-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.xml
More file actions
988 lines (931 loc) · 78.2 KB
/
search.xml
File metadata and controls
988 lines (931 loc) · 78.2 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title>2021 Happy New Year</title>
<url>/posts/292f001b.html</url>
<content><![CDATA[<h2 id="2021-新年快乐!"><a href="#2021-新年快乐!" class="headerlink" title="2021 新年快乐!"></a>2021 新年快乐!</h2><p>2020 已经过去,今天既是过去的终点也是新的起点</p>
<p>2020 许多目标已经达成<br>2021 希望能做好自己的知识管理,从学习向学如何学习过度</p>
<p>新年快乐!</p>
]]></content>
<tags>
<tag>新年祈愿</tag>
</tags>
</entry>
<entry>
<title>ARPAnet</title>
<url>/posts/28463431.html</url>
<content><![CDATA[<h1 id="ARPAnet"><a href="#ARPAnet" class="headerlink" title="ARPAnet"></a>ARPAnet</h1><p>ARPAnet 始于美苏冷战,由美国国防部(DoD)领导利克利德提出的一种”大又分散的巨型网络”<br>1969年9月问世,是世界上第一个运营的封包交换网络</p>
]]></content>
<categories>
<category>计算机网络历史</category>
<category>ARPAnet</category>
</categories>
</entry>
<entry>
<title>Arch linux PPPOE</title>
<url>/posts/4ff942cb.html</url>
<content><![CDATA[<h1 id="ppp-拨号方案"><a href="#ppp-拨号方案" class="headerlink" title="ppp 拨号方案"></a><code>ppp</code> 拨号方案</h1><h2 id="依靠-ppp-进行拨号上网"><a href="#依靠-ppp-进行拨号上网" class="headerlink" title="依靠 ppp 进行拨号上网"></a>依靠 <code>ppp</code> 进行拨号上网</h2><h3 id="安装-ppp"><a href="#安装-ppp" class="headerlink" title="安装 ppp"></a>安装 <code>ppp</code></h3><p><code>sudo pacman -S ppp</code></p>
<h2 id="ppp-拨号需要先将对应的网卡-turn-down"><a href="#ppp-拨号需要先将对应的网卡-turn-down" class="headerlink" title="ppp 拨号需要先将对应的网卡 turn down"></a><code>ppp</code> 拨号需要先将对应的网卡 turn down</h2><h3 id="查看网卡名称"><a href="#查看网卡名称" class="headerlink" title="查看网卡名称"></a>查看网卡名称</h3><p>nmcli device show </p>
<h3 id="使用默认示例"><a href="#使用默认示例" class="headerlink" title="使用默认示例"></a>使用默认示例</h3><p><code>cp /etc/netctl/examples/pppoe /etc/netctl/pppoe</code></p>
<h2 id="修改基础信息"><a href="#修改基础信息" class="headerlink" title="修改基础信息"></a>修改基础信息</h2>]]></content>
<categories>
<category>pppoe</category>
</categories>
<tags>
<tag>arch</tag>
</tags>
</entry>
<entry>
<title>Arch 挂起后黑屏</title>
<url>/posts/6c736e1c.html</url>
<content><![CDATA[<div class="note "><p>一个困扰许久的问题:<br>系统在锁屏后挂起,但是用鼠标和键盘经常无法唤起桌面</p>
</div>
<span id="more"></span>
<div class="note default"><p>OS: Arch linux 5.12.12-arch1 64位<br>DW: kde<br>核显: UHD Graphics 630<br>驱动: xf86-video-intel<br>独显: GeForce GTX 1650 mobile<br>驱动: nvidia</p>
</div>
<p>暂时没有什么头绪,看了网上的一些情况,也有一部分笔记本用户和我一样遇到这个问题<br>目前是知道大概是驱动或者是电源管理的问题</p>
<h2 id="6月28日"><a href="#6月28日" class="headerlink" title="6月28日"></a>6月28日</h2><p>尝试解决这个问题</p>
<blockquote><p>此次参考以下博客:</p>
<footer><strong>@雨落凋殇</strong><cite><a href="https://rainss.cn/essay/1355.html">rainss.cn/essay/1355.html</a></cite></footer></blockquote>
<ol>
<li><p>安装必要的驱动</p>
<figure class="highlight plaintext"><figcaption><span>intel</span></figcaption><table><tr><td class="code"><pre><span class="line">sudo pacman -S xf86-video-intel </span><br></pre></td></tr></table></figure>
<figure class="highlight plaintext"><figcaption><span>nvidia</span></figcaption><table><tr><td class="code"><pre><span class="line">sudo pacman -S nvidia nvidia-prime nvidia-settings nvidia-utils opencl-nvidia lib32-nvidia-utils lib32-opencl-nvidia </span><br></pre></td></tr></table></figure></li>
<li><p>显卡切换管理</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">sudo pacman -S optimus-manager optimus-manager-qt bbswitch </span><br></pre></td></tr></table></figure></li>
<li><p>使用optimus-manager-qt更改一些配置</p>
</li>
<li><p>显卡切换</p>
</li>
</ol>
<ul>
<li>命令行<br><code>optimus-manager --switch nvidia</code></li>
<li>或者在optimus-manager-qt中选择nvidia</li>
</ul>
<ol start="5">
<li>重启实验<br>查看当前使用的显卡<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">glxinfo | grep "OpenGL renderer" </span><br></pre></td></tr></table></figure></li>
</ol>
<h3 id="结论"><a href="#结论" class="headerlink" title="结论"></a>结论</h3><p>显卡是切换成功,但是黑屏还是无法解决<br>根据我了解的一些情况,相对于显卡的驱动,电源管理才是罪魁祸首</p>
]]></content>
<categories>
<category>arch - xorg</category>
</categories>
</entry>
<entry>
<title>C语言基础知识</title>
<url>/posts/7f2a165f.html</url>
<content><![CDATA[<h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><div class="note success"><p>本文内容基于 C-primer-plus (第六版), 所有代码基于<code>C 99</code>协议由<code>GCC v10.2.0</code>编译在<code>Arch Linux 64</code>位系统可以运行 </p>
</div>
<blockquote>
<p>主要介绍C语言的基础语法知识</p>
</blockquote>
<div class="note "><ul>
<li>概述</li>
<li>字符串格式化输入/输出</li>
<li>运算符,语句</li>
<li>循环 <code>for</code>, <code>while</code>, <code>do while</code></li>
<li>流程控制 <code>if else</code>, 三目运算符 <code>? :</code></li>
<li>缓冲,重定向</li>
<li>递归和函数</li>
<li>指针和数组</li>
<li>字符串处理</li>
<li>存储类型</li>
<li>文件操作</li>
<li>结构体</li>
</ul>
</div>
<span id="more"></span>
<h1 id="一、C-语言基础知识"><a href="#一、C-语言基础知识" class="headerlink" title="一、C 语言基础知识"></a>一、C 语言基础知识</h1><h2 id="1-概述"><a href="#1-概述" class="headerlink" title="1.概述"></a>1.概述</h2><div class="note default"><h3 id="根据-C-11-协议标准,C语言中有六种语句"><a href="#根据-C-11-协议标准,C语言中有六种语句" class="headerlink" title="根据 C 11 协议标准,C语言中有六种语句"></a>根据 <code>C 11</code> 协议标准,C语言中有六种语句</h3><details class="note "><summary><p>1.标号语句</p>
</summary>
<p> <code>goto</code>, <code>case</code> 和 <code>default</code> 是在 <code>switch</code> 中使用的标号语句.</p>
<div class="note danger"><p><code>goto </code> 在结构化程序设计并不建议使用,容易造成程序的结构混乱,代码难以维护和调试,不易理解</p>
</div>
</details>
<details class="note "><summary><p>2.复合语句</p>
</summary>
<figure class="highlight c"><figcaption><span>由`{}`括号以及一条或多条语句的组合</span></figcaption><table><tr><td class="code"><pre><span class="line">{<span class="comment">//一对花括号</span></span><br><span class="line"> <span class="built_in">printf</span>(<span class="string">"hello word!"</span>);</span><br><span class="line"> getchar();</span><br><span class="line">}</span><br></pre></td></tr></table></figure>
</details>
<details class="note "><summary><p>3.表达式语句</p>
</summary>
<p>表达式语句由 <code>;</code> 分号结尾<br>一条语句可以只有一个 <code>;</code>,表示什么都不做<br> ;</p>
</details>
<details class="note "><summary><p>4.选择语句</p>
</summary>
<p><code>if</code> && <code>switch</code>,可以根据某些条件改变程序原有的执行顺序和流程</p>
</details>
<details class="note "><summary><p>5.迭代语句</p>
</summary>
<p><code>for</code>, <code>while</code>, <code>do while</code>,用于执行重复且相同的指令</p>
</details>
<details class="note "><summary><p>6.跳转语句</p>
</summary>
<ul>
<li>无条件跳转到指定位置</li>
</ul>
<div class="tabs" id="4种跳转语句"><ul class="nav-tabs"><li class="tab active"><a href="#4种跳转语句-1">1.return</a></li><li class="tab"><a href="#4种跳转语句-2">2.break</a></li><li class="tab"><a href="#4种跳转语句-3">3.continue</a></li><li class="tab"><a href="#4种跳转语句-4">4.goto</a></li></ul><div class="tab-content"><div class="tab-pane active" id="4种跳转语句-1"><blockquote>
<p>将控制权限返还给上一级调用函数</p>
</blockquote></div><div class="tab-pane" id="4种跳转语句-2"><blockquote>
<p>用来从 <code>switch</code> 或 循环中跳出一层</p>
</blockquote></div><div class="tab-pane" id="4种跳转语句-3"><blockquote>
<p>只能出现在循环体中,跳过本轮循环剩余代码,提前进入下一轮循环</p>
</blockquote></div><div class="tab-pane" id="4种跳转语句-4"><blockquote>
<p>用来在函数内跳转到指定标识符位置</p>
</blockquote></div></div></div>
</details></div>
<h2 id="2-main-的两种标准表示方法"><a href="#2-main-的两种标准表示方法" class="headerlink" title="2. main 的两种标准表示方法"></a>2. <code>main</code> 的两种标准表示方法</h2><figure class="highlight c"><table><tr><td class="code"><pre><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span> <span class="params">(<span class="keyword">void</span>)</span></span>{</span><br><span class="line">}<span class="comment">// 第一种</span></span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span> <span class="params">(<span class="keyword">int</span> argv, <span class="keyword">char</span> * argc)</span></span>{</span><br><span class="line">}<span class="comment">// 第二种</span></span><br></pre></td></tr></table></figure>
<h2 id="3-两种注释方法"><a href="#3-两种注释方法" class="headerlink" title="3. 两种注释方法"></a>3. 两种注释方法</h2><figure class="highlight c"><table><tr><td class="code"><pre><span class="line"><span class="comment">//第一种</span></span><br><span class="line"><span class="comment">/* 第二种*/</span></span><br></pre></td></tr></table></figure>
<h2 id="4-关键字"><a href="#4-关键字" class="headerlink" title="4. 关键字"></a>4. 关键字</h2><div class="note "><h3 id="有一些关键字是-c90和-c99新增"><a href="#有一些关键字是-c90和-c99新增" class="headerlink" title="有一些关键字是 c90和 c99新增"></a>有一些关键字是 <code>c90</code>和 <code>c99</code>新增</h3><table>
<thead>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody><tr>
<td>auto</td>
<td>extern</td>
<td>short</td>
<td>whiel</td>
</tr>
<tr>
<td>break</td>
<td>float</td>
<td>signed(c90)</td>
<td><em>_Alignas</em>(c99)</td>
</tr>
<tr>
<td>case</td>
<td>for</td>
<td>sizeof</td>
<td><em>_Alihnof</em>(c99)</td>
</tr>
<tr>
<td>char</td>
<td>goto</td>
<td>static</td>
<td><em>_Atomic</em>(c99)</td>
</tr>
<tr>
<td>const(c90)</td>
<td>if</td>
<td>struct</td>
<td><em>_Bool</em>(c99)</td>
</tr>
<tr>
<td>continue</td>
<td>inline</td>
<td>switch</td>
<td><em>_Complex</em>(c99)</td>
</tr>
<tr>
<td>default</td>
<td>int</td>
<td>typedef</td>
<td><em>_Generic</em>(c99)</td>
</tr>
<tr>
<td>do</td>
<td>long</td>
<td>union</td>
<td><em>_Imaginary</em>(c99)</td>
</tr>
<tr>
<td>double</td>
<td>register</td>
<td>unsingned</td>
<td><em>_Noreturn</em>(c99)</td>
</tr>
<tr>
<td>else</td>
<td>rastrict</td>
<td>void</td>
<td><em>_Static_assert</em>(c99)</td>
</tr>
<tr>
<td>enum(c90)</td>
<td>return</td>
<td>volatile(c90)</td>
<td><em>_Thread_local</em>(c99)</td>
</tr>
</tbody></table>
</div>
<h2 id="5-函数"><a href="#5-函数" class="headerlink" title="5. 函数"></a>5. 函数</h2><p>函数是C语言最基本的结构,在 <code>c90</code> 标准中新增了<mark class="label ">函数原型</mark></p>
<div class="note "><h3 id="函数原型"><a href="#函数原型" class="headerlink" title="函数原型"></a>函数原型</h3><p>就是对函数的返回值和参数进行描述</p>
<figure class="highlight c"><table><tr><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> @sum</span></span><br><span class="line"><span class="comment"> */</span><span class="function"><span class="keyword">int</span> <span class="title">sum</span> <span class="params">(a, b)</span></span>; <span class="comment">//函数原型</span></span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span> <span class="params">(<span class="keyword">void</span>)</span></span>{</span><br><span class="line"> sum (<span class="number">1</span>, <span class="number">2</span>); <span class="comment">//函数调用</span></span><br><span class="line">}</span><br><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">sum</span> <span class="params">(a, b)</span></span>{ <span class="comment">//函数定义</span></span><br><span class="line"> <span class="keyword">return</span> a + b;</span><br><span class="line">}</span><br></pre></td></tr></table></figure></div>
<h2 id="6-参数"><a href="#6-参数" class="headerlink" title="6. 参数"></a>6. 参数</h2><p>参数分为两种</p>
<div class="note "><h3 id="sum-a-2"><a href="#sum-a-2" class="headerlink" title="sum(a, 2);"></a><code>sum(a, 2);</code></h3><p>这里函数 <code>sum</code> 有两个参数<br>参数 <code>a</code> 是一个变量<br>参数 <code>2</code> 是一个实际的值</p>
<div class="note info no-icon"><h4 id="总结"><a href="#总结" class="headerlink" title="总结:"></a>总结:</h4><p>所以可以看出形参其实指的是变量,而实参则指的是实际的数值</p>
</div> </div>
<h2 id="7-数据类型"><a href="#7-数据类型" class="headerlink" title="7. 数据类型"></a>7. 数据类型</h2><p>C语言分为两大类型的数据</p>
<ol>
<li>整数</li>
</ol>
<ul>
<li><div class="note "><p>int, short, long, long long</p>
</div></li>
</ul>
<ol start="2">
<li>浮点数</li>
</ol>
<ul>
<li><div class="note "><p>float, double</p>
</div></li>
</ul>
<h3 id="Bool-类型"><a href="#Bool-类型" class="headerlink" title="_Bool 类型 ()"></a><code>_Bool</code> 类型 (<mark class="label ">C99</mark>)</h3><p><code>C99</code>添加的新的类型,用于表示布尔值 <code>true</code>,<code>false</code><br>占用 <mark class="label danger">1位</mark> 存储空间</p>
<h3 id="可移植类型"><a href="#可移植类型" class="headerlink" title="可移植类型"></a>可移植类型</h3><div class="note "><ul>
<li>可移植是C语言的一个重要特点之一<br>C语言没有强制要求每种数据类型的具体长度而是 <mark class="label danger">严格要求每种数据类型的最少长度</mark><ul>
<li>这样要求就使得在不同平台下的数据类型的长度不会小于最小值<ul>
<li>比如说使用 <code>inttypers.h</code>中的 <code>uint32_t(定义为无符号32位整型)</code>,也就是在不同的系统中可能是 <code>unsingned int</code> 也可能是 <code>unsingned long</code>但是C语言都能保证它绝对能存储对应的数据 </li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
]]></content>
<categories>
<category>C 语言</category>
</categories>
<tags>
<tag>C 语言基础</tag>
</tags>
</entry>
<entry>
<title>Kwin</title>
<url>/posts/22dae244.html</url>
<content><![CDATA[<div class="note warning"><p>这套快捷键仅适用于 <code>HHKB</code> 键盘配列!!</p>
</div>
<h1 id="利用-Kwin-krohnkite-实现类似-xmonad-的体验"><a href="#利用-Kwin-krohnkite-实现类似-xmonad-的体验" class="headerlink" title="利用 Kwin``krohnkite 实现类似 xmonad 的体验"></a>利用 <code>Kwin``krohnkite</code> 实现类似 <code>xmonad</code> 的体验</h1><p><code>krohnkite</code> 相对其他脚本已经是比较完善了</p>
<h2 id="krohnkite基础"><a href="#krohnkite基础" class="headerlink" title="krohnkite基础"></a>krohnkite基础</h2><h3 id="改变视窗大小比例"><a href="#改变视窗大小比例" class="headerlink" title="改变视窗大小比例"></a>改变视窗大小比例</h3><div class="note info"><p>第一种:</p>
<ol>
<li>left: <code><meta + h></code></li>
<li>righ: <code><meta + l></code><br>第二种:</li>
<li>left: <code><meta + Alt + h></code></li>
<li>right: <code><meta + Alt + l></code></li>
<li>up: <code><meta + Alt + k></code></li>
<li>down: <code><meta + Alt + j></code></li>
</ol>
</div>
<div class="note "><p>这两种方法在普通模式下没有区别<br>但是在 <mark class="label primary"><code>float</code>模式下,分离出浮窗的情况下,第一种可以控制未分离的视窗大小,第二种可以单独控制分离出的浮窗的大小</mark></p>
</div>
<h3 id="布局"><a href="#布局" class="headerlink" title="布局"></a>布局</h3><p>它有 <code>6</code> 种完善的布局,可以很好的适应各种需求:</p>
<div class="note info"><ol>
<li><mark class="label ">monocle:</mark> <code><Alt + !></code></li>
<li><mark class="label ">Tile[0]:</mark> <code><Alt + @></code></li>
<li><mark class="label ">Three-cloumn[1]:</mark> <code><Alt + #></code></li>
<li><mark class="label ">Quarter:</mark> <code><Alt + $></code></li>
<li><mark class="label ">Spread:</mark> <code><Alt + %></code></li>
<li><mark class="label ">Stair:</mark> <code><Alt + ^></code></li>
</ol>
</div>
<h3 id="改变布局"><a href="#改变布局" class="headerlink" title="改变布局"></a>改变布局</h3><ol>
<li>下一个布局: <code><ctrl + space></code></li>
<li>上一个布局: <code><ctrl + shift + space></code></li>
</ol>
<p>改变当前布局视窗排列</p>
<div class="note info"><ol>
<li>move up/prev: <code><meta + Alt + shift + j></code></li>
<li>move down/next: <code><meta + Alt + shift + k></code></li>
<li>move right: <code><meta + Alt + shift + l></code></li>
<li>move left: <code><meta + Alt + shift + h></code></li>
</ol>
</div>
<h3 id="布局变化"><a href="#布局变化" class="headerlink" title="布局变化"></a>布局变化</h3><h4 id="其中-master-的窗格的数量可以Increase或Decrease"><a href="#其中-master-的窗格的数量可以Increase或Decrease" class="headerlink" title="其中 master 的窗格的数量可以Increase或Decrease"></a>其中<mark class="label ">tile 和 three-cloumn</mark> <code>master</code> 的窗格的数量可以<code>Increase</code>或<code>Decrease</code></h4><p>我把它设置为了</p>
<ul>
<li><mark class="label primay">Decrease:</mark> `<num + ->`</li>
<li><mark class="label primay">Increase:</mark> `<num + +>`</li>
</ul>
<h3 id="浮动窗口"><a href="#浮动窗口" class="headerlink" title="浮动窗口"></a>浮动窗口</h3><p>单个窗口: <code><Alt + f></code><br>所有窗口: <code><Alt + shift + f></code></p>
<h2 id="kwin"><a href="#kwin" class="headerlink" title="kwin"></a>kwin</h2><h3 id="基础"><a href="#基础" class="headerlink" title="基础"></a>基础</h3><p>close window: <code><ctrl + Alt + x></code><br>full windows: <code><F11></code><br>minnimum windows: <code><F12></code><br>卷起视窗: <code><ctrl + F12></code><br>垂直最大化: <code><ctrl + F11></code></p>
<p>放大桌面: <code><meta + =></code><br>缩小桌面: <code><meta + -></code><br>接触放大或缩小状态: <code><meta + 0></code></p>
<ul>
<li>视角移动:<br>左: <code><meta + ctrl + left></code><br>右: <code><meta + ctrl + right></code><br>上: <code><meta + ctrl + up></code><br>下: <code><meta + ctrl + down></code></li>
</ul>
<p>当前视窗在所有桌面可见: <code><meta + Alt + A></code></p>
<p>显示桌面: <code><meta + d></code><br>显示所有桌面: <code><meta + shift + d></code><br>手动更改视窗大小: <code><meta + shift + m></code><br>手动杀死视窗: <code><ctrl + Alt + Esc></code><br>激活请求注意的视窗: <code><ctrl + Alt + a></code></p>
<p>移动鼠标到屏幕中央: <code><meta + F6></code><br>移动鼠标到屏幕右上角: <code><meta + F5></code></p>
<p>视窗的操作菜单: <code><Alt + F3></code><br>视窗菜单栏隐藏或展开: <code><Alt + F2></code></p>
<p>窗口置前或置后: <code><meta + Alt + n></code></p>
<h3 id="切换桌面"><a href="#切换桌面" class="headerlink" title="切换桌面"></a>切换桌面</h3><p>上一个桌面: <code><meta + Alt + shift + d></code><br>下一个桌面: <code><meta + Alt + d></code><br>上方桌面: <code><meta + up></code><br>下方桌面: <code><meta + down></code><br>左边桌面: <code><meta + left></code><br>右方桌面: <code><meta + right></code></p>
<p>桌面1: <code><meta + F1></code><br>桌面2: <code><meta + F2></code><br>桌面3: <code><meta + F3></code></p>
<h3 id="移动视窗焦点"><a href="#移动视窗焦点" class="headerlink" title="移动视窗焦点"></a>移动视窗焦点</h3><p>左: <code><ctrl + *></code><br>右: <code><ctrl + <PageUp>></code><br>上: <code><ctrl + <Home>></code><br>下: <code><ctrl + /></code></p>
<h3 id="移动视窗"><a href="#移动视窗" class="headerlink" title="移动视窗"></a>移动视窗</h3><p>左: <code><ctrl + Alt + h></code><br>右: <code><ctrl + Alt + l></code><br>上: <code><ctrl + Alt + k></code><br>下: <code><ctrl + Alt + j></code></p>
<h3 id="视窗转移到其他桌面"><a href="#视窗转移到其他桌面" class="headerlink" title="视窗转移到其他桌面"></a>视窗转移到其他桌面</h3><p>窗口上移一个桌面: <code><meta + Alt + shift + up></code><br>窗口下移一个桌面: <code><meta + Alt + shift + down></code><br>窗口左移一个桌面: <code><meta + Alt + shift + left></code><br>窗口右移一个桌面: <code><meta + Alt + shift + right></code></p>
]]></content>
<categories>
<category>arch</category>
<category>kwin</category>
</categories>
<tags>
<tag>kwin</tag>
</tags>
</entry>
<entry>
<title>Netword control protocol</title>
<url>/posts/c4009546.html</url>
<content><![CDATA[<h1 id="Net-Netword-control-protocol"><a href="#Net-Netword-control-protocol" class="headerlink" title="Net(Netword control protocol)"></a>Net(Netword control protocol)</h1><p>网络控制协议</p>
<div class="note primary"></div>
]]></content>
<categories>
<category>网络协议</category>
<category>NCP</category>
</categories>
</entry>
<entry>
<title>SHELL和插件</title>
<url>/posts/a8f47976.html</url>
<content><![CDATA[<h1 id="选取一个合适的shell"><a href="#选取一个合适的shell" class="headerlink" title="选取一个合适的shell"></a>选取一个合适的shell</h1><p> 可选的shell很多,这里列出常选的:<br> <div class="note "><ul>
<li>zsh</li>
<li>fish</li>
<li>bash</li>
<li>…</li>
</ul>
</div></p>
<h2 id="bash"><a href="#bash" class="headerlink" title="bash"></a>bash</h2><p> 这是一个老牌的shell,大部分的linux系统自带可以说具有最广泛的兼容<br> 同样与其他的shell对比样式和功能相对较弱的</p>
<h2 id="zsh"><a href="#zsh" class="headerlink" title="zsh"></a>zsh</h2><p> zsh我用的比较久,这也是大部分的人比较喜爱的shell了,有活跃的社区和教程<br> 有很多好用的插件</p>
<h3 id="必备"><a href="#必备" class="headerlink" title="必备"></a>必备</h3><ul>
<li>zsh-autosuggestons: 自动补全插件</li>
<li>zsh-syntax-highlighting: 命令高亮</li>
</ul>
<h3 id="zinit"><a href="#zinit" class="headerlink" title="zinit"></a>zinit</h3><p> zsh目前比较火的插件管理器,Turbo mode延时加载使得你的zsh可以达到最快的启动速度,对比安装了许多插件的zsh可以做到<mark class="label ">10倍</mark>的提升</p>
<h4 id="Install-zinit"><a href="#Install-zinit" class="headerlink" title="Install zinit"></a>Install zinit</h4><h5 id="自动安装"><a href="#自动安装" class="headerlink" title="自动安装"></a>自动安装</h5> <figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)"</span><br></pre></td></tr></table></figure>
<h5 id="手动安装"><a href="#手动安装" class="headerlink" title="手动安装"></a>手动安装</h5><ol>
<li>先把源代码克隆下来<figure class="highlight plaintext"><figcaption><span>createDir:~/.config/zinit/bin</span></figcaption><table><tr><td class="code"><pre><span class="line">git clone https://github.com/zdharma/zinit.git ~/.config/.zinit/bin</span><br></pre></td></tr></table></figure></li>
<li>在 <code>~/.zshrc</code> 顶端添加 <code>zinit</code> 的路径<br><code>source ~/.config/zinit/bin</code></li>
<li>重新启动终端,用 <mark class="label success">zinit self-update</mark> 进行自编译</li>
</ol>
<h5 id="zinit-加载插件"><a href="#zinit-加载插件" class="headerlink" title="zinit 加载插件"></a>zinit 加载插件</h5><p> 加载插件有几种不同的模式</p>
<ul>
<li><code>zinit snippet</code>: 片段式,可以加载一个插件中的某一个脚本或者代码段</li>
<li><code>zinit load</code>: 加载整个repo 或者单个脚本</li>
<li><code>zinit light</code>: load 的轻量化加载版本</li>
</ul>
<h4 id="zinit-常见的插件安装"><a href="#zinit-常见的插件安装" class="headerlink" title="zinit 常见的插件安装"></a>zinit 常见的插件安装</h4><h5 id="CLI-命令补全高亮"><a href="#CLI-命令补全高亮" class="headerlink" title="CLI 命令补全高亮"></a>CLI 命令补全高亮</h5><figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">zinit wait lucid for \</span><br><span class="line"> atinit"ZINIT[COMPINIT_OPTS]=-C; zicompinit; zicdreplay" \</span><br><span class="line"> zsh-users/zsh-syntax-highlighting\</span><br><span class="line"> blockf \</span><br><span class="line"> zsh-users/zsh-completions \</span><br><span class="line"> atload"!_zsh_autosuggest_start" \</span><br><span class="line"> zsh-users/zsh-autosuggestions</span><br></pre></td></tr></table></figure>
<h5 id="zinit-oh-my-zsh"><a href="#zinit-oh-my-zsh" class="headerlink" title="zinit + oh my zsh"></a>zinit + oh my zsh</h5><h5 id="zinit-powerlevel10k"><a href="#zinit-powerlevel10k" class="headerlink" title="zinit + powerlevel10k"></a>zinit + powerlevel10k</h5><p> zinit ice depth=1; zinit light romkatv/powerlevel10k</p>
<h4 id="powerlevel10k-install"><a href="#powerlevel10k-install" class="headerlink" title="powerlevel10k install"></a>powerlevel10k install</h4><p> powerlevel10k 是一个zsh主题,快速,美观,强大<br> 这里是AUR中官方的包<br> <figure class="highlight plaintext"><figcaption><span>Install powerlevel10k</span></figcaption><table><tr><td class="code"><pre><span class="line">yay -S --noconfirm zsh-theme-powerlevel10k-git</span><br><span class="line">echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc</span><br></pre></td></tr></table></figure></p>
<h5 id="Unintall-powerlevel10k"><a href="#Unintall-powerlevel10k" class="headerlink" title="Unintall powerlevel10k"></a>Unintall powerlevel10k</h5><p> 将一下配置从 <code>.zshrc</code> 配置文件中移除<br> <figure class="highlight plaintext"><figcaption><span>warning in ~/.zshrc</span></figcaption><table><tr><td class="code"><pre><span class="line">if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then</span><br><span class="line">source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"</span><br><span class="line"></span><br><span class="line">[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh</span><br><span class="line">fi</span><br><span class="line"></span><br></pre></td></tr></table></figure></p>
<h5 id="about-instant-prompt"><a href="#about-instant-prompt" class="headerlink" title="about instant prompt"></a>about instant prompt</h5><p>即使提示:<br>p10k 可以加速你的zsh启动,当你的zsh装了很多插件的时候,p10k 将会自动解决这些加载缓慢的情况<br>如果你开启了即使提示,将会在每一次zsh configure initialization 的时候得到一些控制台输出的信息</p>
<ul>
<li>建议开启这个优化功能,但是如果想关闭每次初始化的提示可以在配置文件下修改如下选项<br><code>~/.p10k.zsh</code><mark class="label primary">Typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet</mark>
这将会关闭提示,但是p10k仍将在后台优化你的zsh启动时间</li>
</ul>
<h4 id="oh-my-zsh-install"><a href="#oh-my-zsh-install" class="headerlink" title="oh my zsh install"></a>oh my zsh install</h4><h2 id="fish"><a href="#fish" class="headerlink" title="fish"></a>fish</h2><p> fish我用过一段时间,开箱即用,比较热门的功能全部自带了</p>
<h3 id="fisher"><a href="#fisher" class="headerlink" title="fisher"></a>fisher</h3><h3 id="oh-my-fish"><a href="#oh-my-fish" class="headerlink" title="oh my fish"></a>oh my fish</h3> <blockquote class="blockquote-center">
<h1 id="Plugins"><a href="#Plugins" class="headerlink" title="Plugins"></a>Plugins</h1>
</blockquote>
<img data-src="/posts/a8f47976/starship.png" class="">
<h2 id="Starship"><a href="#Starship" class="headerlink" title="Starship"></a>Starship</h2><p> repo: <a href="https://github.com/starship/starship/">starship/starship</a></p>
<div class="note success"><ul>
<li> 快: 很快 —— 真的真的非常快! rocket</li>
<li> 定制化: 可定制各种各样的提示符。</li>
<li> 通用: 适用于任何 Shell、任何操作系统。</li>
<li> 智能: 一目了然地显示相关信息。</li>
<li> 功能丰富: 支持所有你喜欢的工具。</li>
<li> 易用: 安装快速 —— 几分钟就可上手。</li>
</ul>
</div>
<h3 id="starship-config"><a href="#starship-config" class="headerlink" title="starship config"></a>starship config</h3><p> 创建配置文件<br> <figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">mkdir -p ~/.config && touch ~/.config/starship.toml</span><br></pre></td></tr></table></figure></p>
<img data-src="/posts/a8f47976/ZVM.png" class="">
<h2 id="zsh-vi-mode-ZVM"><a href="#zsh-vi-mode-ZVM" class="headerlink" title="zsh-vi-mode (ZVM)"></a>zsh-vi-mode (ZVM)</h2><p> repo: <a href="https://github.com/jeffreytse/zsh-vi-mode">jeffreytse/zsh-vi-mode</a></p>
<h3 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h3> <div class="note "><ol>
<li>使用zinit 安装 ZVM</li>
</ol>
</div>
<p> 用这个插件唯一蛋疼的地方就是光标显示了,在shell中,特别是开了多个shell的情况下你很难分出切换到了哪个窗口,所以我建议调整两个选项<br> <figure class="highlight zsh"><figcaption><span>`~/.zinit/plugins/jeffreytse---zsh-vi-mode`</span></figcaption><table><tr><td class="code"><pre><span class="line">ZVM_CURSOR_STYLE_ENABLED=<span class="literal">false</span> <span class="comment"># 关闭默认光标样式,你也可以修改为其他样式</span></span><br><span class="line">ZVM_VI_INSERT_ESCAPE_BINDKEY=jk <span class="comment"># 启用jk快捷切换模式</span></span><br></pre></td></tr></table></figure></p>
]]></content>
</entry>
<entry>
<title>SpaceVim LSP:Haskell</title>
<url>/posts/7413cad6.html</url>
<content><![CDATA[<!-- vim-markdown-toc GFM -->
<ul>
<li><a href="#%E4%B8%BAspacevim-%E9%85%8D%E7%BD%AEhaskell%E7%9A%84lsp-server-%E4%B8%BAspacevim-%E9%85%8D%E7%BD%AEhaskell%E7%9A%84lsp-server">为SpaceVim 配置Haskell的LSP server# 为SpaceVim 配置Haskell的LSP server</a></li>
<li><a href="#lsp-server-repo">LSP server repo</a></li>
<li><a href="#%E9%87%87%E7%94%A8-ghcup%E9%85%8D%E7%BD%AE%E5%AE%8C%E6%95%B4%E7%9A%84haskell%E7%8E%AF%E5%A2%83">采用 <code>ghcup</code>配置完整的<code>haskell</code>环境</a></li>
<li><a href="#cabal-%E5%88%9D%E5%A7%8B%E5%8C%96">cabal 初始化</a></li>
<li><a href="#%E4%BF%AE%E6%94%B9%E9%BB%98%E8%AE%A4%E6%BA%90%E4%B8%BA%E4%B8%8A%E6%B5%B7%E4%BA%A4%E5%A4%A7%E6%BA%90">修改默认源为上海交大源</a></li>
<li><a href="#%E9%85%8D%E7%BD%AE%E6%98%BE%E7%A4%BA%E4%BE%9D%E8%B5%96%E6%80%A7%E7%9A%84%E6%96%87%E6%A1%A3-%E9%85%8D%E7%BD%AE%E6%98%BE%E7%A4%BA%E4%BE%9D%E8%B5%96%E6%80%A7%E7%9A%84%E6%96%87%E6%A1%A3">配置显示依赖性的文档# 配置显示依赖性的文档</a></li>
<li><a href="#%E6%B3%A8%E5%86%8C%E5%88%B0%E5%AE%A2%E6%88%B7%E7%AB%AF%E7%9A%84coc-%E6%B3%A8%E5%86%8C%E5%88%B0%E5%AE%A2%E6%88%B7%E7%AB%AF%E7%9A%84coc">注册到客户端的Coc# 注册到客户端的Coc</a></li>
<li><a href="#coc">Coc</a></li>
</ul>
<!-- vim-markdown-toc -->
<h2 id="为SpaceVim-配置Haskell的LSP-server-为SpaceVim-配置Haskell的LSP-server"><a href="#为SpaceVim-配置Haskell的LSP-server-为SpaceVim-配置Haskell的LSP-server" class="headerlink" title="为SpaceVim 配置Haskell的LSP server# 为SpaceVim 配置Haskell的LSP server"></a>为SpaceVim 配置Haskell的LSP server# 为SpaceVim 配置Haskell的LSP server</h2><div class="note default"><h2 id="LSP-server-repo"><a href="#LSP-server-repo" class="headerlink" title="LSP server repo"></a>LSP server repo</h2><p><mark class="label ">此方案失败</mark>: <del>Haskell: <a href="https://github.com/haskell/haskell-ide-engine.git">https://github.com/haskell/haskell-ide-engine.git</a></del></p>
<h2 id="采用-ghcup配置完整的haskell环境"><a href="#采用-ghcup配置完整的haskell环境" class="headerlink" title="采用 ghcup配置完整的haskell环境"></a>采用 <code>ghcup</code>配置完整的<code>haskell</code>环境</h2><p>ghcup install:</p>
<ul>
<li><p><code>curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh</code></p>
</li>
<li><p><code>curl --proto '=https' --tlsv1.2 -LsSf https://mirror.sjtu.edu.cn/ghcup/script/install.sh | sh</code></p>
</li>
</ul>
<h2 id="cabal-初始化"><a href="#cabal-初始化" class="headerlink" title="cabal 初始化"></a>cabal 初始化</h2><p><code>cabal update && stack update</code></p>
<h2 id="修改默认源为上海交大源"><a href="#修改默认源为上海交大源" class="headerlink" title="修改默认源为上海交大源"></a>修改默认源为上海交大源</h2><ul>
<li>ghcup:<code>~/.ghcup/config.yaml</code></li>
</ul>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">url-source:</span><br><span class="line"> OwnSource: <span class="string">"https://mirror.sjtu.edu.cn/ghcup/yaml/ghcup/data/ghcup-0.0.5.yaml"</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>
</div>
<span id="more"></span>
<h2 id="配置显示依赖性的文档-配置显示依赖性的文档"><a href="#配置显示依赖性的文档-配置显示依赖性的文档" class="headerlink" title="配置显示依赖性的文档# 配置显示依赖性的文档"></a>配置显示依赖性的文档# 配置显示依赖性的文档</h2><ul>
<li><p>cabal</p>
<ul>
<li><code>~/.cabal/config</code></li>
</ul>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">progtam-default-options</span><br><span class="line"> ghc-options: -haddock</span><br></pre></td></tr></table></figure>
<ul>
<li>或者针对某一项目使用:<br><code>cabal configure --ghc-options=-haddock</code></li>
</ul>
</li>
</ul>
<h2 id="注册到客户端的Coc-注册到客户端的Coc"><a href="#注册到客户端的Coc-注册到客户端的Coc" class="headerlink" title="注册到客户端的Coc# 注册到客户端的Coc"></a>注册到客户端的Coc# 注册到客户端的Coc</h2><blockquote>
<p>官方给出了大部分流行的前端配置方式: <a href="https://github.com/haskell/haskell-language-server#configuring-your-editor">Configuring your editor</a></p>
</blockquote>
<ul>
<li>因为haskell在Coc里面没有coc插件,这种独立的server需要在Coc进行注册,才能成功调用server</li>
</ul>
<h2 id="Coc"><a href="#Coc" class="headerlink" title="Coc"></a><a href="https://github.com/haskell/haskell-language-server#coc">Coc</a></h2><p>在vim/nvim中使用 <code>:CocConfig</code> 进入Coc配置文件写入下面的内容</p>
<figure class="highlight json"><table><tr><td class="code"><pre><span class="line">{</span><br><span class="line"> <span class="attr">"languageserver"</span>: {</span><br><span class="line"> <span class="attr">"haskell"</span>: {</span><br><span class="line"> <span class="attr">"command"</span>: <span class="string">"haskell-language-server-wrapper"</span>,</span><br><span class="line"> <span class="attr">"args"</span>: [<span class="string">"--lsp"</span>],</span><br><span class="line"> <span class="attr">"rootPatterns"</span>: [<span class="string">"*.cabal"</span>, <span class="string">"stack.yaml"</span>, <span class="string">"cabal.project"</span>, <span class="string">"package.yaml"</span>,<span class="string">"hie.yaml"</span>],</span><br><span class="line"> <span class="attr">"filetypes"</span>: [<span class="string">"haskell"</span>, <span class="string">"lhaskell"</span>]</span><br><span class="line"> }</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure>
<p>—- >到这里基本完成<—-</p>
]]></content>
<categories>
<category>SpaceVim</category>
<category>LSP</category>
</categories>
<tags>
<tag>SpaceVim</tag>
<tag>LSP</tag>
<tag>ghcup</tag>
<tag>haskell</tag>
<tag>cabal</tag>
</tags>
</entry>
<entry>
<title>VAX && VMS</title>
<url>/posts/37d5a867.html</url>
<content><![CDATA[<h2 id="VAX"><a href="#VAX" class="headerlink" title="VAX"></a>VAX</h2><p>DEC公司开发的中端服务器计算机<br>按照DEC1978年的PDP-11标准<br>搭载当时最新的VMS系统<br>采用32位处理器</p>
<span id="more"></span>
<h3 id="Visual-Assist-X-(番茄助手)"><a href="#Visual-Assist-X-(番茄助手)" class="headerlink" title="Visual Assist X (番茄助手)"></a>Visual Assist X (番茄助手)</h3><p> Visual Assist X 是 Microsoft Visual studio的插件<br> 支持VS 2002-2017 , 并支持c/c++,c#,ASP,VB,java.HTML等语言<br> 这块插件提供了很多方便快捷且强大的功能<br> 例如:<br> 代码重构<br> 智能提示<br> 代码检索<br> 等等…</p>
<h3 id="Virtual-Address-Extender"><a href="#Virtual-Address-Extender" class="headerlink" title="Virtual Address Extender"></a>Virtual Address Extender</h3><p>1978 年 DEC公司建立第一个基于VAX (virtual address extension) 虚拟地址扩展的计算机体系<br>它是DEC计算机系统特有的复杂指令计算(CISC)体系结构的计算机VAX11,780.</p>
<p>VAX计算机使用多用户系统<br>采用的网络应用包括</p>
<ol>
<li>通信终端协议(CTERM) : DNA为VMS系统提供的虚拟终端使用该协议,为LAT的可选协议</li>
<li>分布式命名服务(DNS)</li>
<li>数据存储协议(DAP)</li>
<li>分布式文件系统(DFS)</li>
<li>分布式队列服务(DQS)</li>
</ol>
<p>VAX计算机专用的终端只能用在VAX系统上,这种唯一性和不兼容性保持了它的安全基础<br>在pc机上可以使用VT100终端仿真程序和VAX系统获取连接</p>
<h2 id="VMS-openVms"><a href="#VMS-openVms" class="headerlink" title="VMS(openVms)"></a>VMS(openVms)</h2><p>应用在VAX 32位计算机上的操作系统<br>open vms也可以通过一些特殊的软件运行在windows NT 服务器上<br>open vms支持开放标准的b便携式操作系统界面的命令集和C语言程序接口<br>运行在VAX BSD Unix 的系统是黑客们一个最爱因为它特别大且友好的编程器汇编的指令集</p>
]]></content>
<categories>
<category>服务器</category>
</categories>
<tags>
<tag>VAX&&VMS</tag>
</tags>
</entry>
<entry>
<title>xmonad</title>
<url>/posts/2024632b.html</url>
<content><![CDATA[<h1 id="一篇对-Derek-Taylor-DT-的XMonad的一份配置文件解析"><a href="#一篇对-Derek-Taylor-DT-的XMonad的一份配置文件解析" class="headerlink" title="一篇对 Derek Taylor(DT) 的XMonad的一份配置文件解析"></a>一篇对 Derek Taylor(DT) 的XMonad的一份配置文件解析</h1><h2 id="目的"><a href="#目的" class="headerlink" title="目的:"></a>目的:</h2><p>方便较为全面的了解XMonad的运行机制,配置编写方法<br>最终实现能根据自己的需求定制配置的内容</p>
<blockquote class="blockquote-center">
<h2 id="资源列表"><a href="#资源列表" class="headerlink" title="资源列表"></a>资源列表</h2><ul>
<li><a href="https://gitlab.com/dwt1/dotfiles/-/blob/master/.xmonad/">DT’s Gitlab</a> – 解析的所有需要的示例配置在DT的lab中可以找到</li>
<li><a href="https://www.youtube.com/watch?v=5oBT0a25FyA&list=PL5--8gKSku144jIsizdhdxq_fKTmBBGBA&index=1">DT in youtube</a> – 油管频道见XMonad专题</li>
<li><a href="https://wiki.haskell.org/Haskell">HaskellWiki</a> – Haskell 的维基</li>
<li><a href="https://hoogle.haskell.org/">Hoogle</a> – Hoogle 语法 库的使用等等</li>
<li><a href="https://hackage.haskell.org/package/">hackage</a> – 搜索库或者包名</li>
</ul>
</blockquote>
<h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>这篇文章基于 example:xmonad-example-xmobar-clickable-workspace.hs</p>
<h1 id="Haskell编译环境配置"><a href="#Haskell编译环境配置" class="headerlink" title="Haskell编译环境配置"></a>Haskell编译环境配置</h1><p><code>curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh</code></p>
<mark class="label ">tip:官方并不推荐在Arch源中安装</mark>
<h2 id="cabal-配置"><a href="#cabal-配置" class="headerlink" title="cabal 配置"></a>cabal 配置</h2><p>下载后请执行 <code>cabal update</code> 生成配置文件 <code>~/.cabal/config</code><br>添加清华源<br><code>repository mirrors.tuna.tsinghua.edu.cn url: http://mirrors.tuna.tsinghua.edu.cn/hackage</code></p>
<h2 id="stack-配置"><a href="#stack-配置" class="headerlink" title="stack 配置"></a>stack 配置</h2><p>下载后执行 <code>stack new config</code> 生成配置文件 <code>~/.stack/config.yaml</code><br>添加清华源<br>`package-indices:</p>
<ul>
<li>name: Tsinghua<br>download-prefix: <a href="http://mirrors.tuna.tsinghua.edu.cn/hackage/package/">http://mirrors.tuna.tsinghua.edu.cn/hackage/package/</a><br>http: <a href="http://mirrors.tuna.tsinghua.edu.cn/hackage/00-index.tar.gz%60">http://mirrors.tuna.tsinghua.edu.cn/hackage/00-index.tar.gz`</a></li>
</ul>
<h2 id="hoogle-配置"><a href="#hoogle-配置" class="headerlink" title="hoogle 配置"></a>hoogle 配置</h2><p><code>hoogle generate</code><br> – 访问 <code>raw.githubusercontent.com</code> 超时请添加 <code>199.232.96.133 raw.githubusercontent.com</code> 到 hosts</p>
<h1 id="依赖包添加示例-包的详细说明见hackage"><a href="#依赖包添加示例-包的详细说明见hackage" class="headerlink" title="依赖包添加示例(包的详细说明见hackage)"></a>依赖包添加示例(包的详细说明见hackage)</h1><ul>
<li><p>xmonad-contrib-git or xmonad-contrib – 常用的算法和库</p>
<div class="note "><p><code>yay -S xmonad-contrib</code>
</p>
</div></li>
<li><p>extra</p>
<div class="note "><p><code>cabal update && cabal install --lib extra</code> – 如果是安装一些程序的话需要配置cabal,解决依赖问题<br><code>ghci -v</code><br><code>import </code>引入要导入的模块
</p>
</div></li>
</ul>
<details class="note "><summary><p>warring</p>
</summary>
<h1 id="出现一个错误"><a href="#出现一个错误" class="headerlink" title="出现一个错误"></a>出现一个错误</h1><p><code>cabal install xmonad xmonad-contrib xmobar</code><br>在重启后SDDM不能自动识别</p>
</details>
]]></content>
<categories>
<category>arch</category>
<category>xmonad</category>
</categories>
<tags>
<tag>arch</tag>
<tag>xmonad</tag>
<tag>cnofig</tag>
</tags>
</entry>
<entry>
<title>git add -A出现嵌入式仓库错误</title>
<url>/posts/b1520caa.html</url>
<content><![CDATA[<h2 id="问题描述"><a href="#问题描述" class="headerlink" title="问题描述"></a>问题描述</h2><p>github 仓库已经清空,现在重新将本地文件上传备份,但是在add -A 操作时提示正在加入嵌入式仓库<br>git 给我推荐的两个操作分别是:</p>
<ol>
<li>子模块添加<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ git submodule add <url> <span class="string">"name"</span></span><br></pre></td></tr></table></figure></li>
<li>在暂存去将这个嵌入的仓库删除<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ git rm --cached <span class="string">"name"</span></span><br></pre></td></tr></table></figure></li>
</ol>
<h2 id="目前已经解决"><a href="#目前已经解决" class="headerlink" title="目前已经解决"></a>目前已经解决</h2><p>原因是在提示的文件夹下面有旧仓库的.git文件夹,删除后即可重新添加到新仓库了</p>
]]></content>
<categories>
<category>git</category>
</categories>
<tags>
<tag>git error</tag>
<tag>git</tag>
</tags>
</entry>
<entry>
<title>git</title>
<url>/posts/518e617c.html</url>
<content><![CDATA[]]></content>
</entry>
<entry>
<title>ln</title>
<url>/posts/229b7a0b.html</url>
<content><![CDATA[<blockquote class="blockquote-center">
</blockquote>
<h1 id="软链接-ln"><a href="#软链接-ln" class="headerlink" title="软链接 ln"></a>软链接 <code>ln</code></h1><div class="note "><p>-f : 链结时先将与 dist 同档名的档案删除<br>-d : 允许系统管理者硬链结自己的目录<br> -i : 在删除与 dist 同档名的档案时先进行询问<br> -n : 在进行软连结时,将 dist 视为一般的档案<br> -s : 进行软链结(symbolic link)<br> -v : 在连结之前显示其档名<br> -b : 将在链结时会被覆写或删除的档案进行备份<br> -S SUFFIX : 将备份的档案都加上 SUFFIX 的字尾<br> -V METHOD : 指定备份的方式<br> –help : 显示辅助说明<br> –version : 显示版本</p>
</div>
<h2 id="常用"><a href="#常用" class="headerlink" title="常用"></a>常用</h2><ul>
<li><mark class="label ">`ln -s`</mark>
<ul>
<li><code>ln -s 源文件 目标文件</code></li>
</ul>
</li>
</ul>
]]></content>
<categories>
<category>linux - command</category>
</categories>
<tags>
<tag>linux常用命令</tag>
</tags>
</entry>
<entry>
<title>mySpaceVim</title>
<url>/posts/529dff6c.html</url>
<content><![CDATA[<p><img data-src="https://user-images.githubusercontent.com/13142418/121829909-64cb5380-ccf6-11eb-9d5a-f576fa63e69c.png" alt="SpaceVim"></p>
<h2 id="SpaceVim-是一个由社区驱动的现代的模块化的-Vim-IDE"><a href="#SpaceVim-是一个由社区驱动的现代的模块化的-Vim-IDE" class="headerlink" title="SpaceVim 是一个由社区驱动的现代的模块化的 Vim IDE"></a>SpaceVim 是一个由社区驱动的现代的模块化的 <code>Vim IDE</code></h2>]]></content>
<categories>
<category>SpaceVim</category>
<category>config</category>
</categories>
<tags>
<tag>SpaceVim</tag>
</tags>
</entry>
<entry>
<title>nord and light</title>
<url>/posts/834bb440.html</url>
<content><![CDATA[<h1 id="GitHub转载"><a href="#GitHub转载" class="headerlink" title="GitHub转载"></a>GitHub转载</h1><ul>
<li>源地址参见:<a href="https://github.com/ayamir/nord-and-light">repo</a></li>
</ul>
<h1 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h1><p><code>git clone https://github.com/ayamir/nord-and-light.git</code><br><code>cd nord-and-light</code></p>
<div class="note "><h2 id="需求"><a href="#需求" class="headerlink" title="需求"></a>需求</h2><ul>
<li>xsettingsd: 在运行时热切换全局GTK主题 [yes]</li>
<li>feh: 设置壁纸 [yes]</li>
<li>fish: 需要的shell [yes]</li>
<li>dunst: 守护进程 [yes]</li>
<li>mako(wayland): wayland守护进程 [yes]</li>
<li>alacritty && kitty: 模拟终端, 支持在运行时切换配置 [yes]</li>
<li>rofi / dmenu: 程序启动器 [yes]</li>
<li>wofi(wayland): wayland的程序启动器 [yes]</li>
<li>zathura: PDF阅读器 [不需要]</li>
<li>Global GTK2/3 theme [no]<ul>
<li>Nordic</li>
<li>Orchis-light</li>
</ul>
</li>
</ul>
<h3 id="其他可选项"><a href="#其他可选项" class="headerlink" title="其他可选项"></a>其他可选项</h3><ul>
<li>firefox [yes]</li>
<li>vim [yes]</li>
<li>doom emacs [yes]<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">git clone https://github.com/hlissner/doom-emacs ~/.emacs.d</span><br><span class="line">~/.emacs.d/bin/doom install</span><br></pre></td></tr></table></figure>
<div class="note "><p>我直接用 <code>doom install</code>还是有点问题的,它提示我 <mark class="label warning"><code>connot load files</code></mark><br>如果你也有同样情况可以用 <code>doom sync</code> 试一下, 老是下载不下来插件,可以开代理试下</p>
</div></li>
</ul>
<ul>
<li>vscode</li>
<li>sublime</li>
<li>fcitx5 [yes]</div></li>
</ul>
<h1 id="将-nord-and-light-中对应的文件拷贝到对应位置"><a href="#将-nord-and-light-中对应的文件拷贝到对应位置" class="headerlink" title="将 nord-and-light 中对应的文件拷贝到对应位置"></a>将 <code>nord-and-light</code> 中对应的文件拷贝到对应位置</h1><div class="note warning"><p>waybar [yes]<br>picom [yes]</p>
</div>
<h1 id="xmonad-启动"><a href="#xmonad-启动" class="headerlink" title="xmonad 启动"></a>xmonad 启动</h1>]]></content>
<categories>
<category>arch - config</category>
</categories>
<tags>
<tag>xmonad</tag>
</tags>
</entry>
<entry>
<title>pandoc</title>
<url>/posts/bc4b56d9.html</url>
<content><![CDATA[<h1 id="文档转换工具"><a href="#文档转换工具" class="headerlink" title="文档转换工具"></a>文档转换工具</h1><p><a href="https://www.pandoc.org/installing.html#linux">pandoc</a><br><code>yay -S pandoc</code></p>
<div class="note warning"><h2 id="不支持PDF转其他格式"><a href="#不支持PDF转其他格式" class="headerlink" title="不支持PDF转其他格式"></a>不支持PDF转其他格式</h2><p>pandoc can convert to PDF, but not from PDF! </p>
</div>
<p>好烦看了半天,找了挺久,还是在线PDF转DOCX好使, tu了~</p>
<h1 id="pandoc支持格式"><a href="#pandoc支持格式" class="headerlink" title="pandoc支持格式"></a>pandoc支持格式</h1><img data-src="/posts/bc4b56d9/diagram.jpg" class="">
]]></content>
<tags>
<tag>tool</tag>
</tags>
</entry>
<entry>
<title>mermaid Syntax Error in graph</title>
<url>/posts/7bae738f.html</url>
<content><![CDATA[<h1 id="基本信息"><a href="#基本信息" class="headerlink" title="基本信息"></a>基本信息</h1><div class="note info no-icon"><ul>
<li>os: <code>Arch linux 64</code></li>
<li>Next: <code>v5.4</code></li>
<li>HexT: <code>v8.2.1</code></li>
<li>npm: <code>v7.5.4</code></li>
<li>node: <code>v14.2.0</code></li>
</ul>
</div>
<span id="more"></span>
<h1 id="问题描述"><a href="#问题描述" class="headerlink" title="问题描述"></a>问题描述</h1><div class="note default no-icon"><ol>
<li><p>我将theme-next文档中<a href="https://theme-next.js.org/docs/tag-plugins/mermaid#Examples">mermaid#Examples</a>板块中的示例代码复制到我的文章中</p>
</li>
<li><p>这是我在示例复制的语法样式</p>
</li>
</ol>
<ol start="3">
<li>这是我的博客中显示的样式<div class="note danger"><h2 id="以下是示例代码运行的效果"><a href="#以下是示例代码运行的效果" class="headerlink" title="以下是示例代码运行的效果"></a>以下是示例代码运行的效果</h2><pre class="mermaid">
graph TD
A[Hard] -->|Text| B(Round)
B --> C{Decision}
C -->|One| D[Result 1]
C -->|Two| E[Result 2]
</pre></div></li>
</ol>
<p>我的示例代码是从示例中复制过来的, 为什么官方文档中的示例图像正常显示,而我的却不行</p>
</div>
<h1 id="第二个样例"><a href="#第二个样例" class="headerlink" title="第二个样例"></a>第二个样例</h1><figure class="highlight yaml"><figcaption><span>这是官网的示例代码</span></figcaption><table><tr><td class="code"><pre><span class="line">{<span class="string">%</span> <span class="string">mermaid</span> <span class="string">sequenceDiagram</span> <span class="string">%</span>}</span><br><span class="line"><span class="string">Alice->>John:</span> <span class="string">Hello</span> <span class="string">John,</span> <span class="string">how</span> <span class="string">are</span> <span class="string">you?</span></span><br><span class="line"><span class="string">loop</span> <span class="string">Healthcheck</span></span><br><span class="line"> <span class="string">John->>John:</span> <span class="string">Fight</span> <span class="string">against</span> <span class="string">hypochondria</span></span><br><span class="line"><span class="string">end</span></span><br><span class="line"><span class="attr">Note right of John:</span> <span class="string">Rational</span> <span class="string">thoughts!</span></span><br><span class="line"><span class="string">John-->>Alice:</span> <span class="string">Great!</span></span><br><span class="line"><span class="string">John->>Bob:</span> <span class="string">How</span> <span class="string">about</span> <span class="string">you?</span></span><br><span class="line"><span class="string">Bob-->>John:</span> <span class="string">Jolly</span> <span class="string">good!</span></span><br><span class="line">{<span class="string">%</span> <span class="string">endmermaid</span> <span class="string">%</span>}</span><br></pre></td></tr></table></figure>
<div class="note warning"><h2 id="这是我的博客中显示的样式"><a href="#这是我的博客中显示的样式" class="headerlink" title="这是我的博客中显示的样式"></a>这是我的博客中显示的样式</h2><pre class="mermaid">
sequenceDiagram
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
</pre></div>
]]></content>
<categories>
<category>hexo</category>
<category>error</category>
<category>mermaid</category>
</categories>
<tags>
<tag>mermaid</tag>
</tags>
</entry>
<entry>
<title>vim+nivm+nvide</title>
<url>/posts/98f28abb.html</url>
<content><![CDATA[<h1 id="关于neovide-中文输入的issue"><a href="#关于neovide-中文输入的issue" class="headerlink" title="关于neovide 中文输入的issue"></a>关于neovide 中文输入的issue</h1><p><a href="https://github.com/neovide/neovide/issues/445#issue-783216919">#445</a><br>已经有人提了,但是目前还没解决.</p>
]]></content>
<categories>
<category>arch - editor</category>
</categories>
<tags>
<tag>neovim</tag>
<tag>vim</tag>
<tag>neovide</tag>
</tags>
</entry>
<entry>
<title>xmonad</title>
<url>/posts/2024632b.html</url>
<content><![CDATA[<h2 id="Arch-linux-wiki"><a href="#Arch-linux-wiki" class="headerlink" title="Arch linux wiki"></a>Arch linux wiki</h2><h3 id="install"><a href="#install" class="headerlink" title="install"></a>install</h3><p>need two packages:<br><code>xmonad-git</code><br><code>xmonad-contrib-git</code></p>
]]></content>
<categories>
<category>arch</category>
<category>xmonad</category>
</categories>
</entry>
<entry>
<title>一本书读懂TCP/IP</title>
<url>/posts/db895e09.html</url>
<content><![CDATA[<blockquote class="blockquote-center">
<h1 id="阔别已久,失踪人口回归"><a href="#阔别已久,失踪人口回归" class="headerlink" title="阔别已久,失踪人口回归"></a>阔别已久,失踪人口回归</h1>
</blockquote>
<h2 id="聊聊想法"><a href="#聊聊想法" class="headerlink" title="聊聊想法"></a>聊聊想法</h2><div class="note default"><p> 网络世界的知识更新非常快速,如果你的知识跟不上更新的速度很快就会被淘汰。<br>计算机网络是一门重要的基础课程,基本上是一门必修课,基础功扎实将减少后期的学习投入<br>想了半天也没啥好写的废话,就这样吧,最近一段时间将主要更新这篇文章<br> ‘^w^’ Happy Reading!</p>
</div>
<span id="more"></span>
<h1 id="关于这本书"><a href="#关于这本书" class="headerlink" title="关于这本书"></a>关于这本书</h1><div class="note default"><p> 这本书讲的是关于TCP/IP的前世、今生和未来。</p>
<h2 id="TCP-IP的哲学"><a href="#TCP-IP的哲学" class="headerlink" title="TCP/IP的哲学"></a>TCP/IP的哲学</h2><p> 尽力而为–TCP/IP</p>
</div>
<h1 id="第一章-TCP-IP起源"><a href="#第一章-TCP-IP起源" class="headerlink" title="第一章 TCP/IP起源"></a>第一章 TCP/IP起源</h1><p> TCP/IP 的全称为: 传输控制协议/网际协议(Transfer Control Protocol/Internet Protocol)</p>
<h2 id="时间简史"><a href="#时间简史" class="headerlink" title="时间简史"></a>时间简史</h2><p>TCP/IP的起源和发展时间段大部分发生于<a href="https://baike.baidu.com/item/%E7%AC%AC%E4%BA%8C%E6%AC%A1%E4%B8%96%E7%95%8C%E5%A4%A7%E6%88%98/174090?fr=aladdin">二战</a> 结束(1945/9/2)<a href="https://baike.baidu.com/item/%E5%86%B7%E6%88%98/82478">冷战</a>时期(1947-1991)</p>
<ul>
<li><p>1962年 美国国防部(DoD)由于军事需求需要一种分散的通信网络</p>
</li>
<li><p>1969年9月 ARPAnet问世,第一台主机用的是:<a href="https://baike.baidu.com/item/%E7%BD%91%E7%BB%9C%E6%8E%A7%E5%88%B6%E5%8D%8F%E8%AE%AE/273720?fr=aladdin">网络控制协议</a>(Netword control protocol,NCP)</p>
</li>
</ul>
]]></content>
<categories>
<category>读书</category>
<category>计算机网络</category>
<category>TCP/IP</category>
</categories>
</entry>
<entry>
<title>三体</title>
<url>/posts/1a772824.html</url>
<content><![CDATA[<h2 id="三体小说–刘慈溪"><a href="#三体小说–刘慈溪" class="headerlink" title="三体小说–刘慈溪"></a>三体小说–刘慈溪</h2><blockquote>
<p>第一部 《三体》<br>第二部 《黑暗森林》<br>第三部 《死神永生》</p>
</blockquote>
<p> 每一次阅读三部曲,都有一种奇妙的回味,或对于文中人物的个人观点的细微改变,或对于所处世界观点的颠覆,<br>小说每一段都值得细细品尝,读完三部曲居然会发现似乎站在宏观的角度来看我们很难去判断,到底文中所描述的人类文明的下场是谁的责任,<br>因为站在宇宙的角度,这一切似乎是理所当然,完全符合宇宙公理。<br> 这是我第三次读三体小说了,碰巧今天在bilibili上写了一个评论,所以打算记录下来。这是以我个人的观点阐述我目前对整部小说的理解。</p>
<span id="more"></span>
<ul>
<li><p>评论是这样的:</p>
<ul>
<li><p>层主:<br>《三体》系列科幻小说究竟多牛?<br>《三体》导读一书中评价道:<br>文学家不可能有这么逼真的技术描写,<br>科学家不可能有这么极致的道德追问,<br>哲学家不可能有这么恣肆的天马行空,<br>《三体》却同时具备了这些特色。</p>
</li>
<li><p>其下一位朋友的品论:<br>换个角度:<br>文笔不行,硬伤不少,深度不够[doge]</p>
</li>
<li><p>我的回复并没有针对任何人任何观点,只是因为看到这位朋友的回复有感而发.</p>
<blockquote>
<p>【】中是我现在想到,加进去的<br>相反我看到了大刘这三种的终极,这是我站在人和我自己的角度考虑的回答:<br>这些人物体现了人类文明的内在,不仅仅是大刘自己的精神追求,文中多次<br>表现了整个人类世界的傲慢,很大的具象化了当今的舆论社会三观;【还描<br>述了几段情节跌宕的爱情故事】还有不失浪漫硬核的星星和小宇宙做礼物,<br>曲折的爱情故事,谁能想到云天明最后居然和AA跑了!!!,很多人说程心是<br>圣母x,如果不是她人类就不会如此下场,但恰恰相反程心给人类带来的是心<br>灵上的救赎,母性在生命的意义是具有很高的抽象意义,一种不太聪明的大爱,<br>在第三部最后留下金鱼生态球的描写中,虽然我们也可能猜到一种可能的结局,<br>但是这又何尝不是这冰冷宇宙中的一丝暖意,做人又何尝不是追求一种无愧于心<br>的态度,把对错交给时间去评判。这不是为了体现人类的本质而是生命的意义,<br>规律是无情的,生命对于生存也是在DNA中映刻的本能,但在这一切之上还有更<br>高级的东西吗?</p>
</blockquote>
<p>在科学上不用说,这已经是终极浪漫了!探究世界真理,宇宙尽头,生命的本质。<br>贯穿三部曲中,从来不缺少人类对宇宙中位置规律的探寻,科技是生存的第一<br>原力,生存离不开科学技术的发展,因为现实中宇宙大自然比书中可能要更加<br>残酷。人类文明面临重大危机表现的那种对知识的渴求是映刻在DNA中的,技术<br>爆炸是存在我们生活中息息相关的,百年以前和百年以后,这是独属文明生存的<br>浪漫。也许我们的子孙后代也会在647号小宇宙来一场极致的浪漫邂逅,又或者和<br>某个未知文明来一次宇宙的世纪旅行。人类的最终旅途是星辰大海!</p>
<p>哲学太过隐晦深刻,我难以用我所知来描述我的感受,可能会很苍白。深究一切<br>根源本质救赎生或死,哲学高度的生或死的界限应该会比较模糊,在宇宙的尺度<br>上人类确实是过于渺小,海中浪花,【以至于人类文明是否灭绝与宇宙没有任何<br>关联】,但是描述程心这个人物时,展现在她内心的和她表现出的博爱,那种包容<br>一下子就从一个人很细微的角度提升到了一中宏观,甚至这是一种超越生死的东西,<br>一种以这种博爱为根源的文明也会是极具包容性的,如果宇宙会死去,那么爱的<br>维度一定超越宇宙。或许书中描写的黑暗森林很残忍,但是现实中太阳一定会暗去,<br>地球也一定会停止转动的,虽然会过很久很久。书中抛出了一些对于我们来说是很<br>终极性的哲学问题,也许未来的人类能找到答案。<br>当然生存是第一需求,直到解开宇宙真相的那天,唯有:<br>前进,前进,不择手段的前进!!</p>
</li>
</ul>
</li>
<li><p>最后总结一下</p>
</li>
</ul>
<p>在这里重新把这段话打一遍时,我能明显感受到,我用词的匮乏,文采水平的贫瘠,<br>但这是我现在内心中真实的感触,如果终有那么一天,人类文明一定也会有人以最浪漫的<br>方式,在宇宙中留下属于我们的印记,不是为了给后来者知道这个文明,而是人类文明<br>自身的另一种生存。<br>在此写下我第一次读《三体》时的一段感悟:</p>
<p>人性像下水道的虫子,肮脏,龌龊,令人厌恶,却又充满生命的挣扎和渴望,水道外的世界<br>充斥着更复杂深沉的黑暗,但偶尔也会有一丝微光照在某只虫子身上,更多虫子开始向往。</p>
]]></content>
<categories>
<category>读书</category>
<category>三体</category>
</categories>
</entry>
<entry>
<title>为hexo添加view统计</title>
<url>/posts/8f878421.html</url>
<content><![CDATA[<h2 id="阅读统计"><a href="#阅读统计" class="headerlink" title="阅读统计"></a>阅读统计</h2><p>基于leancloud的文章阅读统计,将显示在文章标题下</p>
<ol>
<li>leancloud<blockquote><p>在leancloud 官网注册账号</p>
<footer><strong>官网</strong><cite><a href="https://console.leancloud.cn">leancloud</a></cite></footer></blockquote></li>
</ol>
<span id="more"></span>
<ol start="2">
<li>创建一个新的应用</li>
</ol>
<p>名称可以随意输入,进入应用在设置中的存储选项下选择<strong>结构化数据</strong><br>创建一个Counter的表格作为计数用</p>
<ol start="3">
<li>将id 和key填入<code> _config.yml</code><br>id 和 key 在leancloud设置中可以找到</li>
</ol>
<ul>
<li>完成后将博文重新编译可以先在本地查看效果<div class="note danger"><p>期间遇到一个问题:<br>Counter not initialized! More info at console err msg</p>
</div>
提示计数器没有初始化,在网上查找到一个方法<figure class="highlight yaml"><figcaption><span>将security设为false, 摘取自</span><a href="https://blog.csdn.net/w573719227/article/details/100704952">轩辕御龙</a></figcaption><table><tr><td class="code"><pre><span class="line"><span class="attr">leancloud_visitors:</span></span><br><span class="line"> <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line"> <span class="attr">app_id:</span> <span class="comment"># 填入leancloud<app_id></span></span><br><span class="line"> <span class="attr">app_key:</span> <span class="comment"># <app_key></span></span><br><span class="line"> <span class="comment"># Dependencies: https://github.com/theme-next/hexo-leancloud-counter-security</span></span><br><span class="line"> <span class="comment"># If you don't care about security in leancloud counter and just want to use it directly</span></span><br><span class="line"> <span class="comment"># (without hexo-leancloud-counter-security plugin), set `security` to `false`.</span></span><br><span class="line"> <span class="comment"># 解决办法是用npm 下载hexo-leancloud-counter-security 模块</span></span><br><span class="line"> <span class="comment"># 然后将security 设为false</span></span><br><span class="line"> <span class="attr">security:</span> <span class="literal">false</span> <span class="comment">#如果要为true</span></span><br><span class="line"> <span class="attr">betterPerformance:</span> <span class="literal">false</span></span><br></pre></td></tr></table></figure></li>
<li><div class="note danger"><p>但是如果你一定要启用security的话,hexo g遇到以下报错:<br>Cannot read property ‘enable_sync’ of undefined</p>
</div>
<figure class="highlight yaml"><figcaption><span>参照以下建议在`_config.yml`中添加 摘取自</span><a href="https://blog.csdn.net/qq_33840251/article/details/103899972">清欢ysy</a></figcaption><table><tr><td class="code"><pre><span class="line"><span class="attr">leancloud_counter_security:</span></span><br><span class="line"> <span class="attr">enable_sync:</span> <span class="literal">true</span></span><br><span class="line"> <span class="attr">app_id:</span> <span class="comment"># leancloud id</span></span><br><span class="line"> <span class="attr">app_key:</span> <span class="comment"># leancloud key</span></span><br><span class="line"> <span class="attr">username:</span> <span class="comment"># 用户名/邮箱</span></span><br><span class="line"> <span class="attr">password:</span> <span class="comment"># 密码</span></span><br></pre></td></tr></table></figure></li>
</ul>
]]></content>
<categories>
<category>hexo</category>
</categories>
<tags>
<tag>hexo文章阅读统计</tag>
</tags>
</entry>
<entry>
<title>使用nvm来管理nodejs</title>
<url>/posts/8f14feec.html</url>
<content><![CDATA[<h1 id="nvm"><a href="#nvm" class="headerlink" title="nvm"></a>nvm</h1><p><code>nvm</code> 是一个node.js的版本管理工具,让每个用户,所有POSIX-compliant SHELL可以使用不同版本的node</p>
<mark class="label warning">nvm不支持`fish shell`,后续也没有打算</mark>
<h2 id="使用"><a href="#使用" class="headerlink" title="使用"></a>使用</h2><h3 id="在安装-nvm-之前移除已安装的node"><a href="#在安装-nvm-之前移除已安装的node" class="headerlink" title="在安装 nvm 之前移除已安装的node"></a>在安装 <code>nvm</code> 之前移除已安装的node</h3><h3 id="Install"><a href="#Install" class="headerlink" title="Install"></a>Install</h3><ol>
<li><code>curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash</code><br>or</li>
<li><code>wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash</code></li>
</ol>
<h3 id="添加环境变量"><a href="#添加环境变量" class="headerlink" title="添加环境变量"></a>添加环境变量</h3><p>在 <code>.zshrc</code> or <code>.profile</code> or <code>.bashrc</code> 中添加一下语句</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"</span><br><span class="line">[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm</span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>nodejs</category>
</categories>
<tags>
<tag>nodejs</tag>
</tags>
</entry>
<entry>
<title>关于C语言main函数</title>
<url>/posts/2edb8018.html</url>
<content><![CDATA[<h1 id="什么是main"><a href="#什么是main" class="headerlink" title="什么是main"></a>什么是main</h1><p>在C语言中 main函数又叫主函数,是程序启动后第一个执行的函数<br>在C程序中不可缺少</p>
<span id="more"></span>
<h2 id="main函数的几种形式"><a href="#main函数的几种形式" class="headerlink" title="main函数的几种形式"></a>main函数的几种形式</h2><ol>
<li><p>没有返回值,也没有参数 (c89)</p>
<figure class="highlight c"><table><tr><td class="code"><pre><span class="line">main (){ }</span><br></pre></td></tr></table></figure>
<p>通常这种写法只有旧的标准支持,使用现在的编译器则会默其返回值为int</p>
</li>
<li><p>这种声明方式不推荐,因为返回值是给系统的,返回空则系统就无法获取程序退出状态</p>
<figure class="highlight c"><table><tr><td class="code"><pre><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">main</span> <span class="params">()</span> </span>{ }</span><br></pre></td></tr></table></figure></li>
<li><p>虽然形参列表没有参数,但是没有声明为void,则main函数依旧可以获取参数<br>程序中其他自定义函数也一样<br>入参没有类型限制,也可以不传参数</p>
<figure class="highlight c"><table><tr><td class="code"><pre><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span> <span class="params">()</span> </span>{ }</span><br></pre></td></tr></table></figure></li>
<li><p>无参,程序就无法获取命令行参数, 如果入参则会报错</p>
<figure class="highlight c"><table><tr><td class="code"><pre><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span> <span class="params">(<span class="keyword">void</span>)</span> </span>{ }</span><br></pre></td></tr></table></figure></li>
<li><p> 两个入参,第一个参数为命令行参数个数,第二个入参为命令行参数数组<br>入参的参数名可以自定义,不一定要下面示例中的名称</p>
<figure class="highlight c"><table><tr><td class="code"><pre><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span> <span class="params">(<span class="keyword">int</span> argv, <span class="keyword">char</span> *argc[])</span> </span>{ }</span><br></pre></td></tr></table></figure></li>
<li><p>三个入参</p>
<figure class="highlight c"><table><tr><td class="code"><pre><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span> <span class="params">(<span class="keyword">int</span> argv, <span class="keyword">char</span> *argc[], <span class="keyword">char</span> *envp[])</span> </span>{ }</span><br></pre></td></tr></table></figure>
<p>前两种参数和第五种一样,但是第三个参数通常为编译器扩展的一个参数<br>但是全局变量environ可以代替参数envp的作用,获取或设置环境变量可以使用getenv或putenv,所以使用这个扩展参数其实没有必要</p>
</li>
</ol>
<h3 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h3><p>可以看到C语言中main函数的写法有很多种,但是现在的C标准中只支持两种</p>
<figure class="highlight c"><figcaption><span>正确的两种形式</span></figcaption><table><tr><td class="code"><pre><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span> <span class="params">(<span class="keyword">void</span>)</span> </span>{ }</span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span> <span class="params">(<span class="keyword">int</span> argv, <span class="keyword">char</span> *argc[])</span> </span>{ }</span><br></pre></td></tr></table></figure>
<p>至于其他的写法要么是编译器扩展写法,要么就是历史遗留问题</p>
]]></content>
<categories>
<category>C 语言</category>
</categories>
<tags>
<tag>C 语言main函数</tag>
</tags>
</entry>
<entry>
<title>关于mermaid syntax error in graph问题的解决方案</title>
<url>/posts/4d5f9c23.html</url>
<content><![CDATA[<div class="note danger"><h1 id="这个错误在最新版本已经修复!!"><a href="#这个错误在最新版本已经修复!!" class="headerlink" title="这个错误在最新版本已经修复!!"></a>这个错误在最新版本已经修复!!</h1></div>
<h1 id="提出这个bug已经有一段时间了,在next-hexo-issues已经得到了解决方案"><a href="#提出这个bug已经有一段时间了,在next-hexo-issues已经得到了解决方案" class="headerlink" title="提出这个bug已经有一段时间了,在next-hexo issues已经得到了解决方案"></a>提出<mark class="label danger">mermaid syntax error in graph</mark>这个bug已经有一段时间了,在next-hexo issues已经得到了解决方案</h1><p>原文:</p>
<blockquote class="blockquote-center">
<p><a href="https://github.com/next-theme/hexo-theme-next/issues/211">#211 Mermaid source code edited by Hexo plugin causing syntax error</a></p>
</blockquote>
<p>引起问题的原因是我安装了<mark class="label ">hexo-neat</mark>, hexo-neat 在压缩post时会将文章中的换行符删除,而mermaid对空格和换行符敏感,所以导致了html语法解释器报错</p>
<span id="more"></span>
<h2 id="解决方法"><a href="#解决方法" class="headerlink" title="解决方法"></a>解决方法</h2><p>有两种方法避免<br>一种是禁用hexo-neat插件<br>另一种是用一种html的局部忽略语法将mermaid代码部分包裹在<code><!-- htmlmin:ignore --></code>中</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line"><!-- htmlmin:ignore --></span><br><span class="line"><pre class="mermaid"></span><br><span class="line">sequenceDiagram</span><br><span class="line">Alice-&gt;&gt;John: Hello John, how are you?</span><br><span class="line">loop Healthcheck</span><br><span class="line"> John-&gt;&gt;John: Fight against hypochondria</span><br><span class="line">end</span><br><span class="line">Note right of John: Rational thoughts!</span><br><span class="line">John--&gt;&gt;Alice: Great!</span><br><span class="line">John-&gt;&gt;Bob: How about you?</span><br><span class="line">Bob--&gt;&gt;John: Jolly good!</span><br><span class="line"></pre></span><br><span class="line"><!-- htmlmin:ignore --></span><br></pre></td></tr></table></figure>
<p>实现:</p>
<pre class="mermaid">
sequenceDiagram
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
</pre>
]]></content>
<categories>
<category>hexo</category>
<category>error</category>
<category>mermaid</category>
<category>fixed</category>
</categories>
<tags>
<tag>mermaid</tag>
</tags>
</entry>
<entry>
<title>正则表达式</title>
<url>/posts/2f57a694.html</url>
<content><![CDATA[<blockquote class="blockquote-center">
<h1 id="读《精通正则表达式》"><a href="#读《精通正则表达式》" class="headerlink" title="读《精通正则表达式》"></a>读《精通正则表达式》</h1>
</blockquote>
]]></content>
<categories>
<category>读书</category>
<category>正则表达式</category>
</categories>
</entry>
<entry>
<title>Arch linux Add a new SDD mobile HD</title>
<url>/posts/16b5c004.html</url>
<content><![CDATA[<h2 id="Arch-linux-插入移动硬盘不显示,解决方案"><a href="#Arch-linux-插入移动硬盘不显示,解决方案" class="headerlink" title="Arch linux 插入移动硬盘不显示,解决方案"></a>Arch linux 插入移动硬盘不显示,解决方案</h2><h3 id=""><a href="#" class="headerlink" title=""></a></h3>]]></content>
<categories>
<category>arch</category>
</categories>
<tags>
<tag>arch</tag>
<tag>add a new SDD HD</tag>
</tags>
</entry>
</search>