Skip to content

Instantly share code, notes, and snippets.

View madhub's full-sized avatar

madhub

View GitHub Profile
@madhub
madhub / Usefull online resource
Created November 27, 2014 04:29
Usefull online resource
HTTP API Design Guidelines https://github.com/interagent/http-api-design
Linux System Call quick reference http://www.digilife.be/quickreferences/qrc/linux%20system%20call%20quick%20reference.pdf
Team leadership skills http://programmers.stackexchange.com/questions/191103/what-skills-should-i-cultivate-to-become-a-development-technical-lead
@madhub
madhub / jdk8
Created November 30, 2014 15:01
http://www.codeproject.com/Articles/848137/Java-SE-new-features-tour-Traversing-filtering-pro
http://www.codejava.net/books/top-7-java-8-books-in-2014
https://speakerdeck.com/adamd/hello-java-8
https://speakerdeck.com/bjpbakker/whats-new-in-java-8
http://www.techempower.com/blog/2013/03/26/everything-about-java-8/
http://underscoreconsulting.com/blog/posts/2014/06/05/lambda.html
http://www.slideshare.net/Soddino/trung-nguyen-java-8-features?related=2
http://www.slideshare.net/martintoshev/new-features-injdk8
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package demo;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package demo;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package demo;
import java.util.Arrays;
import java.util.List;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package demo;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
@madhub
madhub / FxTest.java
Last active August 29, 2015 14:17
UsingFXCollections
import javafx.collections.FXCollections;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
@madhub
madhub / DemoClass.java
Created March 15, 2015 16:12
Jdk8 AdderTest
/**
* Created by madhub_2 on 3/15/2015.
*/
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplication1;
public class LambdaDemo {
public static void withLock(ReentrantLock lock, Runnable run) {
if(lock == null || run == null){
throw new IllegalArgumentException("lock or run must not be null.");
}
lock.lock();
try {
run.run();
} finally {
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.LongAdder;
public class LongAdderDemo {
public static void main(String[] args) throws InterruptedException {
Thread[] threads = new Thread[1000];
long start;