Skip to content

Instantly share code, notes, and snippets.

Jim Driscoll netdance

Block or report user

Report or block netdance

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am netdance on github.
  • I am netdance (https://keybase.io/netdance) on keybase.
  • I have a public key whose fingerprint is CFC9 CBE6 E5D6 76EA 9A26 17AF B6ED A125 0E60 685D

To claim this, I am signing this object:

@netdance
netdance / TestBacon.java
Created Jan 11, 2014
Find Bacon Numbers with JDK 8.
View TestBacon.java
package testbacon;
import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@netdance
netdance / TestLargestArray.java
Created Jan 4, 2014
JDK 8 CompletableFuture and Stream example to get the largest subarray sum.
View TestLargestArray.java
package testlargestarray;
import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
import java.util.stream.*;
/*
Problem: Given a list of random numbers, both positive and negative, find the
largest sum of a sublist.
@netdance
netdance / TestSortedListStreams.java
Created Jan 3, 2014
Various Java methods to create one sorted list from two sorted lists
View TestSortedListStreams.java
package testsortedliststreams;
import java.util.*;
import java.util.stream.*;
/*
Sample output on late-2013 MacBook Pro:
Starting Naive List Sort, via Collections
Total number of sorted values: 40000000
@netdance
netdance / TestPalindrome.java
Created Jan 3, 2014
Writing a palindrome program with Java 8 Streams and Method Expressions
View TestPalindrome.java
package testpalindrome;
import java.nio.file.*;
import java.util.stream.Stream;
public class TestPalindrome {
// system dependant path of dictionary - this is where it is on Mac
private static final String dictpath = "/usr/share/dict/words";
You can’t perform that action at this time.