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:
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 |
This app collects no private data, period. Your data will not be used in any way, because we won't have it. |
@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 |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env bash | |
# I've found that the "Migrate to AndroidX" converter in Android Studio doesn't work very | |
# well, so I wrote my own script to do the simple job of converting package names. | |
# | |
# You can download a CSV of package names here: https://developer.android.com/topic/libraries/support-library/downloads/androidx-class-mapping.csv | |
# | |
# It'll run faster on a clean build because then there are fewer files to scan over. | |
# | |
# Uses `gsed` because I'm on a Mac. Can easily replace with `sed` if you don't have `gsed`. |
import xml.etree.ElementTree as ET | |
tree = ET.parse('/path/to/save/file') | |
root = tree.getroot() | |
locations = root.find('locations') | |
for location in locations: | |
name = location.find('name').text | |
objects = location.find('objects') | |
for thing in objects: |
When Mac OS X first launched they did so without an existing poll function. They later added poll() in Mac OS X 10.3, but we quickly discovered that it was broken (it returned a non-zero value when asked to wait for nothing) so in the curl project we added a check in configure for that and subsequently avoided using poll() in all OS X versions to and including Mac OS 10.8 (Darwin 12). The code would instead switch to the alternative solution based on select() for these platforms.
With the release of Mac OS X 10.9 “Mavericks” in October 2013, Apple had fixed their poll() implementation and we’ve built libcurl to use it since with no issues at all. The configure script picks the correct underlying function to use.
Enter macOS 10.12 (yeah, its not called OS X anymore) “Sierra”, released in September 2016. Quickly we discovered that poll() once against did not act like it should and we are back to disabling the use of it in preference to the b
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()); |
/** | |
* Returns the Java Compilation task if javac was configured to compile the source files. | |
* @deprecated prefer {@link #getJavaCompiler} which always return the java compiler task | |
* irrespective of which tool chain (javac or jack) used. | |
*/ | |
@Nullable | |
@Deprecated | |
JavaCompile getJavaCompile() throws IllegalStateException; | |
/** |