Skip to content

Instantly share code, notes, and snippets.

View PrabhatKJena's full-sized avatar

Prabhat Kumar PrabhatKJena

  • Paypal
  • Bangalore, India
View GitHub Profile
@PrabhatKJena
PrabhatKJena / ReactiveResource.java
Last active February 27, 2024 12:28
Reactive Implementation demo
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");
@PrabhatKJena
PrabhatKJena / PublisherSubscriberTest.java
Created January 25, 2018 03:25
Publisher-Subscriber Thread Implementation
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 {
@PrabhatKJena
PrabhatKJena / git-diff-spreadsheet.md
Last active June 25, 2023 03:05
How to git diff for MS-Excel files(xls/xlsx) on Mac-OS

How to git diff for MS-Excel files(xls/xlsx) on Mac-OS

Installation

Prerequisites

  • 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
@PrabhatKJena
PrabhatKJena / git-diff-excel.md
Created April 12, 2017 08:48 — forked from hkuno9000/git-diff-excel.md
How to git diff for MS-Excel files(xls/xlsx) on Windows-OS

How to git diff for MS-Excel files(xls/xlsx) on Windows-OS

  1. Download the xdoc2txt tool from: http://ebstudio.info/home/xdoc2txt.html#download
  2. extract "xdoc2txt.exe" and locate it on your PATH folder
  3. edit your gitattributes as A:
  4. edit your gitconfig as B:

A: append following texts to "~/.config/git/attributes" or ".git/info/attributes"

*.xls	diff=xdoc2txt
@PrabhatKJena
PrabhatKJena / introrx.md
Created January 23, 2017 07:30 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
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: