Skip to content

Instantly share code, notes, and snippets.

View everett1992's full-sized avatar

Caleb Everett everett1992

  • Amazon
  • Seattle WA
View GitHub Profile

Percolation

Algorithms Project 1 Caleb Everett TCNJ Fall 2013

This document is a markdown file, and can be found online at https://gist.github.com/everett1992/7257667

This project includes an Ant build file, I've included instructions on how to use ant to build and run the different parts of this project. If you do not have, or do not want to use Ant you should be able to compile using javac, just make sure the jars in ./lib are included in the java classpath.

Rails dev environment setup

I've included instructions on installing ruby, and rails through the ruby version manager (rvm) or creating a copy of a pre configured environment on Amazon EC2.

Installation of ruby and rails with rvm

Detailed instructions can be found here http://rvm.io/rvm/install

Install rvm, the ruby version manager, and rails.

// create N-by-N grid, with all sites blocked
public Percolation(int N) {
// N will be doubled, so if n > sqrt(MAX_INT)
// there would be an overflow.
if (N > MAX_SIZE) {
throw new RuntimeException(GRID_OVERSIZE_MESSAGE);
}
cells = new boolean[N][N];
@everett1992
everett1992 / gist:6651555
Created September 21, 2013 15:23
build error
[javac] /home/caleb/workspace/percolation/src/stdlib/StdDraw3D.java:35: error: package javax.vecmath does not exist
[javac] import javax.vecmath.*;
[javac] ^
[javac] /home/caleb/workspace/percolation/src/stdlib/StdDraw3D.java:36: error: package javax.media.j3d does not exist
[javac] import javax.media.j3d.*;
[javac] ^
[javac] /home/caleb/workspace/percolation/src/stdlib/StdDraw3D.java:37: error: package com.sun.j3d.utils.image does not exist
[javac] import com.sun.j3d.utils.image.*;
[javac] ^
[javac] /home/caleb/workspace/percolation/src/stdlib/StdDraw3D.java:38: error: package com.sun.j3d.utils.geometry does not exist
@everett1992
everett1992 / Diplomacy.md
Created April 27, 2013 00:07
Abridged rules of Diplomacy.

Diplomacy Rules

Winning

If one player controls 18 or more supply centers the game ends. If all remaining players agree to peace they all win.

Turn Sequence

Turns alternate between Spring and Fall, starting with spring 1901.

@everett1992
everett1992 / SystemInformation.md
Last active December 16, 2015 08:29
System information for Steam for Linux bug reports

System Information

Processor Information:
    Vendor:  GenuineIntel
    Speed: 3401 Mhz
    4 logical processors
    4 physical processors
    HyperThreading:  Unsupported
    FCMOV:  Supported
    SSE2:  Supported
# I have this
resources :dwellings do
resources :invites
end
# there is no
# /invites
# invite_path(invite) doesn't work, I have to do dwelling_invite_path(invite.dwelling, invite)
# should't rails do some magic here?