This file contains 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
[0,25,13,-9,-18,0,137,13,-16,0,3,-9,-9,-9,136,13,12,0,-12,0,-11,-9,0,0,3,-9,9,8,-18,0,135,13,-16,0,3,-9,-9,-9,134,13,12,0,-12,0,-11,-9,0,0,3,-9,9,8,-18,0,133,13,-16,0,3,-9,-9,-9,132,13,12,0,-12,0,-11,-9,0,0,3,-9,9,8,-18,0,131,13,-16,0,3,-9,-9,-9,130,13,12,0,-12,0,-11,-9,0,0,3,-9,9,8,-18,0,129,13,-16,0,3,-9,-9,-9,128,13,12,0,-12,0,-11,-9,0,0,3,-9,9,8,-18,0,127,13,-16,0,3,-9,-9,-9,126,13,12,0,-12,0,-11,-9,0,0,3,-9,9,8,-18,0,125,13,-16,0,3,-9,-9,-9,124,13,12,0,-12,0,-11,-9,0,0,3,-9,9,8,-18,0,123,13,-16,0,3,-9,-9,-9,122,13,12,0,-12,0,-11,-9,0,0,3,-9,9,8,-18,0,121,13,-16,0,3,-9,-9,-9,120,13,12,0,-12,0,-11,-9,0,0,3,-9,9,8,-18,0,119,13,-16,0,3,-9,-9,-9,118,13,12,0,-12,0,-11,-9,0,0,3,-9,9,8,-18,0,117,13,-16,0,3,-9,-9,-9,116,13,12,0,-12,0,-11,-9,0,0,3,-9,9,8,-18,0,115,13,-16,0,3,-9,-9,-9,114,13,12,0,-12,0,-11,-9,0,0,3,-9,9,8,-18,0,113,13,-16,0,3,-9,-9,-9,112,13,12,0,-12,0,-11,-9,0,0,3,-9,9,8,-18,0,111,13,-16,0,3,-9,-9,-9,110,13,12,0,-12,0,-11,-9,0,0,3,-9,9,8,-18,0,109,13,-16,0,3,-9,-9,-9,108,13,12,0,-12,0,-11,-9,0,0,3 |
This file contains 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 org.junit.Test | |
import java.util.* | |
class MergeArraySortTest { | |
@Test | |
fun test() { | |
val original = LinkedList(mutableListOf(4, 5, 8, 11, 15, 17, 20)) //n | |
val addition = | |
LinkedList(mutableListOf(1, 3, 6, 10, 11, 13, 19, 21)) //m |
This file contains 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
<!-- You can change the parent around to whatever you normally use --> | |
<style name="DebugColors" parent="Theme.AppCompat"> | |
<!-- System colors --> | |
<item name="android:windowBackground">@color/__debugWindowBackground</item> | |
<item name="android:colorPressedHighlight">#FF4400</item> | |
<item name="android:colorLongPressedHighlight">#FF0044</item> | |
<item name="android:colorFocusedHighlight">#44FF00</item> | |
<item name="android:colorActivatedHighlight">#00FF44</item> |
This file contains 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 SomeClass { | |
private val channel: BroadcastChannel<List<Purchase>> = BroadcastChannel(Channel.CONFLATED) | |
override fun onPurchasesUpdated(responseCode: Int, purchases: MutableList<Purchase>?) { | |
GlobalScope.launch { | |
purchases?.run { channel.send(toList()) } | |
} | |
} | |
This file contains 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 java.security.SecureRandom | |
/** | |
* Created by alexeypushkarev on 04.06.17. | |
*/ | |
fun randomArrayOfUniques(size: Int, maxValue: Int): List<Int> { | |
if (size > maxValue) { | |
throw IllegalArgumentException("maxValue should be greater than size") | |
} |
This file contains 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.avs.express.android.interactor.common; | |
/** | |
* Базовый класс репозитория | |
*/ | |
public class BaseRepository { | |
private ConnectionQualityProvider connectionQualityProvider; | |
public BaseRepository(ConnectionQualityProvider connectionQualityProvider) { |
This file contains 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
/** | |
* Осуществляет гибридный запрос, в методе происходит объединение данных приходящих с сервера и из кеша | |
* | |
* @param cacheRequest запрос к кешу | |
* @param networkRequestCreator функция, которая должна вернуть запрос к серверу, | |
* Integer параметр этой функции определяет {@link QueryMode} | |
* @param <T> тип возвращаемого значения | |
*/ | |
protected <T> Observable<T> hybridQuery(Observable<T> cacheRequest, | |
Func1<Integer, Observable<T>> networkRequestCreator) { |
This file contains 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 android.content.Context; | |
import android.content.pm.PackageInfo; | |
import android.content.pm.PackageManager; | |
import android.content.pm.PackageManager.NameNotFoundException; | |
import android.content.pm.Signature; | |
public class TamperCheck { | |
//we store the hash of the signture for a little more protection | |
private static final String APP_SIGNATURE = "1038C0E34658923C4192E61B16846"; |
This file contains 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
```java | |
@OnClick({R.id.cvAnswerA, R.id.cvAnswerB, R.id.cvAnswerC, R.id.cvAnswerD}) | |
public void onClick(View v) { | |
Transition slideLeft = new Slide(Gravity.LEFT) | |
.addListener(new Transition.TransitionListenerAdapter() { | |
@Override | |
public void onTransitionEnd(Transition transition) { | |
TransitionManager.beginDelayedTransition(container, new Slide(Gravity.RIGHT)); | |
cvPicture.setVisibility(View.VISIBLE); |