This file contains hidden or 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
/* Implementation by Jesse Phelps & Tomasz Mozolewski */ | |
DECLARE @maxGen int | |
set @maxgen = (select MAX(generation) from Cells) | |
--insert into cells | |
;WITH cte AS | |
( |
This file contains hidden or 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
(= [[:top :left] [:top :middle] [:top :right] | |
[:middle :left] [:middle :middle] [:middle :right] | |
[:bottom :left] [:bottom :middle] [:bottom :right]] | |
(for [row [:top :middle :bottom] column [:left :middle :right]] | |
[row column]))) |
This file contains hidden or 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
[:top, :middle, :bottom].product [:left, :middle, :right] | |
# produces | |
[[:top, :left], [:top, :middle], [:top, :right], | |
[:middle, :left], [:middle, :middle], [:middle, :right], | |
[:bottom, :left], [:bottom, :middle], [:bottom, :right]] |
This file contains hidden or 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
def run_it | |
system('sh run.sh') | |
end | |
run_it | |
watch( 'src/koans/.*\.clj' ) { run_it } |
This file contains hidden or 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
def js_command(command) | |
"-e 'do JavaScript \"#{command}\" in first document'" | |
end | |
def reload | |
js_command("window.location.reload();") | |
end | |
def scroll | |
js_command("window.scrollTo(0, document.body.scrollHeight);") |
This file contains hidden or 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
def run | |
system("clear;rake") | |
end | |
run | |
watch("koans/\.*\.rb") { run } | |
This file contains hidden or 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
(1..100).each do |num| | |
out = num % 3 == 0 ? 'Fizz' : '' | |
out << 'Buzz' if num % 5 == 0 | |
out = num if out.size == 0 | |
print out | |
end |
This file contains hidden or 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
var counter1 = 0, counter2 = 0; | |
var i,j,l,ll; | |
var single = new Array(1000000); | |
var double = new Array(1000); | |
for(i = 0, l = double.length; i < l; i = (i + 1)) { | |
double[i] = new Array(1000); | |
} | |
var start = new Date(); |
This file contains hidden or 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 'irb/completion' | |
require 'ap' | |
unless IRB.version.include?('DietRB') | |
IRB::Irb.class_eval do | |
def output_value | |
ap @context.last_value | |
end | |
end |
This file contains hidden or 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
Autotest.add_hook(:initialize) do |at| | |
at.add_exception(%r{vendor/cache}) | |
at.add_mapping(%r%^vendor/engines/proposals/spec/(models|controllers|routing|views|helpers|mailers|requests|lib)/.*rb$%) { |filename, _| | |
filename | |
} | |
at.add_mapping(%r%^vendor/engines/proposals/app/models/(.*)\.rb$%) { |_, m| | |
["vendor/engines/proposals/spec/models/#{m[1]}_spec.rb"] | |
} | |
at.add_mapping(%r%^vendor/engines/proposals/app/views/(.*)$%) { |_, m| |