Instructions on to encrypt a file on OSX 10.9. Based of this StackOverflow post.
- Homebrew
- osxfuse
brew install Caskroom/cask/osxfuse
- encfs
brew install encfs
public class TestSub<T> | |
implements Observable.OnSubscribe<T> { | |
Subscriber<T> sub; | |
public void call(Subscriber<T> sub) { | |
this.sub = sub; | |
} | |
public void onNext(T data) { | |
sub.onNext(data); | |
} | |
... |
E/LayerSDK: LayerClientImpl : Exception | |
E/LayerSDK: com.layer.sdk.exceptions.LayerException: DEVICE_PERSISTENCE_FAILURE (9001) - Uncaught Task exception | |
E/LayerSDK: at com.layer.sdk.internal.syncrecon.SyncRecon$a.a(SyncRecon.java:467) | |
E/LayerSDK: at com.layer.sdk.internal.syncrecon.SyncRecon$a.run(SyncRecon.java:599) | |
E/LayerSDK: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) | |
E/LayerSDK: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) | |
E/LayerSDK: at java.lang.Thread.run(Thread.java:856) | |
E/LayerSDK: Caused by: android.database.sqlite.SQLiteConstraintException: column stream_id is not unique (code 19) | |
E/LayerSDK: at android.database.sqlite.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method) | |
E/LayerSDK: at android.database.sqlite.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:727) |
public class TimeZoneRule implements TestRule { | |
private final String timeZoneId; | |
public TimeZoneRule(String timeZoneId) { | |
this.timeZoneId = timeZoneId; | |
} | |
@Override | |
public Statement apply(final Statement base, Description description) { | |
return new Statement() { |
# Built application files | |
*.apk | |
*.ap_ | |
# Files for the Dalvik VM | |
*.dex | |
# Java class files | |
*.class |
package com.playdraft.hexigonimageview; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.CornerPathEffect; | |
import android.graphics.Paint; | |
import android.graphics.Path; | |
import android.graphics.PorterDuff; |
keytool -genkey -v -keystore keystore.keystore -alias alias -storepass password -keypass password -keyalg RSA -validity 36500 |
/* | |
* copied from: http://stackoverflow.com/questions/8501920/how-to-mock-a-builder-with-mockito | |
*/ | |
import static org.mockito.Mockito.RETURNS_DEFAULTS; | |
import org.mockito.invocation.InvocationOnMock; | |
import org.mockito.stubbing.Answer; | |
public class SelfReturningAnswer implements Answer<Object>{ |
Intent intent = new Intent(this, NextActivity.class); | |
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); | |
startActivity(intent); | |
finish(); |
Instructions on to encrypt a file on OSX 10.9. Based of this StackOverflow post.
brew install Caskroom/cask/osxfuse
brew install encfs
apply plugin: 'idea' | |
idea { | |
module { | |
testOutputDir = file('build/test-classes') | |
} | |
} | |
task initGradleTest << { | |
def imlFile = '<path to iml>.iml' |