This file contains hidden or 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
Run the emulator without Audio | |
$ emulator -avd Pixel_2_API_27 -qemu -no-audio | |
This file contains hidden or 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
echo "=================================================" | |
echo "Enable and disable Android animations" | |
echo "Usage" | |
echo "Enable animations: ./android_animations.sh 1" | |
echo "Disable animations: ./android_animations.sh 0" | |
echo "Value can also be decimals in the range of 0 - 1" | |
echo "=================================================" | |
adb shell settings put global window_animation_scale $1 | |
adb shell settings put global transition_animation_scale $1 |
This file contains hidden or 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
import androidx.lifecycle.LifecycleCoroutineScope | |
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.Job | |
import kotlin.coroutines.CoroutineContext | |
internal interface ManagedCoroutineScope : CoroutineScope { | |
fun launch(block: suspend CoroutineScope.() -> Unit): Job | |
} | |
internal class LifecycleManagedCoroutineScope( |
This file contains hidden or 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
sealed class Result<T> { | |
data class Success<T>(val data: T) : Result<T>() | |
data class NetworkError<T>(val code: Int, val t: Throwable? = null) : Result<T>() | |
data class NetworkFailure<T>(val t: Throwable) : Result<T>() | |
} |
This file contains hidden or 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
abstract class BaseService { | |
suspend fun <T : Any> apiCall(call: suspend () -> Response<T>): Result<T> { | |
val response: Response<T>? | |
try { | |
response = call.invoke() | |
} catch (ex: Exception) { | |
return NetworkFailure(ex) | |
} | |
if (response.isSuccessful) { | |
response.body()?.let { return Success(it) } ?: return NetworkFailure( |
This file contains hidden or 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
{ | |
"info": { | |
"version": 5 | |
}, | |
"data": [ | |
{ | |
"symbol": "ZWR", | |
"name": "Zimbabwe Dollar", | |
"id": 935 | |
}, |
This file contains hidden or 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
{ | |
"42": "42 Coin", | |
"300": "300 token", | |
"365": "365Coin", | |
"404": "404Coin", | |
"433": "433 Token", | |
"611": "SixEleven", | |
"808": "808", | |
"888": "Octocoin", | |
"1337": "EliteCoin", |
First of all: YUV pixel formats and Recommended 8-Bit YUV Formats for Video Rendering. Chromium's source code contains good documentation about those formats too: chromium/src/media/base/video_types.h and chromium/src/media/base/video_frame.cc (search for RequiresEvenSizeAllocation()
, NumPlanes()
and those kinds of functions).
You can think of an image as a superposition of several planes (or layers in a more natural language). YUV formats have three planes: Y
, U
, and V
.
Y
is the luma plane, and can be seen as the image as grayscale. U
and V
are reffered to as the chroma planes, which are basically the colours. All the YUV formats have these three planes, and differ by the different orderings of them.
This file contains hidden or 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
Deps | |
## yarn add express | |
## yarn add @babel/preset-env @babel/preset-react @babel/register ignore-styles | |
## Build react app | |
## yarn build | |
## Add file | |
## server/server.js |
NewerOlder