Skip to content

Instantly share code, notes, and snippets.

name: binary increment
source code: |
# Adds 1 to a binary number.
input: '111101111'
blank: '0'
start state: right
table:
# scan to the rightmost digit
right:
0: {R: checkdone}
package org.usfirst.frc.team295.robot;
import com.ctre.CANTalon;
import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;
package org.usfirst.frc.team295.robot;
import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Talon;
package org.usfirst.frc.team295.robot;
import edu.wpi.first.wpilibj.SampleRobot;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Victor;
import edu.wpi.first.wpilibj.VictorSP;
@davidtsong
davidtsong / naut.css
Created July 10, 2015 18:14
Naut for Reddit .css for any subreddit
/*
Version 3.2
Stylesheet by Cryptonaut
Last modified: 01 MAY 2015
Details: This is a custom template made by /u/Cryptonaut.
Find out more on /r/Naut.
--------------------------------------------------------------------------
Just put this entire file into your Stylish Config
-------------------------------------------------------------------------- */

Keybase proof

I hereby claim:

  • I am davidthesong on github.
  • I am davidsong (https://keybase.io/davidsong) on keybase.
  • I have a public key whose fingerprint is E420 A145 798A C8A7 3833 6313 F8C7 5505 330D F700

To claim this, I am signing this object:

@davidtsong
davidtsong / db.json
Created January 25, 2015 07:22
The json format standard for my application.
{
"users":{
"akash":{
"age": 18,
"status": true,
"location":{
"long": 123,
"lat": 123
},
"email":"scrub@scrubmail.com",
@davidtsong
davidtsong / abstract.java
Created June 3, 2014 02:55
Java Abstract Class
//Abstract concepts in OOP
public abstract class Food()
{
public abstract prepare()
{
}
}
@davidtsong
davidtsong / interface.java
Created June 3, 2014 02:55
Java Interface
public interface myInterface{
int constant;
String constant2;
void Method()
{
}
int intMethod()
{
@davidtsong
davidtsong / RunnableImplement.java
Created May 26, 2014 21:31
Create a thread by implementing a runnable
public interface Runnable{
public void run();
}
public class MyRunnable() implements Runnable
{
public void run()
{
//Todo Code here
}