/tmp/duangsuse.sock
23 subscribers
303 photos
3 videos
92 files
337 links
从 duangsuse::Echo (@dsuse) 跟进出来的分支,将在作者恢复原帐号访问的时候合并删除。
Download Telegram
1582868729060.jpeg
5.1 KB
#security 你们觉得这是什么编码
Forwarded from chopin1998
我有一个问题, 比如用adb打开 usb tethering, adb shell service call connectivity 34 i32 1 s16 text
这个命令里奇怪的数字, 在哪里可以查到意义?
Forwarded from Deleted Account
只有 34 是魔数,是你分词分错了
adb shell ${command}
service call ${name} ${args}

name=connectivity
args=(i32 1, s16 text)

这个 34 的含义是 IConnectivityManager.aidl 里 setUsbTethering 的 methodNo,具体 Duck.com 搜 "USB service connectivity 34"

i32 是 integer 32-bit,jint 整数的意思
s16 应该是 UTF-16 wchar_t 字符串的意思

顺便:第二个调用参数实际上没用可以删掉
morsecode.world 这个比较好玩
Forwarded from Node.js | Sleepy
Btw 這跟 security 沒有什麼關係,這只是一種編碼方式,標 #encoding 會更好。
Forwarded from Deleted Account
我的频道是有些重点标签的,不可能专门为 encoding 弄个标签,毕竟我不是学 密码学/信息学/信号处理 的。
既然和 security 能扯上关系,那就扯这个关系,反正 security 的东西也极少
/tmp/duangsuse.sock
morsecode.world 这个比较好玩
.. -- -....- ... - -- -....- .- .-.. -- - -. . .-.-.- -. --- - .... .. -. --. -....- ..-. . . .-.. ... -....- .-.. .. -.- . -....- .... --- -- .
我居然手动打出来了……
IM-STM-ALMTNE.NOTHING-FEELS-LIKE-HOME
Forwarded from Deleted Account
就图样的话,是一个序列,有三种图样
下面的方块是 '.'
中间长条是 '--'
中间短条是 '-'
有任何的空白像素都是 ' '
Forwarded from Deleted Account
javax.imageio.ImageIO
java.awt.image.BufferedImage
写一个啦(迫真

怎么感觉位图也应该可以流式处理
但是不知道应该怎么分块,怎么让算法来 crop……
🤔 原来 Java 的 image 还有 Raster 和 Tile 啊……还有分块呢
还能 getSubImage
This media is not supported in your browser
VIEW IN TELEGRAM
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/index.html
原来 Kotlin 里已经有 Iterable.toMap 了,就是 associate…… 还有 associateBy……
histogram 也早就有了,就是 groupBy……
原来 partition 只是特殊化的 groupBy 啊……

还有 chunked, windowed 这种高级操作……
还可以用 onEach,许多 method 还有 withIndex, notNull 的版本

Kotlin 实在是太厉害了…… 哪个函数式语言能做到这么清晰啊
Kotlin 的方法起名还都是带介词的,这样不仅仅给方法参数依赖分了类,而且还能给人在写类似自然语言一样代码的感觉……
官方逼死同人……
This media is not supported in your browser
VIEW IN TELEGRAM
ReadMoses.kt
1.2 KB
草写不下去了,不知道 如果每个序列不止同一个 y 的话,到底该怎么处理,流数据关系依赖很复杂,排序也不知道怎么排才能把多行合并回一行……
Kotlin 你实在是太美
/tmp/duangsuse.sock
ReadMoses.kt
这都不能算是 Reader,我没见过数据关系这么复杂的 stream……
一开始我以为是线性 same y 的,没想到不仅仅一个序列由两个 same y 构词,要兼容单靠 y_skip 也会导致不一致,保留 point 的 x 都不行……
/tmp/duangsuse.sock
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/index.html 原来 Kotlin 里已经有 Iterable.toMap 了,就是 associate…… 还有 associateBy…… histogram 也早就有了,就是 groupBy…… 原来 partition 只是特殊化的 groupBy 啊…… 还有 chunked, windowed 这种高级操作…… 还可以用 onEach,许多 method 还有 withIndex…
突然对 ParserKt 的代码质量很失望,草,必须重构了
原来那都是我自己所谓的叫法,什么俩重载的 toMap 居然是 associate, associateBy、hist 居然是 groupBy…… #Kotlin

ParserKt 式的流架构可以说是原创,但存在着一个黑点
我也不确定它到底在多大程度上比 Kotlin sequences 处理能力强