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
public class Main { | |
public static void main(String[] args) { | |
SingleLinkList<Integer> list = new SingleLinkList<>(); | |
Random rand = new Random(); | |
for (int i = 0; i < 10; i++) { | |
list.add(rand.nextInt(100)); | |
} | |
System.out.println("List data: " + list.toString() + " with size: " + list.size()); |
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 TestWidget extends StatefulWidget{ | |
@override | |
State<StatefulWidget> createState() => TestState(); | |
} | |
class TestState extends State<TestWidget> { | |
String _text; | |
@override | |
Widget build(BuildContext context) { | |
if (_text == null) |
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 MyScaffold extends StatelessWidget { | |
var restClient = RestClient(); | |
var dropDownCurrencies = DropDownCurrency(); | |
@override | |
Widget build(BuildContext context) { | |
// Material is a conceptual piece of paper on which the UI appears. | |
restClient.loadConfig().then((value) { | |
print("load finish. result: ${value.status}"); |
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.gorkapstroy.sensorlogger.api.mock; | |
import android.content.Context; | |
import android.util.Log; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.lang.reflect.Method; | |
import java.util.ArrayList; | |
import java.util.HashMap; |
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
Метод класса B | |
fun reserveBadCaseDevice(workerId: Int, | |
condition: DeviceCondition, | |
result: (Unit) -> Unit, | |
errorText: (String) -> Unit, | |
errorId: (Int) -> Unit) { | |
val data = ReservedWorkerData( | |
DeviceState.TAKE, | |
condition, null, |
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 A { | |
val b: B | |
val c: String = "" | |
fun a(value: Int) { | |
b.doSomething( | |
value, | |
{ | |
c = it + "result good" |
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
#retrofit | |
# Platform calls Class.forName on types which do not exist on Android to determine platform. | |
-dontnote retrofit2.Platform | |
# Platform used when running on Java 8 VMs. Will not be used at runtime. | |
-dontwarn retrofit2.Platform$Java8 | |
# Retain generic type information for use by reflection by converters and adapters. | |
-keepattributes Signature | |
# Retain declared checked exceptions for use by a Proxy instance. | |
-keepattributes Exceptions |
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
# By default, the flags in this file are appended to flags specified | |
# in /usr/share/android-studio/data/sdk/tools/proguard/proguard-android.txt | |
# For more details, see | |
# http://developer.android.com/guide/developing/tools/proguard.html | |
##---------------Begin: proguard configuration common for all Android apps ---------- | |
-optimizationpasses 5 | |
-dontusemixedcaseclassnames | |
-dontskipnonpubliclibraryclasses |
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
override fun intercept(chain: Interceptor.Chain): Response { | |
val request = chain.request() | |
val response: Response? | |
try { | |
response = chain.proceed(request) | |
val responseBody = response.body() |
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
public class ExampleActivity extends AppCompatActivity implements SmartTimer.OnSecondTickListener { | |
private static final String TAG = TimerActivity.class.getSimpleName(); | |
private TextView mTextViewTime; | |
private Button mButtonStart; | |
private Button mButtonStop; | |
private Button mButtonClear; | |
private SmartTimer mSmartTimer = new SmartTimer(this, this); |
NewerOlder