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
//Create a new CefAppBuilder instance | |
val builder = CefAppBuilder(); | |
builder.setInstallDir(File("jcef-bundle")); //Default | |
builder.setProgressHandler(ConsoleProgressHandler()); //Default | |
builder.addJcefArgs("--disable-gpu"); //Just an example | |
builder.cefSettings.windowless_rendering_enabled = false; //Default - select OSR mode | |
val cefApp = builder.build() | |
CefApp.addAppHandler(object : CefAppHandlerAdapter(null) { | |
override fun stateHasChanged(state: CefAppState) { |
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
val sizePx = with(LocalDensity.current) { 100.dp.toPx() } | |
val anchors = mapOf(-sizePx to 1, sizePx to 0) | |
val swipeableState = rememberSwipeableState( | |
initialValue = 0, | |
confirmStateChange = { | |
if (it == 1) { | |
viewModel.index.value-- | |
} else if (it == 0) { | |
viewModel.index.value++ | |
} |
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
val image = ImageIO.read(Files.newInputStream(Paths.get("C:/Users/toastkidjp/Pictures/mikaKunimoto_20201114_43.png"))) | |
val w1 = image.getWidth() | |
val h1 = image.getHeight() | |
val im2 = BufferedImage(w1, h1, BufferedImage.TYPE_INT_ARGB) | |
val g2 = im2.createGraphics() | |
val rect = Rectangle2D.Double(0.0, 0.0, w1.toDouble(), h1.toDouble()) | |
g2.drawImage(image, 0, 0, null) | |
g2.color = Color(220, 220, 220, 230) | |
g2.fill(rect) | |
g2.dispose() |
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) 2020 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. | |
*/ | |
import android.hardware.Sensor | |
import android.hardware.SensorEvent |
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.yobidashi.compact.migration | |
import jp.toastkid.yobidashi.compact.NameDecoder | |
import java.io.IOException | |
import java.nio.file.Files | |
import java.nio.file.Paths | |
object ArticleFileRenaming { | |
private val nameDecoder = NameDecoder() |
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.browser.floating | |
import android.annotation.SuppressLint |
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
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { | |
val consumerIrManager = | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { | |
activitySupplier().getSystemService(Context.CONSUMER_IR_SERVICE) as? ConsumerIrManager | |
} else { | |
null | |
} | |
if (consumerIrManager?.hasIrEmitter() == true) { | |
consumerIrManager.transmit( | |
38000, |
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.main | |
import android.view.GestureDetector |
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
var ps = document.getElementsByTagName('p'); | |
var arry = []; | |
for (var i = 0; i < ps.length; i++) { | |
arry[i] = ps[i].textContent; | |
} | |
arry; |
NewerOlder