Skip to content

Instantly share code, notes, and snippets.

@boxysean
boxysean / gist:6884552
Created October 8, 2013 13:22
Trying to make an Arduino blink sketch for the Universal LED Driver
int clockPin = 2;
int dataPin = 3;
void setup() {
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
pinMode(13, OUTPUT);
}
void loop() {
@boxysean
boxysean / gist:6441636
Created September 4, 2013 19:24
cordova exception
boxysean@boxysean-ubook:~/workspace/BikeFIRMA-mobile$ cordova --verbose ripple android
Wrote out Android application name to "BikeFIRMA"
Wrote out Android package name to "com.dash7design.bikefirma"
Error: Invalid listen argument:
at Server.listen (net.js:1098:13)
at Function.app.listen (/usr/local/lib/node_modules/cordova/node_modules/ripple-emulator/node_modules/express/lib/application.js:533:24)
at Object.module.exports.start (/usr/local/lib/node_modules/cordova/node_modules/ripple-emulator/lib/server/index.js:33:13)
at Object.module.exports.start (/usr/local/lib/node_modules/cordova/node_modules/ripple-emulator/lib/server/emulate.js:31:26)
at /usr/local/lib/node_modules/cordova/src/ripple.js:27:24
at /usr/local/lib/node_modules/cordova/src/serve.js:130:9
@boxysean
boxysean / Main00441.java
Created August 9, 2013 17:13
Lotto UVa 441
package homework04;
import java.util.Arrays;
import java.util.Scanner;
import java.util.Stack;
// 441 Lotto
public class Main00441 {
public static void main(String[] args) throws Exception {
package class09;
import java.io.BufferedReader;
import java.io.InputStreamReader;
// UVa 352 - The Seasonal War
public class Main00352TheSeasonalWar {
public static void main(String[] args) throws Exception {
new Main00352TheSeasonalWar().execute();
@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 {
@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 / 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 / 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 / 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 / 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));