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 kotlinx.coroutines.delay | |
| import kotlinx.coroutines.launch | |
| import kotlinx.coroutines.runBlocking | |
| fun main() { | |
| runBlocking { | |
| launch { | |
| val result1 = fun1() | |
| println(result1) | |
| val result2 = fun2() |
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 kotlinx.coroutines.async | |
| import kotlinx.coroutines.delay | |
| import kotlinx.coroutines.launch | |
| import kotlinx.coroutines.runBlocking | |
| fun main() { | |
| runBlocking { | |
| launch { | |
| val resultDeferred1 = async { fun1() } | |
| val resultDeferred2 = async { fun2() } |
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
| object VinValidator2 { | |
| private val values = intArrayOf(1, 2, 3, 4, 5, 6, 7, 8, 0, 1, | |
| 2, 3, 4, 5, 0, 7, 0, 9, 2, 3, | |
| 4, 5, 6, 7, 8, 9) | |
| private val weights = intArrayOf(8, 7, 6, 5, 4, 3, 2, 10, 0, 9, | |
| 8, 7, 6, 5, 4, 3, 2) | |
| fun isValid(vin: String): Boolean { | |
| var s = vin |
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 retrofit2.Retrofit; | |
| import retrofit2.converter.gson.GsonConverterFactory; | |
| public class RetrofitWrapper { | |
| private Retrofit retrofit; | |
| private String baseUrl; | |
| public RetrofitWrapper(String baseUrl) { | |
| this.baseUrl = baseUrl; |
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
| @Composable | |
| fun ListItems( | |
| modifier: Modifier = Modifier, | |
| fastFiltersSelectDelegate: ItemsDelegate, | |
| isAutoScroll: Boolean = false, | |
| ) { | |
| val items by fastFiltersSelectDelegate.filterItems.collectAsStateWithLifecycle() | |
| val listState = rememberLazyListState() | |
| LazyRow( | |
| modifier = Modifier |
OlderNewer