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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.node { | |
font: 11px "Helvetica Neue", Helvetica, Arial, sans-serif; | |
} | |
.link { | |
stroke: steelblue; |
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 Phrase | |
def initialize(words) | |
words_cleaner = WordsCleaner.new(words) | |
@frequency_counter = Frequencies.new(words_cleaner) | |
end | |
def word_count | |
@frequency_counter.frequencies | |
end | |
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
;; based on core.logic 0.8-alpha2 or core.logic master branch | |
(ns sudoku | |
(:refer-clojure :exclude [==]) | |
(:use clojure.core.logic)) | |
(defn get-square [rows x y] | |
(for [x (range x (+ x 3)) | |
y (range y (+ y 3))] | |
(get-in rows [x y]))) |
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
# Specs | |
describe "a sucessful create" do | |
it "redirects" do | |
Organization.any_instance.stub(:saved? => true) | |
controller = OrganizationsController.new | |
controller.should_receive(:redirect_to) | |
controller.create | |
end | |
end |