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
library("ggplot2") | |
> x = c(1:10) | |
> y = c(1:10) | |
> colours = rainbow(10) | |
> size <- c(1,2,3,4,5,5,4,3,2,1) | |
> tt <- data.frame(x=x,y=y,colours=colours,size=size) | |
> tt | |
x y colours size |
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
/** | |
* Uses: | |
* HTMLTableBuilder htmlBuilder = new HTMLTableBuilder(null, true, 2, 3); | |
* htmlBuilder.addTableHeader("1H", "2H", "3H"); | |
* htmlBuilder.addRowValues("1", "2", "3"); | |
* htmlBuilder.addRowValues("4", "5", "6"); | |
* htmlBuilder.addRowValues("9", "8", "7"); | |
* String table = htmlBuilder.build(); | |
* System.out.println(table.toString()); | |
*/ |
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
/** | |
* Use: | |
* | |
* HTMLTableBuilder htmlBuilder = new HTMLTableBuilder(null, true, 2, 3); | |
* htmlBuilder.addTableHeader("1H", "2H", "3H"); | |
* htmlBuilder.addRowValues("1", "2", "3"); | |
* htmlBuilder.addRowValues("4", "5", "6"); | |
* htmlBuilder.addRowValues("9", "8", "7"); | |
* String table = htmlBuilder.build(); |
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 static enum HtmlColor { | |
GREEN, BLUE, RED, BROWN, BLACK | |
} |
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.test; | |
public class TestRunner { | |
// Set the running time here | |
public static long RUNNING_TIME_MIN = 10; | |
class Runnable1 implements Runnable { |
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
/* BTrace Script Template */ | |
import com.sun.btrace.annotations.*; | |
import static com.sun.btrace.BTraceUtils.*; | |
import com.sun.btrace.Profiler; | |
@BTrace | |
public class TracingScript { | |
// Initiate the profiler instance | |
public static Profiler p = com.sun.btrace.BTraceUtils.Profiling.newProfiler(); |
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
import java.text.DecimalFormat; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
/** | |
* Parses longitude or latitude to double | |
*/ | |
public class LongitudeLatitudeUtil { | |
private static String EXPRESSION = "^(?<deg>[-+0-9]+)[^0-9]+(?<min>[0-9]+)[^0-9]+(?<sec>[0-9.,]+)[^0-9.,ENSW]+(?<pos>[ENSW]*)$"; |
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 util.text; | |
import java.io.BufferedReader; | |
import java.io.DataInputStream; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.LinkedHashMap; | |
import java.util.List; |
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
/** | |
* Created on Jan 4, 2012 | |
* @author sbsbsb | |
*/ | |
package util.stopWatch; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.Iterator; | |
import java.util.Map; |