kotlin notes
Android Kotlin Retrofit MVP网络请求封装(四)
依赖 implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.google.code.gson:gson:2.8.8' implementation 'com.squareup.okhttp3:okhttp ......
Android Kotlin 底部菜单栏
LoginSuccessActivity布局 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http ......
Android Kotlin MVP 登录实现
一:新建MVP软件包文件 activity_main.xml 界面 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xm ......
Neutral Network Notes
# Table of Contents * [卷积]() ### 卷积 #### 卷积公式 $ \int_{-\infty}^{+\infty} f(\tau )g(x-\tau)d\tau $ | 符号 | 意义 | | | | | $f(t)$ | $t$时刻的进食量 | | $\int_{0} ......
kotlin 调用对应java实现
kotlin 调用对应java实现1.枚举 kotlion默认是publiccotlin 枚举enum class DoorState { OPEN, CLOSE } java实现public static enum DoorState { OPEN, CLOSE; } 2. class 2.1 d ......
the-little-prince-reading-notes
《小王子》读书笔记 Created: 2023-06-04T09:09+08:00 Published: 2023-06-19T09:08+08:00 Categories: ReadingNotes 第 26 章关于生离死别的印象深刻,water、bell …… > On the 31st of ......
【C++】Effective Modern C++ Key Notes
[errata very important](https://www.aristeia.com/BookErrata/emc++-errata.html) > Argument, Actual Argument> Parameter, Formal Parameter ## 一 类型推导C++98 ......
Models, Mappings, Request Validation Notes
Request Validation API Gateway can perform basic validation. This enables you, the API developer, to focus on app-specific deep validation in the back ......
What is API Gateway Notes, API Driven Dev Notes
API Driven Development What is API Driven Development? API Driven Development is a process that allows developers to focus on API design before writin ......
Kotlin协程-从理论到实战
> 上一篇文章从理论上对Kotlin协程进行了部分说明,本文将在上一篇的基础上,从实战出发,继续协程之旅。 ### 从源头说起 在Kotlin中,要想使用协程,首先需要使用协程创建器创建,但还有个前提——协程作用域(`CoroutineScope`)。在早期的Kotlin实现中,协程创建器是一等函数 ......
Kotlin协程-从一到多
> 上一篇文章,我介绍了Kotlin协程的创建,使用,协作等内容。本篇将引入更多的使用场景,继续带你走进协程世界。 ### 使用协程处理异步数据流 常用编程语言都会内置对同一类型不同对象的数据集表示,我们通常称之为容器类。不同的容器类适用于不同的使用场景。Kotlin的`Flow`就是在异步计算的需 ......
Kotlin协程-那些理不清乱不明的关系
> Kotlin的协程自推出以来,受到了越来越多Android开发者的追捧。另一方面由于它庞大的API,也将相当一部分开发者拒之门外。本篇试图从协程的几个重要概念入手,在复杂API中还原出它本来的面目,以全新的角度带读者走进Kotlin协程世界。 ### 什么是协程 在很多有关协程的文章中,描述协程 ......
Kotlin 集合对象的单条件和多条件排序
原文: [Kotlin 集合对象的单条件和多条件排序 - Stars-One的杂货小窝](https://stars-one.site/2023/06/14/kotlin-list-sort) 本文不是太难的东西,因为`sortedWith`之前没怎么用过,所以就记录下 平常开发经常使用到List, ......
Kotlin中的Sealed Class
###Sealed Class Sealed Class即密封类,使用**sealed**关键字修饰一个类即表示该类是密封类。 ``` sealed class Error ``` 密封类的一个主要特点是其只有有限个子类型,其所有的子类型在编译期就能够全部枚举出来。 从这一个特点上看,密封类有点像是 ......
[Fullstack] Learning note for Fullstack developer - FrontendMaster
Command Line 1. Navigate to your home directory cd ~ 2. Make a directory call "temp" mkdir temp 3. Move into temp cd temp 4. List the idrectory conten ......
Kotlin中的@JvmOverloads注解的解释
在自定义一些控件的时候,我经常会直接写入需要的参数,比如: class MaskedCardView( context: Context, attributeSet: AttributeSet? = null, defStyle: Int = com.google.android.material. ......
[Kotlin Tutorials 22] 协程中的异常处理
# 协程中的异常处理  ## Parent-Child关系 如果 ......
[Kotlin Tutorials 21] 协程的取消
# 协程的取消 本文讨论协程的取消, 以及实现时可能会碰到的几个问题.  本 ......
使用kotlin实现lua的协程(非对称)
一、非对称所以调用的参数和返回值可以是不同的类型 例如:我们创建一个调用的yield参数返回值 // 模板的参数是P,返回值是R // yield对应的传入参数是R,返回值是P interface CoroutineScope<P, R> { val parameter: P? suspend fu ......
From Java To Kotlin 2:Kotlin 类型系统与泛型
上期主要分享了 From Java To Kotlin 1 :空安全、扩展、函数、Lambda。
这是 From Java to Kotlin 第二期。
From Java to Kotlin 关键在于 **思维的转变**。 ......
Note&browser collect
#浏览器收藏的问题就在于,没有将东西变成自己的产出  ......
Kotlin对Springboot的runApplication内联函数结构分析
# 主菜  [括号外尾随Lambda](https://kotlinlang.org/docs/functions ......
Machine Learning 【note_02】
# note_02 Keywords: Classification, Logistic Regression, Overfitting, Regularization ## 1 Motivation Classification: - "binary classification": $y$ ca ......
Machine Learning 【note_01】
Declaration (2023/06/02): This note is the first note of a series of machine learning notes. At present, the main learning resource is *the 2022 Andre ......
Kotlin中的解构声明
###解构声明(Destructuring declarations) 解构声明可以用于将一个变量拆分成由其多个成员属性构成的组合来表示,例如: ``` class Person(var name: String?, var email: String?) { operator fun compon ......
Notes-task how wirte
多个分区排列任务不行,多了没人看,要集中一个 原来的task分组,内容分组,到后面你自己都不看 现在都搞到1个文件去,内部分组、分内容 多个分区排列任务不行,多了没人看,要集中一个 ......
Kotlin中的字符串模板
### 字符串模板的使用 在Kotlin中可以直接在字符串字面值中引用变量,例如: ``` val name = "william" val str = "my name is ${name}" println(str) ``` 并且Kotlin官方文档建议使用字符串模板来替代字符串连接符的使用,原 ......
Kotlin中的Any、Unit、Nothing
### Any Kotlin中的*Any*即相当于Java中的**Object**类,是一切其他非空类型的父类型,**Any?**则表示一切可空类型的父类型。 *Any*拥有三个方法: - equals() - hashCode() - toString() 事实上Any在编译成字节码后正是会转成* ......