I hereby claim:
- I am cpdyj on github.
- I am iseki (https://keybase.io/iseki) on keybase.
- I have a public key ASCnrr1PRCnVZFjg0wmSa2D2lABjiVq7Ju4yZNhwU9MwmQo
To claim this, I am signing this object:
fun main(args:Array<String>){ | |
val a=IntRange(0,3) | |
val s="0123456" | |
println(s.substring(a)) | |
while(true){} // <<<----- BUG !!! | |
} |
-----BEGIN PGP SIGNED MESSAGE----- | |
Hash: SHA256 | |
This key has been revoke! | |
I lost all secret key.(Except encrypt and signature key which is in yubikey.) | |
I cannot generate a revocation. | |
iseki | |
2019/6/21 | |
-----BEGIN PGP SIGNATURE----- |
I hereby claim:
To claim this, I am signing this object:
class RingBuffer<T:Any>(val size:Int){ | |
init { | |
check(size>-1) | |
} | |
private var putptr=0 | |
private var getptr=0 | |
private var free=size | |
private val array= arrayOfNulls<Any>(size) | |
fun put(o:T){ | |
if (free==0){ |
package bot | |
import org.apache.commons.codec.net.URLCodec | |
import java.io.FileReader | |
import java.io.FileWriter | |
import java.net.URL | |
fun main() { | |
// 输入为 find 命令的输出去掉首行 |
All data from: github.com/overtrue/pinyin | |
by MIT license | |
thanks. |
internal fun <T> List<T>.slice(indices: Iterable<Int>, default: (index: Int) -> T): List<T> { | |
fun measureSizeOrDefault(iterator: Iterable<Int>, defaultValue: Int): Int = | |
when (iterator) { | |
is IntProgression -> { | |
iterator.run { | |
when { | |
step > 0 -> if (first > last) 0 else ((last - first) / step) + 1 | |
step < 0 -> if (last > first) 0 else ((first - last) / step.absoluteValue) + 1 | |
else -> error("step equals zero.") | |
} |
internal fun <T> List<T>.slice(indices: Iterable<Int>, default: (index: Int) -> T): List<T> { | |
val size = indices.measureSizeOrDefault(10) | |
val target = ArrayList<T>(size) | |
val availRange = 0..this.lastIndex | |
indices.forEach { | |
val pos = if (it < 0) this.size + it else it | |
if (pos in availRange) { | |
target.add(this[pos]) | |
} else { | |
target.add(default.invoke(pos)) |
c:{ | |
c0:0, | |
c1:0, | |
mh:false | |
} | |
function uc(page,x){ | |
const c={ | |
c:{ | |
c0:x<0.5?x:0.5, |
plugins { | |
java | |
kotlin("jvm") version "1.4-M1" | |
application | |
} | |
group = "space.iseki" | |
version = "1.0-SNAPSHOT" |