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.io.File | |
import java.util.* | |
import kotlin.math.pow | |
private data class GraphNode(val label: Int, val parent: Int?, val depth: Int) | |
private val nodes = mutableMapOf<Int, GraphNode>() | |
/** | |
441888214 |
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
<manifest ... > | |
... | |
<application ... > | |
... | |
<meta-data | |
android:name="io.fabric.ApiKey" |
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
fun readFileContent(file: File) : String { | |
val reader = FileReader(file) | |
fun readBuffer(bufferedReader: BufferedReader) : String { | |
val result = StringBuilder() | |
fun finally() : String { | |
bufferedReader.close() | |
return result.toString() | |
} |
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
public class SampleTest { | |
@Test | |
public void testObservableParallel() { | |
List<String> terminals = new ArrayList<>(); | |
for (int i = 0; i < 100000; i++) { | |
terminals.add(i, String.format("Terminal %s", i + 1)); | |
} | |
PublishSubject<String> publisher = PublishSubject.create(); |
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
applicationVariants.all { variant -> | |
variant.outputs.each { output -> | |
output.outputFile = new File( | |
output.outputFile.parent, | |
output.outputFile.name.replace(".apk", "-${variant.versionName}.apk")) | |
} | |
} |
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 com.github.rodrigohenriques.samples.customview; | |
import android.animation.Animator; | |
import android.animation.AnimatorListenerAdapter; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.graphics.Matrix; | |
import android.graphics.Rect; | |
import android.graphics.RectF; | |
import android.os.Build; |
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
public class ClickToSelectEditText<T extends Listable> extends AppCompactEditText { | |
List<T> mItems; | |
String[] mListableItems; | |
CharSequence mHint; | |
OnItemSelectedListener<T> onItemSelectedListener; | |
public ClickToSelectEditText(Context context) { | |
super(context); |