Instead of the verbose setOnClickListener:
RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));Observable
.just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)| function get_avatar_from_service(service, userid, size) { | |
| // this return the url that redirects to the according user image/avatar/profile picture | |
| // implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback | |
| // for google use get_avatar_from_service('google', profile-name or user-id , size-in-px ) | |
| // for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word ) | |
| // for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px ) | |
| // for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word ) | |
| // for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px ) | |
| // everything else will go to the fallback | |
| // google and gravatar scale the avatar to any site, others will guided to the next best version |
| boolean hasUpdated = false; | |
| boolean doneBuffering = false; | |
| long bufferTimeout = 500; | |
| // put this somewhere smart | |
| new Thread(new Runnable() { | |
| public void run() { | |
| while(!doneBuffering) { | |
| Thread.sleep(bufferTimeout); |
The git command-line utility has plenty of inconsistencies http://steveko.wordpress.com/2012/02/24/10-things-i-hate-about-git/
A GUI like http://sourcetreeapp.com is often helpful, but staying on the command line usually quicker. This is a list of the commands I use most frequently, listed by funcional category:
git status list which (unstaged) files have changed
| package net.cogindo.ssl; | |
| import java.io.IOException; | |
| import java.net.InetAddress; | |
| import java.net.Socket; | |
| import java.net.UnknownHostException; | |
| import java.security.KeyManagementException; | |
| import java.security.NoSuchAlgorithmException; | |
| import javax.net.ssl.SSLContext; |
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.cards.notification"> | |
| <uses-sdk | |
| android:minSdkVersion="17" | |
| android:targetSdkVersion="17" /> | |
| <application | |
| android:allowBackup="true" |