From cd6d4ee78c27dd763755957728f93b7b61276d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90?= <48374300+wulnm@users.noreply.github.com> Date: Fri, 11 Jun 2021 23:53:11 +0800 Subject: [PATCH 1/4] fix format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正表格格式以及去除一个多余字符` --- .../framework/mybatis/mybatis-interview.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/system-design/framework/mybatis/mybatis-interview.md b/docs/system-design/framework/mybatis/mybatis-interview.md index 9b68d75e..e1195390 100644 --- a/docs/system-design/framework/mybatis/mybatis-interview.md +++ b/docs/system-design/framework/mybatis/mybatis-interview.md @@ -197,14 +197,14 @@ public V get(Object key) { 举例:下面 join 查询出来 6 条记录,一、二列是 Teacher 对象列,第三列为 Student 对象列,MyBatis 去重复处理后,结果为 1 个老师 6 个学生,而不是 6 个老师 6 个学生。 - t_id t_name s_id - -| 1 | teacher | 38 | -| 1 | teacher | 39 | -| 1 | teacher | 40 | -| 1 | teacher | 41 | -| 1 | teacher | 42 | -| 1 | teacher | 43 | +| t_id | t_name | s_id | +| ---- | ------- | ---- | +| 1 | teacher | 38 | +| 1 | teacher | 39 | +| 1 | teacher | 40 | +| 1 | teacher | 41 | +| 1 | teacher | 42 | +| 1 | teacher | 43 | #### 10、MyBatis 是否支持延迟加载?如果支持,它的实现原理是什么? @@ -238,7 +238,7 @@ public V get(Object key) { **`SimpleExecutor`:**每执行一次 update 或 select,就开启一个 Statement 对象,用完立刻关闭 Statement 对象。 -**``ReuseExecutor`:**执行 update 或 select,以 sql 作为 key 查找 Statement 对象,存在就使用,不存在就创建,用完后,不关闭 Statement 对象,而是放置于 Map内,供下一次使用。简言之,就是重复使用 Statement 对象。 +**`ReuseExecutor`:**执行 update 或 select,以 sql 作为 key 查找 Statement 对象,存在就使用,不存在就创建,用完后,不关闭 Statement 对象,而是放置于 Map内,供下一次使用。简言之,就是重复使用 Statement 对象。 **`BatchExecutor`:**执行 update(没有 select,JDBC 批处理不支持 select),将所有 sql 都添加到批处理中(addBatch()),等待统一执行(executeBatch()),它缓存了多个 Statement 对象,每个 Statement 对象都是 addBatch()完毕后,等待逐一执行 executeBatch()批处理。与 JDBC 批处理相同。 From 96048c4fd067f5b8b034b8fbc0566c4422f7c2c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90?= <48374300+wulnm@users.noreply.github.com> Date: Sun, 13 Jun 2021 20:14:14 +0800 Subject: [PATCH 2/4] add string expression explanation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加了一些表达式说明以及对齐注释 --- docs/operating-system/Shell.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/operating-system/Shell.md b/docs/operating-system/Shell.md index 53466d11..c4d4d43a 100644 --- a/docs/operating-system/Shell.md +++ b/docs/operating-system/Shell.md @@ -235,12 +235,16 @@ echo ${str:0:10} #输出:SnailClimb #author:amau var="https://www.runoob.com/linux/linux-shell-variable.html" - -s1=${var%%t*}#h -s2=${var%t*}#https://www.runoob.com/linux/linux-shell-variable.h -s3=${var%%.*}#http://www -s4=${var#*/}#/www.runoob.com/linux/linux-shell-variable.html -s5=${var##*/}#linux-shell-variable.html +# %表示删除从后匹配, 最短结果 +# %%表示删除从后匹配, 最长匹配结果 +# #表示删除从头匹配, 最短结果 +# ##表示删除从头匹配, 最长匹配结果 +# 注: *为通配符, 意为匹配任意数量的任意字符 +s1=${var%%t*} #h +s2=${var%t*} #https://www.runoob.com/linux/linux-shell-variable.h +s3=${var%%.*} #http://www +s4=${var#*/} #/www.runoob.com/linux/linux-shell-variable.html +s5=${var##*/} #linux-shell-variable.html ``` ### Shell 数组 From 6516e2183e3a8e944c9c953075f99637d75a9cd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90?= <48374300+wulnm@users.noreply.github.com> Date: Mon, 14 Jun 2021 15:41:55 +0800 Subject: [PATCH 3/4] fix typo --- docs/java/basis/Java基础知识疑难点.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/java/basis/Java基础知识疑难点.md b/docs/java/basis/Java基础知识疑难点.md index 09fb3269..eb5c17b2 100644 --- a/docs/java/basis/Java基础知识疑难点.md +++ b/docs/java/basis/Java基础知识疑难点.md @@ -376,7 +376,7 @@ s=list.toArray(new String[0]);//没有指定类型的话会报错 如果要进行`remove`操作,可以调用迭代器的 `remove `方法而不是集合类的 remove 方法。因为如果列表在任何时间从结构上修改创建迭代器之后,以任何方式除非通过迭代器自身`remove/add`方法,迭代器都将抛出一个`ConcurrentModificationException`,这就是单线程状态下产生的 **fail-fast 机制**。 -> **fail-fast 机制** :多个线程对 fail-fast 集合进行修改的时,可能会抛出ConcurrentModificationException,单线程下也会出现这种情况,上面已经提到过。 +> **fail-fast 机制** :多个线程对 fail-fast 集合进行修改的时候,可能会抛出ConcurrentModificationException,单线程下也会出现这种情况,上面已经提到过。 Java8开始,可以使用`Collection#removeIf()`方法删除满足特定条件的元素,如 ``` java From 758a16cb16b151d5bcf7b0f1f3935a3778eaa394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90?= <48374300+wulnm@users.noreply.github.com> Date: Mon, 14 Jun 2021 16:44:48 +0800 Subject: [PATCH 4/4] fix typo --- docs/java/basis/Java常见关键字总结.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/java/basis/Java常见关键字总结.md b/docs/java/basis/Java常见关键字总结.md index a37ef4b6..f46c5245 100644 --- a/docs/java/basis/Java常见关键字总结.md +++ b/docs/java/basis/Java常见关键字总结.md @@ -88,7 +88,7 @@ public class Sub extends Super { } ``` -在上面的例子中,Sub 类访问父类成员变量 number 并调用其其父类 Super 的 `showNumber()` 方法。 +在上面的例子中,Sub 类访问父类成员变量 number 并调用其父类 Super 的 `showNumber()` 方法。 **使用 this 和 super 要注意的问题:**