Skip to content

Instantly share code, notes, and snippets.

landjd19

Block or report user

Report or block landjd19

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:27e428fca0f39731032540fe02554c8c
const int ledPin = 13; // LED connected to digital pin 13
const int knockSensor = A0; // the piezo is connected to analog pin 0
const int threshold = 250; // threshold value to decide when the detected sound is a knock or not
// these variables will change:
int sensorReading = 0; // variable to store the value read from the sensor pin
int ledState = LOW; // variable used to store the last LED status, to toggle the light
void setup() {
View gist:1483938ea7e26889eceeaa411f85cccc
import java.util.*;
public class BinaryConvert
{
Scanner sc = new Scanner(System.in);
public BinaryConvert(){
System.out.println("Press 1 to convert decimal to binary, press 2 to do the opposite.");
int which = sc.nextInt();
View gist:6f5c7b26258e9ac57488282210ea749e
import java.util.*;
public class CaesarCipher
{
String message;
int key;
Scanner sc = new Scanner(System.in);
String encoded = "";
View gist:26cae157060f08d4ce3a90ca19471e98
import java.util.*;
public class CaesarCipher
{
String message;
int key;
Scanner sc = new Scanner(System.in);
String encoded = "";
View gist:57e0cbbf307a9d6aecfcf60bd88e1cc5
public class intSort
{
public intSort(){
int[] primes = new int[10];
for(int i=0;i<=9;i++){
int newNum = (int)((Math.random() * 1000) + 1);
if(isAPrime(newNum)){
primes[i] = newNum;
}else{
i--;
View gist:54e25b58fce544dc1909409b6af6abb6
char letter;
String sym = "";
String words = "";
String lines = "";
float linePlace = -150;
ArrayList<String> priceList = new ArrayList<String>();
String placeHolder = "";
int spot = 0;
int which = 0;
//In draw method
View gist:aa0a768692c67f355ff85259f851fe23
/**
* Write a description of class RandomOrder here.
*
* @author (jake landaiche)
* @version (a version number or a date)
*/
import java.util.*;
public class RandomOrder
View gist:32d73b3af61eeb54f1aad6b22c36a2e7
/**
* A program to carry on conversations with a human user.
* This is the initial version that:
* <ul><li>
* Uses indexOf to find strings
* </li><li>
* Handles responding to simple words and phrases
* </li></ul>
* This version uses a nested if to handle default responses.
* @author Jake Landaiche
View gist:7e90ef3c33f7c54d7f11df0bd2b06f27
/**
* Write a description of class FactorialRunner here.
*
* @author Jake Landaiche
* @version 10/10/18
*/
import java.util.*;
public class FactorialRunner
{
View gist:9d5f586169289da5809752ca208ddbff
/**
* Write a description of class Factorial here.
*
* @author jake Landaiche
* @version 10/10/18
*/
import java.util.*;
You can’t perform that action at this time.