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 com.google.gson.Gson | |
enum class T {A, B} | |
open class A(val a: T) | |
class B(val b: T) : A(T.A) | |
fun main(args: Array<String>) { | |
val b = Gson().fromJson("{\"b\":\"B\"}", B::class.java) |
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
apply plugin: 'com.android.application' | |
android { | |
compileSdkVersion 27 | |
defaultConfig { | |
applicationId "com.nikialeksey.moxybug" | |
minSdkVersion 20 | |
targetSdkVersion 27 | |
} | |
buildTypes { |
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
// Inspired by https://gist.github.com/tzachz/419478fc8b009e953f5e5dc39f3f3a2a | |
// Task creates a .dot file with all inter-module dependencies | |
// Supports any depth of nested modules | |
task moduleDependencyReport { | |
doLast { | |
def file = new File("project-dependencies.dot") | |
file.delete() | |
file << "strict digraph {\n" | |
file << "splines=ortho\n" |
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 app.package.name | |
import io.gitlab.arturbosch.detekt.api.Finding | |
import io.gitlab.arturbosch.detekt.api.YamlConfig | |
import io.gitlab.arturbosch.detekt.core.DetektFacade | |
import io.gitlab.arturbosch.detekt.core.ProcessingSettings | |
import io.gitlab.arturbosch.detekt.rules.providers.* | |
import org.hamcrest.core.IsEqual | |
import org.junit.Assert | |
import org.junit.Test |
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.example | |
import com.atlascopco.hunspell.Hunspell | |
import org.hamcrest.core.IsEqual | |
import org.junit.Assert | |
import org.junit.Test | |
import java.io.BufferedReader | |
import java.io.File | |
import java.io.FileReader | |
import java.util.* |
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.eclipse.jgit.storage.file.FileRepositoryBuilder | |
import org.hamcrest.core.IsEqual | |
import org.junit.Assert | |
import org.junit.Test | |
import java.io.File | |
import java.util.* | |
class CommitVerifier { | |
@Test | |
fun changelogPresents() { |
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.apache.commons.math3.analysis.interpolation.NevilleInterpolator; | |
public class WtfCreator { | |
public static void main(String[] args) { | |
var text = "Hello, world!\n"; | |
double[] x = new double[text.length() + 1]; | |
double[] y = new double[text.length() + 1]; | |
for(var i = 0; i < text.length(); i++) { | |
x[i] = i; |