Skip to content

Instantly share code, notes, and snippets.

View ravindranathakila's full-sized avatar

Ravindranath Akila ravindranathakila

View GitHub Profile
package com.vast.example
import java.net.InetSocketAddress
import java.util.UUID
import java.util.concurrent.{Executors, TimeUnit}
import com.google.common.base.Splitter
import com.twitter.finagle.http.Http
import com.twitter.finagle.builder.{Server, ServerBuilder}
import com.twitter.finagle.service.TimeoutFilter
import com.twitter.finagle.{Service, SimpleFilter, GlobalRequestTimeoutException}
/**
* Prepare the App Folder
*/
(function(){
window.appRootDirName = ".myapp";
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
console.log("device is ready");
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
@ravindranathakila
ravindranathakila / HighchartsConfig.json
Last active August 29, 2015 14:03
Highcharts Config
{
"colors": ["#7cb5ec", "#434348", "#90ed7d", "#f7a35c",
"#8085e9", "#f15c80", "#e4d354", "#8085e8", "#8d4653", "#91e8e1"],
"symbols": ["circle", "diamond", "square", "triangle", "triangle-down"],
"lang": {
"loading": "Loading...",
"months": ["January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December"],
"shortMonths": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
"weekdays": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
//mapper
package com.tistory.devyongsik.hadoop.mapre;
import java.io.IOException;
import org.apache.hadoop.io.DoubleWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

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.

package example;
import java.util.Properties;
import cascading.flow.Flow;
import cascading.flow.FlowDef;
import cascading.flow.hadoop.HadoopFlowConnector;
import cascading.pipe.CoGroup;
import cascading.pipe.Pipe;
import cascading.pipe.assembly.CountBy;
@ravindranathakila
ravindranathakila / EventType.java
Created January 29, 2012 16:55
DOM Event Types To Be Used With ItsNat
package ai.ilikeplaces.util;
import ai.ilikeplaces.doc.License;
/**
* DOM event types
* <p/>
* User: <a href="http://www.ilikeplaces.com"> http://www.ilikeplaces.com </a>
* Date: Dec 8, 2009
* Time: 11:17:06 PM
@ravindranathakila
ravindranathakila / ElasticArray.java
Created January 29, 2012 16:42
Elastic Array In Java
package ai.ilikeplaces.util;
import ai.ilikeplaces.doc.License;
import java.util.Arrays;
/**
* Please let us know if you have a faster/memorable :P implementation.
*
* I doubt if this approach is consistent, but over time, there are no complains :)
@ravindranathakila
ravindranathakila / ElementComposer.java
Created January 29, 2012 16:53
W3C Element Composer For DOM
package ai.ilikeplaces.util;
import ai.ilikeplaces.doc.License;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.Text;
/**
* Created by IntelliJ IDEA.
* User: <a href="http://www.ilikeplaces.com"> http://www.ilikeplaces.com </a>
@ravindranathakila
ravindranathakila / Return.java
Created January 29, 2012 17:00
Java Return Framework - Return Results From Different Tiers Properly. This has been used a lot on www.ilikeplaces.com to perfect effect.
package ai.ilikeplaces.util;
import ai.ilikeplaces.doc.License;
import ai.ilikeplaces.rbs.RBGet;
/**
* Created by IntelliJ IDEA.
* User: <a href="http://www.ilikeplaces.com"> http://www.ilikeplaces.com </a>
* Date: Jan 1, 2010
* Time: 4:26:30 PM