I hereby claim:
- I am kornysietsma on github.
- I am korny (https://keybase.io/korny) on keybase.
- I have a public key whose fingerprint is CCA6 2821 5A0F 290B 5040 1F49 1C12 9115 703D B610
To claim this, I am signing this object:
lazy val javascriptIntegrationTest = task { | |
val statusLogger: JasmineStatusLogger = new JasmineStatusLogger(log) | |
val workingDirectory = new File(info.projectPath.asFile, "src/it/javascript").getPath | |
val phantomJasmine = workingDirectory + "/phantom-jasmine.js" | |
val specRunner = workingDirectory + "/SpecRunner.html" | |
val reportDir = new File(info.projectPath.asFile.getParent, | |
"app/target/reports/javascript-test/").getPath | |
try { | |
run(List("/usr/bin/phantomjs", phantomJasmine, specRunner, reportDir), true) |
val scalatra = "org.scalatra" %% "scalatra" % scalatraVersion withSources () | |
val scalate = "org.scalatra" %% "scalatra-scalate" % scalatraVersion withSources () | |
val servletApi = "org.mortbay.jetty" % "servlet-api" % "2.5-20081211" % "provided" | |
val specs = "org.scalatra" %% "scalatra-specs" % scalatraVersion % "test" withSources () | |
val mockito = "org.mockito" % "mockito-all" % "1.8.5" % "test" withSources () |
sealed trait Aggregation | |
final object Aggregation | |
{ | |
def apply(dependencies: Seq[ProjectReference], transitive: Boolean = true): Aggregation | |
= new Explicit(dependencies, transitive) | |
implicit def fromBoolean(b: Boolean): Aggregation = if(b) Enabled else Disabled | |
val Enabled = new Implicit(true) | |
val Disabled = new Implicit(false) | |
final case class Implicit(enabled: Boolean) extends Aggregation | |
final class Explicit(val dependencies: Seq[ProjectReference], val transitive: Boolean) |
(ns test.core) | |
(defn foo | |
"I don't do a whole lot." | |
[x] | |
(println x "Hello, World!")) |
(ns wikiparse.core | |
(:require [clojure.java.io :as io] | |
[clojure.data.xml :as xml] | |
[clojure.zip :refer [xml-zip]] | |
[clojure.data.zip.xml :refer [xml-> xml1-> text]]) | |
(:import [ org.apache.commons.compress.compressors.bzip2 BZip2CompressorInputStream]) | |
(:gen-class :main true)) | |
(defn bz2-reader | |
"Returns a streaming Reader for the given compressed BZip2 |
(defn game-loop [] | |
(let [anim-chan (au/anim-ch active) | |
ajax-chan (au/ajax-loop "world" slowth active)] | |
(go | |
(loop [state {:world {} :timestamp (js-now)}] | |
(when @active | |
(let [next-state | |
(alt! | |
anim-chan ([val] (do | |
(graphics/draw-map |
(def moneys {:nickel 5 :dime 10 :quarter 25 :dollar 100}) | |
(def prices {:a 65 :b 100 :c 150}) | |
(def initial-state | |
{:inserted-money [:nickel :dime] | |
:items {:a 15 :b 3} | |
}) | |
(defn in-stock? [state item] | |
(let [stock-level (item (:items state))] |
package foo; | |
import java.util.*; | |
public class BadMap implements Map<String,String> { | |
private Map<String,String> theMap; | |
public BadMap(Map<String,String> m) { | |
theMap = m; | |
} |
; this page: http://tinyurl.com/ndfzluz | |
; "higher order functions" basically means using functions as parameters to functions. Lots of languages have this - even C has function pointers | |
; Structure and Interpretation of Computer Programs, a classic 1993 text from MIT, says: | |
; "It is better to have 100 functions operate on one data structure than to have 10 functions operate on 10 data structures" | |
; http://mitpress.mit.edu/sicp/ | |
; simple example - define "is-even": | |
(def is-even (fn [x] (= (mod x 2) 0))) |
I hereby claim:
To claim this, I am signing this object: