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
/* | |
* Copyright (c) 2019 toastkidjp. | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v1.0 | |
* which accompany this distribution. | |
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html. | |
*/ | |
package jp.toastkid.yobidashi.settings.color | |
import android.app.Dialog |
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
(it.background as? RippleDrawable)?.also { ripple -> | |
ripple.state = arrayOf(android.R.attr.state_pressed, android.R.attr.state_enabled) | |
.toIntArray() | |
menuSwitch.postDelayed({ ripple.state = IntArray(0) }, 200) | |
} |
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
private val detector = FirebaseVision.getInstance().visionTextDetector | |
// ... | |
detector.detectInImage(FirebaseVisionImage.fromBitmap(bitmap)) | |
.addOnSuccessListener { visionText -> | |
for (block in visionText.blocks) { | |
val text = block.text | |
for (line in block.lines) { |
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 jp.toastkid.imaging; | |
import org.apache.commons.imaging.ImageReadException; | |
import org.apache.commons.imaging.ImageWriteException; | |
import org.apache.commons.imaging.formats.jpeg.exif.ExifRewriter; | |
import org.junit.jupiter.api.BeforeEach; | |
import org.junit.jupiter.api.Test; | |
import java.io.IOException; | |
import java.io.OutputStream; |
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.database.Cursor; | |
import androidx.room.EntityInsertionAdapter; | |
import androidx.room.RoomDatabase; | |
import androidx.room.RoomSQLiteQuery; | |
import androidx.room.SharedSQLiteStatement; | |
import androidx.sqlite.db.SupportSQLiteStatement; | |
import java.lang.Override; | |
import java.lang.String; | |
import java.lang.SuppressWarnings; | |
import java.util.ArrayList; |
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.mapdb.Serializer; | |
import org.mapdb.SortedTableMap; | |
import org.mapdb.volume.MappedFileVol; | |
import org.mapdb.volume.Volume; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; |
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 io.reactivex.Completable | |
import io.reactivex.schedulers.Schedulers | |
import java.util.* | |
/** | |
* Created by toastkidjp on 2019/05/14. | |
*/ | |
fun main(args: Array<String>) { | |
val first = Completable.fromCallable { | |
Thread.sleep(3000L) |
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
@JvmStatic | |
fun main(args: Array<String>) { | |
val split = Okio.buffer(Okio.source(javaClass.classLoader.getResourceAsStream("regnal/regnal_year.txt"))).readUtf8() | |
.split(System.lineSeparator()) | |
val wa = split.filter { it.contains("和") } | |
println("${wa.size}: $wa") | |
println(split | |
.flatMap { it.toCharArray().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
From 9356cb97b033cc8a45f29fd553949413a56db2de Mon Sep 17 00:00:00 2001 | |
From: Toast Kid <super_q1m@yahoo.co.jp> | |
Date: Sun, 4 Nov 2018 11:29:35 +0900 | |
Subject: [PATCH] Replace to AndroidX. | |
--- | |
app/build.gradle | 23 +++++++++---------- | |
.../toastkid/clock/ClockSettingsActivity.kt | 8 +++---- | |
.../jp/toastkid/clock/SettingPagerAdapter.kt | 6 ++--- | |
.../clock/libs/PrivacyPolicyLauncher.kt | 4 ++-- |
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
private var start = 0L | |
fun main(args: Array<String>) { | |
doWithRange() | |
doWithSequence() | |
} | |
private fun doWithRange() { | |
resetTime() | |
val range = (1..5).filter { |