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 Mannequin = new Object(); | |
| Mannequin.element_id = 'mannequin-canvas'; | |
| Mannequin.shirt_id = ''; | |
| Mannequin.pant_id = ''; | |
| Mannequin.shoes_id = ''; | |
| Mannequin.last_piece_hover = ''; // The last piece the mouse was over, to detect changes |
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
| { | |
| "env": { | |
| "default": { | |
| "db": "http://[adminusername]:[adminpassword]@localhost:5984/wear" | |
| } | |
| } | |
| } |
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
| (defn flatten [s] | |
| (remove seq? (tree-seq seq? seq s))) |
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 people-view | |
| (html [:html | |
| [:h1 "People"] | |
| [:ul | |
| (let [rows '({:id 1 :name "johanna"} {:id 2 :name "vincent"})] | |
| (reduce html | |
| (map (fn [hash] [:li (str (get hash :id) " - " (get hash :name))]) rows)))]])) |
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
| (ns something | |
| (:require [clojure.contrib.sql :as sql])) | |
| ; Give the sql library all the information about the db | |
| ; to be used in transactions | |
| (def db {:classname "org.sqlite.JDBC" | |
| :subprotocol "sqlite" ; Protocol to use | |
| :subname "db/db.sqlite3" ; Location of db | |
| :create true}) | |
NewerOlder