- Requires Java 1.6 or higher.
- Assumes Java is added to PATH (to check open a cmd and run java -version)
- No other platform specific requirements
- A shell script and a bat script are packaged
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.util.Random; | |
import java.util.function.Consumer; | |
class ReactiveImplDemo { | |
public static void main(String[] args) throws IOException { | |
System.out.println("Start"); | |
ReactiveSource.getIntFlux(20).subscribe(x -> System.out.println("Subscriber 1 received int: " + x)); | |
ReactiveSource.getIntFlux(12).subscribe(x -> System.out.println(" Subscriber 2 received int: " + x)); | |
System.out.println("End. Press any key to continue"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package edu.pk.java.test; | |
import java.util.Random; | |
import java.util.concurrent.ArrayBlockingQueue; | |
import java.util.concurrent.BlockingQueue; | |
import java.util.concurrent.TimeUnit; | |
import static edu.pk.java.test.PublisherSubscriberTest.*; | |
public class PublisherSubscriberTest { |
- Download the xdoc2txt tool from: http://ebstudio.info/home/xdoc2txt.html#download
- extract "xdoc2txt.exe" and locate it on your PATH folder
- edit your gitattributes as A:
- edit your gitconfig as B:
*.xls diff=xdoc2txt
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Blackjack is a popular card game played against a Dealer. In this card game the Player is trying to beat the Dealer. | |
Deck: | |
The game is played with 4 or more decks containing 52 distinct cards in each (Face values : A, 2-9, J, Q and K; Suits : D,C,S,H) | |
The entire deck is shuffled before the start of the game. | |
Beginning: | |
Player and Dealer are initially dealt 2 cards each. Only one of the Dealer's cards is visible to the Player, the other is hidden. All the cards of the Player are visible to everyone at all times. | |
Turns: |