Skip to content

Instantly share code, notes, and snippets.

View WilliamHester's full-sized avatar

William Hester WilliamHester

View GitHub Profile
@WilliamHester
WilliamHester / LotteryNumbers.java
Created January 11, 2016 00:10
LotteryNumbers.java
import java.math.*;
import java.util.*;
import java.security.*;
public class LotteryNumbers {
public static void main(String[] args) {
SecureRandom random = new SecureRandom();
byte[] bytes = new byte[1];
TreeSet<Integer> ints = new TreeSet<>();
import java.util.*;
public class TwoHundred {
public static final String[] ONES = new String[]{"",
"ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX",
"SEVEN", "EIGHT", "NINE"};
public static final String[] TEENS = new String[]{"TEN",
"ELEVEN", "TWELVE", "THIRTEEN", "FOURTEEN",
package main
import (
"fmt"
"os"
"os/exec"
"strings"
"time"
"bufio"
)
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
int main(int argc, char const *argv[])
{
/*Develop Variables*/
FILE *inp; /*file pointer*/
int status; /*fscanf feed back*/
#include <stdio.h>
#include <string.h>
#define EXIT_SUCCESS (0)
int main(int argc, char const *argv[])
{
/*Develop Variables*/
FILE *inp; /*file pointer*/
int status; /*fscanf feed back*/
package me.williamhester.tools;
import android.graphics.Color;
import android.graphics.Typeface;
import android.support.annotation.NonNull;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.style.BulletSpan;
import android.text.style.QuoteSpan;
import android.text.style.StrikethroughSpan;
#include <Adafruit_NeoPixel.h>
#define PIN 1
const int buttonPin = 2;
const int pot1Pin = 3;
const int pot2Pin = 4;
int buttonState = 0;
int pot1Val = 0; // color select
int pot2Val = 0; // pulse speed select
int r = 0;
int g = 0;
package main
import "fmt"
func main() {
var n, m int
for fmt.Scanln(&n, &m); n > 0; fmt.Scanln(&n, &m) {
names := make([]string, 0, n)
cmap := make(map[string][]string)
for i := 0; i < n; i++ {
package main
import "fmt"
func main() {
var n int
var m int
for fmt.Scanln(&n, &m); n > 0; fmt.Scanln(&n, &m) {
names := make([]string, 0, 100000)
cmap := make(map[string][]string)
@WilliamHester
WilliamHester / politics.go
Created September 23, 2014 03:47
Politics
package main
import "fmt"
func main() {
var n int
var m int
for fmt.Scanln(&n, &m); n > 0; fmt.Scanln(&n, &m) {
names := make([]string, 0, 100000)
cmap := make(map[string][]string)