I hereby claim:
- I am dlew on github.
- I am danlew (https://keybase.io/danlew) on keybase.
- I have a public key ASD8v3oTeKIyAZP1WwjzP1Wxej0F_V6CqXZOdQ9A61iewAo
To claim this, I am signing this object:
package rx.android.lifecycle; | |
import android.app.Activity; | |
import android.app.Application; | |
import android.content.Context; | |
import android.os.Bundle; | |
import rx.Observable; | |
import rx.subjects.BehaviorSubject; | |
import java.util.Map; |
public class LazyListManagerUtils { | |
public static <T> List<T> add(List<T> list, T item) { | |
if (list == null) { | |
list = new ArrayList<T>(); | |
list.add(item); | |
} | |
else if (!list.contains(item)) { | |
list.add(item); | |
} |
@SuppressWarnings("unchecked") | |
public static <T extends View> T findView(Activity activity, int id) { | |
return (T) activity.findViewById(id); | |
} | |
@SuppressWarnings("unchecked") | |
public static <T extends View> T findView(View view, int id) { | |
return (T) view.findViewById(id); | |
} |
I hereby claim:
To claim this, I am signing this object:
// Follow the five numbered instructions for setting up Crashlytics | |
buildscript { | |
repositories { | |
maven { url 'http://repo1.maven.org/maven2' } | |
// 1. Add the Crashlytics Maven repository to your build script. | |
maven { url 'http://download.crashlytics.com/maven' } | |
} | |
dependencies { |
@Test | |
fun verifySerializedNameMatchesJsonName() { | |
// Reflections library | |
Reflections("com.foobar").getTypesAnnotatedWith(JsonClass::class.java) | |
.flatMap { clz -> | |
// FieldUtils is in Apache Commons | |
FieldUtils.getAllFieldsList(clz).filter { !Modifier.isStatic(it.modifiers) } | |
} | |
.forEach { field -> | |
val serializedNameAnnotation = field.declaredAnnotations.find { it is SerializedName } as? SerializedName |
public static Action1<Throwable> crashOnError() { | |
final Throwable checkpoint = new Throwable(); | |
return throwable -> { | |
StackTraceElement[] stackTrace = checkpoint.getStackTrace(); | |
StackTraceElement element = stackTrace[1]; // First element after `crashOnError()` | |
String msg = String.format("onError() crash from subscribe() in %s.%s(%s:%s)", | |
element.getClassName(), | |
element.getMethodName(), | |
element.getFileName(), | |
element.getLineNumber()); |
This app collects no private data, period. Your data will not be used in any way, because we won't have it. |
import be.tarsos.dsp.AudioEvent | |
import be.tarsos.dsp.io.jvm.AudioDispatcherFactory | |
import be.tarsos.dsp.pitch.PitchDetectionHandler | |
import be.tarsos.dsp.pitch.PitchDetectionResult | |
import be.tarsos.dsp.pitch.PitchProcessor | |
import be.tarsos.dsp.pitch.PitchProcessor.PitchEstimationAlgorithm | |
import java.awt.Robot | |
import java.awt.event.InputEvent | |
import java.util.concurrent.Executors | |
import java.util.concurrent.TimeUnit |