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 Compress | |
{ | |
public static final int BYTE_MORE = 0x80; | |
public static final int BYTE_SIGN = 0x40; | |
public static final int BYTE_NULL = 0x20; |
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 interface Reflect<T> | |
{ | |
public T get(ByteBuffer in); | |
public void getAndSet(ByteBuffer in, Object obj, Field field) throws IllegalAccessException; | |
public void put(ByteBuffer out, T v); | |
public int sizeOf(T v); | |
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 abstract class Blend | |
{ | |
public static final Blend Alpha = new Blend() | |
{ | |
public int blend( int o, int n ) | |
{ | |
return Color.mixRGB( o, n, Color.alpha( n ), Color.alpha( o ) ); | |
} | |
}; |
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 Prime | |
{ | |
/* BEGIN TEST */ | |
public static void main( String[] args ) | |
{ | |
Prime p = new Prime( 100000 ); | |
// Load 100,000 primes into cache | |
long t0 = System.nanoTime(); |
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 LinkedList<T> implements Iterable<T> | |
{ | |
public LinkedNode<T> head = new LinkedNode<T>( this ); | |
private int size = 0; | |
public final LinkedNode<T> add( T value ) | |
{ | |
return new LinkedNode<T>( value ).prepend( head ); | |
} |
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.axe.sandbox.gs; | |
import java.io.InputStream; | |
import java.nio.ByteBuffer; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.lwjgl.BufferUtils; | |
import org.lwjgl.input.Keyboard; | |
import org.lwjgl.opengl.ARBBufferObject; |
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 SetOperations | |
{ | |
//=========================================================================== | |
// A set is an immutable group of unique numbers ordered from smallest to | |
// largest. The values in the set must be ordered for all set operations to | |
// function properly, so don't manually change/re-order these! | |
//=========================================================================== | |
class Set { | |
// The ordered set of numbers. |
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.Arrays; | |
import java.util.Collection; | |
import java.util.Comparator; | |
import java.util.Iterator; | |
public class Array<T> implements Iterable<T> | |
{ | |
public T[] elements; | |
public int 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
import java.util.ArrayList; | |
//Saving Maze as Monochrome Bitmap | |
import java.io.*; | |
import java.awt.Color; | |
import java.awt.image.BufferedImage; | |
import javax.imageio.ImageIO; | |
import java.io.IOException; | |
// __ _ ___ _____ _____ ______ _ __ _____ | |
// / | / | / |/ ___// ___/__ __/| | / // ___/ |
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 DriveYaNuts | |
{ | |
public static void main(String[] args) { | |
new DriveYaNuts(); | |
} | |
/** | |
* BOARD POSITIONS | |
* | |
* _-1-_ |
OlderNewer