Hi:
perl -e 'print "hello world!\n"'
A simple filter:
perl -ne 'print if /REGEX/'
Filter out blank lines (in place):
;; this code valid as of build 3084 | |
;; in-memory example database | |
(use '[datomic.api :only (db q) :as d]) | |
(def uri "datomic:mem://test") | |
(d/create-database uri) | |
(def conn (d/connect uri)) | |
;; example schema | |
(d/transact conn [{:db.install/_attribute :db.part/db, |
Meine Freundin ist weg (so wie Schecks aus Amerika). | |
Geilheit macht mich zum Teilzeit-Polemiker. | |
Freiheit bringt mich jetzt nicht weiter Mann, | |
ich frage mich: Was fang ich bloß mit so viel Freizeit an? | |
Ich hab Chips gekauft und fern gesehen, | |
VIPs beim Boxen und Kochen im Dschungel — und in den Wehen. | |
Ich weiß nur: Live ist als Scheiß einzustufen! | |
Mir wars egal — ich hab 300 mal da angerufen. |
;; Datomic example code | |
;; make in memory database | |
(use '[datomic.api :only (q db) :as d]) | |
(def uri "datomic:mem://matches") | |
(d/create-database uri) | |
(def conn (d/connect uri)) | |
;; add the match attribute | |
(d/transact |
;; Datomic example code | |
(use '[datomic.api :only (db q) :as d]) | |
;; ?answer binds a scalar | |
(q '[:find ?answer :in ?answer] | |
42) | |
;; of course you can bind more than one of anything | |
(q '[:find ?last ?first :in ?last ?first] | |
"Doe" "John") |
;; Datomic example code | |
;; demonstrates various update scenarios, using a news database | |
;; that contains stories, users, and upvotes | |
;; grab an in memory database | |
(use '[datomic.api :only (q db) :as d]) | |
(def uri "datomic:mem://foo") | |
(d/create-database uri) | |
(def conn (d/connect uri)) |
Hi:
perl -e 'print "hello world!\n"'
A simple filter:
perl -ne 'print if /REGEX/'
Filter out blank lines (in place):
;; | |
;; NS CHEATSHEET | |
;; | |
;; * :require makes functions available with a namespace prefix | |
;; and optionally can refer functions to the current ns. | |
;; | |
;; * :import refers Java classes to the current namespace. | |
;; | |
;; * :refer-clojure affects availability of built-in (clojure.core) | |
;; functions. |