Skip to content

Instantly share code, notes, and snippets.

@kwhrstr
kwhrstr / KeyedEnqueue.scala
Created October 12, 2021 01:07
fs2 groupBy with key. notify timeout. I was refining to https://gist.github.com/Daenyth/bcb0b4b8978dc9fa00735f374f5f2d92
package fs2utils
import cats.data.NonEmptyList
import cats.effect.{Concurrent, Ref, Resource}
import cats.effect.kernel.Temporal
import cats.effect.std.Queue
import cats.implicits._
import fs2.{Pipe, Stream}
import scala.concurrent.duration.FiniteDuration
@kwhrstr
kwhrstr / KotlinEditText.kt
Last active April 16, 2018 03:59
Kotlinでcustom viewを実装する時の注意点 ref: https://qiita.com/kwhrstr1206/items/93827190a535b11bd064
class KotlinEditText : EditText {
constructor(context: Context) : super(context, null)
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
...
}
@kwhrstr
kwhrstr / MainActivity.kt
Last active August 5, 2018 12:55
Android VulkanでCamera画像を表示する。 ref: https://qiita.com/kwhrstr1206/items/44fb2b6f89126cf78437
class MainActivity : AppCompatActivity(){
//省略
}