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
// node_server.js | |
var db = requre('./db'); | |
app.get('/getTest', function(request, response) { | |
var testId = 1; | |
db.getTest(testId, function (err, data) { | |
// I don't actually know how to send data using express. | |
response.pumpThatShitOut(data); | |
}); |
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
module CLR | |
class MDTable | |
class << self | |
def dump | |
puts @schema | |
end | |
def word(name) | |
@schema << "word #{name};" | |
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
p ->(n) { | |
y = ->(*a, &b) { z = ->(*a) { b.(*a, &z) } } | |
y.() { |f, &b| | |
i, g = f.() | |
i <= n ? [i] + b.(g) : [] | |
}.(y.() { |i, j, &b| -> { [j, b.(j, i + j)] } }.(1, 1)) | |
}.([8877, | |
5745, | |
2197, | |
9747, |
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
RESCUED TYPE A | |
RESCUED TYPE B | |
test_splat_with_rescue.rb:8:in `a': ohhhhh we raised a type C (C) | |
from test_splat_with_rescue.rb:16 |