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
class App : Application() { | |
override fun onCreate() { | |
initVoxClient(applicationContext) | |
} | |
private fun initVoxClient(context: Context) { | |
voxClient = Voximplant.getClientInstance( | |
Executors.newSingleThreadExecutor(), | |
context, |
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
class App : Application() { | |
override fun onCreate() { | |
initVoxClient(applicationContext) | |
} | |
private fun initVoxClient(context: Context) { | |
voxClient = Voximplant.getClientInstance( //row #168 | |
Executors.newSingleThreadExecutor(), | |
context, |
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
class GlobalFeature @Inject constructor() | |
: BaseFeature< | |
GlobalFeature.State, | |
>( | |
initialState = State(), | |
) { | |
data class State( | |
val isSmthInProgress: Boolean = false | |
) |
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
package rxjava | |
import io.reactivex.Observable | |
import io.reactivex.Single | |
import io.reactivex.functions.BiConsumer | |
import java.util.concurrent.Callable | |
fun main() { | |
// val list = listOf(1, 2, 3, 4, 5) | |
val list = listOf<Int>() |
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
/* | |
* Copyright (C) 2017 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
class PushPopMax { | |
private val mutableList = mutableListOf<Pair<Int, Int>>() | |
fun push(foo: Int) { | |
mutableList.lastOrNull { last -> | |
if (foo > last.second) { | |
mutableList.add(foo to foo) | |
} else { | |
mutableList.add(foo to last.second) |
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
class ExmplAdapter(context: Context, | |
@LayoutRes resource: Int, | |
items: List<ChipsAdapter.CounterPartyData>) : | |
ArrayAdapter<ChipsAdapter.CounterPartyData>(context, resource, items) { | |
fun evaluateWithoutNotify(action: (() -> Unit)) { | |
setNotifyOnChange(false) | |
action.invoke() | |
setNotifyOnChange(true) |