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
| (def winning-states | |
| [ | |
| [1 0 0 0 | |
| 0 1 0 0 | |
| 0 0 1 0 | |
| 0 0 0 1] | |
| [0 0 0 1 | |
| 0 0 1 0 | |
| 0 1 0 0 | |
| 1 0 0 0] |
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
| (defroutes all-routes | |
| socket-routes | |
| (wrap-restful-format api-routes) | |
| (wrap-friend-auth app-routes) | |
| (route/resources "/") | |
| (route/not-found "Not Found")) |
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
| {:user {:plugins [[lein-localrepo "0.4.1"] | |
| [lein-tarsier "0.9.4"] | |
| [lein-clojars "0.9.1"] | |
| [compojure-app/lein-template "0.2.7"] | |
| [leinjacker "0.4.1"] | |
| [http-kit/lein-template "1.0.0-SNAPSHOT"] | |
| [lein-cljsbuild "0.3.0"] | |
| [lein-pprint "1.1.1"] | |
| [starter/lein-template "0.1.4-SNAPSHOT"]] | |
| :injections [(require 'spyscope.core) |
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
| (def app | |
| (wrap-restful-format (wrap-request-logging | |
| (if prod? | |
| (handler/site all-routes) | |
| (reload/wrap-reload (handler/api #'all-routes)))))) |
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
| bitcoin.core=> (def network (testNet)) | |
| #'bitcoin.core/network | |
| bitcoin.core=> (start) | |
| #<Transition com.google.common.util.concurrent.AbstractService$Transition@562ccf18> | |
| bitcoin.core=> (.getId (net)) | |
| "org.bitcoin.test" | |
| bitcoin.core=> (def w (open-wallet "./testWallet.wallet")) | |
| #'bitcoin.core/w | |
| bitcoin.core=> w | |
| #<Wallet Wallet containing 0.00 BTC in: |
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
| wei:wall wei$ lein ring server | |
| Retrieving aleph/aleph/0.3.0-beta15/aleph-0.3.0-beta15.pom from clojars | |
| Retrieving org/clojure/data.xml/0.0.7/data.xml-0.0.7.pom from central | |
| Retrieving io/netty/netty/3.6.2.Final/netty-3.6.2.Final.pom from central | |
| Retrieving lamina/lamina/0.5.0-beta14/lamina-0.5.0-beta14.pom from clojars | |
| Retrieving org/clojure/tools.logging/0.2.4/tools.logging-0.2.4.pom from central | |
| Retrieving org/flatland/useful/0.9.0/useful-0.9.0.pom from clojars | |
| Retrieving potemkin/potemkin/0.2.0/potemkin-0.2.0.pom from clojars | |
| Retrieving gloss/gloss/0.2.2-beta5/gloss-0.2.2-beta5.pom from clojars | |
| Retrieving lamina/lamina/0.5.0-beta9/lamina-0.5.0-beta9.pom from clojars |
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
| define(["scripts/match"], function(cycle, main){ | |
| var Gadget = function(player, config, $el) { | |
| cljs.match.init(player, config, $el); | |
| player.on('toggleEdit', this.toggleEdit, this); | |
| player.on('configChange', this.update, this); | |
| player.on('render', this.render, this); | |
| }; |
This file has been truncated, but you can view the full file.
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
| ;(function(){ | |
| var CLOSURE_NO_DEPS = true; | |
| var COMPILED = false; | |
| var goog = goog || {}; | |
| goog.global = this; | |
| goog.DEBUG = true; | |
| goog.LOCALE = "en"; | |
| goog.provide = function(name) { | |
| if(!COMPILED) { | |
| if(goog.isProvided_(name)) { |
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
| define([], function(){ | |
| return function(){ | |
| return Math.floor(Math.random() * 100) + 1; | |
| } | |
| }); |
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
| wei:classnotes wei$ irb | |
| irb(main):001:0> a = [{:a=>1}, {:a=>2}] | |
| => [{:a=>1}, {:a=>2}] | |
| irb(main):003:0> a.sort! {|a, b| a[:a] <=> b[:a]} | |
| => [{:a=>1}, {:a=>2}] | |
| irb(main):004:0> b = [{:a => 1}] | |
| => [{:a=>1}] | |
| irb(main):005:0> b.sort! {|a, b| a[:a] <=> b[:a]} | |
| => [{:a=>1}] |