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 com.example | |
import org.apache.commons.math3.stat.inference.ChiSquareTest | |
import java.util.Random | |
/** | |
* カイ二乗検定のデモ | |
* https://github.com/komiya-atsushi/dbflute-fes-2014-demo/blob/master/src/main/java/biz/k11i/demo/stat/ChiSquareTestDemo.java | |
* Kotlin ver | |
*/ |
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
@file:Suppress("DataClassPrivateConstructor") | |
// ADT and Smart Constructor | |
package com.example.algebra | |
import java.math.BigDecimal | |
import java.util.* | |
// domain modeling part |
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 com.example.forloop | |
sealed class Result<T, E> { | |
data class Success<T, E>(val t: T) : Result<T, E>() | |
data class Failure<T, E>(val e: E) : Result<T, E>() | |
} | |
sealed class MultiResult<T, E> { | |
data class Success<T, E>(val t: T, val ers: List<E>?) : MultiResult<T, E>() | |
data class Failures<T, E>(val msg: String, val ers: List<E>) : MultiResult<T, E>() |
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 input.your.pkg | |
import android.graphics.Bitmap | |
import android.view.View | |
import com.google.firebase.ml.vision.FirebaseVision | |
import com.google.firebase.ml.vision.common.FirebaseVisionImage | |
import kotlinx.android.synthetic.main.activity_main.* | |
public fun MainActivity.detectTextOnCloud(bitmap: Bitmap) { |
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 mobi.pooh3.thefun.fp.bitree | |
import kotlin.test.assertFalse | |
import kotlin.test.assertTrue | |
/* | |
The Fun of Programming 1-1 [IFPH Section 6.3] | |
Q, 6つのjoinのうち2つは、そのどちらか一方だけを使うと、すべての木が線形になってしまう。どの二つか? | |
A, 1 & 5 |
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
interface AFunctionExecutor { | |
fun execute(tag: String = "None", name: String = "Taro", age: Int=32) | |
} | |
class DefaultFunctionExecutor : AFunctionExecutor { | |
override fun execute(tag: String , name: String, age: Int) = println("[$tag] $name($age)") | |
} | |
class SoccerFunctionExecutor : AFunctionExecutor { | |
override fun execute(tag: String, name: String, age: Int) { |
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 mobi.pooh3..util | |
/* | |
Copyright (c) <2018> <PooheMobi@GitHub> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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
import android.media.ToneGenerator | |
import android.os.Bundle | |
import android.support.v4.app.Fragment | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import com.jakewharton.rxbinding2.widget.text | |
import com.jakewharton.rxbinding2.widget.userChanges | |
import io.reactivex.Observable |
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
// Row.kt | |
sealed class Row { | |
data class Header( | |
val columns: List<String> | |
) : Row() | |
data class Item( | |
val id: Long, | |
val name: String, | |
val price: Long? |
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
sealed class Row { | |
data class Header( | |
val columns: List<String> | |
) : Row() | |
data class Item( | |
val id: Long, | |
val name: String, | |
val price: Long? | |
) : Row() |