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 ru.maksim.sample | |
| import org.junit.jupiter.api.Test | |
| class ReifiedSampleKotlinTest { | |
| @Test | |
| fun foo() { | |
| val shapeManager = ShapeManager() | |
| val circle = Circle(10.0) |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| package="ru.maksim.sample"> | |
| <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | |
| <application | |
| android:name=".MyApp" | |
| android:allowBackup="true" |
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
| <!-- Sample-Application/app/src/main/AndroidManifest.xml --> | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| package="ru.maksim.sample"> | |
| <uses-permission android:name="android.permission.INTERNET" /> | |
| <application | |
| android:name=".MyApp" |
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 ru.maksim.sample | |
| import org.junit.jupiter.api.Test | |
| class ArrayAndListKotlinTest { | |
| @Test | |
| fun foo() { | |
| val intArray = intArrayOf(5, 3, 1, 2, 4) | |
| val list = intArray.asList() |
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 ru.maksim.sample | |
| import org.junit.jupiter.api.Test | |
| class SampleKotlinTest { | |
| @Test | |
| fun foo() { | |
| val arr = intArrayOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) | |
| insertionSort(arr) |
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 ru.maksim.sample | |
| import org.junit.jupiter.api.Test | |
| class SelectionSortTest { | |
| @Test | |
| fun foo() { | |
| val arr = intArrayOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) |
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 OtherState() { | |
| val state = remember { | |
| mutableStateOf("abc") | |
| } | |
| Column { | |
| Inner(text = state.value) | |
| } | |
| } |
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 ru.maksim.sample | |
| class Foo { | |
| @JvmField | |
| val a = 1 | |
| @JvmName("getStr") | |
| fun getB() = a.toString() |
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 ru.maksim.kotlin.flow | |
| import android.util.Log | |
| import java.security.SecureRandom | |
| import java.util.concurrent.Callable | |
| class DummyService(private val name: String) { | |
| private val random = SecureRandom() |
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
| // generated code! | |
| public final class Bar$$Factory implements Factory<Bar> { | |
| private MemberInjector<Bar> memberInjector = new ru.maksim.twitterstrsample.Bar$$MemberInjector(); | |
| @Override | |
| public Bar createInstance(Scope scope) { | |
| scope = getTargetScope(scope); | |
| Bar bar = new Bar(); | |
| memberInjector.inject(bar, scope); |