Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
hItuE25058127 | |
6uGdS64633551 | |
iZ8Yg129410073 | |
mn9Ni177063744 | |
tvUy62899300 | |
LlcJs181693848 | |
rRNp274174151 | |
UsiSz5027013 | |
DH4Yd88472413 | |
eEIN376415610 |
hItuE25058127 | |
6uGdS64633551 | |
iZ8Yg129410073 | |
mn9Ni177063744 | |
tvUy62899300 | |
LlcJs181693848 | |
rRNp274174151 | |
UsiSz5027013 | |
DH4Yd88472413 | |
eEIN376415610 |
class Greeter | |
def initialize(*names) | |
names << "World" if names.empty? | |
@names = names | |
end | |
def say_hi | |
@names.each do |name| | |
puts "Hello #{name}!" | |
end |
(ns redis-memo | |
(:require redis) | |
(:import (java.net URLEncoder))) | |
;; -------------------------------------------------------------------------------- | |
;; Default connection params | |
;; -------------------------------------------------------------------------------- | |
(def memo-server {:host "localhost" :port 6379 :db 14}) |
;; 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 |
(use '[datomic.api :only (q db) :as d]) | |
(def uri "datomic:mem://user-groups3") | |
(d/create-database uri) | |
(def conn (d/connect uri)) | |
(d/transact | |
conn | |
[{:db.install/_attribute :db.part/db | |
:db/id #db/id[:db.part/db] | |
:db/ident :user/name |
(ns user | |
(:require [clojure.java.io :as io] | |
[datomic.api :as d])) | |
(defn order-schema [] | |
(read-string (slurp (io/resource "schema.edn")))) | |
(defn start-datomic! [uri schema] | |
(d/create-database uri) | |
(let [conn (d/connect uri)] |
(use '[datomic.api :only (q db) :as d]) | |
(def uri "datomic:mem://user-groups3") | |
(d/create-database uri) | |
(def conn (d/connect uri)) | |
(d/transact | |
conn | |
[{:db.install/_attribute :db.part/db | |
:db/id #db/id[:db.part/db] | |
:db/ident :user/name |
;; Some example error messages resulting from common mistakes | |
;; using Datomic 0.8.4138 | |
(ns errors | |
(:use [datomic.api :as d :only (db q)])) | |
(def uri "datomic:mem://database") | |
(d/create-database uri) |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000