This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class CaesarCipher | |
{ | |
String message; | |
int key; | |
Scanner sc = new Scanner(System.in); | |
String encoded = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class CaesarCipher | |
{ | |
String message; | |
int key; | |
Scanner sc = new Scanner(System.in); | |
String encoded = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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--; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Write a description of class RandomOrder here. | |
* | |
* @author (jake landaiche) | |
* @version (a version number or a date) | |
*/ | |
import java.util.*; | |
public class RandomOrder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Write a description of class FactorialRunner here. | |
* | |
* @author Jake Landaiche | |
* @version 10/10/18 | |
*/ | |
import java.util.*; | |
public class FactorialRunner | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Write a description of class Factorial here. | |
* | |
* @author jake Landaiche | |
* @version 10/10/18 | |
*/ | |
import java.util.*; |
NewerOlder