Login to github, go to project and click on Fork
git clone https://github.com/davidmoten/RxJava.git
git remote add upstream https://github.com/ReactiveX/RxJava.git
#!/bin/bash | |
set -e | |
TEMPFILE=`mktemp /tmp/ScriptXXXXX|sed -e 's/\.//g'` | |
CLASS_NAME=`basename "$TEMPFILE"` | |
JAVA_SOURCE=$TEMPFILE.java | |
cat <<EOF >$JAVA_SOURCE.tmp | |
//Write your java class here with a main method | |
//Be sure to leave the name of the class as Script |
sudo apt-get install -y curl | |
sudo apt-add-repository -r http://ppa.launchpad.net/adamsutton/tvheadend | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo add-apt-repository -y "deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main" | |
curl http://apt.tvheadend.org/repo.gpg.key | sudo apt-key add - | |
sudo apt-add-repository -y http://apt.tvheadend.org/stable | |
sudo apt-get update |
/** | |
* Returns distinct cells and the the total nautical miles travelled in that | |
* cell. Uses RxJava {@link Observable}s to maximize throughput and will | |
* scale to use all available processors and to handle a large number of | |
* files (number of open file handles should be limited by number of | |
* available processors). | |
* | |
* @param files | |
* @return | |
*/ |
$!/bin/bash | |
sudo apt-get purge docker.io | |
curl -s https://get.docker.io/ubuntu/ | sudo sh |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo add-apt-repository -y "deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main" | |
sudo apt-get update | |
sudo apt-get install maven3 --force-yes | |
cd | |
echo >>.bashrc | |
echo export PATH=/usr/share/maven3/bin/mvn:$PATH >>.bashrc | |
echo alias i=\'mvn clean install\' >>.bashrc | |
source .bashrc |
find . -name *.java|grep -v target|xargs sed '/^\s*\/\//d;/^\s*$/d'|wc -l |
# shows uncommitted files and unpushed commits | |
function gits { | |
set -e | |
git status -s | |
CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD` | |
UNPUSHED=`git log origin/$CURRENT_BRANCH..$CURRENT_BRANCH` | |
if [ -z $UNPUSHED ]; then | |
echo Unpushed: | |
echo $UNPUSHED | |
fi |
Observable<Entry<GeoCircleValue<String>> results = tree.search(...);
results
//get just the name of the city
.map( entry -> entry.value().value)
//get the populations asynchronously
.flatMap(name -> Observable.just(name)
.map(n -> new NameAndPop(n, service.populationOf(n))
.subscribeOn(Schedulers.io()))
//observe the results on current thread