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
{'Lisa Rose': {'Lady in the Water': 2.5, 'Snakes on a Plane': 3.5}, | |
'Gene Seymour': {'Lady in the Water': 3.0, 'Snakes on a Plane': 3.5}} | |
to: | |
{'Lady in the Water':{'Lisa Rose':2.5,'Gene Seymour':3.0}, | |
'Snakes on a Plane':{'Lisa Rose':3.5,'Gene Seymour':3.5}} | |
def transformPrefs(prefs): | |
result={} | |
for person in prefs: | |
for item in prefs[person]: |
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
/home/mac/.rvm/gems/ruby-1.9.2-p0/gems/cake-0.5.8/bin/cake:345:in `kill': Operation not permitted (Errno::EPERM) | |
from /home/mac/.rvm/gems/ruby-1.9.2-p0/gems/cake-0.5.8/bin/cake:345:in `refresh' | |
from /home/mac/.rvm/gems/ruby-1.9.2-p0/gems/cake-0.5.8/bin/cake:326:in `initialize' | |
from /home/mac/.rvm/gems/ruby-1.9.2-p0/gems/cake-0.5.8/bin/cake:771:in `new' | |
from /home/mac/.rvm/gems/ruby-1.9.2-p0/gems/cake-0.5.8/bin/cake:771:in `<top (required)>' | |
from /home/mac/.rvm/gems/ruby-1.9.2-p0/bin/cake:19:in `load' | |
from /home/mac/.rvm/gems/ruby-1.9.2-p0/bin/cake:19:in `<main>' |
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
mac@spectre:~/projects/devbox$ vagrant reload | |
[default] Fixed port collision 'ssh'. Now on port 2200. | |
[default] Provisioning enabled with chef_solo... | |
[default] Running any VM customizations... | |
[default] Clearing any previously set forwarded ports... | |
[default] Forwarding ports... | |
[default] -- ssh: 22 => 2200 (adapter 1) | |
[default] Cleaning previously set shared folders... | |
[default] Creating shared folders metadata... | |
[default] Booting VM... |
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
mac@spectre:~/projects/devbox$ vagrant reload | |
[default] Fixed port collision 'ssh'. Now on port 2200. | |
[default] Provisioning enabled with chef_solo... | |
[default] Running any VM customizations... | |
[default] Clearing any previously set forwarded ports... | |
[default] Forwarding ports... | |
[default] -- ssh: 22 => 2200 (adapter 1) | |
[default] Cleaning previously set shared folders... | |
[default] Creating shared folders metadata... | |
[default] Booting VM... |
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
(defproject cmc "0.0.1-SNAPSHOT" | |
:description "TODO: Write project description" | |
:main cmc.core | |
:dependencies [[org.clojure/clojure "1.2.0"] | |
[org.clojure/clojure-contrib "1.2.0"] | |
[enlive "1.0.0-SNAPSHOT"] | |
[net.cgrand/moustache "1.0.0-SNAPSHOT"] | |
[ring/ring-core "0.3.0"] | |
[ring/ring-jetty-adapter "0.3.0"] | |
[ring/ring-devel "0.3.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
(def cmc-application | |
(app | |
(wrap-session) | |
(wrap-if development? wrap-reload '[cmc.templates]) | |
(wrap-if development? wrap-stacktrace) | |
;; set application root | |
(wrap-if development? wrap-file "resources") | |
["app" &] | |
(app | |
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
(ns cmc.server | |
(:use net.cgrand.enlive-html | |
net.cgrand.moustache | |
somnium.congomongo | |
ring.util.response | |
[ring.middleware params multipart-params file reload session stacktrace] | |
[clojure.contrib logging] | |
[cmc templates handlers]) | |
(:require [clojure.contrib.io :as io]) | |
(:import [java.io File])) |
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
(defprotocol Payroll | |
(paycheck [emp hrs])) | |
(defrecord HourlyEmployee [name rate] | |
Payroll | |
(paycheck [hrs] (* rate hrs))) | |
Fails with: | |
java.lang.IllegalArgumentException: Can't define method not in interfaces: paycheck (NO_SOURCE_FILE:13) |
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
(defproject +project+ "0.0.1-SNAPSHOT" | |
:description "TODO: Write project description" | |
:main +project+.core | |
:dependencies [[org.clojure/clojure "1.2.0"] | |
[org.clojure/clojure-contrib "1.2.0"] | |
[enlive "1.0.0-SNAPSHOT"] | |
[net.cgrand/moustache "1.0.0-SNAPSHOT"] | |
[ring/ring-core "0.3.0"] | |
[ring/ring-jetty-adapter "0.3.0"] | |
[ring/ring-devel "0.3.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
(fn [f i] (map (fn [n] ((apply comp (take n (repeat f))) i)) (range))) |
OlderNewer