直到有一天,无论是所谓的简单还是复杂对我来说都再也不能花费我的大量精力来学习...
无论是所谓的后端还是前端工作都无法难住我了就好了呢。
异步、IPC、服务、数据库、用户界面、用户界面动画、计算机图形学、应用程序资源算什么....
好的程序员要有能力既做皇帝又做农民呢。
既要有能力彻底理解别人的抽象,又要能下到实地实现自己的算法,看起来才像是正常人呢。
无论是所谓的后端还是前端工作都无法难住我了就好了呢。
异步、IPC、服务、数据库、用户界面、用户界面动画、计算机图形学、应用程序资源算什么....
好的程序员要有能力既做皇帝又做农民呢。
既要有能力彻底理解别人的抽象,又要能下到实地实现自己的算法,看起来才像是正常人呢。
duangsuse::Echo
之前已经知道了 Android config 里面的 packageId (其实是 applicationId...), versionCode, versionName, minSdkVersion, targetSdkVersion, androidTestInstrumentationRunner, compileSdkVersion 什么的了,现在见到了 buildConfigField 也会用了,所以好多了... 之前不是很清楚 Java 的 Properties,然后看过了用法后清楚了(无论是…
刚才看了一下 android resource
复习了一下类型:
color
drawable
mipmap
menu
layout
values
string
dimen
style
colors
attr
xml
🤔...
复习了一下类型:
color
drawable
mipmap
menu
layout
values
string
dimen
style
colors
attr
xml
🤔...
duangsuse::Echo
#Haskell duangsuse 日常 Haskell.... 🤔...
只要 duangsuse 开始写应用们,应用层的东西就不应该可以阻挡 duangsuse 学习,成为『技术难关』
越复杂越容易堆砌,即便是使用了大量的 API 也一样,我要记住他们... 总有一天我要以非堆砌的方法,深刻明白自己在写什么的状态以快的速度完成更多应用程序
对于 duangsuse 来说,我要记住所有操作... 看到数据流们通过后发生了什么,有着怎样的变化,通过小段程序看到抽象和直觉... 这样才最好...
越复杂越容易堆砌,即便是使用了大量的 API 也一样,我要记住他们... 总有一天我要以非堆砌的方法,深刻明白自己在写什么的状态以快的速度完成更多应用程序
对于 duangsuse 来说,我要记住所有操作... 看到数据流们通过后发生了什么,有着怎样的变化,通过小段程序看到抽象和直觉... 这样才最好...
duangsuse::Echo
之前已经知道了 Android config 里面的 packageId (其实是 applicationId...), versionCode, versionName, minSdkVersion, targetSdkVersion, androidTestInstrumentationRunner, compileSdkVersion 什么的了,现在见到了 buildConfigField 也会用了,所以好多了... 之前不是很清楚 Java 的 Properties,然后看过了用法后清楚了(无论是…
刚才看了一下 Paracel 的操作,目前对 Paracel 的直觉就是 Shared memory stream,或者说 SharedArrayBuffer?
Paracel android.os.Paracel.obtain()
然后有
Paracel android.os.Paracel.obtain()
然后有
void setDataPosition(Int)
void writeT(T)
T readT()
unmarshall(T, position: Int, size: Int)
marshall()
void recycle()https://github.com/Trumeet/WorkMode/tree/master/app/src/main/java/moe/yuuta/workmode
最后总结一下我要开始默写那个包了...
UI 和相关操作逻辑:
suspend: 状态栏 suspend Tile
root package: 应用程序活动
widget: 辅助 UI 控件
update: 自动更新提示
抽象:
access: Android 系统包启用禁用 API 的访问封装,Service
async: AsyncTask 封装
辅助:
utils
最后总结一下我要开始默写那个包了...
UI 和相关操作逻辑:
suspend: 状态栏 suspend Tile
root package: 应用程序活动
widget: 辅助 UI 控件
update: 自动更新提示
抽象:
access: Android 系统包启用禁用 API 的访问封装,Service
async: AsyncTask 封装
辅助:
utils
GitHub
Trumeet/WorkMode
[ROOT needed] Enjoy your work and disable disturbing apps - Trumeet/WorkMode
duangsuse::Echo
https://github.com/Trumeet/WorkMode/tree/master/app/src/main/java/moe/yuuta/workmode 最后总结一下我要开始默写那个包了... UI 和相关操作逻辑: suspend: 状态栏 suspend Tile root package: 应用程序活动 widget: 辅助 UI 控件 update: 自动更新提示 抽象: access: Android 系统包启用禁用 API 的访问封装,Service async: AsyncTask…
这个包包含:
可以随时 cancel 也可以类似 Promise 地在完成后添加逻辑处理异步结果
当然也可以理解为一个只有 Callback (TaskResult) 的 Promise,没有 resolve 和 reject,只有 then 没有 catch,反正就是类似 Promise 的东西
object Async {
fun <T> beginTask(runnable: Runnable<T>, callback: Callback<T>): Stoppable
}
interface Runnable<T> {
fun run(): T?
}
data class TaskResult<T>(
val successful: Boolean,
val result: T?,
val e: Throwable?
)
interface Callback<T> {
fun onStart() {}
fun onStop(success: Boolean, result: T?, e: Throwable?) {}
}
interface Stoppable {
fun stop()
fun isStopped(): Boolean
}
class StoppableGroup : Stoppable {
override fun stop()
override fun isStopped(): Boolean
fun add(Stoppable)
fun remove(Stoppable)
}
其实 C# FCL 里也有类似的东西,就是一个 Cancelable and Thenable Task可以随时 cancel 也可以类似 Promise 地在完成后添加逻辑处理异步结果
当然也可以理解为一个只有 Callback (TaskResult) 的 Promise,没有 resolve 和 reject,只有 then 没有 catch,反正就是类似 Promise 的东西
duangsuse::Echo
Photo
其实我不懂 Kotlin... 即便是 Kotlin 极简教程上也没讲 Kotlin 元编程
我不知道
我不知道
by operator 是怎么工作的...刚才看了一些 Android API28 平台包,了解到了:
+ android.os.Paracel 其实就是 Android 的 Protobuf,被称为 Message 的...
+ Praacelabel 就是可以写到 Paracel 上的东西...
+ android.os.Bundle 就是有类型检查的 Map
+ android.content.Intent 有 Category, Action 和 ClassName
+ android.util.ArrayMap 的容器(bin)是 Array 而不是 LinkedList、扫描算法是二分查找,故此称为 ArrayMap
+ 有一个 android.util.SparseArray 但我不知道是哪种东西
+ Android 有内建的 JSON 和 Base64 支持
+ 如果你要在 Gradle 里用
然后搜索 Android Plugin 的源代码并最终发现其实 Andriod 插件所谓的“不兼容”不是指 Java 插件版本不兼容,而是 android 根本不能和 java 一起 apply...
必须用
+ Kotlin JVM 的默认 Maven coordinates: "org.jetbrains.kotlin:kotlin-stdlib-jdk8:+"
+ Android AndroidManifest XML 的 Schema URI: "http://schemas.android.com/apk/res/android"
+ android.os.Paracel 其实就是 Android 的 Protobuf,被称为 Message 的...
+ Praacelabel 就是可以写到 Paracel 上的东西...
+ android.os.Bundle 就是有类型检查的 Map
+ android.content.Intent 有 Category, Action 和 ClassName
+ android.util.ArrayMap 的容器(bin)是 Array 而不是 LinkedList、扫描算法是二分查找,故此称为 ArrayMap
+ 有一个 android.util.SparseArray 但我不知道是哪种东西
+ Android 有内建的 JSON 和 Base64 支持
+ 如果你要在 Gradle 里用
plugin: 'com.android.library' 和 plugin: 'kotlin'
不能这么做,要不然你就会和我一样浪费至少半个小时的时间调整 Gradle 和 Gradle Android 的版本...然后搜索 Android Plugin 的源代码并最终发现其实 Andriod 插件所谓的“不兼容”不是指 Java 插件版本不兼容,而是 android 根本不能和 java 一起 apply...
必须用
plugin: 'kotlin-android' 替换默认 kotlin+ Kotlin JVM 的默认 Maven coordinates: "org.jetbrains.kotlin:kotlin-stdlib-jdk8:+"
+ Android AndroidManifest XML 的 Schema URI: "http://schemas.android.com/apk/res/android"
duangsuse::Echo
Photo
AsyncTask 其实就是基于消息队列事件的异步,是解决 Android 的 "UI 线程" "Worker Thread" 不对称问题的
Forwarded from Telegram Beta
Now you can share the public channel's link and view the content in a browser.
Copy and open it in a browser:
t.me/s/durov
t.me/s/telegram
t.me/s/tgbeta
t.me/s/username
Note:
The contents aren't updated real time, currently for preview.
Credit: KeralaGram
Copy and open it in a browser:
t.me/s/durov
t.me/s/telegram
t.me/s/tgbeta
t.me/s/username
Note:
The contents aren't updated real time, currently for preview.
Credit: KeralaGram
https://t.me/s/dsuse 这样看起来会方便很多,也给了我用 Telegram 而不是写 Markdown/HTML 的动力
duangsuse::Echo
data Maybe a = Just a | Nothing deriving Eq, Show instance Functor Maybe where fmap f (Just x) = Just <$> f x fmap f Nothing = Nothing instance Monad Maybe where return x = Maybe x (Just x) >>= f = f x Nothing >>= _ = Nothing 其中 Fuctor 就是 Functor...…
(define (histogram vector-of-words)
(define hash (make-hash))
(for ([word (in-vector vector-of-words)])
(hash-set! hash word (add1 (hash-ref hash word 0))))
hash)
(letrec([l '(pure monkey made a salted monkey soup)])
(histogram (list->vector l)))
;
'#hash((made . 1) (salted . 1) (soup . 1) (a . 1) (pure . 1) (monkey . 2))
所以 #Racket 还是很过程式的?(从这个角度看,王垠在某个程度上还真是... 很灵性呢... 🙈