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
| D 17:09:06.2180230 ZoneChangeList.ProcessChanges() - id=10 local=False [name=Doomguard id=8 zone=HAND zonePos=0 cardId=EX1_310 player=1] zone from FRIENDLY DECK -> FRIENDLY HAND | |
| D 17:09:06.2187700 ZoneChangeList.ProcessChanges() - processing index=1 change=powerTask=[power=[type=TAG_CHANGE entity=[id=8 cardId=EX1_310 name=Doomguard] tag=ZONE_POSITION value=4] complete=False] entity=[name=Doomguard id=8 zone=HAND zonePos=0 cardId=EX1_310 player=1] srcZoneTag=INVALID srcPos= dstZoneTag=INVALID dstPos=4 | |
| D 17:09:06.2187930 ZoneChangeList.ProcessChanges() - START waiting for [name=Doomguard id=8 zone=HAND zonePos=0 cardId=EX1_310 player=1] to load (powerTask=(not null)) | |
| D 17:09:06.2400590 ZoneChangeList.ProcessChanges() - END waiting for [name=Doomguard id=8 zone=HAND zonePos=0 cardId=EX1_310 player=1] to load (powerTask=(not null)) | |
| D 17:09:06.2401110 ZoneChangeList.ProcessChanges() - id=10 local=False [name=Doomguard id=8 zone=HAND zonePos=4 cardId=EX1_310 player=1] pos from 0 -> 4 | |
| D 17:09:06.2401530 ZoneChangeLi |
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 speed-test.core | |
| ;; Original Java Source | |
| (:import LCS)) | |
| (set! *warn-on-reflection* true) | |
| (defn time-it [num-trials f] | |
| (loop [sum-ms 0 trials-left num-trials] | |
| (let [start (System/currentTimeMillis)] | |
| (f) |
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 example [datum] | |
| [:li [:a {:href (str "#show/" (:key datum))} | |
| [:div.class1.class2 {:id (str "item" (:key datum))} | |
| [:span.anchor (:name datum)]]]]) |
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 with-cdn [cdn-url form] | |
| (clojure.walk/postwalk | |
| (fn [node] | |
| (if (rel-asset-path? node) | |
| (cdn-url node) | |
| node) | |
| form))) |
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
| [:head | |
| [:meta {:charset "UTF-8"}] | |
| [:title "Prismatic"] | |
| (element/include-css "/style/landing.css")] | |
| [:body | |
| [:img.product {:src "/img/landing.jpg"}] | |
| (map element/javascript-tag scripts)] |
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
| head | |
| meta(charset= 'UTF-8') | |
| title Prismatic | |
| link(rel="stylesheet", type="text/css", href=cdnAsset("/style/landing.css"), media="all") | |
| body | |
| img.product(src=cdnAsset("/img/landing.jpg")) | |
| - each file in scripts | |
| script(type='text/javascript', src=cdnAsset(file)) |
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
| (defnk foo [x y [s 1]] | |
| (+ x (* y s))) | |
| (foo {:x 2 :y 3 :s 2}) | |
| ;; ==> 8 | |
| (foo {:x 2 :y 3}) | |
| ;; 's' defaulted to 1 | |
| ;; ==> 5 |
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 map-reduce [map-fn reduce-fn n xs] | |
| (let [bspec {:type :mem :merge reduce-fn} | |
| bs (repeatedly n #(bucket/new bspec)) | |
| work (fn [b x] | |
| (doseq [[k v] (map-fn x)] | |
| (bucket/merge b k v))) | |
| ;; each worker gets own bucket | |
| ;; so no contention | |
| workers (map #(partial work %) bs)] | |
| ;; workers process xs in par, blocking |
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 bigrams (bucket/new | |
| {:type :bdb :merge (partial merge-with +) | |
| :flush-freq 60})) |
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
| {"Prismatic" {"runs" 1},"runs" {"on" 1}, | |
| "on" {"coffee" 1}} |