I hereby claim:
- I am afzalive on github.
- I am afzal (https://keybase.io/afzal) on keybase.
- I have a public key ASCEiRXUkvJrKqp2vh1X3N1jI9nKfF_liHnizkJSvnZFPAo
To claim this, I am signing this object:
| package com.test | |
| class DatabaseSyncer() { | |
| // Updated thanks to @gildor | |
| private fun findUpdatedNotes( | |
| allLocalNotes: List<Note>, | |
| allRemoteNotes: List<Note> | |
| ): List<Note> { |
| /** | |
| * Constructs a ViewModelFactory with dependencies | |
| */ | |
| @Singleton | |
| class ViewModelFactory @Inject constructor( | |
| private val creators: Map<Class<out ViewModel>, @JvmSuppressWildcards Provider<ViewModel>> | |
| ) : ViewModelProvider.Factory { | |
| override fun <T : ViewModel> create(modelClass: Class<T>): T { | |
| var creator = creators[modelClass] |
| public class LocaleChanger { | |
| public static void setLocale(ArrayList<Locale> arrayList) { | |
| try { | |
| Class cls = Class.forName("android.app.ActivityManagerNative"); | |
| Method method = cls.getMethod("getDefault", new Class[0]); | |
| method.setAccessible(true); | |
| Object invoke = method.invoke(cls, new Object[0]); | |
| method = cls.getMethod("getConfiguration", new Class[0]); | |
| method.setAccessible(true); |
| import com.azimolabs.conditionwatcher.Instruction; | |
| import org.junit.Assume; | |
| import org.junit.rules.TestRule; | |
| import org.junit.runner.Description; | |
| import org.junit.runners.model.Statement; | |
| import timber.log.Timber; | |
| import java.lang.annotation.ElementType; | |
| import java.lang.annotation.Retention; | |
| import java.lang.annotation.RetentionPolicy; |
I hereby claim:
To claim this, I am signing this object:
| # ps3 eye + 3.5mm speaker Raspberry Pi | |
| ## Suggested by http://julius.sourceforge.jp/forum/viewtopic.php?f=9&t=66 | |
| ## Modified by https://github.com/afzalive | |
| pcm.jack { | |
| type hw | |
| card ALSA | |
| } | |
| pcm.array { | |
| type hw | |
| card CameraB409241 |
| public class BottomSheetView extends NestedScrollView { | |
| private BottomSheetBehavior bottomSheetBehavior; | |
| private RecyclerView devicesListV; | |
| public BottomSheetView(Context context, AttributeSet attrs) { | |
| super(context, attrs); | |
| LayoutInflater.from(context).inflate(R.layout.bottom_sheet_view, this, true); |
| [ | |
| { | |
| "quote": "Life isn’t about getting and having, it’s about giving and being.", | |
| "author": "Kevin Kruse" | |
| }, | |
| { | |
| "quote": "Whatever the mind of man can conceive and believe, it can achieve.", | |
| "author": "Napoleon Hill" | |
| }, | |
| { |
| #Android and CI and Gradle (A How-To) | |
| There are tech stacks in this world that make it dead simple to integrate a <abbr title="Continuous Integration">CI</abbr> build system. <br> | |
| The Android platform is not one of them. | |
| Although Gradle is getting better, it's still a bit non-deterministic, and some of the fixes you'll need will start to feel more like black magic than any sort of programming. | |
| But fear not! It can be done! | |
| Before we embark on our journey, you'll need a few things to run locally: |
| #!/bin/sh | |
| # check for where the latest version of IDEA is installed | |
| IDEA=`ls -1d /Applications/Android\ Studio.app | tail -n1` | |
| wd=`pwd` | |
| # were we given a directory? | |
| if [ -d "$1" ]; then | |
| # echo "checking for things in the working dir given" | |
| wd=`ls -1d "$1" | head -n1` |