Skip to content

Commit

Permalink
update rustc_edit_distance_and_typo_checker
Browse files Browse the repository at this point in the history
  • Loading branch information
pymongo committed Apr 16, 2021
1 parent ec4482a commit 1ba5765
Show file tree
Hide file tree
Showing 12 changed files with 360 additions and 39 deletions.
2 changes: 1 addition & 1 deletion 2019/12/activity_lifecycle.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [Activity Lifecycle](/2019/12/activity_lifecycle.md)

[https://developer.android.com/guide/components/activities/activity-lifecycle](https://developer.android.com/guide/components/activities/activity-lifecycle)
<https://developer.android.com/guide/components/activities/activity-lifecycle>

<i class="fa fa-hashtag"></i>
英文专业名词
Expand Down
5 changes: 2 additions & 3 deletions 2019/12/association_without_primary_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,5 @@ markets表没有一个外键是currencies表的外键,好在belongs_to有选
<i class="fa fa-hashtag"></i>
参考链接

[https://stackoverflow.com/questions/16071735/active-record-association-without-using-id](https://stackoverflow.com/questions/16071735/active-record-association-without-using-id)

[https://stackoverflow.com/questions/21466726/rails-has-many-relationship-without-using-id](https://stackoverflow.com/questions/21466726/rails-has-many-relationship-without-using-id)
- <https://stackoverflow.com/questions/16071735/active-record-association-without-using-id>
- <https://stackoverflow.com/questions/21466726/rails-has-many-relationship-without-using-id>
4 changes: 2 additions & 2 deletions 2019/12/except_array_include_hash.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ expect(response_body["data"])
<i class="fa fa-hashtag"></i>
参考链接

- [https://stackoverflow.com/questions/52000714/rspec-check-if-array-contains-element-with-specified-id](https://stackoverflow.com/questions/52000714/rspec-check-if-array-contains-element-with-specified-id)
- [https://stackoverflow.com/questions/23815944/rspec-match-array-of-hashes](https://stackoverflow.com/questions/23815944/rspec-match-array-of-hashes)
- <https://stackoverflow.com/questions/52000714/rspec-check-if-array-contains-element-with-specified-id>
- <https://stackoverflow.com/questions/23815944/rspec-match-array-of-hashes>
2 changes: 1 addition & 1 deletion 2019/12/redirect_to_anchor.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
<i class="fa fa-hashtag"></i>
参考链接

[https://stackoverflow.com/questions/13791556/how-to-redirect-to-a-certain-location-in-a-page](https://stackoverflow.com/questions/13791556/how-to-redirect-to-a-certain-location-in-a-page)
<https://stackoverflow.com/questions/13791556/how-to-redirect-to-a-certain-location-in-a-page>
2 changes: 1 addition & 1 deletion 2020/01/android_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static HomeFragment newInstance() {
一个TextView+ImageView可以写成一个TextView(加上一个drawable属性),而且渲染性能更好

[https://stackoverflow.com/questions/3214424/android-layout-this-tag-and-its-children-can-be-replaced-by-one-textview-and](https://stackoverflow.com/questions/3214424/android-layout-this-tag-and-its-children-can-be-replaced-by-one-textview-and)
<https://stackoverflow.com/questions/3214424/android-layout-this-tag-and-its-children-can-be-replaced-by-one-textview-and>

## Snackbar

Expand Down
2 changes: 1 addition & 1 deletion 2020/10/rfc_const_generics.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

我的翻译并不会按原文顺序逐字翻译,因为除了RFC的网页,还涉及相关PR和issues,以下是我对RFC#2000 const generic个人理解下的翻译

[https://rust-lang.github.io/rfcs/2000-const-generics.html](https://rust-lang.github.io/rfcs/2000-const-generics.html)
<https://rust-lang.github.io/rfcs/2000-const-generics.html>

首先动态语言为什么没有常量,因为常量是编译时编译器将常量的字面量替换到使用该常量的地方,这也叫「内联优化」

Expand Down
2 changes: 1 addition & 1 deletion 2021/03/statically_linked_executable.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ rustc 生成的汇编默认是 Intel 语法,可以传入 llvm 参数让 rustc
可以用 ldd 工具校验编译生成的可执行文件是不是 statically linked (没有引入任何动态链接库)

汇编的劣势在于代码跟硬件架构绑定,gcc 编译这段代码时加上`-m32`参数指定生成32位的可执行文件时就会报错
汇编的劣势在于代码跟硬件架构绑定,gcc 编译这段汇编代码时加上`-m32`参数指定生成32位的可执行文件时就会报错

## C 编译 no_std 可执行文件

Expand Down
Binary file added 2021/04/kfind_lev_distance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1ba5765

Please sign in to comment.