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 static java.lang.Math.*; | |
public class Kepler | |
{ | |
public static class Point2d | |
{ | |
public double x; | |
public double y; | |
public Point2d(double x, double y) |
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.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.HashMap; | |
public class CountCharFrequency { | |
private static final int ASCII_LC_ALPHA_OFFSET = 97; | |
private static final int NUM_ASCII_CHARS = 26; | |
private static final char[] extra = new char[] { 'ä', 'ö', 'ü', 'ß' }; |
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 static java.lang.Math.*; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
import java.awt.Image; | |
import java.awt.Point; | |
import java.awt.image.BufferedImage; | |
import javax.swing.ImageIcon; | |
import javax.swing.JFrame; |
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
aptitude install git-core build-essential autoconf libdigest-sha1-perl liberror-perl libsvn-perl | |
git clone git://git.kernel.org/pub/scm/git/git.git | |
cd git | |
make configure | |
./configure | |
make | |
aptitude purge git-core | |
make install |
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
RevWalk rw = new RevWalk(repo); | |
RevCommit rev = rw.parseCommit(repo.resolve("HEAD")); | |
RevTree rt = rev.getTree(); | |
TreeWalk tw = new TreeWalk(repo); | |
tw.addTree(rt); | |
tw.setRecursive(true); | |
while (tw.next()) { | |
System.out.println(tw.getPathString()); |
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
// this is a helper for the curry function which does partial | |
// function application; given the function fn, an optional scope | |
// self and a variable number of arguments this function returns | |
// a new function which is bound to self with all arguments applied. | |
// example: | |
// function add(a, b) { | |
// return a + b; | |
// } | |
// var inc = partial(add, null, 1); | |
// assert(inc(4) == 5); |
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 System.Environment | |
import System.Directory | |
import Control.Monad | |
import Database.HDBC | |
import Database.HDBC.Sqlite3 | |
import Data.Time.Calendar | |
import Data.Time.Clock | |
import Data.Time.Format | |
import System.Locale | |
import Text.Printf |
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.awt.Color; | |
import java.awt.Component; | |
import java.awt.Graphics; | |
import java.awt.Rectangle; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.util.Collections; | |
import java.util.Enumeration; | |
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
import java.awt.Color; | |
import java.awt.Component; | |
import java.awt.Graphics; | |
import java.awt.Rectangle; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import javax.swing.DefaultRowSorter; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; |
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.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import javax.jms.Connection; | |
import javax.jms.DeliveryMode; | |
import javax.jms.Destination; | |
import javax.jms.JMSException; | |
import javax.jms.Message; | |
import javax.jms.MessageConsumer; | |
import javax.jms.MessageListener; |
OlderNewer