Skip to content

Instantly share code, notes, and snippets.

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
(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)
(defn example [datum]
[:li [:a {:href (str "#show/" (:key datum))}
[:div.class1.class2 {:id (str "item" (:key datum))}
[:span.anchor (:name datum)]]]])
(defn with-cdn [cdn-url form]
(clojure.walk/postwalk
(fn [node]
(if (rel-asset-path? node)
(cdn-url node)
node)
form)))
[: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)]
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))
@aria42
aria42 / fnk_examples.clj
Created October 1, 2012 21:29 — forked from w01fe/fnk_examples.clj
Bring on the fnk
(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
(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
(def bigrams (bucket/new
{:type :bdb :merge (partial merge-with +)
:flush-freq 60}))
{"Prismatic" {"runs" 1},"runs" {"on" 1},
"on" {"coffee" 1}}