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
grammar Where | |
rule expression | |
'(' space expression space ')' / conjoined | |
end | |
rule conjoined | |
primary space conjunction space expression / primary | |
end | |
rule conjunction |
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
class MyClass { | |
obj *parent; | |
MyClass(obj &parent) { | |
this->parent = parent; | |
} | |
~MyClass() { | |
delete parent; | |
} |
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 'rubygems' | |
require 'socket' | |
require 'thread' | |
require 'uuidtools' | |
class Peer | |
attr_accessor :host, :port | |
def initialize(host, port) | |
@host = host |
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
- [F] aws-s3 = 0.5.1 | |
- [F] xml-simple | |
- [I] builder | |
- [F] mime-types | |
- [F] xml-simple = 1.0.11 | |
- [F] choice = 0.1.2 | |
- [F] cssmin = 1.0.0 | |
- [F] daemons = 1.0.10 | |
- [F] Linguistics = 1.0.5 | |
- [F] mechanize = 0.7.6 |
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
function loadImage(type:String, name:String, src:String) { | |
var loader = new Loader(); | |
function onLoadComplete(event:Event):void { | |
var thumbnail:Sprite = new Sprite(); | |
thumbnail.addChild(loader); | |
//thumbnail.width = 100; | |
//thumbnail.height = 100; | |
thumbnail.x = 150; | |
thumbnail.y = 150; |
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 'thread' | |
queue = Queue.new | |
consumer = Thread.new do | |
value = queue.pop | |
end | |
consumer.join |
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 'benchmark' | |
size = 1048576 | |
data = [] | |
genders = ['male', 'female'] | |
size.times do | |
data << [genders[rand * 2]] | |
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
0, (*, *, *), (*, *, *), -1, 9.0 | |
5, (*, P1, *), (*, P1, *), 0, 7.5 | |
10, (S1, *, s), (*, *, s), 0, 9.0 | |
1, (S1, *, s), (S1, *, *), 0, 9.0 | |
7, (S1, P1, s), (*, P1, s), 5, 6.0 | |
2, (S1, P1, s), (S1, P1, s), 1, 6.0 | |
8, (S1, P2, s), (*, P2, *), 0, 12.0 | |
3, (S1, P2, s), (S1, P2, s), 1, 12.0 | |
4, (S2, P1, f), (S2, *, *), 0, 9.0 | |
9, (S2, P1, f), (*, *, f), 0, 9.0 |
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
JFerguson:website joshferguson$ rake gems --trace | |
(in /Users/joshferguson/Rupture/website) | |
** Invoke gems (first_time) | |
** Invoke gems:base (first_time) | |
** Execute gems:base | |
** Invoke environment (first_time) | |
** Execute environment | |
rake aborted! | |
can't activate highline (= 1.4.0, runtime), already activated highline-1.5.0 | |
/Library/Ruby/Site/1.8/rubygems.rb:149:in `activate' |
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
# find( | |
# :select => 'DISTINCT identity_providers.*', | |
# :joins => [:datasources], | |
# :conditions => 'datasources.pull' | |
# ) | |
SELECT DISTINCT identity_providers.* | |
FROM identity_providers | |
INNER JOIN datasources | |
ON identity_providers.id = datasources.identity_provider_id |