View TryPerf.java
public class TryPerf {
private static int foo(int a) {
return a * 2;
}
private static int tryFinally(int a) {
try {
return a * 2;
} finally {
View FormatterExercise.java
import java.util.Formatter;
public class FormatterExercise {
private static int n = 1_000_000;
public static void main(String[] args) throws InterruptedException {
long before = System.nanoTime();
str();
long after = System.nanoTime();
System.out.println((after - before)/1_000_000);
View selftar.sh
#!/bin/sh
if [ $# -eq 0 ]; then
echo "This script creates self extractable executable"
echo Usage: $0 TAR.GZ [COMMAND]
exit;
fi
if [ $# -gt 0 ]; then
TAR_FILE=$1
View CQLTest
import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.ResultSetFuture;
import com.datastax.driver.core.Session;
import com.google.common.util.concurrent.Futures;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Collection;
public class CQLTest {