diff --git a/2014/12/23/my-new-post/index.html b/2014/12/23/my-new-post/index.html index 4a67156c32..b36c9c2d6e 100644 --- a/2014/12/23/my-new-post/index.html +++ b/2014/12/23/my-new-post/index.html @@ -428,20 +428,20 @@
- 87 + 88 posts
- 107 + 109 categories
- 152 + 156 tags
@@ -466,7 +466,7 @@
- +
diff --git a/2014/12/24/MFC 模态对话框/index.html b/2014/12/24/MFC 模态对话框/index.html index 3f064e1df8..bdd5f39479 100644 --- a/2014/12/24/MFC 模态对话框/index.html +++ b/2014/12/24/MFC 模态对话框/index.html @@ -301,16 +301,16 @@ @@ -451,20 +451,20 @@
- 87 + 88 posts
- 107 + 109 categories
- 152 + 156 tags
@@ -489,7 +489,7 @@
- +
diff --git a/2014/12/30/Clone-Graph-Part-I/index.html b/2014/12/30/Clone-Graph-Part-I/index.html index ccc1643030..d010a8ab7f 100644 --- a/2014/12/30/Clone-Graph-Part-I/index.html +++ b/2014/12/30/Clone-Graph-Part-I/index.html @@ -35,8 +35,8 @@ - + @@ -300,19 +300,19 @@ @@ -356,8 +356,8 @@ @@ -469,20 +472,20 @@
- 87 + 88 posts
- 107 + 109 categories
- 152 + 156 tags
@@ -507,7 +510,7 @@
- +
diff --git a/2021/02/07/关于读书打卡与分享/index.html b/2021/02/07/关于读书打卡与分享/index.html new file mode 100644 index 0000000000..5e8fa79160 --- /dev/null +++ b/2021/02/07/关于读书打卡与分享/index.html @@ -0,0 +1,759 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 关于读书打卡与分享 | Nicksxs's Blog + + + + + + + + + + + + + + + + +
+
+ +
+
+ + +
+ + + +

Nicksxs's Blog

+ +
+

What hurts more, the pain of hard work or the pain of regret?

+
+ + +
+ + + + + + + + + +
+
+ + +
+ + 0% +
+ + + + +
+
+
+ + +
+ + + + + +
+ + + + + +
+

+ 关于读书打卡与分享 +

+ + +
+ + + + +
+ + +

最近群里大佬发起了一个读书打卡活动,需要每天读一会书,在群里打卡分享感悟,争取一个月能读完一本书,说实话一天十分钟的读书时间倒是问题不大,不过每天都要打卡,而且一个月要读完一本书,其实难度还是有点大的,不过也想试试看。
之前某某老大给自己立了个 flag,说要读一百本书,这对我来说挺难实现的,一则我也不喜欢书只读一小半,二则感觉对于喜欢看的内容范围还是比较有限制,可能也算是比较矫情,不爱追热门的各类东西,因为往往会有一些跟大众不一致的观点看法,显得格格不入。所以还是这个打卡活动可能会比较适合我,书是人类进步的阶梯。
到现在是打卡了三天了,读的主要是白岩松的《幸福了吗》,对于白岩松,我们这一代人是比较熟悉,并且整体印象比较不错的一个央视主持人,从《焦点访谈》开始,到疫情期间的各类一线节目,可能对我来说是个三观比较正,敢于说一些真话的主持人,这中间其实是有个空档期,没怎么看电视,也不太关注了,只是在疫情期间的节目,还是一如既往地给人一种可靠的感觉,正好有一次偶然微信读书推荐了白岩松的这本书,就看了一部分,正好这次继续往下看,因为相对来讲不会很晦涩,并且从这位知名央视主持人的角度分享他的过往和想法看法,还是比较有意思的。
从对汶川地震,08 年奥运等往事的回忆和一些细节的呈现,也让我了解比较多当时所不知道的,特别是汶川地震,那时的我还在读高中,真的是看着电视,作为“猛男”都忍不住泪目了,共和国之殇,多难兴邦,但是这对于当事人来说,都是一场醒不过来的噩梦。
然后是对于足球的热爱,其实光这个就能掰扯很多,因为我不爱足球,只爱篮球,其中原因有的没的也挺多可以说的,但是看了他的书,才能比较深入的了解一个足球迷,对足球,对中国足球,对世界杯,对阿根廷的感情。
接下去还是想能继续坚持下去,加油!

+ +
+ + + + + + + + +
+
请我喝杯咖啡
+ + +
+ + + +
+ +
+ + + + +
+ + + + + + +
+ + +
+
+ +
+
+ + + + +
+ + + + + + + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/404.html b/404.html index 66bbb55cb0..3ab3aa2acf 100644 --- a/404.html +++ b/404.html @@ -320,20 +320,20 @@
- 87 + 88 posts
- 107 + 109 categories
- 152 + 156 tags
@@ -358,7 +358,7 @@
- +
diff --git a/404/index.html b/404/index.html index 75da8f5cb9..a832e6b2fe 100644 --- a/404/index.html +++ b/404/index.html @@ -307,20 +307,20 @@
- 87 + 88 posts
- 107 + 109 categories
- 152 + 156 tags
@@ -345,7 +345,7 @@
- +
diff --git a/archives/2014/12/index.html b/archives/2014/12/index.html index 179794ebe0..ceea3e6448 100644 --- a/archives/2014/12/index.html +++ b/archives/2014/12/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -350,20 +350,20 @@
- 87 + 88 posts
- 107 + 109 categories
- 152 + 156 tags
@@ -388,7 +388,7 @@
- +
diff --git a/archives/2014/index.html b/archives/2014/index.html index a6c91cc807..5bf8e158f2 100644 --- a/archives/2014/index.html +++ b/archives/2014/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -350,20 +350,20 @@ @@ -388,7 +388,7 @@
- +
diff --git a/archives/2015/01/index.html b/archives/2015/01/index.html index e4a3adffd2..c2ece3028e 100644 --- a/archives/2015/01/index.html +++ b/archives/2015/01/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -350,20 +350,20 @@ @@ -388,7 +388,7 @@
- +
diff --git a/archives/2015/03/index.html b/archives/2015/03/index.html index 0650331b5f..aa39e6bc86 100644 --- a/archives/2015/03/index.html +++ b/archives/2015/03/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -350,20 +350,20 @@ @@ -388,7 +388,7 @@
- +
diff --git a/archives/2015/04/index.html b/archives/2015/04/index.html index 2fbe57f054..f4fa2f6404 100644 --- a/archives/2015/04/index.html +++ b/archives/2015/04/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -330,20 +330,20 @@ @@ -368,7 +368,7 @@
- +
diff --git a/archives/2015/06/index.html b/archives/2015/06/index.html index 9083468d48..187269a867 100644 --- a/archives/2015/06/index.html +++ b/archives/2015/06/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/archives/2015/index.html b/archives/2015/index.html index 72a22fdc54..23a1394847 100644 --- a/archives/2015/index.html +++ b/archives/2015/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -470,20 +470,20 @@ @@ -508,7 +508,7 @@
- +
diff --git a/archives/2016/07/index.html b/archives/2016/07/index.html index 49cfba80da..db8578870a 100644 --- a/archives/2016/07/index.html +++ b/archives/2016/07/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/archives/2016/08/index.html b/archives/2016/08/index.html index d1c3709ab1..984e424b7b 100644 --- a/archives/2016/08/index.html +++ b/archives/2016/08/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -330,20 +330,20 @@ @@ -368,7 +368,7 @@
- +
diff --git a/archives/2016/09/index.html b/archives/2016/09/index.html index f009884de1..ad0bd7a602 100644 --- a/archives/2016/09/index.html +++ b/archives/2016/09/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/archives/2016/10/index.html b/archives/2016/10/index.html index b73574e486..8a3f2bfe46 100644 --- a/archives/2016/10/index.html +++ b/archives/2016/10/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -330,20 +330,20 @@ @@ -368,7 +368,7 @@
- +
diff --git a/archives/2016/11/index.html b/archives/2016/11/index.html index 04c3f917b1..74d364d99a 100644 --- a/archives/2016/11/index.html +++ b/archives/2016/11/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/archives/2016/index.html b/archives/2016/index.html index 61074de736..771b0844c4 100644 --- a/archives/2016/index.html +++ b/archives/2016/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -430,20 +430,20 @@ @@ -468,7 +468,7 @@
- +
diff --git a/archives/2017/03/index.html b/archives/2017/03/index.html index 8c847aae18..925f08f7e2 100644 --- a/archives/2017/03/index.html +++ b/archives/2017/03/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/archives/2017/04/index.html b/archives/2017/04/index.html index 25cd964be0..d6cbd8e60d 100644 --- a/archives/2017/04/index.html +++ b/archives/2017/04/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/archives/2017/05/index.html b/archives/2017/05/index.html index ddb2cf36a3..da698aeaee 100644 --- a/archives/2017/05/index.html +++ b/archives/2017/05/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/archives/2017/index.html b/archives/2017/index.html index a77b282204..1576be3224 100644 --- a/archives/2017/index.html +++ b/archives/2017/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -350,20 +350,20 @@ @@ -388,7 +388,7 @@
- +
diff --git a/archives/2019/06/index.html b/archives/2019/06/index.html index 01eef9419c..5a119671b2 100644 --- a/archives/2019/06/index.html +++ b/archives/2019/06/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/archives/2019/09/index.html b/archives/2019/09/index.html index fbaba41874..321e69584c 100644 --- a/archives/2019/09/index.html +++ b/archives/2019/09/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/archives/2019/12/index.html b/archives/2019/12/index.html index a7f5715903..6b5d25d923 100644 --- a/archives/2019/12/index.html +++ b/archives/2019/12/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -390,20 +390,20 @@ @@ -428,7 +428,7 @@
- +
diff --git a/archives/2019/index.html b/archives/2019/index.html index ec26aeebe5..62907f7ecc 100644 --- a/archives/2019/index.html +++ b/archives/2019/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -430,20 +430,20 @@ @@ -468,7 +468,7 @@
- +
diff --git a/archives/2020/01/index.html b/archives/2020/01/index.html index 8526088108..f43b797e0a 100644 --- a/archives/2020/01/index.html +++ b/archives/2020/01/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -390,20 +390,20 @@ @@ -428,7 +428,7 @@
- +
diff --git a/archives/2020/02/index.html b/archives/2020/02/index.html index 84c1b9757e..11cbaefbaf 100644 --- a/archives/2020/02/index.html +++ b/archives/2020/02/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -370,20 +370,20 @@ @@ -408,7 +408,7 @@
- +
diff --git a/archives/2020/03/index.html b/archives/2020/03/index.html index 8d9679a9b3..14e1fd3d84 100644 --- a/archives/2020/03/index.html +++ b/archives/2020/03/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -390,20 +390,20 @@ @@ -428,7 +428,7 @@
- +
diff --git a/archives/2020/04/index.html b/archives/2020/04/index.html index 7d8b486c3d..3d0fa7ad79 100644 --- a/archives/2020/04/index.html +++ b/archives/2020/04/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -370,20 +370,20 @@ @@ -408,7 +408,7 @@
- +
diff --git a/archives/2020/05/index.html b/archives/2020/05/index.html index d520c9cd3e..ba6a67f601 100644 --- a/archives/2020/05/index.html +++ b/archives/2020/05/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -390,20 +390,20 @@ @@ -428,7 +428,7 @@
- +
diff --git a/archives/2020/06/index.html b/archives/2020/06/index.html index 4e9a91d1d1..01f9dfb7d5 100644 --- a/archives/2020/06/index.html +++ b/archives/2020/06/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -370,20 +370,20 @@ @@ -408,7 +408,7 @@
- +
diff --git a/archives/2020/07/index.html b/archives/2020/07/index.html index cf7e2b0929..e57e1b1467 100644 --- a/archives/2020/07/index.html +++ b/archives/2020/07/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -370,20 +370,20 @@ @@ -408,7 +408,7 @@
- +
diff --git a/archives/2020/08/index.html b/archives/2020/08/index.html index 9356163b09..c88cb621b1 100644 --- a/archives/2020/08/index.html +++ b/archives/2020/08/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -390,20 +390,20 @@ @@ -428,7 +428,7 @@
- +
diff --git a/archives/2020/09/index.html b/archives/2020/09/index.html index b2953f02e5..8913b579cf 100644 --- a/archives/2020/09/index.html +++ b/archives/2020/09/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -370,20 +370,20 @@ @@ -408,7 +408,7 @@
- +
diff --git a/archives/2020/10/index.html b/archives/2020/10/index.html index 006b97dd69..aa2817e97b 100644 --- a/archives/2020/10/index.html +++ b/archives/2020/10/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -370,20 +370,20 @@ @@ -408,7 +408,7 @@
- +
diff --git a/archives/2020/11/index.html b/archives/2020/11/index.html index d8acd15b52..5718e68ae7 100644 --- a/archives/2020/11/index.html +++ b/archives/2020/11/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -390,20 +390,20 @@ @@ -428,7 +428,7 @@
- +
diff --git a/archives/2020/12/index.html b/archives/2020/12/index.html index e3ba59988b..7fc60a1957 100644 --- a/archives/2020/12/index.html +++ b/archives/2020/12/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -370,20 +370,20 @@ @@ -408,7 +408,7 @@
- +
diff --git a/archives/2020/index.html b/archives/2020/index.html index c56a59e3fb..a951e99a31 100644 --- a/archives/2020/index.html +++ b/archives/2020/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -493,20 +493,20 @@ @@ -531,7 +531,7 @@
- +
diff --git a/archives/2020/page/2/index.html b/archives/2020/page/2/index.html index 01bfdd5b4d..e4fad5c3c6 100644 --- a/archives/2020/page/2/index.html +++ b/archives/2020/page/2/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -493,20 +493,20 @@ @@ -531,7 +531,7 @@
- +
diff --git a/archives/2020/page/3/index.html b/archives/2020/page/3/index.html index 28da8e0c49..f9e47c02be 100644 --- a/archives/2020/page/3/index.html +++ b/archives/2020/page/3/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -493,20 +493,20 @@ @@ -531,7 +531,7 @@
- +
diff --git a/archives/2020/page/4/index.html b/archives/2020/page/4/index.html index 58d7ee08b0..4d5acbe5f1 100644 --- a/archives/2020/page/4/index.html +++ b/archives/2020/page/4/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -493,20 +493,20 @@ @@ -531,7 +531,7 @@
- +
diff --git a/archives/2020/page/5/index.html b/archives/2020/page/5/index.html index d4c8b6650e..b55a7cccce 100644 --- a/archives/2020/page/5/index.html +++ b/archives/2020/page/5/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -493,20 +493,20 @@ @@ -531,7 +531,7 @@
- +
diff --git a/archives/2020/page/6/index.html b/archives/2020/page/6/index.html index b0311ebf09..71c309e2e7 100644 --- a/archives/2020/page/6/index.html +++ b/archives/2020/page/6/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -353,20 +353,20 @@ @@ -391,7 +391,7 @@
- +
diff --git a/archives/2021/01/index.html b/archives/2021/01/index.html index 3a99f5d094..d2be265f37 100644 --- a/archives/2021/01/index.html +++ b/archives/2021/01/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -390,20 +390,20 @@ @@ -428,7 +428,7 @@
- +
diff --git a/archives/2021/02/index.html b/archives/2021/02/index.html new file mode 100644 index 0000000000..3353a59767 --- /dev/null +++ b/archives/2021/02/index.html @@ -0,0 +1,594 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Archive | Nicksxs's Blog + + + + + + + + + + + + + + + + +
+
+ +
+
+ + +
+ + + +

Nicksxs's Blog

+ +
+

What hurts more, the pain of hard work or the pain of regret?

+
+ + +
+ + + + + + + + + +
+
+ + +
+ + 0% +
+ + + + +
+
+
+ + +
+ + + + + +
+
+
+ + Good! 88 posts in total. Keep on posting. +
+ + +
+ 2021 +
+ + + + +
+
+ + + + + + + + +
+ + + + +
+ + + + + + + + +
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archives/2021/index.html b/archives/2021/index.html index be1c8a69b9..5fb6cec458 100644 --- a/archives/2021/index.html +++ b/archives/2021/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -216,6 +216,26 @@ 2021
+ +
@@ -390,20 +410,20 @@ @@ -428,7 +448,7 @@
- +
diff --git a/archives/index.html b/archives/index.html index 78a2d991d0..85d9d9a5ac 100644 --- a/archives/index.html +++ b/archives/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -216,6 +216,26 @@ 2021
+ +
@@ -399,26 +419,6 @@
- -
@@ -496,20 +496,20 @@ @@ -534,7 +534,7 @@
- +
diff --git a/archives/page/2/index.html b/archives/page/2/index.html index e1e9660580..e28063a85e 100644 --- a/archives/page/2/index.html +++ b/archives/page/2/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -216,6 +216,26 @@ 2020
+ +
@@ -396,26 +416,6 @@
- -
@@ -493,20 +493,20 @@ @@ -531,7 +531,7 @@
- +
diff --git a/archives/page/3/index.html b/archives/page/3/index.html index 8293b04f6f..436c8fd5fa 100644 --- a/archives/page/3/index.html +++ b/archives/page/3/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -216,6 +216,26 @@ 2020
+ +
@@ -396,26 +416,6 @@
- -
@@ -493,20 +493,20 @@ @@ -531,7 +531,7 @@
- +
diff --git a/archives/page/4/index.html b/archives/page/4/index.html index d51a7840c2..df037c7e59 100644 --- a/archives/page/4/index.html +++ b/archives/page/4/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -216,6 +216,26 @@ 2020
+ +
@@ -396,26 +416,6 @@
- -
@@ -493,20 +493,20 @@ @@ -531,7 +531,7 @@
- +
diff --git a/archives/page/5/index.html b/archives/page/5/index.html index a0aa772116..8ac70e8f02 100644 --- a/archives/page/5/index.html +++ b/archives/page/5/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -216,6 +216,26 @@ 2020
+ +
@@ -396,26 +416,6 @@
- -
@@ -493,20 +493,20 @@ @@ -531,7 +531,7 @@
- +
diff --git a/archives/page/6/index.html b/archives/page/6/index.html index 3449aa3615..1010bde32b 100644 --- a/archives/page/6/index.html +++ b/archives/page/6/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -216,6 +216,26 @@ 2020
+ +
@@ -399,26 +419,6 @@
- -
@@ -496,20 +496,20 @@ @@ -534,7 +534,7 @@
- +
diff --git a/archives/page/7/index.html b/archives/page/7/index.html index e1799d0f0f..2dee4b3e05 100644 --- a/archives/page/7/index.html +++ b/archives/page/7/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -216,6 +216,26 @@ 2019
+ +
@@ -402,26 +422,6 @@
- -
@@ -499,20 +499,20 @@ @@ -537,7 +537,7 @@
- +
diff --git a/archives/page/8/index.html b/archives/page/8/index.html index b2dcfcea7f..faae570325 100644 --- a/archives/page/8/index.html +++ b/archives/page/8/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -216,6 +216,26 @@ 2016
+ +
@@ -399,26 +419,6 @@
- -
@@ -496,20 +496,20 @@ @@ -534,7 +534,7 @@
- +
diff --git a/archives/page/9/index.html b/archives/page/9/index.html index 691c51d7a0..4f58340e7c 100644 --- a/archives/page/9/index.html +++ b/archives/page/9/index.html @@ -208,7 +208,7 @@
- Good! 87 posts in total. Keep on posting. + Good! 88 posts in total. Keep on posting.
@@ -216,6 +216,26 @@ 2015
+ +
@@ -436,20 +456,20 @@ @@ -474,7 +494,7 @@
- +
diff --git a/atom.xml b/atom.xml index 0bdeb0c939..f00b6f1de2 100644 --- a/atom.xml +++ b/atom.xml @@ -6,7 +6,7 @@ - 2021-01-31T15:02:44.242Z + 2021-02-07T15:13:39.017Z https://nicksxs.me/ @@ -16,6 +16,47 @@ Hexo + + 关于读书打卡与分享 + + https://nicksxs.me/2021/02/07/%E5%85%B3%E4%BA%8E%E8%AF%BB%E4%B9%A6%E6%89%93%E5%8D%A1%E4%B8%8E%E5%88%86%E4%BA%AB/ + 2021-02-07T15:13:39.000Z + 2021-02-07T15:13:39.017Z + + + + + + + + <p>最近群里大佬发起了一个读书打卡活动,需要每天读一会书,在群里打卡分享感悟,争取一个月能读完一本书,说实话一天十分钟的读书时间倒是问题不大,不过每天都要打卡,而且一个月要读完一本书,其实难度还是有点大的,不过也想试试看。<br>之前某某老大给自己立了个 + + + + + + + + + + + + + + + + + + + + + + + + + + + 聊聊 redis 缓存的应用问题 @@ -88,10 +129,10 @@ - - + + @@ -168,10 +209,10 @@ - - + + @@ -314,10 +355,10 @@ - - + + @@ -369,14 +410,14 @@ - - - + + + @@ -498,10 +539,10 @@ - - + + @@ -607,10 +648,10 @@ - - + + @@ -698,14 +739,14 @@ - - - + + + @@ -805,46 +846,4 @@ - - Leetcode 3 Longest Substring Without Repeating Characters 题解分析 - - https://nicksxs.me/2020/09/20/Leetcode-3-Longest-Substring-Without-Repeating-Characters-%E9%A2%98%E8%A7%A3%E5%88%86%E6%9E%90/ - 2020-09-20T13:40:23.000Z - 2020-09-20T13:45:17.000Z - - - - - - - - <p>又做了个题,看记录是以前用 C++写过的,现在捋一捋思路,用 Java 再写了一下,思路还是比较清晰的,但是边界细节处理得比较差</p> -<h2 id="简要介绍"><a href="#简要介绍" class="headerlink" - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/baidu_verify_Gl8jtoDV4z.html b/baidu_verify_Gl8jtoDV4z.html index f77c1bce08..03ac1fbc01 100644 --- a/baidu_verify_Gl8jtoDV4z.html +++ b/baidu_verify_Gl8jtoDV4z.html @@ -309,20 +309,20 @@ @@ -347,7 +347,7 @@
- +
diff --git a/baidusitemap.xml b/baidusitemap.xml index 53fdf10d6d..cc973d31dd 100644 --- a/baidusitemap.xml +++ b/baidusitemap.xml @@ -1,6 +1,9 @@ + https://nicksxs.me/2021/02/07/%E5%85%B3%E4%BA%8E%E8%AF%BB%E4%B9%A6%E6%89%93%E5%8D%A1%E4%B8%8E%E5%88%86%E4%BA%AB/ + 2021-02-07 + https://nicksxs.me/2021/01/31/%E8%81%8A%E8%81%8A-redis-%E7%BC%93%E5%AD%98%E7%9A%84%E5%BA%94%E7%94%A8%E9%97%AE%E9%A2%98/ 2021-01-31 @@ -169,41 +172,35 @@ https://nicksxs.me/2020/01/19/redis%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%BB%8B%E7%BB%8D%E5%9B%9B/ 2020-01-18 - https://nicksxs.me/2014/12/24/MFC%20%E6%A8%A1%E6%80%81%E5%AF%B9%E8%AF%9D%E6%A1%86/ - 2020-01-12 - - https://nicksxs.me/2016/10/11/minimum-size-subarray-sum-209/ - 2020-01-12 - - https://nicksxs.me/2016/08/14/docker-mysql-cluster/ - 2020-01-12 - - https://nicksxs.me/2019/06/18/openresty/ + https://nicksxs.me/2019/12/26/redis%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%BB%8B%E7%BB%8D/ 2020-01-12 https://nicksxs.me/2015/04/14/Add-Two-Number/ 2020-01-12 - https://nicksxs.me/2016/11/10/php-abstract-class-and-interface/ + https://nicksxs.me/2014/12/24/MFC%20%E6%A8%A1%E6%80%81%E5%AF%B9%E8%AF%9D%E6%A1%86/ 2020-01-12 https://nicksxs.me/2020/01/10/redis%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%BB%8B%E7%BB%8D%E4%B8%89/ 2020-01-12 - https://nicksxs.me/2019/12/10/Redis-Part-1/ - 2020-01-12 - - https://nicksxs.me/2015/03/13/Reverse-Integer/ + https://nicksxs.me/2016/08/14/34-Search-for-a-Range/ 2020-01-12 https://nicksxs.me/2020/01/04/redis%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%BB%8B%E7%BB%8D%E4%BA%8C/ 2020-01-12 - https://nicksxs.me/2016/08/14/34-Search-for-a-Range/ + https://nicksxs.me/2016/11/10/php-abstract-class-and-interface/ 2020-01-12 https://nicksxs.me/2015/03/11/Reverse-Bits/ 2020-01-12 + + https://nicksxs.me/2019/12/10/Redis-Part-1/ + 2020-01-12 + + https://nicksxs.me/2019/06/18/openresty/ + 2020-01-12 https://nicksxs.me/2017/05/09/ambari-summary/ 2020-01-12 @@ -211,46 +208,52 @@ https://nicksxs.me/2016/09/29/binary-watch/ 2020-01-12 - https://nicksxs.me/2019/12/26/redis%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%BB%8B%E7%BB%8D/ + https://nicksxs.me/2016/10/11/minimum-size-subarray-sum-209/ + 2020-01-12 + + https://nicksxs.me/2015/03/13/Reverse-Integer/ 2020-01-12 https://nicksxs.me/2015/01/14/Two-Sum/ 2020-01-12 - https://nicksxs.me/2015/01/04/Path-Sum/ + https://nicksxs.me/2016/08/14/docker-mysql-cluster/ 2020-01-12 - https://nicksxs.me/2014/12/30/Clone-Graph-Part-I/ + https://nicksxs.me/2015/03/11/Number-Of-1-Bits/ 2020-01-12 - https://nicksxs.me/2016/07/13/swoole-websocket-test/ + https://nicksxs.me/2015/06/22/invert-binary-tree/ 2020-01-12 - https://nicksxs.me/2016/10/12/summary-ranges-228/ + https://nicksxs.me/2014/12/23/my-new-post/ 2020-01-12 - https://nicksxs.me/2017/03/28/spark-little-tips/ + https://nicksxs.me/2015/01/16/pcre-intro-and-a-simple-package/ 2020-01-12 - https://nicksxs.me/2019/09/23/AbstractQueuedSynchronizer/ + https://nicksxs.me/2015/01/04/Path-Sum/ 2020-01-12 - https://nicksxs.me/2015/03/11/Number-Of-1-Bits/ + https://nicksxs.me/2016/07/13/swoole-websocket-test/ 2020-01-12 https://nicksxs.me/2017/04/25/rabbitmq-tips/ 2020-01-12 - https://nicksxs.me/2015/06/22/invert-binary-tree/ + https://nicksxs.me/2017/03/28/spark-little-tips/ 2020-01-12 - https://nicksxs.me/2014/12/23/my-new-post/ + https://nicksxs.me/2015/04/15/Leetcode-No-3/ 2020-01-12 - https://nicksxs.me/2015/01/16/pcre-intro-and-a-simple-package/ + https://nicksxs.me/2014/12/30/Clone-Graph-Part-I/ 2020-01-12 - https://nicksxs.me/2015/04/15/Leetcode-No-3/ + https://nicksxs.me/2016/10/12/summary-ranges-228/ + 2020-01-12 + + https://nicksxs.me/2019/09/23/AbstractQueuedSynchronizer/ 2020-01-12 https://nicksxs.me/2019/12/21/%E8%81%8A%E8%81%8AJava%E4%B8%AD%E7%9A%84%E5%8D%95%E4%BE%8B%E6%A8%A1%E5%BC%8F/ diff --git a/categories/Binary-Tree/index.html b/categories/Binary-Tree/index.html index cc9b5b0892..1ec1be411d 100644 --- a/categories/Binary-Tree/index.html +++ b/categories/Binary-Tree/index.html @@ -353,20 +353,20 @@ @@ -391,7 +391,7 @@
- +
diff --git a/categories/C/Mysql/index.html b/categories/C/Mysql/index.html index 519f4f6148..27c2cc6689 100644 --- a/categories/C/Mysql/index.html +++ b/categories/C/Mysql/index.html @@ -370,20 +370,20 @@ @@ -408,7 +408,7 @@
- +
diff --git a/categories/C/Redis/index.html b/categories/C/Redis/index.html index 06d699b44d..cb3a4cd4d3 100644 --- a/categories/C/Redis/index.html +++ b/categories/C/Redis/index.html @@ -473,20 +473,20 @@ @@ -511,7 +511,7 @@
- +
diff --git a/categories/C/index.html b/categories/C/index.html index 783d31bcef..f86b32c9ad 100644 --- a/categories/C/index.html +++ b/categories/C/index.html @@ -493,20 +493,20 @@ @@ -531,7 +531,7 @@
- +
diff --git a/categories/C/page/2/index.html b/categories/C/page/2/index.html index 572d34c581..19ad329ff0 100644 --- a/categories/C/page/2/index.html +++ b/categories/C/page/2/index.html @@ -356,20 +356,20 @@ @@ -394,7 +394,7 @@
- +
diff --git a/categories/Dubbo-RPC-SPI/index.html b/categories/Dubbo-RPC-SPI/index.html index aefe7aa1f3..b9a562239d 100644 --- a/categories/Dubbo-RPC-SPI/index.html +++ b/categories/Dubbo-RPC-SPI/index.html @@ -330,20 +330,20 @@ @@ -368,7 +368,7 @@
- +
diff --git a/categories/Dubbo-RPC/index.html b/categories/Dubbo-RPC/index.html index 193268376a..048ab5ae45 100644 --- a/categories/Dubbo-RPC/index.html +++ b/categories/Dubbo-RPC/index.html @@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/categories/Dubbo/SPI/Adaptive/index.html b/categories/Dubbo/SPI/Adaptive/index.html index d850b68bf7..732ee56d8d 100644 --- a/categories/Dubbo/SPI/Adaptive/index.html +++ b/categories/Dubbo/SPI/Adaptive/index.html @@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/categories/Dubbo/SPI/index.html b/categories/Dubbo/SPI/index.html index 97de6e8669..658b0a477d 100644 --- a/categories/Dubbo/SPI/index.html +++ b/categories/Dubbo/SPI/index.html @@ -330,20 +330,20 @@ @@ -368,7 +368,7 @@
- +
diff --git a/categories/Dubbo/index.html b/categories/Dubbo/index.html index 962dcd6d79..f2b98fc037 100644 --- a/categories/Dubbo/index.html +++ b/categories/Dubbo/index.html @@ -350,20 +350,20 @@ @@ -388,7 +388,7 @@
- +
diff --git a/categories/Dubbo/容错机制/index.html b/categories/Dubbo/容错机制/index.html index 0d4efb608e..f9b87dcdf3 100644 --- a/categories/Dubbo/容错机制/index.html +++ b/categories/Dubbo/容错机制/index.html @@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/categories/Filter/index.html b/categories/Filter/index.html index b7c97cdcf0..af69482131 100644 --- a/categories/Filter/index.html +++ b/categories/Filter/index.html @@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/categories/Interceptor-AOP/index.html b/categories/Interceptor-AOP/index.html index 1d608ca95e..f1d7df2094 100644 --- a/categories/Interceptor-AOP/index.html +++ b/categories/Interceptor-AOP/index.html @@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/categories/Java/Apollo/index.html b/categories/Java/Apollo/index.html index b23dbd2e90..2317da04e4 100644 --- a/categories/Java/Apollo/index.html +++ b/categories/Java/Apollo/index.html @@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/categories/Java/Apollo/value/index.html b/categories/Java/Apollo/value/index.html index 54416fcf55..a352069b6a 100644 --- a/categories/Java/Apollo/value/index.html +++ b/categories/Java/Apollo/value/index.html @@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/categories/Java/Design-Patterns/index.html b/categories/Java/Design-Patterns/index.html index 5e9c5f914a..0fd3f9c357 100644 --- a/categories/Java/Design-Patterns/index.html +++ b/categories/Java/Design-Patterns/index.html @@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/categories/Java/GC/index.html b/categories/Java/GC/index.html index 08d3632aa3..cb10a10b64 100644 --- a/categories/Java/GC/index.html +++ b/categories/Java/GC/index.html @@ -333,20 +333,20 @@ @@ -371,7 +371,7 @@
- +
diff --git a/categories/Java/JVM/index.html b/categories/Java/JVM/index.html index 13a376046d..e852743a22 100644 --- a/categories/Java/JVM/index.html +++ b/categories/Java/JVM/index.html @@ -333,20 +333,20 @@ @@ -371,7 +371,7 @@
- +
diff --git a/categories/Java/Maven/index.html b/categories/Java/Maven/index.html index 46b299b2c1..8e613751eb 100644 --- a/categories/Java/Maven/index.html +++ b/categories/Java/Maven/index.html @@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/categories/Java/Mybatis/index.html b/categories/Java/Mybatis/index.html index 8893c6cf51..a61f8b33cc 100644 --- a/categories/Java/Mybatis/index.html +++ b/categories/Java/Mybatis/index.html @@ -330,20 +330,20 @@ @@ -368,7 +368,7 @@
- +
diff --git a/categories/Java/Singleton/index.html b/categories/Java/Singleton/index.html index deaa3f0c1e..cc44da0b65 100644 --- a/categories/Java/Singleton/index.html +++ b/categories/Java/Singleton/index.html @@ -310,20 +310,20 @@ @@ -348,7 +348,7 @@
- +
diff --git a/categories/Java/index.html b/categories/Java/index.html index d26de07f85..f5593e4b83 100644 --- a/categories/Java/index.html +++ b/categories/Java/index.html @@ -29,7 +29,7 @@ - + @@ -40,7 +40,7 @@ - + - Category: java | Nicksxs's Blog + Category: Java | Nicksxs's Blog - - - - - - -k" rel="noopener" target="_blank">NexT.Pisces -
- - -
- - - - -
- - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Category: Linked List | Nicksxs's Blog + Category: linked list | Nicksxs's Blog + + + + + + +t?(n+="?r="+encodeURIComponent(document.referrer),r&&(n+="&l="+r)):r&&(n+="?l="+r);var i=new Image;i.src=n}}(window);})(); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Category: 白岩松 | Nicksxs's Blog + + + + + + + + + + + + + + + + +
+
+ +
+
+ + +
+ + + +

Nicksxs's Blog

+ +
+

What hurts more, the pain of hard work or the pain of regret?

+
+ + +
+ + + + + + + + + +
+
+ + +
+ + 0% +
+ + + + +
+
+
+ + +
+ + + + + +
+
+
+

白岩松 + Category +

+
+ + +
+ 2021 +
+ + + +
+
+ + + + + + + + +
+ + + + +
+ + + + + + + + +
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/categories/读后感/白岩松/幸福了吗/index.html b/categories/读后感/白岩松/幸福了吗/index.html new file mode 100644 index 0000000000..90d68ceca1 --- /dev/null +++ b/categories/读后感/白岩松/幸福了吗/index.html @@ -0,0 +1,604 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Category: 幸福了吗 | Nicksxs's Blog + + + + + + + + + + + + + + + + +
+
+ +
+
+ + +
+ + + +

Nicksxs's Blog

+ +
+

What hurts more, the pain of hard work or the pain of regret?

+
+ + +
+ + + + + + + + + +
+
+ + +
+ + 0% +
+ + + + +
+
+
+ + +
+ + + + + +
+
+
+

幸福了吗 + Category +

+
+ + +
+ 2021 +
+ + + +
+
+ + + + + + + + +
+ + + + +
+ + + + + + + + +
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/categories/问题排查/index.html b/categories/问题排查/index.html index af6ab77654..e94705f220 100644 --- a/categories/问题排查/index.html +++ b/categories/问题排查/index.html @@ -330,20 +330,20 @@ @@ -368,7 +368,7 @@
- +
diff --git a/css/main.css b/css/main.css index 7e0f9de415..f55aaf73f4 100644 --- a/css/main.css +++ b/css/main.css @@ -1261,7 +1261,7 @@ pre .javascript .function { } .links-of-author a::before, .links-of-author span.exturl::before { - background: #592f75; + background: #dd96e2; border-radius: 50%; content: ' '; display: inline-block; diff --git a/index.html b/index.html index eb8dc82492..0c5dfc0e34 100644 --- a/index.html +++ b/index.html @@ -203,6 +203,108 @@ +
+ + + + + +
+

+ + +

+ + +
+ + + + +
+ + +

最近群里大佬发起了一个读书打卡活动,需要每天读一会书,在群里打卡分享感悟,争取一个月能读完一本书,说实话一天十分钟的读书时间倒是问题不大,不过每天都要打卡,而且一个月要读完一本书,其实难度还是有点大的,不过也想试试看。
之前某某老大给自己立了个 flag,说要读一百本书,这对我来说挺难实现的,一则我也不喜欢书只读一小半,二则感觉对于喜欢看的内容范围还是比较有限制,可能也算是比较矫情,不爱追热门的各类东西,因为往往会有一些跟大众不一致的观点看法,显得格格不入。所以还是这个打卡活动可能会比较适合我,书是人类进步的阶梯。
到现在是打卡了三天了,读的主要是白岩松的《幸福了吗》,对于白岩松,我们这一代人是比较熟悉,并且整体印象比较不错的一个央视主持人,从《焦点访谈》开始,到疫情期间的各类一线节目,可能对我来说是个三观比较正,敢于说一些真话的主持人,这中间其实是有个空档期,没怎么看电视,也不太关注了,只是在疫情期间的节目,还是一如既往地给人一种可靠的感觉,正好有一次偶然微信读书推荐了白岩松的这本书,就看了一部分,正好这次继续往下看,因为相对来讲不会很晦涩,并且从这位知名央视主持人的角度分享他的过往和想法看法,还是比较有意思的。
从对汶川地震,08 年奥运等往事的回忆和一些细节的呈现,也让我了解比较多当时所不知道的,特别是汶川地震,那时的我还在读高中,真的是看着电视,作为“猛男”都忍不住泪目了,共和国之殇,多难兴邦,但是这对于当事人来说,都是一场醒不过来的噩梦。
然后是对于足球的热爱,其实光这个就能掰扯很多,因为我不爱足球,只爱篮球,其中原因有的没的也挺多可以说的,但是看了他的书,才能比较深入的了解一个足球迷,对足球,对中国足球,对世界杯,对阿根廷的感情。
接下去还是想能继续坚持下去,加油!

+ + +
+ + + + + + +
+
+
+
+ + + + + + +
@@ -357,11 +459,11 @@ - + , - + , @@ -574,11 +676,11 @@ - + , - + , @@ -650,91 +752,6 @@ - - - -
- - - - - -
-

- - -

- - -
- - - - -
- - -

Java 中的这个话题也是比较常遇到的,关于这块原先也是比较忽略的,但是仔细想想又有点遗忘了就在这里记一下
简单看下代码
java.lang.Object#equals

-
1
2
3
public boolean equals(Object obj) {
return (this == obj);
}
-

对于所有对象的父类,equals 方法其实对比的就是对象的地址,也就是是否是同一个对象,试想如果像 Integer 或者 String 这种,我们没有重写 equals,那其实就等于是在用==,可能就没法达到我们的目的,所以像 String 这种常用的 jdk 类都是默认重写了
java.lang.String#equals

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public boolean equals(Object anObject) {
if (this == anObject) {
return true;
}
if (anObject instanceof String) {
String anotherString = (String)anObject;
int n = value.length;
if (n == anotherString.value.length) {
char v1[] = value;
char v2[] = anotherString.value;
int i = 0;
while (n-- != 0) {
if (v1[i] != v2[i])
return false;
i++;
}
return true;
}
}
return false;
}
-

然后呢就是为啥一些书或者 effective java 中写了 equalshashCode 要一起重写,这里涉及到当对象作为 HashMapkey 的时候
首先 HashMap 会使用 hashCode 去判断是否在同一个槽里,然后在通过 equals 去判断是否是同一个 key,是的话就替换,不是的话就链表接下去,如果不重写 hashCode 的话,默认的 objecthashCodenative 方法,根据对象的地址生成的,这样其实对象的值相同的话,因为地址不同,HashMap 也会出现异常,所以需要重写,同时也需要重写 equals 方法,才能确认是同一个 key,而不是落在同一个槽的不同 key.

- - -
- - - - - - -
-
-
-
- - - - @@ -844,7 +861,7 @@
- +
diff --git a/leancloud.memo b/leancloud.memo index 4997a87b71..5a7add056b 100644 --- a/leancloud.memo +++ b/leancloud.memo @@ -88,4 +88,5 @@ {"title":"Leetcode 160 相交链表(intersection-of-two-linked-lists) 题解分析","url":"/2021/01/10/Leetcode-160-相交链表-intersection-of-two-linked-lists-题解分析/"}, {"title":"聊聊那些加塞狗","url":"/2021/01/17/聊聊那些加塞狗/"}, {"title":"Leetcode 124 二叉树中的最大路径和(Binary Tree Maximum Path Sum) 题解分析","url":"/2021/01/24/Leetcode-124-二叉树中的最大路径和-Binary-Tree-Maximum-Path-Sum-题解分析/"}, +{"title":"聊聊 redis 缓存的应用问题","url":"/2021/01/31/聊聊-redis-缓存的应用问题/"}, ] \ No newline at end of file diff --git a/leancloud_counter_security_urls.json b/leancloud_counter_security_urls.json index 76f10e91b2..617ab7fd0b 100644 --- a/leancloud_counter_security_urls.json +++ b/leancloud_counter_security_urls.json @@ -1 +1 @@ -[{"title":"2020年中总结","url":"/2020/07/11/2020年中总结/"},{"title":"村上春树《1Q84》读后感","url":"/2019/12/18/1Q84读后感/"},{"title":"34_Search_for_a_Range","url":"/2016/08/14/34-Search-for-a-Range/"},{"title":"Apollo 的 value 注解是怎么自动更新的","url":"/2020/11/01/Apollo-的-value-注解是怎么自动更新的/"},{"title":"AbstractQueuedSynchronizer","url":"/2019/09/23/AbstractQueuedSynchronizer/"},{"title":"add-two-number","url":"/2015/04/14/Add-Two-Number/"},{"title":"2019年终总结","url":"/2020/02/01/2019年终总结/"},{"title":"Comparator使用小记","url":"/2020/04/05/Comparator使用小记/"},{"title":"Clone Graph Part I","url":"/2014/12/30/Clone-Graph-Part-I/"},{"title":"Leetcode 104 二叉树的最大深度(Maximum Depth of Binary Tree) 题解分析","url":"/2020/10/25/Leetcode-104-二叉树的最大深度-Maximum-Depth-of-Binary-Tree-题解分析/"},{"title":"G1收集器概述","url":"/2020/02/09/G1收集器概述/"},{"title":"Leetcode 2 Add Two Numbers 题解分析","url":"/2020/10/11/Leetcode-2-Add-Two-Numbers-题解分析/"},{"title":"Leetcode 124 二叉树中的最大路径和(Binary Tree Maximum Path Sum) 题解分析","url":"/2021/01/24/Leetcode-124-二叉树中的最大路径和-Binary-Tree-Maximum-Path-Sum-题解分析/"},{"title":"Leetcode 3 Longest Substring Without Repeating Characters 题解分析","url":"/2020/09/20/Leetcode-3-Longest-Substring-Without-Repeating-Characters-题解分析/"},{"title":"leetcode no.3","url":"/2015/04/15/Leetcode-No-3/"},{"title":"MFC 模态对话框","url":"/2014/12/24/MFC 模态对话框/"},{"title":"Maven实用小技巧","url":"/2020/02/16/Maven实用小技巧/"},{"title":"Leetcode 155 最小栈(Min Stack) 题解分析","url":"/2020/12/06/Leetcode-155-最小栈-Min-Stack-题解分析/"},{"title":"Leetcode 105 从前序与中序遍历序列构造二叉树(Construct Binary Tree from Preorder and Inorder Traversal) 题解分析","url":"/2020/12/13/Leetcode-105-从前序与中序遍历序列构造二叉树-Construct-Binary-Tree-from-Preorder-and-Inorder-Traversal-题解分析/"},{"title":"Path Sum","url":"/2015/01/04/Path-Sum/"},{"title":"Linux 下 grep 命令的一点小技巧","url":"/2020/08/06/Linux-下-grep-命令的一点小技巧/"},{"title":"Leetcode 160 相交链表(intersection-of-two-linked-lists) 题解分析","url":"/2021/01/10/Leetcode-160-相交链表-intersection-of-two-linked-lists-题解分析/"},{"title":"Leetcode 234 回文链表(Palindrome Linked List) 题解分析","url":"/2020/11/15/Leetcode-234-回文联表-Palindrome-Linked-List-题解分析/"},{"title":"Redis_分布式锁","url":"/2019/12/10/Redis-Part-1/"},{"title":"Reverse Integer","url":"/2015/03/13/Reverse-Integer/"},{"title":"Reverse Bits","url":"/2015/03/11/Reverse-Bits/"},{"title":"two sum","url":"/2015/01/14/Two-Sum/"},{"title":"binary-watch","url":"/2016/09/29/binary-watch/"},{"title":"ambari-summary","url":"/2017/05/09/ambari-summary/"},{"title":"docker比一般多一点的初学者介绍","url":"/2020/03/08/docker比一般多一点的初学者介绍/"},{"title":"docker比一般多一点的初学者介绍三","url":"/2020/03/21/docker比一般多一点的初学者介绍三/"},{"title":"docker-mysql-cluster","url":"/2016/08/14/docker-mysql-cluster/"},{"title":"gogs使用webhook部署react单页应用","url":"/2020/02/22/gogs使用webhook部署react单页应用/"},{"title":"Number of 1 Bits","url":"/2015/03/11/Number-Of-1-Bits/"},{"title":"docker比一般多一点的初学者介绍二","url":"/2020/03/15/docker比一般多一点的初学者介绍二/"},{"title":"invert-binary-tree","url":"/2015/06/22/invert-binary-tree/"},{"title":"minimum-size-subarray-sum-209","url":"/2016/10/11/minimum-size-subarray-sum-209/"},{"title":"mybatis 的 $ 和 # 是有啥区别","url":"/2020/09/06/mybatis-的-和-是有啥区别/"},{"title":"docker使用中发现的echo命令的一个小技巧及其他","url":"/2020/03/29/echo命令的一个小技巧/"},{"title":"pcre-intro-and-a-simple-package","url":"/2015/01/16/pcre-intro-and-a-simple-package/"},{"title":"C++ 指针使用中的一个小问题","url":"/2014/12/23/my-new-post/"},{"title":"openresty","url":"/2019/06/18/openresty/"},{"title":"php-abstract-class-and-interface","url":"/2016/11/10/php-abstract-class-and-interface/"},{"title":"rabbitmq-tips","url":"/2017/04/25/rabbitmq-tips/"},{"title":"redis数据结构介绍三-第三部分 整数集合","url":"/2020/01/10/redis数据结构介绍三/"},{"title":"redis数据结构介绍五-第五部分 对象","url":"/2020/01/20/redis数据结构介绍五/"},{"title":"redis数据结构介绍二-第二部分 跳表","url":"/2020/01/04/redis数据结构介绍二/"},{"title":"redis数据结构介绍四-第四部分 压缩表","url":"/2020/01/19/redis数据结构介绍四/"},{"title":"spark-little-tips","url":"/2017/03/28/spark-little-tips/"},{"title":"summary-ranges-228","url":"/2016/10/12/summary-ranges-228/"},{"title":"swoole-websocket-test","url":"/2016/07/13/swoole-websocket-test/"},{"title":"周末我在老丈人家打了天小工","url":"/2020/08/16/周末我在老丈人家打了天小工/"},{"title":"在老丈人家的小工记三","url":"/2020/09/13/在老丈人家的小工记三/"},{"title":"在老丈人家的小工记五","url":"/2020/10/18/在老丈人家的小工记五/"},{"title":"从丁仲礼被美国制裁聊点啥","url":"/2020/12/20/从丁仲礼被美国制裁聊点啥/"},{"title":"从清华美院学姐聊聊我们身边的恶人","url":"/2020/11/29/从清华美院学姐聊聊我们身边的恶人/"},{"title":"在老丈人家的小工记四","url":"/2020/09/26/在老丈人家的小工记四/"},{"title":"我是如何走上跑步这条不归路的","url":"/2020/07/26/我是如何走上跑步这条不归路的/"},{"title":"寄生虫观后感","url":"/2020/03/01/寄生虫观后感/"},{"title":"聊聊 Dubbo 的 SPI 续之自适应拓展","url":"/2020/06/06/聊聊-Dubbo-的-SPI-续之自适应拓展/"},{"title":"聊聊 Java 的类加载机制一","url":"/2020/11/08/聊聊-Java-的类加载机制/"},{"title":"聊聊 Dubbo 的 SPI","url":"/2020/05/31/聊聊-Dubbo-的-SPI/"},{"title":"聊聊 mysql 的 MVCC 续篇","url":"/2020/05/02/聊聊-mysql-的-MVCC-续篇/"},{"title":"聊聊 mysql 的 MVCC 续续篇之锁分析","url":"/2020/05/10/聊聊-mysql-的-MVCC-续续篇之加锁分析/"},{"title":"聊聊 mysql 的 MVCC","url":"/2020/04/26/聊聊-mysql-的-MVCC/"},{"title":"聊聊Java中的单例模式","url":"/2019/12/21/聊聊Java中的单例模式/"},{"title":"聊聊一次 brew update 引发的血案","url":"/2020/06/13/聊聊一次-brew-update-引发的血案/"},{"title":"聊聊 redis 缓存的应用问题","url":"/2021/01/31/聊聊-redis-缓存的应用问题/"},{"title":"聊聊我刚学会的应用诊断方法","url":"/2020/05/22/聊聊我刚学会的应用诊断方法/"},{"title":"这周末我又在老丈人家打了天小工","url":"/2020/08/30/这周末我又在老丈人家打了天小工/"},{"title":"聊聊 mysql 索引的一些细节","url":"/2020/12/27/聊聊-mysql-索引的一些细节/"},{"title":"聊聊 Java 的 equals 和 hashCode 方法","url":"/2021/01/03/聊聊-Java-的-equals-和-hashCode-方法/"},{"title":"redis数据结构介绍-第一部分 SDS,链表,字典","url":"/2019/12/26/redis数据结构介绍/"},{"title":"mybatis 的缓存是怎么回事","url":"/2020/10/03/mybatis-的缓存是怎么回事/"},{"title":"redis数据结构介绍六 快表","url":"/2020/01/22/redis数据结构介绍六/"},{"title":"介绍一下 RocketMQ","url":"/2020/06/21/介绍一下-RocketMQ/"},{"title":"聊聊 Dubbo 的容错机制","url":"/2020/11/22/聊聊-Dubbo-的容错机制/"},{"title":"聊聊我理解的分布式事务","url":"/2020/05/17/聊聊我理解的分布式事务/"},{"title":"聊聊那些加塞狗","url":"/2021/01/17/聊聊那些加塞狗/"},{"title":"Filter, Interceptor, Aop, 啥, 啥, 啥? 这些都是啥?","url":"/2020/08/22/Filter-Intercepter-Aop-啥-啥-啥-这些都是啥/"},{"title":"redis系列介绍七-过期策略","url":"/2020/04/12/redis系列介绍七/"},{"title":"JVM源码分析之G1垃圾收集器分析一","url":"/2019/12/07/JVM-G1-Part-1/"},{"title":"redis系列介绍八-淘汰策略","url":"/2020/04/18/redis系列介绍八/"},{"title":"聊一下 RocketMQ 的 NameServer 源码","url":"/2020/07/05/聊一下-RocketMQ-的-NameServer-源码/"},{"title":"聊聊 RocketMQ 的 Broker 源码","url":"/2020/07/19/聊聊-RocketMQ-的-Broker-源码/"},{"title":"聊聊 Java 自带的那些*逆天*工具","url":"/2020/08/02/聊聊-Java-自带的那些逆天工具/"},{"title":"聊一下 RocketMQ 的 DefaultMQPushConsumer 源码","url":"/2020/06/26/聊一下-RocketMQ-的-Consumer/"}] \ No newline at end of file +[{"title":"村上春树《1Q84》读后感","url":"/2019/12/18/1Q84读后感/"},{"title":"2020年中总结","url":"/2020/07/11/2020年中总结/"},{"title":"34_Search_for_a_Range","url":"/2016/08/14/34-Search-for-a-Range/"},{"title":"2019年终总结","url":"/2020/02/01/2019年终总结/"},{"title":"AbstractQueuedSynchronizer","url":"/2019/09/23/AbstractQueuedSynchronizer/"},{"title":"add-two-number","url":"/2015/04/14/Add-Two-Number/"},{"title":"Apollo 的 value 注解是怎么自动更新的","url":"/2020/11/01/Apollo-的-value-注解是怎么自动更新的/"},{"title":"Clone Graph Part I","url":"/2014/12/30/Clone-Graph-Part-I/"},{"title":"Comparator使用小记","url":"/2020/04/05/Comparator使用小记/"},{"title":"G1收集器概述","url":"/2020/02/09/G1收集器概述/"},{"title":"Leetcode 104 二叉树的最大深度(Maximum Depth of Binary Tree) 题解分析","url":"/2020/10/25/Leetcode-104-二叉树的最大深度-Maximum-Depth-of-Binary-Tree-题解分析/"},{"title":"Leetcode 124 二叉树中的最大路径和(Binary Tree Maximum Path Sum) 题解分析","url":"/2021/01/24/Leetcode-124-二叉树中的最大路径和-Binary-Tree-Maximum-Path-Sum-题解分析/"},{"title":"Leetcode 105 从前序与中序遍历序列构造二叉树(Construct Binary Tree from Preorder and Inorder Traversal) 题解分析","url":"/2020/12/13/Leetcode-105-从前序与中序遍历序列构造二叉树-Construct-Binary-Tree-from-Preorder-and-Inorder-Traversal-题解分析/"},{"title":"Leetcode 2 Add Two Numbers 题解分析","url":"/2020/10/11/Leetcode-2-Add-Two-Numbers-题解分析/"},{"title":"Leetcode 3 Longest Substring Without Repeating Characters 题解分析","url":"/2020/09/20/Leetcode-3-Longest-Substring-Without-Repeating-Characters-题解分析/"},{"title":"leetcode no.3","url":"/2015/04/15/Leetcode-No-3/"},{"title":"Linux 下 grep 命令的一点小技巧","url":"/2020/08/06/Linux-下-grep-命令的一点小技巧/"},{"title":"MFC 模态对话框","url":"/2014/12/24/MFC 模态对话框/"},{"title":"Leetcode 234 回文链表(Palindrome Linked List) 题解分析","url":"/2020/11/15/Leetcode-234-回文联表-Palindrome-Linked-List-题解分析/"},{"title":"Leetcode 155 最小栈(Min Stack) 题解分析","url":"/2020/12/06/Leetcode-155-最小栈-Min-Stack-题解分析/"},{"title":"Maven实用小技巧","url":"/2020/02/16/Maven实用小技巧/"},{"title":"Leetcode 160 相交链表(intersection-of-two-linked-lists) 题解分析","url":"/2021/01/10/Leetcode-160-相交链表-intersection-of-two-linked-lists-题解分析/"},{"title":"Reverse Bits","url":"/2015/03/11/Reverse-Bits/"},{"title":"Number of 1 Bits","url":"/2015/03/11/Number-Of-1-Bits/"},{"title":"Path Sum","url":"/2015/01/04/Path-Sum/"},{"title":"Redis_分布式锁","url":"/2019/12/10/Redis-Part-1/"},{"title":"ambari-summary","url":"/2017/05/09/ambari-summary/"},{"title":"binary-watch","url":"/2016/09/29/binary-watch/"},{"title":"Reverse Integer","url":"/2015/03/13/Reverse-Integer/"},{"title":"docker-mysql-cluster","url":"/2016/08/14/docker-mysql-cluster/"},{"title":"docker比一般多一点的初学者介绍","url":"/2020/03/08/docker比一般多一点的初学者介绍/"},{"title":"docker比一般多一点的初学者介绍三","url":"/2020/03/21/docker比一般多一点的初学者介绍三/"},{"title":"docker比一般多一点的初学者介绍二","url":"/2020/03/15/docker比一般多一点的初学者介绍二/"},{"title":"docker使用中发现的echo命令的一个小技巧及其他","url":"/2020/03/29/echo命令的一个小技巧/"},{"title":"gogs使用webhook部署react单页应用","url":"/2020/02/22/gogs使用webhook部署react单页应用/"},{"title":"invert-binary-tree","url":"/2015/06/22/invert-binary-tree/"},{"title":"two sum","url":"/2015/01/14/Two-Sum/"},{"title":"minimum-size-subarray-sum-209","url":"/2016/10/11/minimum-size-subarray-sum-209/"},{"title":"C++ 指针使用中的一个小问题","url":"/2014/12/23/my-new-post/"},{"title":"mybatis 的 $ 和 # 是有啥区别","url":"/2020/09/06/mybatis-的-和-是有啥区别/"},{"title":"openresty","url":"/2019/06/18/openresty/"},{"title":"pcre-intro-and-a-simple-package","url":"/2015/01/16/pcre-intro-and-a-simple-package/"},{"title":"rabbitmq-tips","url":"/2017/04/25/rabbitmq-tips/"},{"title":"php-abstract-class-and-interface","url":"/2016/11/10/php-abstract-class-and-interface/"},{"title":"mybatis 的缓存是怎么回事","url":"/2020/10/03/mybatis-的缓存是怎么回事/"},{"title":"redis数据结构介绍二-第二部分 跳表","url":"/2020/01/04/redis数据结构介绍二/"},{"title":"redis数据结构介绍三-第三部分 整数集合","url":"/2020/01/10/redis数据结构介绍三/"},{"title":"redis数据结构介绍五-第五部分 对象","url":"/2020/01/20/redis数据结构介绍五/"},{"title":"redis数据结构介绍四-第四部分 压缩表","url":"/2020/01/19/redis数据结构介绍四/"},{"title":"spark-little-tips","url":"/2017/03/28/spark-little-tips/"},{"title":"summary-ranges-228","url":"/2016/10/12/summary-ranges-228/"},{"title":"swoole-websocket-test","url":"/2016/07/13/swoole-websocket-test/"},{"title":"周末我在老丈人家打了天小工","url":"/2020/08/16/周末我在老丈人家打了天小工/"},{"title":"关于读书打卡与分享","url":"/2021/02/07/关于读书打卡与分享/"},{"title":"在老丈人家的小工记三","url":"/2020/09/13/在老丈人家的小工记三/"},{"title":"在老丈人家的小工记五","url":"/2020/10/18/在老丈人家的小工记五/"},{"title":"在老丈人家的小工记四","url":"/2020/09/26/在老丈人家的小工记四/"},{"title":"从清华美院学姐聊聊我们身边的恶人","url":"/2020/11/29/从清华美院学姐聊聊我们身边的恶人/"},{"title":"寄生虫观后感","url":"/2020/03/01/寄生虫观后感/"},{"title":"从丁仲礼被美国制裁聊点啥","url":"/2020/12/20/从丁仲礼被美国制裁聊点啥/"},{"title":"我是如何走上跑步这条不归路的","url":"/2020/07/26/我是如何走上跑步这条不归路的/"},{"title":"聊聊 Dubbo 的 SPI","url":"/2020/05/31/聊聊-Dubbo-的-SPI/"},{"title":"聊聊 Dubbo 的 SPI 续之自适应拓展","url":"/2020/06/06/聊聊-Dubbo-的-SPI-续之自适应拓展/"},{"title":"聊聊 Java 的类加载机制一","url":"/2020/11/08/聊聊-Java-的类加载机制/"},{"title":"聊聊 mysql 的 MVCC 续篇","url":"/2020/05/02/聊聊-mysql-的-MVCC-续篇/"},{"title":"聊聊 mysql 的 MVCC 续续篇之锁分析","url":"/2020/05/10/聊聊-mysql-的-MVCC-续续篇之加锁分析/"},{"title":"聊聊Java中的单例模式","url":"/2019/12/21/聊聊Java中的单例模式/"},{"title":"聊聊 Java 的 equals 和 hashCode 方法","url":"/2021/01/03/聊聊-Java-的-equals-和-hashCode-方法/"},{"title":"聊聊一次 brew update 引发的血案","url":"/2020/06/13/聊聊一次-brew-update-引发的血案/"},{"title":"聊聊 redis 缓存的应用问题","url":"/2021/01/31/聊聊-redis-缓存的应用问题/"},{"title":"聊聊我刚学会的应用诊断方法","url":"/2020/05/22/聊聊我刚学会的应用诊断方法/"},{"title":"聊聊 mysql 索引的一些细节","url":"/2020/12/27/聊聊-mysql-索引的一些细节/"},{"title":"这周末我又在老丈人家打了天小工","url":"/2020/08/30/这周末我又在老丈人家打了天小工/"},{"title":"聊聊 mysql 的 MVCC","url":"/2020/04/26/聊聊-mysql-的-MVCC/"},{"title":"聊聊那些加塞狗","url":"/2021/01/17/聊聊那些加塞狗/"},{"title":"Filter, Interceptor, Aop, 啥, 啥, 啥? 这些都是啥?","url":"/2020/08/22/Filter-Intercepter-Aop-啥-啥-啥-这些都是啥/"},{"title":"redis数据结构介绍-第一部分 SDS,链表,字典","url":"/2019/12/26/redis数据结构介绍/"},{"title":"redis数据结构介绍六 快表","url":"/2020/01/22/redis数据结构介绍六/"},{"title":"介绍一下 RocketMQ","url":"/2020/06/21/介绍一下-RocketMQ/"},{"title":"聊聊 Dubbo 的容错机制","url":"/2020/11/22/聊聊-Dubbo-的容错机制/"},{"title":"聊聊我理解的分布式事务","url":"/2020/05/17/聊聊我理解的分布式事务/"},{"title":"JVM源码分析之G1垃圾收集器分析一","url":"/2019/12/07/JVM-G1-Part-1/"},{"title":"redis系列介绍七-过期策略","url":"/2020/04/12/redis系列介绍七/"},{"title":"redis系列介绍八-淘汰策略","url":"/2020/04/18/redis系列介绍八/"},{"title":"聊一下 RocketMQ 的 NameServer 源码","url":"/2020/07/05/聊一下-RocketMQ-的-NameServer-源码/"},{"title":"聊聊 RocketMQ 的 Broker 源码","url":"/2020/07/19/聊聊-RocketMQ-的-Broker-源码/"},{"title":"聊聊 Java 自带的那些*逆天*工具","url":"/2020/08/02/聊聊-Java-自带的那些逆天工具/"},{"title":"聊一下 RocketMQ 的 DefaultMQPushConsumer 源码","url":"/2020/06/26/聊一下-RocketMQ-的-Consumer/"}] \ No newline at end of file diff --git a/lib/pace/README.html b/lib/pace/README.html index 1c09ea3206..99893da229 100644 --- a/lib/pace/README.html +++ b/lib/pace/README.html @@ -351,20 +351,20 @@ @@ -389,7 +389,7 @@
- +
diff --git a/page/10/index.html b/page/10/index.html index 7d225fcf06..b3c4a6bbfb 100644 --- a/page/10/index.html +++ b/page/10/index.html @@ -203,6 +203,112 @@ +
+ + + + + +
+

+ + +

+ + +
+ + + + +
+ + +

最近做 docker 系列,会经常进到 docker 内部,如上一篇介绍的,这些镜像一般都有用 ubuntu 或者alpine 这样的 Linux 系统作为底包,如果构建镜像的时候没有替换源的话,因为你懂的原因,在内部想编辑下东西要安装 vim 就会很慢很慢,thousand years later~
而且如果在容器内部想改源配置的话也要编辑器,就陷入了一个鸡生蛋,跟蛋生鸡的问题中,对于 linux 大神来说应该有一万种方法解决这个问题,对于我这个渣渣来说可能只想到了这个土方法,先 cp backup 一下 sources.list, 再 echo “xxx” > sources.list, 这里就碰到了一个问题,这个 sources.list 一般不止一行,直接 echo 的话就解析不了了,不过 echo 可以支持”\n”转义,就是加-e
看一下解释和示例

还有一点也是在这个时候要安装 vim 之类的,得知道是什么镜像底包,如果是用 uname 指令,其实看到的是宿主机的系统,得用cat /etc/issue

这里稍稍记一下

+ + +
+ + + + + + +
+
+
+
+ + + + + + +
@@ -668,123 +774,6 @@ - - - -
- - - - - -
-

- - -

- - -
- - - - -
- - -

众所周知,我是个前端彩笔,但是也想做点自己可以用的工具页面,所以就让朋友推荐了蚂蚁出品的 ant design,说基本可以直接 ctrl-c ctrl-v,实测对我这种来说还是有点难的,不过也能写点,但是现在碰到的问题是怎么部署到自己的服务器上去
用 ant design 写的是个单页应用,实际来说就是一个 html 加 css 跟 js,最初的时候是直接 build 完就 scp 上去,也考虑过 rsync 之类的,但是都感觉不够自动化,正好自己还没这方面的经验就想折腾下,因为我自己搭的仓库应用是 gogs,搜了一下主要是跟 drones 配合做 ci/cd,研究了一下发现其实这个事情没必要这么搞(PS:drone 也不好用),整个 hook 就可以了, 但是实际上呢,这东西也不是那么简单
首先是需要在服务器上装 webhook,这个我一开始用 snap 安装,但是出现问题,run 的时候会出现后面参数带的 hooks.json 文件找不到,然后索性就直接 github 上下最新版,放 /usr/local/bin 了,webhook 的原理呢其实也比较简单,就是起一个 http 服务,通过 post 请求调用,解析下参数,如果跟配置的参数一致,就调用对应的命令或者脚本。

-

配置 hooks.json

webhook 的配置,需要的两个文件,一个是 hooks.json,这个是 webhook 服务的配置文件,像这样

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
[
{
"id": "redeploy-app",
"execute-command": "/opt/scripts/redeploy.sh",
"command-working-directory": "/opt/scripts",
"pass-arguments-to-command":
[
{
"source": "payload",
"name": "head_commit.message"
},
{
"source": "payload",
"name": "pusher.name"
},
{
"source": "payload",
"name": "head_commit.id"
}
],
"trigger-rule":
{
"and":
[
{
"match":
{
"type": "payload-hash-sha1",
"secret": "your-github-secret",
"parameter":
{
"source": "header",
"name": "X-Hub-Signature"
}
}
},
{
"match":
{
"type": "value",
"value": "refs/heads/master",
"parameter":
{
"source": "payload",
"name": "ref"
}
}
}
]
}
}
]
- -

这是个跟 github搭配的示例,首先 id 表示的是这个对应 hook 的识别 id,也可以看到这个 hooks.json 的结构是这样的一个数组,然后就是要执行的命令和命令执行的参数,值得注意的是这个trigger-rule,就是请求进来了回去匹配里面的,比如前一个是一个加密的,放在请求头里,第二个 match 表示请求里的 ref 是个 master 分支,就可以区分分支进行不同操作,但是前面的加密配合 gogs 使用的时候有个问题(PS: webhook 的文档是真的烂),gogs 设置 webhook 的加密是用的

-
-

密钥文本将被用于计算推送内容的 SHA256 HMAC 哈希值,并设置为 X-Gogs-Signature 请求头的值。

-
-

这种加密方式,所以 webhook 的这个示例的加密方式不行,但这货的文档里居然没有说明支持哪些加密,神TM,后来还是翻 issue 翻到了, 需要使用这个payload-hash-sha256

-

执行脚本 redeploy.sh

脚本类似于这样

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash -e

function cleanup {
echo "Error occoured"
}
trap cleanup ERR

commit_message=$1 # head_commit.message
pusher_name=$2 # pusher.name
commit_id=$3 # head_commit.id


cd ~/do-react-example-app/
git pull origin master
yarn && yarn build
- -

就是简单的拉代码,然后构建下,真实使用时可能不是这样,因为页面会部署在 nginx 的作用目录,还需要 rsync 过去,这部分可能还涉及到两个问题第一个是使用 rsync 还是其他的 cp,不过这个无所谓;第二个是目录权限的问题,以我的系统ubuntu 为例,默认用户是 ubuntu,nginx 部署的目录是 www,所以需要切换用户等操作,一开始是想用在shell 文件中直接写了密码,但是不知道咋传,查了下是类似于这样 echo "passwd" | sudo -S cmd,通过管道命令往后传,然后就是这个-S, 参数的解释是-S, --stdin read password from standard input,但是这样么也不是太安全的赶脚,又看了下还有两种方法,

-
    -
  • 就是给root 设置一个不需要密码的命令类似于这样,

    -
    1
    2
    myusername ALL = (ALL) ALL
    myusername ALL = (root) NOPASSWD: /path/to/my/program
    -
  • -
  • 另一种就是把默认用户跟 root 设置成同一个 group 的

    -
  • -
-

使用

真正实操的时候其实还有不少问题,首先运行 webhook 就碰到了我前面说的,使用 snap 运行的时候会找不到前面的 hooks.json配置文件,执行snap run webhook -hooks /opt/hooks/hooks.json -verbose就碰到下面的couldn't load hooks from file! open /opt/hooks/hooks.json: no such file or directory,后来直接下了个官方最新的 release,就直接执行 webhook -hooks /opt/hooks/hooks.json -verbose 就可以了,然后是前面的示例配置文件里的几个参数,比如head_commit.message 其实 gogs 推过来的根本没这玩意,而且都是数组,不知道咋取,烂文档,不过总比搭个 drone 好一点就忍了。补充一点就是在 debug 的时候需要看下问题出在哪,看看脚本有没有执行,所以需要在前面的 json 里加这个参数"include-command-output-in-response": true, 就能输出来脚本执行结果

- - -
- - - - - - -
-
-
-
- - - - @@ -894,7 +883,7 @@
- +
diff --git a/page/11/index.html b/page/11/index.html index 8658358291..fb679ed24a 100644 --- a/page/11/index.html +++ b/page/11/index.html @@ -203,6 +203,123 @@ +
+ + + + + +
+

+ + +

+ + +
+ + + + +
+ + +

众所周知,我是个前端彩笔,但是也想做点自己可以用的工具页面,所以就让朋友推荐了蚂蚁出品的 ant design,说基本可以直接 ctrl-c ctrl-v,实测对我这种来说还是有点难的,不过也能写点,但是现在碰到的问题是怎么部署到自己的服务器上去
用 ant design 写的是个单页应用,实际来说就是一个 html 加 css 跟 js,最初的时候是直接 build 完就 scp 上去,也考虑过 rsync 之类的,但是都感觉不够自动化,正好自己还没这方面的经验就想折腾下,因为我自己搭的仓库应用是 gogs,搜了一下主要是跟 drones 配合做 ci/cd,研究了一下发现其实这个事情没必要这么搞(PS:drone 也不好用),整个 hook 就可以了, 但是实际上呢,这东西也不是那么简单
首先是需要在服务器上装 webhook,这个我一开始用 snap 安装,但是出现问题,run 的时候会出现后面参数带的 hooks.json 文件找不到,然后索性就直接 github 上下最新版,放 /usr/local/bin 了,webhook 的原理呢其实也比较简单,就是起一个 http 服务,通过 post 请求调用,解析下参数,如果跟配置的参数一致,就调用对应的命令或者脚本。

+

配置 hooks.json

webhook 的配置,需要的两个文件,一个是 hooks.json,这个是 webhook 服务的配置文件,像这样

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
[
{
"id": "redeploy-app",
"execute-command": "/opt/scripts/redeploy.sh",
"command-working-directory": "/opt/scripts",
"pass-arguments-to-command":
[
{
"source": "payload",
"name": "head_commit.message"
},
{
"source": "payload",
"name": "pusher.name"
},
{
"source": "payload",
"name": "head_commit.id"
}
],
"trigger-rule":
{
"and":
[
{
"match":
{
"type": "payload-hash-sha1",
"secret": "your-github-secret",
"parameter":
{
"source": "header",
"name": "X-Hub-Signature"
}
}
},
{
"match":
{
"type": "value",
"value": "refs/heads/master",
"parameter":
{
"source": "payload",
"name": "ref"
}
}
}
]
}
}
]
+ +

这是个跟 github搭配的示例,首先 id 表示的是这个对应 hook 的识别 id,也可以看到这个 hooks.json 的结构是这样的一个数组,然后就是要执行的命令和命令执行的参数,值得注意的是这个trigger-rule,就是请求进来了回去匹配里面的,比如前一个是一个加密的,放在请求头里,第二个 match 表示请求里的 ref 是个 master 分支,就可以区分分支进行不同操作,但是前面的加密配合 gogs 使用的时候有个问题(PS: webhook 的文档是真的烂),gogs 设置 webhook 的加密是用的

+
+

密钥文本将被用于计算推送内容的 SHA256 HMAC 哈希值,并设置为 X-Gogs-Signature 请求头的值。

+
+

这种加密方式,所以 webhook 的这个示例的加密方式不行,但这货的文档里居然没有说明支持哪些加密,神TM,后来还是翻 issue 翻到了, 需要使用这个payload-hash-sha256

+

执行脚本 redeploy.sh

脚本类似于这样

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash -e

function cleanup {
echo "Error occoured"
}
trap cleanup ERR

commit_message=$1 # head_commit.message
pusher_name=$2 # pusher.name
commit_id=$3 # head_commit.id


cd ~/do-react-example-app/
git pull origin master
yarn && yarn build
+ +

就是简单的拉代码,然后构建下,真实使用时可能不是这样,因为页面会部署在 nginx 的作用目录,还需要 rsync 过去,这部分可能还涉及到两个问题第一个是使用 rsync 还是其他的 cp,不过这个无所谓;第二个是目录权限的问题,以我的系统ubuntu 为例,默认用户是 ubuntu,nginx 部署的目录是 www,所以需要切换用户等操作,一开始是想用在shell 文件中直接写了密码,但是不知道咋传,查了下是类似于这样 echo "passwd" | sudo -S cmd,通过管道命令往后传,然后就是这个-S, 参数的解释是-S, --stdin read password from standard input,但是这样么也不是太安全的赶脚,又看了下还有两种方法,

+
    +
  • 就是给root 设置一个不需要密码的命令类似于这样,

    +
    1
    2
    myusername ALL = (ALL) ALL
    myusername ALL = (root) NOPASSWD: /path/to/my/program
    +
  • +
  • 另一种就是把默认用户跟 root 设置成同一个 group 的

    +
  • +
+

使用

真正实操的时候其实还有不少问题,首先运行 webhook 就碰到了我前面说的,使用 snap 运行的时候会找不到前面的 hooks.json配置文件,执行snap run webhook -hooks /opt/hooks/hooks.json -verbose就碰到下面的couldn't load hooks from file! open /opt/hooks/hooks.json: no such file or directory,后来直接下了个官方最新的 release,就直接执行 webhook -hooks /opt/hooks/hooks.json -verbose 就可以了,然后是前面的示例配置文件里的几个参数,比如head_commit.message 其实 gogs 推过来的根本没这玩意,而且都是数组,不知道咋取,烂文档,不过总比搭个 drone 好一点就忍了。补充一点就是在 debug 的时候需要看下问题出在哪,看看脚本有没有执行,所以需要在前面的 json 里加这个参数"include-command-output-in-response": true, 就能输出来脚本执行结果

+ + +
+ + + + + + +
+
+
+
+ + + + + + +
@@ -364,11 +481,11 @@ , - + , - + @@ -590,19 +707,19 @@ , - + , - + , - + , - + @@ -679,121 +796,6 @@ - - - -
- - - - - -
-

- - -

- - -
- - - - -
- - -

前面说了这么些数据结构,其实大家对于 redis 最初的印象应该就是个 key-value 的缓存,类似于 memcache,redis 其实也是个 key-value,key 还是一样的字符串,或者说就是用 redis 自己的动态字符串实现,但是 value 其实就是前面说的那些数据结构,差不多快说完了,还有个 quicklist 后面还有一篇,这里先介绍下 redis 对于这些不同类型的 value 是怎么实现的,首先看下 redisObject 的源码头文件

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* The actual Redis Object */
#define OBJ_STRING 0 /* String object. */
#define OBJ_LIST 1 /* List object. */
#define OBJ_SET 2 /* Set object. */
#define OBJ_ZSET 3 /* Sorted set object. */
#define OBJ_HASH 4 /* Hash object. */
/*
* Objects encoding. Some kind of objects like Strings and Hashes can be
* internally represented in multiple ways. The 'encoding' field of the object
* is set to one of this fields for this object. */
#define OBJ_ENCODING_RAW 0 /* Raw representation */
#define OBJ_ENCODING_INT 1 /* Encoded as integer */
#define OBJ_ENCODING_HT 2 /* Encoded as hash table */
#define OBJ_ENCODING_ZIPMAP 3 /* Encoded as zipmap */
#define OBJ_ENCODING_LINKEDLIST 4 /* No longer used: old list encoding. */
#define OBJ_ENCODING_ZIPLIST 5 /* Encoded as ziplist */
#define OBJ_ENCODING_INTSET 6 /* Encoded as intset */
#define OBJ_ENCODING_SKIPLIST 7 /* Encoded as skiplist */
#define OBJ_ENCODING_EMBSTR 8 /* Embedded sds string encoding */
#define OBJ_ENCODING_QUICKLIST 9 /* Encoded as linked list of ziplists */
#define OBJ_ENCODING_STREAM 10 /* Encoded as a radix tree of listpacks */

#define LRU_BITS 24
#define LRU_CLOCK_MAX ((1<<LRU_BITS)-1) /* Max value of obj->lru */
#define LRU_CLOCK_RESOLUTION 1000 /* LRU clock resolution in ms */

#define OBJ_SHARED_REFCOUNT INT_MAX
typedef struct redisObject {
unsigned type:4;
unsigned encoding:4;
unsigned lru:LRU_BITS; /* LRU time (relative to global lru_clock) or
* LFU data (least significant 8 bits frequency
* and most significant 16 bits access time). */
int refcount;
void *ptr;
} robj;
-

主体结构就是这个 redisObject,

-
    -
  • type: 字段表示对象的类型,它对应的就是 redis 的对外暴露的,或者说用户可以使用的五种类型,OBJ_STRING, OBJ_LIST, OBJ_SET, OBJ_ZSET, OBJ_HASH
  • -
  • encoding: 字段表示这个对象在 redis 内部的编码方式,由OBJ_ENCODING_开头的 11 种
  • -
  • lru: 做LRU替换算法用,占24个bit
  • -
  • refcount: 引用计数。它允许robj对象在某些情况下被共享。
  • -
  • ptr: 指向底层实现数据结构的指针
    当 type 是 OBJ_STRING 时,表示类型是个 string,它的编码方式 encoding 可能有 OBJ_ENCODING_RAW,OBJ_ENCODING_INT,OBJ_ENCODING_EMBSTR 三种
    当 type 是 OBJ_LIST 时,表示类型是 list,它的编码方式 encoding 是 OBJ_ENCODING_QUICKLIST,对于早一些的版本,2.2这种可能还会使用 OBJ_ENCODING_ZIPLIST,OBJ_ENCODING_LINKEDLIST
    当 type 是 OBJ_SET 时,是个集合,但是得看具体元素的类型,有可能使用整数集合,OBJ_ENCODING_INTSET, 如果元素不全是整型或者数量超过一定限制,那么编码就是 OBJ_ENCODING_HT hash table 了
    当 type 是 OBJ_ZSET 时,是个有序集合,它底层有可能使用的是 OBJ_ENCODING_ZIPLIST 或者 OBJ_ENCODING_SKIPLIST
    当 type 是 OBJ_HASH 时,一开始也是 OBJ_ENCODING_ZIPLIST,然后当数据量大于 hash_max_ziplist_entries 时会转成 OBJ_ENCODING_HT
  • -
- - -
- - - - - - -
-
-
-
- - - - @@ -903,7 +905,7 @@
- +
diff --git a/page/12/index.html b/page/12/index.html index a602d42dcb..ba2a47c703 100644 --- a/page/12/index.html +++ b/page/12/index.html @@ -204,7 +204,7 @@
- +