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
regenerator index.js > index_compiled.js |
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 fromArray = require('read-stream/array'), | |
CombinedStream = require('combined-stream'); | |
var s1 = fromArray([1, 2, 3]); | |
var s2 = fromArray([4, 5, 6]); | |
var combined = CombinedStream.create(); | |
combined.on('data', function(v) { | |
console.log(v); |
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 runner(machine) { | |
var gen = machine(); | |
runner_(gen, gen.next()); | |
} | |
function runner_(gen) { | |
var delay = Math.random() * 1000; | |
setTimeout(function() { | |
gen.next(delay); | |
runner_(gen); |
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
Tue Apr 30 2013 22:43:29 GMT-0700 (PDT) | |
Testing tunes.test.core | |
Testing tunes.test.player | |
Ran 3 tests containing 4 assertions. | |
0 failures, 0 errors. | |
FAIL in () (:) | |
expected: (> (clojure.core/deref position) 0) |
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
- (void)loadView | |
{ | |
[super loadView]; | |
UIView *view = [[UIView alloc] initWithFrame:[[self view] bounds]]; | |
[view setAutoresizesSubviews:YES]; | |
[view setAutoresizingMask:UIViewAutoresizingFlexibleHeight]; | |
[self setView:view]; | |
} |
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
diff --git src/cljs/cljs/core.cljs src/cljs/cljs/core.cljs | |
index 4f7bd94..6c011da 100644 | |
--- src/cljs/cljs/core.cljs | |
+++ src/cljs/cljs/core.cljs | |
@@ -3439,9 +3439,9 @@ reduces them without incurring seq initialization" | |
(seq? x) (doall (map thisfn x)) | |
(coll? x) (into (empty x) (map thisfn x)) | |
(goog.isArray x) (vec (map thisfn x)) | |
- (goog.isObject x) (into {} (for [k (js-keys x)] | |
- [(keyfn k) |
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
/target | |
/lib | |
/classes | |
/checkouts | |
pom.xml | |
*.jar | |
*.class | |
.lein-deps-sum | |
.lein-failures | |
.lein-plugins |
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
; before | |
(defpage "/photos" {} | |
(common/main-layout (...))) | |
(defpage "/photos/:id" {id :id} | |
(common/main-layout (...))) | |
(defpage "/photos/:id/edit" {id :id} | |
(common/main-layout (...))) |
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
javascript:(function(){readConvertLinksToFootnotes=true;readStyle='style-athelas';readSize='size-medium';readMargin='margin-wide';_readability_script=document.createElement('SCRIPT');_readability_script.type='text/javascript';_readability_script.src='http://lab.arc90.com/experiments/readability/js/readability.js?x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(_readability_script);_readability_css=document.createElement('LINK');_readability_css.rel='stylesheet';_readability_css.href='http://lab.arc90.com/experiments/readability/css/readability.css';_readability_css.type='text/css';_readability_css.media='all';document.getElementsByTagName('head')[0].appendChild(_readability_css);_readability_print_css=document.createElement('LINK');_readability_print_css.rel='stylesheet';_readability_print_css.href='http://lab.arc90.com/experiments/readability/css/readability-print.css';_readability_print_css.media='print';_readability_print_css.type='text/css';document.getElementsByTagName('head')[0]. |
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
(defunk fetch | |
"Fetches objects from a collection. | |
Note that MongoDB always adds the _id and _ns | |
fields to objects returned from the database. | |
Optional arguments include | |
:where -> takes a query map | |
:only -> takes an array of keys to retrieve | |
:as -> what to return, defaults to :clojure, can also be :json or :mongo | |
:from -> argument type, same options as above | |
:skip -> number of records to skip |