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
git bisect start | |
# good: [59b65669860a1f33825775494809e5d500c19c63] added 1.0, test all public doc-ed fns have :added | |
git bisect good 59b65669860a1f33825775494809e5d500c19c63 | |
# bad: [d694d6d45fb46195ae4de01aab9a2b9f9c06355f] place to hang defn error messages | |
git bisect bad d694d6d45fb46195ae4de01aab9a2b9f9c06355f | |
# bad: [4f729ba2432d8ffbe7c2f74f680b472e528cba4c] Merge branch 'patches' | |
git bisect bad 4f729ba2432d8ffbe7c2f74f680b472e528cba4c | |
# good: [40f3dc93b926721e94b75a10a9c88815ea4691aa] clojure.repl with -fn naming, #310 | |
git bisect good 40f3dc93b926721e94b75a10a9c88815ea4691aa | |
# good: [3b07c0e98ebfd7025a5e36c7e47f6562e4750e14] Merge branch 'patches' |
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 bestinclass.io | |
(:use compojure) | |
(:import | |
(java.io File) | |
(org.apache.commons.fileupload.servlet ServletFileUpload) | |
(org.apache.commons.fileupload.disk DiskFileItemFactory))) | |
(def *max_size* (* 30 1024 1024)) ; 30 Megabytes | |
(defn upload-file |
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 knapsack_count | |
[sack space] | |
(if (or (empty? sack) (< space 0)) | |
0 | |
(if (= space 0) | |
1 | |
(+ | |
(knapsack_count (next sack) space) | |
(knapsack_count sack (- space (first sack))))))) |
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
;; put test.jpg in root/public/test.jpg | |
(defroutes app | |
(GET "/" [] "Hello, world") | |
(ANY "*" [] (redirect "/"))) | |
(run-jetty (-> app (wrap-file "public")) | |
{:port 8080}) | |
;; access //localhost:8080/public/test.jpg |
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 render [#^Graphics g scene w h #^Integer scale] | |
(do-board [w h1] | |
(.setColor g (org.newdawn.slick.Color. (aget! scene i (+ h1 j)))) | |
(.fillRect g (* scale i) (* scale (+ h1 j)) scale scale))) | |
(defn render [#^Graphics g scene w h #^Integer scale] | |
(let [h1 (int (/ h 2)) | |
r1 (future | |
(do-board [w h1] | |
(.setColor g (org.newdawn.slick.Color. (aget! scene i j))) |
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
def sort(xs: Array[Int]) { | |
def swap(i: Int, j: Int) { | |
val t = xs(i); xs(i) = xs(j); xs(j) = t | |
} | |
def sort1(l: Int, r: Int) { | |
val pivot = xs((l + r) / 2) | |
var i = l; var j = r | |
while (i <= j) { | |
while (xs(i) < pivot) i += 1 | |
while (xs(j) > pivot) j -= 1 |
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 joy.proxytest) | |
;;== evilbase | |
(gen-class | |
:name joy.proxytest.evilbase | |
:prefix "evilbase-" | |
:post-init ctor | |
:methods [[tragedy [] void]] | |
:impl-ns joy.proxytest) |
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 p.pulp | |
(:import (pulpcore.animation Easing Timeline) | |
(pulpcore.animation.event RemoveSpriteEvent) | |
(pulpcore.image BlendMode CoreImage CoreFont) | |
(pulpcore Input Stage) | |
(pulpcore.math CoreMath) | |
(pulpcore.scene Scene2D) | |
(pulpcore.sprite FilledSprite Group ImageSprite Sprite Label)) | |
(:gen-class | |
:extends pulpcore.scene.Scene2D |
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 pulp | |
(:import (pulpcore.animation Easing Timeline) | |
(pulpcore.animation.event RemoveSpriteEvent) | |
(pulpcore.image BlendMode CoreImage CoreFont) | |
(pulpcore Input Stage) | |
(pulpcore.math CoreMath) | |
(pulpcore.scene Scene2D) | |
(pulpcore.sprite FilledSprite Group ImageSprite Sprite Label)) | |
(:gen-class :extends pulpcore.scene.Scene2D :main true)) |
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 pulp | |
(:import (pulpcore.animation Easing Timeline) | |
(pulpcore.animation.event RemoveSpriteEvent) | |
(pulpcore.image BlendMode CoreImage CoreFont) | |
(pulpcore Input Stage) | |
(pulpcore.math CoreMath) | |
(pulpcore.scene Scene2D) | |
(pulpcore.sprite FilledSprite Group ImageSprite Sprite Label)) | |
(:gen-class :extends pulpcore.scene.Scene2D)) |