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 now-plus [n] | |
"Returns current time plus `n` minutes as string" | |
(let [f (SimpleDateFormat. "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")] | |
(.setTimeZone f (TimeZone/getTimeZone "GMT" )) | |
(.format f (Date. (+ (System/currentTimeMillis) (* n 60 1000)))))) |
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 best | |
[f [h & t]] | |
(reduce #(if (f %1 %2) %1 %2) h t)) | |
(defn most | |
[f [h & t :as coll]] | |
(if (seq coll) | |
(reduce (fn [[wins wins-score] x] | |
(let [x-score (f x)] | |
(if (> wins-score x-score) |
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 home-api-map | |
[] | |
{ :banner (model/pick :banner {:where {:slug "home"}}) | |
:intro-headline (model/pick :headline {:where {:slug "intro"}}) | |
:intro-slides (model/gather :slides {:where {:slug "intro"} :include {:slides {}}}) | |
:intro-highlights (model/gather :highlight {:where {:slug "intro"}}) | |
:tenants (model/gather :tenant) | |
:partners (model/gather :neighborhood-partner) | |
:whats-here-headline (model/pick :headline {:where {:slug "whats-here"}}) | |
:project-highlights (model/gather :project-highlights {:include {:highlights {}}}) |
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 clojure.gdx.myscreen | |
(:import (com.badlogic.gdx Gdx Screen) | |
(com.badlogic.gdx.scenes.scene2d Stage) | |
(com.badlogic.gdx.scenes.scene2d.ui Label Label$LabelStyle) | |
(com.badlogic.gdx.graphics Color) | |
(com.badlogic.gdx.graphics.g2d BitmapFont) | |
(com.badlogic.gdx.graphics.g2d SpriteBatch))) | |
(declare ^Stage stage) |