- 
Roll-your-own lazy singleton public final class Single { private static Single INSTANCE; private Single() {} 
Welcome to step by step hands-on guide to setup webpack in your upcoming typescript project. Please follow the steps and you should be able to create your own webpack project. Please download the source code from github.
You will learn below things:
- ✅Create a Typescript node.js project.
- ✅Install Dependencies with webpack & typescripts.
- ✅Use Webpack CLI to crate webpack.config.jsfile and modify webpack.config.js based on our need.
| public class StereoVolumeProcessor implements AudioProcessor { | |
| private int channelCount; | |
| private int sampleRateHz; | |
| private int[] pendingOutputChannels; | |
| private boolean active; | |
| private int[] outputChannels; | |
| private ByteBuffer buffer; | |
| private ByteBuffer outputBuffer; | 
| /** | |
| * Used as a wrapper for data that is exposed via a LiveData that represents an event. | |
| */ | |
| open class Event<out T>(private val content: T) { | |
| var hasBeenHandled = false | |
| private set // Allow external read but not write | |
| /** | |
| * Returns the content and prevents its use again. | 
| import kotlinx.coroutines.experimental.DefaultDispatcher | |
| import kotlinx.coroutines.experimental.channels.ReceiveChannel | |
| import kotlinx.coroutines.experimental.channels.consumeEach | |
| import kotlinx.coroutines.experimental.channels.produce | |
| import kotlinx.coroutines.experimental.delay | |
| import kotlinx.coroutines.experimental.runBlocking | |
| import kotlin.coroutines.experimental.CoroutineContext | |
| fun <T> ReceiveChannel<T>.debounce( | |
| wait: Long = 300, | 
| #!/bin/bash | |
| # from https://chromium.woolyss.com/ | |
| # and https://gist.github.com/addyosmani/5336747 | |
| # and https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md | |
| sudo apt-get update | |
| sudo apt-get install software-properties-common | |
| sudo add-apt-repository ppa:canonical-chromium-builds/stage | |
| sudo apt-get update | |
| sudo apt-get install chromium-browser | |
| chromium-browser --headless --no-sandbox http://example.org/ | 
- Login to https://web.telegram.org
- Copy-paste contents of telegram-scripts.jsinto JS console
- Run showContacts()to get the list of contacts with ids
- Run saveChat(userId)whereuserIdis the id from step 3
Process can take a while, check console for progress. Occasionall FLOOD_WAIT errors are expected. Once done, browser will download the JSON file.
Prior to Android 7, the system had a single preferred locale, and fallback behavior was quite rudimentary. Starting with Android 7, the user can now specify a priority list of locales, and fallback behavior is improved.
However, in many cases it is still surprisingly difficult to make full use of locale fallback, and there are some hidden gotchas when trying to fully support both Android 7 and earlier versions.
| @file:Suppress("NOTHING_TO_INLINE") | |
| import kotlin.experimental.and // Used for Byte | |
| import kotlin.experimental.inv // Used for Byte | |
| import kotlin.experimental.or // Used for Byte | |
| inline fun Int.hasFlag(flag: Int) = flag and this == flag | |
| inline fun Int.withFlag(flag: Int) = this or flag | |
| inline fun Int.minusFlag(flag: Int) = this and flag.inv() | 
