Skip to content

Instantly share code, notes, and snippets.

Brennan Holzer bholzer

View GitHub Profile
View gist:1811143
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();
View gist:2500473
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);
View gist:2500515
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++)
View gist:2500523
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++)
View gist:2500528
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++)
View gist:2707768
.container {
width: 710px;
}
body {
background: #cff;
}
header {
padding-top: 20px;
View gist:2865409
require 'spec_helper'
describe PagesController do
describe "GET 'home' " do
it "should be successful" do
get 'home'
response.should be_success
end
end
View gist:3221982
<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">
View gist:4955633
function getCookies() {
var c = document.cookie, v = 0, cookies = {};
if (document.cookie.match(/^\s*\$Version=(?:"1"|1);\s*(.*)/)) {
c = RegExp.$1;
v = 1;
}
if (v === 0) {
c.split(/[,;]/).map(function(cookie) {
var parts = cookie.split(/=/, 2),
name = decodeURIComponent(parts[0].trimLeft()),
View gist:4955786
javascript:var a=35;var b=["#FF57EB","#FF0000","#CE08FF"];var c=["Arial Black","Arial Narrow","Times","Comic Sans MS"];var c="Fuck you all";var d=0.5;var e=40;var f=20;var g=1;var sn=[];var mb,mr,tmr;var is=0;var xm=[];var crds=[];var lr=[];var browserinfos=navigator.userAgent;var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/);var ns6=document.getElementById&&!document.all;var op=browserinfos.match(/Opera/);var browserok=ie5||ns6||op;function rm(range){rand=Math.floor(range*Math.random());return rand;}
function go(){if(ie5||op){mb=document.body.clientHeight;mr=document.body.clientWidth;}else if(ns6){mb=window.innerHeight;mr=window.innerWidth;}var ssr=e-f;
for(i=0;i<=a;i++){crds[i]=0;lr[i]=Math.random()*15;xm[i]=0.03+Math.random()/10;sn[i]=document.getElementById("s"+i);sn[i].style.fontFamily=c[rm(c.length)];sn[i].size=rm(ssr)+f;sn[i].style.fontSize=sn[i].size;sn[i].style.color=b[rm(b.length)];sn[i].sink=d*sn[i].size/5;if(g==1){sn[i].posx=rm(mr-sn[i].size)}if(g==2){sn[i].posx=rm(mr/2-s
You can’t perform that action at this time.