Skip to content

Instantly share code, notes, and snippets.

View arwagner's full-sized avatar

Andrew Wagner arwagner

  • Northern Virginia
View GitHub Profile
Device Identifier: disk2
Device Node: /dev/disk2
Whole: Yes
Part of Whole: disk2
Device / Media Name: SD Card Reader
Volume Name: Not applicable (no file system)
Mounted: Not applicable (no file system)
File System: None
console.log(process.argv);
if (process.argv.length != 7){
console.log("Usage: node challenge.js <timestamp> <status> <challenger> <challengee> <comment>");
process.exit();
}
var data = [process.argv[2], process.argv[3], process.argv[4], process.argv[5], process.argv[6]]
var spreadsheet = require('./spreadsheet');
void printOwning(double amount) {
printBanner();
//print details
System.out.println("name:" + _name);
System.out.println("amount:" + amount);
}
///////////////////////////
@arwagner
arwagner / Main.java
Created October 20, 2015 23:58
Something I'm not understanding about resizing labels
package com.andrewwagner.chess.study;
import java.awt.Image;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'foobarService' defined in file [/Users/wagnera/workspace/j+hs/onboard/onboardservices/target/classes/com/agilex/onboardservices/services/FoobarService.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanInitializationException: Property 'text' is required for bean 'foobarService'
class Article < ActiveRecord::Base
scope :published, where(:published => true)
scope :in_order, order('published_at desc')
end
pedestal git:(master) pwd
//Users/andrewwagner/workspace/clojure/pedestal
➜ pedestal git:(master) lein classpath
/Users/andrewwagner/workspace/clojure/pedestal/test:/Users/andrewwagner/workspace/clojure/pedestal/src:/Users/andrewwagner/workspace/clojure/pedestal/dev-resources:/Users/andrewwagner/workspace/clojure/pedestal/resources:/Users/andrewwagner/workspace/clojure/pedestal/target/classes
➜ pedestal git:(master)
def foo obj
obj.bar(1)
obj.bar(2)
end
describe "foo" do
it "calls bar on obj" do
obj = stub
obj.should_receive(:bar).with(2)
foo obj
(defrecord Hashtable [hash-function data])
(defn create-hashtable [f]
(Hashtable. f {}))
(defn contains? [ht item]
(let [map (:data ht)
key ((:hash-function ht) item)]
(map key)))
#!/usr/bin/env ruby
i = 0
moves = ["a7a6","a6a5","a5a4","a4a3"]
ARGF.each do |command|
if command.start_with?("protover")
$stdout.puts "feature ping=0 setboard=1 ics=1 usermove=1"
elsif command.start_with?("usermove")
$stdout.puts "move #{moves[i]}"
i+=1