Skip to content

Instantly share code, notes, and snippets.

#include "Tlc5940.h"
int delayTime = 1;
int analogPin[8] = {
A0, A1, A2, A3, A4, A5, 2, 1};
char cmd;
int edgeLength = 2;
int layMin = 3;
@boxysean
boxysean / cameras.csv
Created June 26, 2013 14:49
Script used to capture stills from ITP cameras. When added to a crontab, it can be run as often as you'd like!
lobby http://128.122.151.22/mjpg/video.mjpg
classroom20closeup http://128.122.151.188/mjpg/video.mjpg
jroom http://128.122.151.200/mjpg/video.mjpg
shop http://128.122.151.221/mjpg/video.mjpg
classroom20 http://128.122.151.227/mjpg/video.mjpg
@boxysean
boxysean / BitmaskDemo.java
Created July 11, 2013 16:07
Demonstration files csci-ua.0380-001 Class 02 Data Structures
package class02;
import java.util.Stack;
//note: for example usage of BitSet, see ch5_06_primes.java
class BitmaskDemo {
private static int setBit(int S, int j) { return S | (1 << j); }
private static int isOn(int S, int j) { return S & (1 << j); }
@boxysean
boxysean / A.java
Created July 12, 2013 19:57
Class 02 solutions
import java.util.PriorityQueue;
import java.util.Scanner;
public class A {
public static void main(String[] args) throws Exception {
Scanner in = new Scanner(System.in);
while (true) {
@boxysean
boxysean / Main.java
Created July 12, 2013 20:48
Solution to UVA 10420
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Map;
import java.util.TreeMap;
public class Main {
public static void main(String args[]) throws Exception {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
@boxysean
boxysean / A.java
Last active December 19, 2015 20:29
Class 03 solutions
import java.util.Scanner;
public class A {
public static String binaryString(int x, int n) {
StringBuilder sb = new StringBuilder();
sb.append(Integer.toString(x, 2));
@boxysean
boxysean / Main10041VitosFamily.java
Last active December 19, 2015 23:09
Class 04 - Complete Search contest
package class04;
import java.util.Scanner;
// 10041 Vito's Family
// TLE on UVa but this should be the answer...
public class Main10041VitosFamily {
public static void main(String[] args) throws Exception {
Scanner in = new Scanner(System.in);
@boxysean
boxysean / Main00357LetMeCountTheWaysTopDown.java
Last active December 20, 2015 06:18
Class06 - Dynamic Programming
package class06;
import java.util.Arrays;
import java.util.Scanner;
// 357 Let Me Count The Ways
// TLE on UVa
public class Main00357LetMeCountTheWaysTopDown {
public static void main(String[] args) throws Exception {
@boxysean
boxysean / Main.java
Created August 1, 2013 22:27
Bowen Yu's solution to UVa 10261 - Ferry Loading
import java.io.*;
import java.util.*;
public class Main {
public static void main(String args[]) throws Exception {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
//BufferedReader in = new BufferedReader(new FileReader("input")); // for local testing from input file
@boxysean
boxysean / Main00673Parenthesis.java
Last active December 20, 2015 14:09
Class 08 - Dynamic Programming, Bottom-Up
package class08;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Stack;
// Parenthesis 00673
public class Main00673Parenthesis {
public static void main(String[] args) throws Exception {