Skip to content

Instantly share code, notes, and snippets.


Andrew Muraco amuraco

  • Medical Answering Services
  • Buffalo, NY
View GitHub Profile
amuraco /
Created Oct 31, 2013
Single iteration streaming java solution for This solution is ideal if myIntArray could be very large (i.e. > 1m ints) but with a limited range (i.e. 0-10) I would probably use a stack based solution if the range could be highly variable (0-10m) with the number of ints being relative…
package test;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class PuddleCounter {
public long calculateVolume(int[] myIntArray) {
long total = 0;
int pendingTotals[] = new int[0];
amuraco /
Created Dec 3, 2012
AbstractWrappedJDBC41Connection: JDBC 4.1 Compatibility with JDK 6+
package amuraco;
import java.lang.reflect.Method;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.util.concurrent.Executor;
public abstract class AbstractWrappedJDBC41Connection implements Connection {
You can’t perform that action at this time.