- Core:
- RxJava - https://github.com/ReactiveX/RxJava
- RxAndroid - https://github.com/ReactiveX/RxAndroid
- RxBinding - https://github.com/JakeWharton/RxBinding
- Applied Duality - http://www.applied-duality.com/
- Network:
- Retrofit - https://github.com/square/retrofit
- Storage:
- SqlBrite - https://github.com/square/sqlbrite
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
/** | |
* Waits until the supplied stream emits a value, and then | |
* continues by emitting the last value emitted on the target. | |
* Useful when you want to gate on an event emitter. | |
*/ | |
Bacon.Observable.prototype.waitUntil = function(item) { | |
// Cache the last value to come out of the source. | |
let last; | |
const unsub = this.onValue(x => last = x); |
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
ASQ.extend("toObservable",function __build__(api,internals){ | |
return function __toObsv__() { | |
return Rx.Observable.create(function(observer) { | |
api.val(function(msg){ | |
observer.onNext(msg); | |
return ASQ.messages.apply(酶,arguments); | |
}); | |
}); | |
}; | |
}); |
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
'use strict'; | |
import {Router5, RouteNode} from 'router5'; | |
import logger from '../logger'; | |
// The set of valid sink functions includes synchronous state-affecting router functions that do not require a callback | |
// and which do not have a significant return value other than the router object itself. | |
const validSinkFuncs = ['add','addNode','canActivate','deregisterComponent','navigate','registerComponent','setOption','start','stop']; | |
function validateAndRemapSinkArgument(arg) { |
- General
- Mastering Observable - http://docs.couchbase.com/developer/java-2.0/observables.html
- Android
- Grokking RxJava, Part 1-4 - http://blog.danlew.net/2014/09/15/grokking-rxjava-part-1/
- Loading data from multiple sources with RxJava - http://blog.danlew.net/2015/06/22/loading-data-from-multiple-sources-with-rxjava/
- Don't break the chain: use RxJava's compose() operator - http://blog.danlew.net/2015/03/02/dont-break-the-chain/
- Pro RxJava
- Hot and Cold Observable - http://davesexton.com/blog/post/Hot-and-Cold-Observables.aspx
- To use subject or not to use subject - http://davesexton.com/blog/post/To-Use-Subject-Or-Not-To-Use-Subject.aspx
- RxJava Threading Examples - http://www.grahamlea.com/2014/07/rxjava-threading-examples/
A demonstration of SVG's Gaussian blur filter effect: the svg:feGaussianBlur element.
Image source: GitHub's octodex.
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
/* Fuzzy Search in JavaScript in 66 bytes by SpeedyNinja | |
Creates a Regex of the Form x.*y.*z.* for query xyz and tests it against the list of terms | |
*/ | |
f=t=>s=>t.filter(x=>eval("/"+s.replace(/./,"$&.*")+"/gi").test(x)) | |
/* | |
Usage: | |
var search = f(["list", "of", "search", "terms"]) | |
search("er") -> ["search", "terms"] | |
^ ^ ^^ |
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
(defn group-by [f] | |
(fn [rf] | |
(let [groupped-value (volatile! (transient {}))] | |
(fn | |
([] (rf)) | |
([result] | |
(rf (rf result (persistent! @groupped-value)))) | |
([result input] | |
(let [key (f input)] | |
(vswap! groupped-value assoc! key (conj (get @groupped-value key []) input)) |
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
// 位h.(h h) | |
let U = f => f(f) | |
// (位 x. x x) (位 x. x x) | |
let 惟 = _ => (x => x (x)) (x => x (x)) | |
// 位f.(位x.f (位v.((x x) v))) (位x.f (位v.((x x) v))) | |
let Z = f => (x => f(y => x(x)(y))) | |
(x => f(y => x(x)(y))) |