This file contains hidden or 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
$ lein native-deps | |
Exception in thread "main" java.lang.IllegalAccessError: make-dependency does not exist (native_deps.clj:1) | |
at clojure.lang.Compiler.eval(Compiler.java:5435) | |
at clojure.lang.Compiler.eval(Compiler.java:5410) | |
at clojure.lang.Compiler.load(Compiler.java:5852) | |
at clojure.lang.RT.loadResourceScript(RT.java:340) | |
at clojure.lang.RT.loadResourceScript(RT.java:331) | |
at clojure.lang.RT.load(RT.java:409) | |
at clojure.lang.RT.load(RT.java:381) | |
at clojure.core$load$fn__4504.invoke(core.clj:4905) |
This file contains hidden or 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
Exception in thread "main" java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.CharSequence (NO_SOURCE_FILE:0) | |
at clojure.lang.Compiler.eval(Compiler.java:5435) | |
at clojure.lang.Compiler.eval(Compiler.java:5386) | |
at clojure.core$eval.invoke(core.clj:2382) | |
at clojure.main$eval_opt.invoke(main.clj:235) | |
at clojure.main$initialize.invoke(main.clj:254) | |
at clojure.main$script_opt.invoke(main.clj:270) | |
at clojure.main$main.doInvoke(main.clj:354) | |
at clojure.lang.RestFn.invoke(RestFn.java:458) | |
at clojure.lang.Var.invoke(Var.java:377) |
This file contains hidden or 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
(defproject testing "1.0.0-SNAPSHOT" | |
:old-dependencies [[org.clojure/clojure "1.2.0-master-SNAPSHOT"] | |
[org.clojure/clojure-contrib "1.2.0-SNAPSHOT"]] | |
:dependencies [[org.clojure/clojure "1.2.0-beta1"] | |
[org.clojure/clojure-contrib "1.2.0-beta1"]] | |
:namespaces [testing.core] | |
:jvm-opts "-Xmx512M") |
This file contains hidden or 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 same-keys? [m & ms] | |
(->> (cons m ms) (map keys) (map set) (apply =))) |
This file contains hidden or 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
$n^2 + 3$ |
This file contains hidden or 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
(defproject null-pointer-exception "1.0.0-SNAPSHOT" | |
:description "FIXME: write" | |
:dependencies [[org.clojure/clojure "1.2.0-master-SNAPSHOT"] | |
[org.clojure/clojure-contrib "1.2.0-SNAPSHOT"]] | |
:dev-dependencies [[native-deps "1.0.3"]] | |
) |
This file contains hidden or 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 sandbox.file-upload | |
(:use ring.adapter.jetty | |
ring.util.response | |
ring.middleware.multipart-params | |
ring.middleware.stacktrace | |
hiccup.core | |
hiccup.form-helpers | |
compojure.core | |
clojure.pprint)) |
This file contains hidden or 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 redblack-clj.core | |
(:use matchure)) | |
(defn- leaf [val] [:red nil val nil]) | |
(def empty-tree nil) | |
(defn new-tree [val] | |
[:black nil val nil]) |
This file contains hidden or 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 dragndrop.core | |
(:use ring.adapter.jetty | |
ring.util.response | |
[ring.middleware file multipart-params stacktrace] | |
[compojure core response] | |
[clojure.contrib.io :only [to-byte-array file]] | |
clojure.pprint) | |
(:import java.io.ByteArrayInputStream)) | |
; UUID generator |
This file contains hidden or 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
$ = require('jquery') | |
_ = require('underscore') | |
isbn_pattern = /[0-9]{10}/g | |
get_isbns = (s) -> s.match isbn_pattern | |
print = (s) -> console.log s | |
# Examples taken from amazon.com | |
print "too short: #{ get_isbns "032134960" } " |