Skip to content

Commit

Permalink
[reafractor]图片路径更改
Browse files Browse the repository at this point in the history
  • Loading branch information
Snailclimb committed Aug 2, 2020
1 parent bedc594 commit ccfba54
Show file tree
Hide file tree
Showing 16 changed files with 14 additions and 12 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/database/Redis/redis-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Memcached 是分布式缓存最开始兴起的那会,比较常用的。后来

作为暖男一号,我给大家画了一个草图。

![正常缓存处理流程](https://static01.imgkr.com/temp/bc0cfbc9911148eeb0542d84a049d9f2.png)
![正常缓存处理流程](images/redis/缓存的处理流程.png)

简单来说就是:

Expand Down Expand Up @@ -694,7 +694,7 @@ public Object getObjectInclNullById(Integer id) {

加入布隆过滤器之后的缓存处理流程图如下。

![image](https://static01.imgkr.com/temp/e384cec584314b019de6e3a39ee56425.png)
![image](images/redis/加入布隆过滤器后的缓存处理流程.png)

但是,需要注意的是布隆过滤器可能会存在误判的情况。总结来说就是: **布隆过滤器说某个元素存在,小概率会误判。布隆过滤器说某个元素不在,那么这个元素一定不在。**

Expand Down
6 changes: 4 additions & 2 deletions docs/java/Java基础知识.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


点击关注[公众号](#公众号)及时获取笔主最新更新文章,并可免费领取本文档配套的《Java 面试突击》以及 Java 工程师必备学习资源。

<!-- TOC -->
Expand Down Expand Up @@ -1177,12 +1179,12 @@ String s = input.readLine();
#### 3.2.1. Java 异常类层次结构图
![](https://imgkr.cn-bj.ufileos.com/199703ce-a1b6-4968-9eb0-161a8217507e.png)
![](images/Java异常类层次结构图.png)
<p style="font-size:13px;text-align:right">图片来自:https://simplesnippets.tech/exception-handling-in-java-part-1/</p>
![](https://imgkr.cn-bj.ufileos.com/3c45529f-8915-448b-816a-360f8cb73fc7.png)
![](images/Java异常类层次结构图2.png)
<p style="font-size:13px;text-align:right">图片来自:https://chercher.tech/java-programming/exceptions-java</p>
Expand Down
8 changes: 4 additions & 4 deletions docs/java/collection/Java集合框架常见面试题.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,13 +549,13 @@ static int hash(int h) {

所谓 **“拉链法”** 就是:将链表和数组相结合。也就是说创建一个链表数组,数组中每一格就是一个链表。若遇到哈希冲突,则将冲突的值加到链表中即可。

![jdk1.8之前的内部结构-HashMap](https://static01.imgkr.com/temp/77c95eb733284dbd8ce4e85c9cb6b042.png)
![jdk1.8之前的内部结构-HashMap](images/jdk1.8之前的内部结构-HashMap.png)

#### 1.4.5.2. JDK1.8 之后

相比于之前的版本, JDK1.8 之后在解决哈希冲突时有了较大的变化,当链表长度大于阈值(默认为 8)(将链表转换成红黑树前会判断,如果当前数组的长度小于 64,那么会选择先进行数组扩容,而不是转换为红黑树)时,将链表转化为红黑树,以减少搜索时间。

![jdk1.8之后的内部结构-HashMap](https://static01.imgkr.com/temp/19f97c2ad53b4ff2948ee4b4792ebe1a.png)
![jdk1.8之后的内部结构-HashMap](images/jdk1.8之后的内部结构-HashMap.png)

> TreeMap、TreeSet 以及 JDK1.8 之后的 HashMap 底层都用到了红黑树。红黑树就是为了解决二叉查找树的缺陷,因为二叉查找树在某些情况下会退化成一个线性结构。
Expand Down Expand Up @@ -600,7 +600,7 @@ ConcurrentHashMap 和 Hashtable 的区别主要体现在实现线程安全的方

**JDK1.8 的 ConcurrentHashMap:**

![JDK1.8 的 ConcurrentHashMap](https://static01.imgkr.com/temp/26fca75ccc874c8fbbeb4fbcd4dec4aa.png)
![Java8 ConcurrentHashMap 存储结构(图片来自 javadoop)](./images/java8_concurrenthashmap.png)

JDK1.8 的 `ConcurrentHashMap` 不在是 **Segment 数组 + HashEntry 数组 + 链表**,而是 **Node 数组 + 链表 / 红黑树**。不过,Node 只能用于链表的情况,红黑树的情况需要使用 **`TreeNode`**。当冲突链表达到一定长度时,链表会转换成红黑树。

Expand Down Expand Up @@ -704,7 +704,7 @@ final void checkForComodification() {

我们再来趁热打铁,看一个阿里巴巴手册相关的规定:

![](https://imgkr.cn-bj.ufileos.com/ad28e3ba-e419-4724-869c-73879e604da1.png)
![](images/ad28e3ba-e419-4724-869c-73879e604da1.png)

有了前面讲的基础,我们应该知道:使用 `Iterator` 提供的 `remove` 方法,可以修改到 `expectedModCount` 的值。所以,才不会再抛出`ConcurrentModificationException` 异常。

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs/system-design/naming.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
编程过程中,有太多太多让我们头疼的事情了,比如命名、维护其他人的代码、写测试、与其他人沟通交流等等。就连世界级软件大师 **Martin Fowler** 大神都说过 CS 领域有两大最难的事情,一是**缓存失效**,一是**程序命名**(@ [https://martinfowler.com/bliki/TwoHardThings.html](https://martinfowler.com/bliki/TwoHardThings.html))。

![](https://imgkr.cn-bj.ufileos.com/a3d6ff24-9304-4160-8f27-e9c4fc83f2d8.png)
![](pictures/marting-naming.png)

今天 Guide 就单独拎出 “**命名**” 来聊聊,据说之前在 Quora 网站,由接近 5000 名程序员票选出来的最难的事情就是“命名”。

Expand Down Expand Up @@ -192,17 +192,17 @@ Codelf 提供了在线网站版本,网址:[https://unbug.github.io/codelf/](

我选择了 Java 编程语言,然后搜索了“序列化”这个关键词,然后它就返回了很多关于序列化的命名。

![](https://imgkr.cn-bj.ufileos.com/4486c586-f4ae-4e3c-b27a-6e92251c35da.png)
![](pictures/Codelf.png)

并且,Codelf 还提供了 VS code 插件,看这个评价,看来大家还是很喜欢这款命名工具的。

![](https://imgkr.cn-bj.ufileos.com/7a454e7f-9f57-48f8-8fcc-a28a19faa370.png)
![](pictures/vscode-codelf.png)

## 总结

Guide 制作了一个涵盖上面所有重要内容的思维导图,便于小伙伴们日后查阅。

![](https://imgkr.cn-bj.ufileos.com/dc253190-57b1-4bc6-baf8-304957079e82.png)
![](pictures/naming-mindmap.png)

## 其他推荐阅读

Expand Down
Binary file added docs/system-design/pictures/Codelf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/system-design/pictures/marting-naming.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/system-design/pictures/naming-mindmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/system-design/pictures/vscode-codelf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ccfba54

Please sign in to comment.