Skip to content

Instantly share code, notes, and snippets.

#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:
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] = {
<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">
require 'spec_helper'
describe PagesController do
describe "GET 'home' " do
it "should be successful" do
get 'home'
response.should be_success
end
end
.container {
width: 710px;
}
body {
background: #cff;
}
header {
padding-top: 20px;
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);
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++)
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++)
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++)
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();