add 2 properties to in Manifest file
android:usesCleartextTraffic="true"
android:requestLegacyExternalStorage="true"
build.gradle (app) set targetSdkVersion to 29
aiohttp==3.8.3 | |
aiosignal==1.3.1 | |
async-timeout==4.0.2 | |
attrs==22.2.0 | |
base58==2.1.1 | |
bitarray==2.6.2 | |
certifi==2022.12.7 | |
charset-normalizer==2.1.1 | |
cytoolz==0.12.1 | |
eth-abi==2.2.0 |
0x42543853a72EDb6f1FF9bddAB0cf4676187EC28a, | |
0xDcFD37eB9Db906528a8e750DA2d3270aDfc9DdCF, | |
0x00409fC839a2Ec2e6d12305423d37Cd011279C09, | |
0xE9748aC6c9D88719BD160DeF338e7bC520Fa9afa, | |
0xaA6e200d3552c1b1E8e0B7E925fb734c194f7Ebc, | |
0x9Ef4074529Cf8214f0AcF2eB8d3E9487747F9273, | |
0x2c83a7387684133F86c76b4719876d70e86100F4, | |
0x3e4F4DEe05C6B2f42704A3a713d4Ae4A084Ed8Ed, | |
0x762ae8d504Adb01A50D6d0b7acE52fbA786f9B09, | |
0x974A60bf964232c88625C9cd843f3C972e77841F, |
# shuffle to tmp file | |
shuf $1 -o $1.tmp | |
# shuffle 16 times | |
for (( i=1; i<=16; i++ )); do | |
shuf $1.tmp -o $1.tmp | |
done | |
# last shuffle and show winner | |
shuf $1.tmp -n 1 |
let count_seed = (word_size, seed_size) => { | |
if (seed_size == 1) return word_size; | |
return word_size * count_seed(word_size-1, seed_size-1); | |
} | |
console.log('seed size 12', '=>', count_seed(2048, 12).toLocaleString()); | |
console.log('seed size 24', '=>', count_seed(2048, 24).toLocaleString()); | |
// seed size 12 => 5,271,537,971,301,488,400,000,000,000,000,000,000,000 | |
// seed size 24 => 25,892,008,055,647,378,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 |
fun sleep8bit (second: Int, width: Int=10, callback: (String)->Unit) { | |
val d = (second * 1000 / width ).toLong() | |
(1..width).forEach { | |
Thread.sleep(d) | |
val progress = "[${"#".repeat(it)}${" ".repeat(width-it)}]" | |
callback(progress) | |
} | |
} |
fun main() { | |
val h = Handler(Looper.getMainLooper()) | |
GlobalScope.launch(Dispatchers.Main) { | |
(1..5).forEach { proc(it, h) } | |
} | |
h.removeCallbacksAndMessages(null) | |
} | |
suspend fun proc(no: Int, h: Handler): Boolean = suspendCoroutine { | |
h.post { |
import com.alibaba.fastjson.JSON | |
data class Setting ( | |
val title: String, | |
val info: List<TimeRange> | |
) | |
data class TimeRange ( | |
val from: String, | |
val to: String, | |
val temp: Int |
class ReadLine { | |
private val EOL = listOf( | |
13.toByte(), // CR | |
10.toByte() // LR | |
) | |
private val EOL_SIZE = EOL.size | |
private val MSG_MAX_LENGTH = 99 | |
private var line = byteArrayOf() |
package com.diewland.installmanager.util | |
import android.util.Log | |
import java.io.BufferedReader | |
import java.io.DataOutputStream | |
import java.io.InputStreamReader | |
object SuUtil { | |
private const val TAG = "SU_UTIL" |