Enable unsigned kext to be installed:
$ sudo nvram boot-args="kext-dev-mode=1"
package io.wondrous.sns.utils; | |
import android.os.Handler; | |
import android.os.Looper; | |
import java.util.concurrent.atomic.AtomicBoolean; | |
import java.util.concurrent.atomic.AtomicLong; | |
public class MainThreadWatchDog { | |
public static final long MAIN_THREAD_PING_INTERVAL = 200; |
package com.example; | |
import java.lang.annotation.Retention; | |
import javax.inject.Inject; | |
import javax.inject.Scope; | |
import javax.inject.Singleton; | |
import dagger.Binds; | |
import dagger.BindsInstance; |
Show traces: | |
$ repo --trace <command> | |
Upload for review with topic set to current branch name: | |
$ repo upload -t | |
or | |
review.URL.uploadtopic = true | |
Issues |
gradlew :app:dependencyInsight --configuration testCompile --dependency kotlin-reflect | |
gradlew :tapp:dependencyInsight --configuration appDebugCompileClasspath --dependency okhttp | |
Resolve all dependencies. Force gradle to precache dependencies for all configurations: | |
``` | |
allprojects { | |
task resolveAllDependencies { | |
doLast { | |
configurations.all { it.resolve() } | |
} |
/** | |
* Calculates correct item position based on RecyclerAdapter and ViewHolder adapter position. | |
* Takes in consideration RecyclerMergeAdapter and adjust position accordingly | |
* | |
* @param adapter RecyclerAdapter with access to RecyclerView instance | |
* @param viewHolder ViewHolder that was created by @adapter | |
* @return adjusted local position for viewHolder | |
*/ | |
public static int getLocalPosition(RecyclerAdapter adapter, RecyclerView.ViewHolder viewHolder) { | |
int position = viewHolder.getAdapterPosition(); |
1.create google app (google console) | |
Example: | |
Client ID xxx.apps.googleusercontent.com | |
Email address [email protected] | |
Client secret xxx | |
Redirect URIs | |
https://localhost/oauth2callback | |
Javascript Origins | |
https://localhost |
sudo ln -s /usr/local/bin/VBoxManage /usr/bin/VBoxManage | |
http://stackoverflow.com/questions/31364475/genymotion-error-unable-to-load-virtualbox-engine-on-yosemite-virtualbox-ins |
private String decodeBody(Response response) throws IOException { | |
final ResponseBody body = response.body(); | |
if (body == null) return null; | |
if (isZipped(response)) { | |
return unzip(response.body()); | |
} else { | |
return body.string(); | |
} | |
} |
ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); | |
int memoryClass = manager.getMemoryClass(); | |
48 - Samsung Nexus S | |
64 - Samsung Galaxy Nexus | |
Samsung S2 | |
Samsung S3 | |
128 - Samsung S4 |
Enable unsigned kext to be installed:
$ sudo nvram boot-args="kext-dev-mode=1"