This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.OutOfMemoryError: Metaspace | |
at java.base/java.lang.ClassLoader.defineClass1(Native Method) | |
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) | |
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151) | |
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:514) | |
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:422) | |
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:416) | |
at java.base/java.security.AccessController.executePrivileged(AccessController.java:784) | |
at java.base/java.security.AccessController.doPrivileged(AccessController.java:691) | |
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:415) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.Exception: Main looper has queued unexecuted runnables. This might be the cause of the test failure. You might need a shadowOf(getMainLooper()).idle() call. | |
at org.robolectric.android.internal.AndroidTestEnvironment.checkStateAfterTestFailure(AndroidTestEnvironment.java:502) | |
at org.robolectric.RobolectricTestRunner$HelperTestRunner$1.evaluate(RobolectricTestRunner.java:581) | |
at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$0(SandboxTestRunner.java:263) | |
at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:89) | |
at java.util.concurrent.FutureTask.run(FutureTask.java:266) | |
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | |
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | |
at java.lang.Thread.run(Thread.java:748) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'com.android.application' | |
id 'kotlin-android' | |
id 'kotlin-android-extensions' | |
id 'kotlin-kapt' | |
id 'dagger.hilt.android.plugin' | |
} | |
android { | |
compileSdkVersion 29 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function git-ls { | |
# tree respecting gitignore | |
local ignored=$(git ls-files -ci --others --directory --exclude-standard) | |
local ignored_filter=$(echo "$ignored" \ | |
| egrep -v "^#.*$|^[[:space:]]*$" \ | |
| sed 's~^/~~' \ | |
| sed 's~/$~~' \ | |
| tr "\\n" "|") | |
tree --prune -I ".git|${ignored_filter: : -1}" "$@" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mvvmize () { | |
# to hold local data source classes such as room,sqlite,realm etc. | |
mkdir -p data/local && | |
# to hold remote data source such as Retrofit, OkHttp etc | |
mkdir -p data/remote && | |
# to hold repository classes that will manage both local and remote data sources | |
mkdir -p data/repositories && |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function animOff(){ | |
adb shell settings put global window_animation_scale 0 & | |
adb shell settings put global transition_animation_scale 0 & | |
adb shell settings put global animator_duration_scale 0 | |
} | |
function animOn(){ | |
adb shell settings put global window_animation_scale 1 & | |
adb shell settings put global transition_animation_scale 1 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
😇 Initializing auto-motion ... | |
🔊 Analyzing audio stream... | |
✔️ Audio analysis finishednition: 100% |###########################| Time: 0:05:19 | |
🎥 Analyzing video stream... | |
✔️ Video analysis finished | |
🎸 Analyzing BGM... | |
↔️↔️↔️↔️↔️↔️↔️↔️↔️↔️↔️↔️↔️↔️↔️↔️↔️↔️↔️↔️ | |
↪ Total BGM duration : 00:12:07 | |
↪ Passed BGM duration : 00:03:41 | |
❗ Remaining BGM needed : 00:08:26 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pull_file(){ | |
filePath=$(adb shell find /storage/emulated/0 -iname "*$1*" | tr -d '\r' | xargs -n1) | |
x=$(echo "$filePath" | tr '\n' ' ' | xargs) | |
adb pull "$x" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.theapache64.mockitosample | |
import androidx.test.core.app.ActivityScenario | |
import androidx.test.ext.junit.runners.AndroidJUnit4 | |
import org.junit.Assert.assertEquals | |
import org.junit.Before | |
import org.junit.Test | |
import org.junit.runner.RunWith | |
import org.mockito.Mock | |
import org.mockito.MockitoAnnotations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Calculator { | |
fun divide(a: Int, b: Int): Int { | |
return a / b | |
} | |
} | |
@RunWith(Parameterized::class) | |
class ParameterizedTest( | |
private val num1: Int, | |
private val num2: Int, |