Skip to content

Commit 16a2424

Browse files
committed
add rxjava part
1 parent f950633 commit 16a2424

File tree

2 files changed

+141
-15
lines changed

2 files changed

+141
-15
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
`RxJava Android`开发全系列
2+
===
3+
4+
有关`RxJava`的介绍请看[RxJava详解系列](https://github.com/CharonChui/AndroidNote/blob/master/AdavancedPart/RxJava%E8%AF%A6%E8%A7%A3(%E4%B8%8A).md)
5+
6+
要说16年`android`开发中要说那个应用最流行,那就是`RxJava`了,现在越来越多的`android`项目都会用到`RxJava`,下面就介绍一些`RxJava`必备的扩张库。
7+
8+
`RxAndroid`
9+
---
10+
11+
[RxAndroid](https://github.com/ReactiveX/RxAndroid)
12+
13+
> Android specific bindings for RxJava.
14+
15+
> This module adds the minimum classes to RxJava that make writing reactive components in Android applications easy and hassle-free. More specifically, it provides a Scheduler that schedules on the main thread or any given Looper.
16+
17+
`Android`中使用`RxJava`的必备类库,虽然里面提供的内容并不多只有`AndroidSchedulers``HandlerScheduler``LooperScheduler`,但是这些确是`Android`开发中的精髓。
18+
19+
`RxLifecycle`
20+
---
21+
22+
[RxLifecycle](https://github.com/trello/RxLifecycle)
23+
24+
> The utilities provided here allow for automatic completion of sequences based on Activity or Fragment lifecycle events. This capability is useful in Android, where incomplete subscriptions can cause memory leaks.
25+
26+
`RxLifecycle`提供了一些配合`Activity``Fragment`生命周期使用的订阅管理的相关功能。例如使用`RxJava`执行一些耗时的操作,但是在执行过程中,用户退出了当前`Activity`,这时如果`Observable`未取消订阅就会导致内存泄漏,而`RxLifecycle`就是为了接着这些问题的。在`Activity`销毁的时候`RxLifecycle`会自动取消订阅。
27+
`RxBinding`
28+
---
29+
30+
[RxBinding](https://github.com/JakeWharton/RxBinding)
31+
32+
> RxJava binding APIs for Android UI widgets from the platform and support libraries.
33+
34+
`RxBinding`是把`Android``UI`事件转换为`RxJava`的方式,例如点击时间,每次点击后`Observable`的订阅者`Observer`都会通过`onNext()`回调得知。
35+
36+
`Retrofit`
37+
---
38+
39+
[Retrofit](https://github.com/square/retrofit)
40+
41+
> Type-safe HTTP client for Android and Java by Square, Inc.
42+
43+
良心企业`Square`出品的一个基于`OkHttp`的网络请求类库,完美支持`RxJava`
44+
45+
`SqlBrite`
46+
---
47+
48+
[SQLBrite](https://github.com/square/sqlbrite)
49+
50+
> A lightweight wrapper around SQLiteOpenHelper and ContentResolver which introduces reactive stream semantics to queries.
51+
52+
良心企业`Square`出品的一个支持`RxJava``Sqlite`数据库的操作库。
53+
54+
`RxPermissions`
55+
56+
[RxPermissions)](https://github.com/tbruyelle/RxPermissions)
57+
58+
> This library allows the usage of RxJava with the new Android M permission model.
59+
60+
`Android M`上动态权限申请的类库。
61+
62+
63+
64+
- 邮箱 :charon.chui@gmail.com
65+
- Good Luck!

JavaKnowledgePart/Vim使用教程.md

Lines changed: 76 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,95 @@ Vim使用教程
1212

1313
下面说一下`Normal`状态下的一些命令,所有的命令都要在`Normal`状态下执行:
1414

15+
进入`Insert`模式
16+
---
17+
1518
- `i` 进入`insert`模式
16-
- `x` 删除光标所在位置的一个字符
17-
- `dd` 删除当前行,并把删除的行存到剪贴板中
18-
- `p` 粘贴
19-
- `yy` 拷贝当前行
2019
- `a` 在光标后进行插入,直接进入`Insert`模式
2120
- `o` 在当前行后插入一个新行,直接进入`Insert`模式
22-
- `O` 在当前行钱插入一个新行,直接进入`Insert`模式
2321
- `cw` 替换从光标位置开始到该单词结束位置的所有字符,直接进入`Insert`模式
24-
- `u` 撤销、回退
25-
- `Ctrl+r` 重新添加、前行
26-
- `y` 拷贝选中部分内容
22+
23+
24+
移动光标
25+
---
26+
27+
- `h` 左移
28+
- `j` 移到下一行
29+
- `k` 移到上一行
30+
- `l` 右移
31+
- `gg` 移动到文章的开头
32+
- `G` 移动到当前文章的最后。
33+
34+
- `$` $光标移动当前行尾
35+
- `0` 数字0光标移动当前行首
36+
37+
- `e` 移动到单词结束位置
38+
- `b` 移动到单词开始位置
39+
- `:59` 移动到59行
40+
- `#l` 移动光标到改行第#个字的位置,如`5l`
41+
- `ctrl+g` 列出当前光标所在行的行号等信息
42+
- `: #` 如输入: 15会跳到文章的第15行
43+
44+
删除文字
45+
---
46+
47+
- `x` 删除光标所在位置的一个字符
48+
- `#x` 删除光标所在位置后的#个字符,如`6x`就是删除后面的6个字符。
49+
- `X` 大写的X为删除光标所在位置前的一个字符
50+
- `#X` 删除光标所在位置前的#个字符
51+
- `dd` 删除当前行,并把删除的行存到剪贴板中
52+
- `#dd` 从光标所在行开始删除#行。如`5dd`就是删除5行
53+
54+
复制粘贴
55+
---
56+
57+
- `yy` 拷贝当前行
58+
- `#yy` 拷贝当前所在行往下的#行文字
59+
- `yw` 复制当前光标所在位置到字尾处的位置
60+
- `#yw` 复制当前光标所在位置往后#个字
2761
- `y$` 拷贝光标至本行结束位置
2862

63+
- `p` 粘贴
64+
65+
66+
替换
67+
---
68+
69+
- `r` 替换光标所在处的字符
70+
- `R` 替换光标所到之处的字符,直到按下`esc`键为止
71+
- `:%s/old/new/g``new`替换文件中所有的`old`
72+
73+
撤销
74+
---
75+
76+
- `u` 撤销、回退
77+
78+
搜索
79+
---
80+
81+
- `/关键字` 先按`/`键,再输入您想寻找的字符,如果第一次找的关键字不是您想要的,可以一直按`n`会往后寻找到您要的关键字为止。
82+
83+
- `?关键字` 同上,只不过`?`是往上查找
84+
85+
缩进缩出
86+
---
87+
88+
- `>>` 当前行缩进
89+
- `#>>` 当前光标下n行缩进
90+
- `<<` 当前行缩出
91+
- `>>` 当前光标下n行缩出
92+
93+
- `: set nu` 会在文件每一行前面显示行号
2994
- `:wq` 保存并退出
3095
- `:w` 保存
3196
- `:q!` 退出不保存
3297
- `:saveas <pat>` 另存为
3398
- `:e filename` 打开文件
3499
- `:sav filename` 保存为某文件名
35100

36-
- `e` 移动到单词结束位置
37-
- `b` 移动到单词开始位置
38-
- `0` 数字0光标移动当行头
39-
- `gg` 移动到文件开始位置
40-
- `L` 移动到文件结束位置
41-
- `G` 移动到当前行结束位置
42-
- `:59` 移动到59行
101+
102+
103+
43104

44105

45106

0 commit comments

Comments
 (0)