- 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
- 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/
<!doctype html> | |
<html ng-app="Demo" ng-controller="AppController"> | |
<head> | |
<meta charset="utf-8" /> | |
<title> | |
Lazy Loading Images With AngularJS | |
</title> | |
<style type="text/css"> |
/** | |
* Decorator to add 'transform' and 'transformError' methods to promises. | |
* These can manipulate the result without catching errors so the 'then' | |
* functions will still work as expected. | |
*/ | |
$provide.decorator('$q', function($delegate) { | |
var defer = $delegate.defer; | |
$delegate.defer = function() { | |
var deferred = defer(); | |
deferred.promise.transform = function(fn) { |
// based on http://msdn.microsoft.com/en-us/magazine/hh335067.aspx | |
// usage example at bottom | |
function pso (number_of_dimensions, function_to_optimize, number_of_particles, number_of_iterations, fitness_threshold, inertia_weight, cognitive_weight, social_weight) { | |
var particles = []; | |
var swarm_best_position = []; | |
var swarm_best_fitness = null; | |
for (var p = 0; p < number_of_particles; p++) { | |
particles.push({ | |
particle_position: [], |
{ | |
"structure": { | |
"copy": [ | |
{ | |
"from": "/Users/eric/Code/Shared/wardrobe/core/bower.json", | |
"to": "bower.json" | |
}, | |
{ | |
"from": "/Users/eric/Code/Shared/wardrobe/core/package.json", | |
"to": "package.json" |
// Bootstrap is used for visual effects | |
/* | |
HTML | |
<ng-upload ng-model="file"></ng-upload> | |
<ng-upload ng-model="Object.file"></ng-upload> | |
*/ | |
var directives = { | |
ngUpload: function () { |
/** @jsx React.DOM */ | |
'use strict'; | |
var React = require('react'); | |
var AnimatableComponent = React.createClass({ | |
propTypes: { | |
tag: React.PropTypes.component.isRequired, |
(by @andrestaltz)
So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
import java.util.Map; | |
import java.util.concurrent.BlockingQueue; | |
import java.util.concurrent.LinkedBlockingQueue; | |
import com.cybozu.labs.langdetect.Detector; | |
import com.cybozu.labs.langdetect.DetectorFactory; | |
import com.cybozu.labs.langdetect.LangDetectException; | |
import com.twitter.hbc.ClientBuilder; | |
import com.twitter.hbc.core.Client; | |
import com.twitter.hbc.core.Constants; |