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
#include <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
#define PIN 6 | |
// Parameter 1 = number of pixels in strip | |
// Parameter 2 = Arduino pin number (most are valid) | |
// Parameter 3 = pixel type flags, add together as needed: |
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
def decodeSingleByteXOR(cipherText: String, char: Char): String = { | |
val cipherTextByteArray = decodeHex(cipherText) | |
new String(cipherTextByteArray.zip(Array.fill(cipherTextByteArray.length)(char)).map((t) => t._2 ^ t._1).map(_.toByte), "UTF-8") | |
} | |
def bruteForceSingleByteXOR(cipherText: String): Array[String] = { | |
(('A' to 'Z') ++ ('a' to 'z') ++ ('0' to '9')).toArray.map(decodeSingleByteXOR(cipherText,_)) | |
} | |
def decodeHex(hex: String): Array[Byte] = { |
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
<pcsTable> | |
<axis pos="1" values="1"> | |
<title>Section</title> | |
<label code="0">Medical and Surgical</label> | |
</axis> | |
<axis pos="2" values="1"> | |
<title>Body System</title> | |
<label code="0">Central Nervous System</label> | |
</axis> | |
<axis pos="3" values="1"> |
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
require 'spec_helper' | |
describe PagesController do | |
describe "GET 'home' " do | |
it "should be successful" do | |
get 'home' | |
response.should be_success | |
end | |
end |
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
.container { | |
width: 710px; | |
} | |
body { | |
background: #cff; | |
} | |
header { | |
padding-top: 20px; |
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.Scanner; | |
public class Card{ | |
private static String[] pairArray={"A,A","K,K","Q,Q","J,J","10,10","9,9","8,8","7,7","6,6","5,5","4,4","3,3","2,2"}; | |
public static void generateRandom(int i){ | |
int minimum = 0; | |
int maximum = 13; | |
int randomNum = minimum + (int)(Math.random()* maximum); |
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.Scanner; | |
public class Card{ | |
private static String[] pairArray={"A,A","K,K","Q,Q","J,J","10,10","9,9","8,8","7,7","6,6","5,5","4,4","3,3","2,2"}; | |
public static void generateRandom(int k){ | |
int minimum = 0; | |
int maximum = 13; | |
for(int i = 1; i <= k; 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
import java.util.Scanner; | |
public class Card{ | |
private static String[] pairArray={"A,A","K,K","Q,Q","J,J","10,10","9,9","8,8","7,7","6,6","5,5","4,4","3,3","2,2"}; | |
public static void generateRandom(int i){ | |
int minimum = 0; | |
int maximum = 13; | |
for(int i = 1; i <= m; 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
import java.util.Scanner; | |
public class Card{ | |
private static String[] pairArray={"A,A","K,K","Q,Q","J,J","10,10","9,9","8,8","7,7","6,6","5,5","4,4","3,3","2,2"}; | |
public static void generateRandom(int k){ | |
int minimum = 0; | |
int maximum = 13; | |
for(int i = 1; i <= k; 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
import java.util.Random; | |
import java.util.Scanner; | |
public class Easy4 { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); | |
System.out.println("How long would you like your password to be?"); | |
int length = in.nextInt(); |