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 other-examples.todo | |
(:require [fn-fx.fx-dom :as dom] | |
[fn-fx.diff :refer [component defui render should-update?]] | |
[fn-fx.controls :as ui])) | |
(def main-font (ui/font :family "Helvetica" :size 20)) | |
(defui TodoItem | |
(render [this {:keys [done? idx text]}] | |
(ui/border-pane |
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 other-examples.todo | |
(:require [fn-fx.fx-dom :as dom] | |
[fn-fx.diff :refer [component defui render should-update?]] | |
[fn-fx.controls :as ui])) | |
(def main-font (ui/font :family "Helvetica" :size 20)) | |
(defui TodoItem | |
(render [this {:keys [done? idx text]}] | |
(ui/border-pane |
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
REPL-y 0.3.7, nREPL 0.2.12 | |
Clojure 1.8.0 | |
Java HotSpot(TM) 64-Bit Server VM 1.8.0_74-b02 | |
Docs: (doc function-name-here) | |
(find-doc "part-of-name-here") | |
Source: (source function-name-here) | |
Javadoc: (javadoc java-object-or-class-here) | |
Exit: Control+D or (exit) or (quit) | |
Results: Stored in vars *1, *2, *3, an exception in *e |
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
(q '[:find ?student-id ?model | |
:in $ ?year | |
:where | |
[?student-id :student/teacher ?teacher-id] | |
[?teacher-id :teacher/car ?car-id] | |
[?car-id :car/year ?year] | |
[?car-id :car/model ?model]] | |
db | |
2012) |
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
(flow :error-handler ex | |
(->> (dbc/subscribe broker topic expr) | |
(map (partial transform alert-id transform)) | |
(throttled 400) | |
(on-each #(println "Writing Batch")) | |
(dbc/put broker) | |
(on-completed #(println "Shutting down")))) |
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
(flow :error-handler ex | |
(->> (dbc/subscribe broker topic expr) | |
(map (partial transform alert-id transform)) | |
(throttled 400) | |
(on-each #(println "Writing Batch")) | |
(dbc/put broker) | |
(on-completed #(println "Shutting down")))) |
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
(defn batch [max in] | |
(let [out (chan 1)] | |
(go-loop [out-coll []] | |
(when-some [v (<! in)] | |
(let [new-coll (concat out-coll v)] | |
(if (< (count new-coll) max) | |
(recur new-coll) | |
(do (>! out new-coll) |
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
[translation:info] Error: | |
[translation:info] File "/Users/tim/oss-not-dropbox/pixie/externals/pypy/rpython/translator/goal/translate.py", line 318, in main | |
[translation:info] drv.proceed(goals) | |
[translation:info] File "/Users/tim/oss-not-dropbox/pixie/externals/pypy/rpython/translator/driver.py", line 551, in proceed | |
[translation:info] return self._execute(goals, task_skip = self._maybe_skip()) | |
[translation:info] File "/Users/tim/oss-not-dropbox/pixie/externals/pypy/rpython/translator/tool/taskengine.py", line 114, in _execute | |
[translation:info] res = self._do(goal, taskcallable, *args, **kwds) | |
[translation:info] File "/Users/tim/oss-not-dropbox/pixie/externals/pypy/rpython/translator/driver.py", line 279, in _do | |
[translation:info] res = func() | |
[translation:info] File "/Users/tim/oss-not-dropbox/pixie/externals/pypy/rpython/translator/driver.py", line 385, in task_backendopt_lltype |
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
(try (apply evt-fn state args) | |
(catch :default ex | |
(console/error "Component CSP Exception: " ex " when processing " evt-fn " with " args))))) |
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
(reduce | |
(fn [_ i] | |
(when (key-matches? i :_yx_rk) | |
(reduced i))) | |
nil | |
(:fields coll)) |