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 graph; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.Queue; | |
import java.util.Stack; | |
/** | |
* @author Bazlur Rahman Rokon | |
* @since 12/27/16. |
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 ca.bazlur.concurrency101; | |
import com.sun.net.httpserver.HttpExchange; | |
import com.sun.net.httpserver.HttpHandler; | |
import com.sun.net.httpserver.HttpServer; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.net.InetSocketAddress; | |
import java.net.ServerSocket; |
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 ca.bazlur.concurrency101; | |
import java.util.Random; | |
import java.util.concurrent.CyclicBarrier; | |
import java.util.concurrent.TimeUnit; | |
import java.util.stream.IntStream; | |
public class CyclicBarrierDemo { | |
public static void main(String[] args) throws InterruptedException { | |
final int numberOfPortfolios = 3; |
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 ca.bazlur; | |
public class JavaRocksPrinter { | |
private final int times; | |
public JavaRocksPrinter(int times) { | |
this.times = times; | |
} | |
public void printJava(Runnable action) { |
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 oop.filesystem; | |
import java.util.Set; | |
import java.util.TreeSet; | |
/** | |
* @author Bazlur Rahman Rokon | |
* @since 3/31/17. | |
*/ | |
public class Directory extends Node { |
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
public abstract class SimpleDao<ObjectType, Identity> { | |
private static final Logger log = Logger.getLogger(SimpleDao.class); | |
private DatabaseHelper databaseHelper; | |
protected Dao<ObjectType, Identity> simpleDao; | |
public SimpleDao(DatabaseHelper databaseHelper, Dao<ObjectType, Identity> simpleDao) { | |
this.databaseHelper = databaseHelper; | |
this.simpleDao = simpleDao; | |
} |
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 spy; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import javax.sound.sampled.*; | |
import java.io.*; | |
public class AudioRecorder { | |
private static final Logger LOGGER = LoggerFactory.getLogger(AudioRecorder.class); |
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 com.masterdevskills.stream; | |
import java.math.BigDecimal; | |
import java.util.List; | |
import java.util.function.Supplier; | |
import java.util.stream.IntStream; | |
public class Demo { | |
public static void main(String[] args) { |
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 com.masterdevskills.playground; | |
import java.util.List; | |
import java.util.function.Function; | |
public class BoxingExample { | |
public static void main(String[] args) { | |
long l = System.nanoTime(); | |
for (int i = 0; i < 10_000_000; i++) { | |
heavyLifting(i); |
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 org.jugbd.quiz; | |
import java.util.function.Function; | |
import java.util.stream.Stream; | |
import static org.jugbd.quiz.Coffee.CoffeeDecoratorUsingLambda.getCoffeeWithExtras; | |
@FunctionalInterface | |
public interface Coffee { |
NewerOlder