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)
private void logToCurlRequest(Request<?> request) { | |
StringBuilder builder = new StringBuilder(); | |
builder.append("curl request: curl "); | |
builder.append("-X \""); | |
switch (request.getMethod()) { | |
case Method.POST: | |
builder.append("POST"); | |
break; | |
case Method.GET: | |
builder.append("GET"); |
/* basic usage */ | |
ViewGroup root = (ViewGroup) findViewById(android.R.id.content); | |
LayoutTraverser.build(new LayoutTraverser.Processor() { | |
@Override | |
public void process(View view) { | |
// do stuff with the view | |
} | |
}).traverse(root); |
package com.company.app.PlatformMethods; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
import java.util.Queue; | |
import java.util.Set; | |
import android.app.PendingIntent; | |
import android.content.BroadcastReceiver; |
apply plugin: 'com.android.application' | |
android { | |
compileSdkVersion 21 | |
buildToolsVersion "21.1.2" | |
defaultConfig{ | |
minSdkVersion 14 | |
targetSdkVersion 21 | |
versionCode 101 |
// check version | |
node -v || node --version | |
// list locally installed versions of node | |
nvm ls | |
// list remove available versions of node | |
nvm ls-remote | |
// install specific version of node |
/** | |
_____ _____ _ | |
| __ \ / ____| | | | |
| | | | ___| | _ __ _ _ _ __ | |_ ___ _ __ | |
| | | |/ _ \ | | '__| | | | '_ \| __/ _ \| '__| | |
| |__| | __/ |____| | | |_| | |_) | || (_) | | | |
|_____/ \___|\_____|_| \__, | .__/ \__\___/|_| | |
__/ | | | |
|___/|_| | |
*/ |
#!/bin/bash | |
# Clean up on exit | |
function finish { | |
rm -f expected found | |
} | |
trap finish EXIT | |
# How to parse JSON | |
JQ="jq --sort-keys" |
Sub Station Alpha v4.00+ Script Format | |
1. 1. General information | |
2. 2. The [sections] of a Sub Station Alpha script | |
3. 3. The line types in a Sub Station Alpha script | |
4. 4. Header lines, [Script Info] section | |
5. 5. Style lines, [v4 Styles] section | |
6. 6. Dialogue event lines, [Events] section |
import android.bluetooth.BluetoothAdapter | |
import android.content.BroadcastReceiver | |
import android.content.Intent | |
import android.content.Context | |
import dagger.android.AndroidInjection | |
import io.reactivex.Observable | |
import io.reactivex.subjects.BehaviorSubject | |
import javax.inject.Inject | |