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 org.magnos.path; | |
import static org.junit.Assert.*; | |
import org.junit.Test; | |
public class TestIntlerp | |
{ | |
public class Intlerp |
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 class Shuffle | |
{ | |
public int n; | |
public int[] index; | |
public long seed; | |
public Shuffle( int size ) | |
{ | |
this( System.currentTimeMillis(), 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
public class Veclerp | |
{ | |
public int x, y; | |
private int x_inc, y_inc, dx, dy, error, n; | |
public void start( int x0, int y0, int x1, int y1 ) | |
{ | |
dx = Math.abs( x1 - x0 ); | |
dy = Math.abs( y1 - y0 ); |
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.util.Scanner; | |
public class Elongate | |
{ | |
public static void main( String[] args ) | |
{ | |
Scanner in = new Scanner( System.in ); | |
StringBuilder code = new StringBuilder(); | |
while (in.hasNextLine()) |
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.nio.ByteBuffer; | |
public class Sqrt | |
{ | |
private static float invsqrt0(float x) | |
{ | |
return 1.0f / (float)Math.sqrt( x ); | |
} | |
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 class StringTemplate | |
{ | |
public static final String DEFAULT_START = "{"; | |
public static final String DEFAULT_END = "}"; | |
private String[] chunks; | |
public StringTemplate( String text ) | |
{ |
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 class Wikipedia | |
{ | |
public static class Article implements Serializable { | |
private static final long serialVersionUID = 1L; | |
public int id; | |
public String title; | |
public Set<String> related = new HashSet<String>(); | |
} | |
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.Font; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.RenderingHints; | |
import java.awt.event.MouseEvent; | |
import java.awt.geom.Ellipse2D; | |
import java.awt.geom.Line2D; |
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.Font; | |
import java.awt.Graphics2D; | |
import java.awt.event.KeyEvent; | |
import java.awt.geom.Ellipse2D; | |
import java.awt.geom.Line2D; | |
import java.util.Arrays; | |
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.BasicStroke; | |
import java.awt.Color; | |
import java.awt.Graphics2D; | |
import java.awt.Stroke; | |
import java.awt.event.KeyEvent; | |
import java.awt.geom.Ellipse2D; | |
import java.awt.geom.Line2D; | |
import java.awt.geom.Path2D; | |
import java.awt.geom.Rectangle2D; |