As configured in my dotfiles.
start new:
tmux
start new with session name:
;variants of the code from point #2 of: | |
; http://www.tbray.org/ongoing/When/200x/2009/12/01/Clojure-Theses | |
;original | |
(apply merge-with + | |
(pmap count-lines | |
(partition-all *batch-size* | |
(line-seq (reader filename))))) |
As configured in my dotfiles.
start new:
tmux
start new with session name:
(ns test.leindroid.sample.main | |
(:use [neko.activity :only [defactivity set-content-view!]] | |
[neko.threading :only [on-ui]] | |
[neko.ui :only [make-ui]]) | |
(:import android.widget.EditText | |
android.net.Uri | |
android.content.Intent)) | |
(declare ^EditText edit | |
^android.app.Activity a) |
#Build OpenCV and the new Java JNI interface described here: https://github.com/emchristiansen/opencv/commit/0d323087fadaf931dbaf4120b69f0839b745b888 | |
git clone git://github.com/Itseez/opencv.git | |
cd opencv | |
cmake -DBUILD_opencv_java=ON | |
ant jar |
(defn model-from-sequence | |
"Returns a transition matrix of 'depth' from 'sequence'" | |
[depth sequence] | |
(loop [accum {} chunks (partition (inc depth) 1 (seq sequence))] | |
(if (seq? chunks) | |
(let [chunk (first chunks) | |
prefix (drop-last chunk) | |
suffix (last chunk)] | |
(recur (assoc accum prefix (conj (get accum prefix []) suffix)) (next chunks))) | |
accum))) |
(ns n01se.externs-for-cljs | |
(:require [clojure.java.io :as io] | |
[cljs.compiler :as comp] | |
[cljs.analyzer :as ana])) | |
(defn read-file [file] | |
(let [eof (Object.)] | |
(with-open [stream (clojure.lang.LineNumberingPushbackReader. (io/reader file))] | |
(vec (take-while #(not= % eof) | |
(repeatedly #(read stream false eof))))))) |
(ns favila.datomic-util.restore-datoms | |
"A \"manual\" datomic database restore. | |
Writes raw datoms (stored in a stream written by d/datoms) to an empty database. | |
Useful for memory databases: you can write out all the datoms in it, then read | |
them into another database. (Note mem dbs have no log or retractions)." | |
(:require [datomic.api :as d] | |
[clojure.edn :as edn])) | |
(defrecord datom [e a v tx added?]) |
(ns om-tutorial.core | |
(:require [goog.dom :as gdom] | |
[om.next :as om :refer-macros [defui]] | |
[om.dom :as dom])) | |
(enable-console-print!) | |
(def init-data | |
{:list/one [{:name "John" :points 0} | |
{:name "Mary" :points 0} |
*.clj diff=clojure | |
*.cljs diff=clojure | |
*.cljx diff=clojure |