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
(defprotocol View | |
"View abstraction" | |
(render [this some-param] "Renders view") | |
(destroy [_] "Destroys view, runs cleanup")) | |
(deftype ProjectView [data] | |
View | |
(render [this some-param] [:h1 (str "Hello " (:name data) " some param we passed in " some-param)]) | |
(destroy [_] (println "Cleaning up"))) |
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 example.core | |
(:require [reagent.core :as reagent :refer [atom]])) | |
(enable-console-print!) | |
(defonce atom1 (atom 1)) | |
(defonce atom2 (atom 2)) | |
(defn handle-file [root stat next] | |
(println "handle 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
(ns example.core | |
(:require [reagent.core :as reagent :refer [atom]])) | |
(enable-console-print!) | |
(defonce atom1 (atom 1)) | |
(defonce atom2 (atom 2)) | |
(defn handle-file [root stat next] | |
(println "handle 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
Exception in thread "main" java.lang.Exception: Unsupported binding form: :as, compiling:(cljs/closure.clj:1127:1) | |
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6567) | |
at clojure.lang.Compiler.analyze(Compiler.java:6361) | |
at clojure.lang.Compiler.analyze(Compiler.java:6322) | |
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708) | |
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139) | |
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751) | |
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558) | |
at clojure.lang.Compiler.analyze(Compiler.java:6361) | |
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548) |
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
var myUtil = (function() { | |
function doStuffToDate(date) {} | |
... | |
return { doStuffToDate: doStuffToDate, //other public funcs } | |
})(); | |
myUtil.doStuffToDate(date); //use | |
var dstd = myUtil.doStuffToDate; //"import" | |
//You can also "inline" the implementations if they're short |
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
var initGlobalize = function() { | |
function init(callbacks) { | |
$.when( | |
$.get("/cldr/main/fi/ca-gregorian.json"), | |
$.get("/cldr/main/fi/currencies.json"), | |
$.get("/cldr/main/fi/numbers.json"), | |
$.get("/cldr/supplemental/currencyData.json"), | |
$.get("/cldr/supplemental/likelySubtags.json"), | |
$.get("/cldr/supplemental/timeData.json"), | |
$.get("/cldr/supplemental/weekData.json") |
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
function argumentsMapExample() { | |
_.map(arguments, function(arg) { console.log(arg); }) | |
} |
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
function bindBarCodeValidation() { | |
$('#shoppingcart').debounced('input keyup', 'input[name="barcode"]', onSchedule, onFire, 500, rowIdentity); | |
function onSchedule() { | |
$(this).addClass('input-loader'); | |
return true; | |
} | |
function onFire() { validateBarcode($(this)); } |
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
> android:run | |
[info] Updating {file:/Users/auramo/src/allacca/}allacca... | |
[info] Resolving jline#jline;2.11 ... | |
[info] Done updating. | |
[info] Collecting resources | |
[info] Performing full resource merge | |
[info] Generating R.java | |
[info] Packaging resources: resources-debug.ap_ | |
[info] Rebuilding all classes because R.java has changed | |
[info] Regenerating TR.scala because R.java has changed |
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
Warning: org.scalatest.tools.StatusJPanel: can't find referenced class javax.swing.JLabel | |
Warning: org.scalatest.tools.StatusJPanel: can't find referenced class javax.swing.JLabel | |
Warning: org.scalatest.tools.StatusJPanel: can't find referenced class javax.swing.JLabel | |
Warning: org.scalatest.tools.StatusJPanel: can't find referenced class javax.swing.JLabel | |
Warning: org.scalatest.tools.StatusJPanel: can't find referenced class javax.swing.JLabel | |
Warning: org.scalatest.tools.StatusJPanel: can't find referenced class javax.swing.JLabel | |
Warning: org.scalatest.tools.StatusJPanel: can't find referenced class javax.swing.JLabel | |
Warning: org.scalatest.tools.StatusJPanel: can't find referenced class javax.swing.JLabel | |
Warning: org.scalatest.tools.StatusJPanel: can't find referenced class javax.swing.JLabel | |
Warning: org.scalatest.tools.StatusJPanel: can't find referenced class javax.swing.JLabel |