-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
978 lines (694 loc) · 55.1 KB
/
index.html
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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.1.1">
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
<link rel="mask-icon" href="/images/logo.svg" color="#222">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
<link rel="stylesheet" href="/lib/pace/pace-theme-counter.min.css">
<script src="/lib/pace/pace.min.js"></script>
<script id="hexo-configurations">
var NexT = window.NexT || {};
var CONFIG = {"hostname":"example.com","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"right","display":"always","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":true,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":true,"scrollpercent":true},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":-1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
</script>
<meta name="description" content="c++">
<meta property="og:type" content="website">
<meta property="og:title" content="我的笔记本">
<meta property="og:url" content="http://example.com/index.html">
<meta property="og:site_name" content="我的笔记本">
<meta property="og:description" content="c++">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="note">
<meta property="article:tag" content="书籍 股票">
<meta name="twitter:card" content="summary">
<link rel="canonical" href="http://example.com/">
<script id="page-configurations">
// https://hexo.io/docs/variables.html
CONFIG.page = {
sidebar: "",
isHome : true,
isPost : false,
lang : 'zh-CN'
};
</script>
<title>我的笔记本</title>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?132bc60928ddfddce419ce303d3cfaa3";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<noscript>
<style>
.use-motion .brand,
.use-motion .menu-item,
.sidebar-inner,
.use-motion .post-block,
.use-motion .pagination,
.use-motion .comments,
.use-motion .post-header,
.use-motion .post-body,
.use-motion .collection-header { opacity: initial; }
.use-motion .site-title,
.use-motion .site-subtitle {
opacity: initial;
top: initial;
}
.use-motion .logo-line-before i { left: initial; }
.use-motion .logo-line-after i { right: initial; }
</style>
</noscript>
</head>
<body itemscope itemtype="http://schema.org/WebPage">
<div class="container use-motion">
<div class="headband"></div>
<header class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-brand-container">
<div class="site-nav-toggle">
<div class="toggle" aria-label="切换导航栏">
<span class="toggle-line toggle-line-first"></span>
<span class="toggle-line toggle-line-middle"></span>
<span class="toggle-line toggle-line-last"></span>
</div>
</div>
<div class="site-meta">
<a href="/" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<h1 class="site-title">我的笔记本</h1>
<span class="logo-line-after"><i></i></span>
</a>
<p class="site-subtitle" itemprop="description">主要记录技术,其他杂七杂八也偶尔发,看心情</p>
</div>
<div class="site-nav-right">
<div class="toggle popup-trigger">
</div>
</div>
</div>
<nav class="site-nav">
<ul id="menu" class="main-menu menu">
<li class="menu-item menu-item-home">
<a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>
</li>
<li class="menu-item menu-item-about">
<a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>
</li>
<li class="menu-item menu-item-tags">
<a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>
</li>
<li class="menu-item menu-item-categories">
<a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>
</li>
<li class="menu-item menu-item-archives">
<a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>
</li>
<li class="menu-item menu-item-sitemap">
<a href="/sitemap.xml" rel="section"><i class="fa fa-sitemap fa-fw"></i>站点地图</a>
</li>
</ul>
</nav>
</div>
</header>
<div class="reading-progress-bar"></div>
<main class="main">
<div class="main-inner">
<div class="content-wrap">
<div class="content index posts-expand">
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="http://example.com/2020/10/07/%E7%BC%96%E7%A8%8B%E7%8F%A0%E7%8E%91-%E7%AC%AC%E4%BA%8C%E7%89%88-%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.gif">
<meta itemprop="name" content="note">
<meta itemprop="description" content="c++">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="我的笔记本">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/10/07/%E7%BC%96%E7%A8%8B%E7%8F%A0%E7%8E%91-%E7%AC%AC%E4%BA%8C%E7%89%88-%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/" class="post-title-link" itemprop="url">编程珠玑 第二版 读书笔记</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-10-07 18:56:48 / 修改时间:23:16:53" itemprop="dateCreated datePublished" datetime="2020-10-07T18:56:48+08:00">2020-10-07</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/" itemprop="url" rel="index"><span itemprop="name">读书笔记</span></a>
</span>
,
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/%E7%BC%96%E7%A8%8B/" itemprop="url" rel="index"><span itemprop="name">编程</span></a>
</span>
,
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/%E7%BC%96%E7%A8%8B/%E7%AE%97%E6%B3%95/" itemprop="url" rel="index"><span itemprop="name">算法</span></a>
</span>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-comment"></i>
</span>
<span class="post-meta-item-text">Disqus:</span>
<a title="disqus" href="/2020/10/07/%E7%BC%96%E7%A8%8B%E7%8F%A0%E7%8E%91-%E7%AC%AC%E4%BA%8C%E7%89%88-%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/#disqus_thread" itemprop="discussionUrl">
<span class="post-comments-count disqus-comment-count" data-disqus-identifier="2020/10/07/编程珠玑-第二版-读书笔记/" itemprop="commentCount"></span>
</a>
</span>
<br>
<span class="post-meta-item" title="本文字数">
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">本文字数:</span>
<span>267</span>
</span>
<span class="post-meta-item" title="阅读时长">
<span class="post-meta-item-icon">
<i class="far fa-clock"></i>
</span>
<span class="post-meta-item-text">阅读时长 ≈</span>
<span>1 分钟</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h1 id="流水记录"><a href="#流水记录" class="headerlink" title="流水记录"></a>流水记录</h1><p><strong>2020-10-07</strong>今天开始看《编程珠玑》第二版。前言值得一看,我们可以知道另外两本书《人月神话》和《代码大全》。人月神话已经看完,感觉还没有达到那个高度,所以没有太大的感同身受。代码大全的表驱动法前段时间略有耳闻,之前觉得这本书应该是枯燥无味的大部头,但是这么多人推荐了,抽时间还是看一下吧。 </p>
<h1 id="章节详解"><a href="#章节详解" class="headerlink" title="章节详解"></a>章节详解</h1><h2 id="第一章"><a href="#第一章" class="headerlink" title="第一章"></a>第一章</h2><p>讲了归并排序用于外部排序,并且讲了bitmap用来排序。第一次接触这个方法,感觉很棒。然后根据习题查阅了位图的实现,联想到了c++里面bitmap的实现,感觉突然清晰了很多。果然经典会让人越来越好,而且进步速度还很快。</p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="http://example.com/2020/10/05/%E5%BF%AB%E9%80%9F%E6%8E%92%E5%BA%8F/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.gif">
<meta itemprop="name" content="note">
<meta itemprop="description" content="c++">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="我的笔记本">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/10/05/%E5%BF%AB%E9%80%9F%E6%8E%92%E5%BA%8F/" class="post-title-link" itemprop="url">快速排序</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-10-05 14:35:55 / 修改时间:14:40:18" itemprop="dateCreated datePublished" datetime="2020-10-05T14:35:55+08:00">2020-10-05</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E7%AE%97%E6%B3%95/" itemprop="url" rel="index"><span itemprop="name">算法</span></a>
</span>
,
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E7%AE%97%E6%B3%95/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/" itemprop="url" rel="index"><span itemprop="name">数据结构与算法</span></a>
</span>
,
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E7%AE%97%E6%B3%95/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/%E6%8E%92%E5%BA%8F/" itemprop="url" rel="index"><span itemprop="name">排序</span></a>
</span>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-comment"></i>
</span>
<span class="post-meta-item-text">Disqus:</span>
<a title="disqus" href="/2020/10/05/%E5%BF%AB%E9%80%9F%E6%8E%92%E5%BA%8F/#disqus_thread" itemprop="discussionUrl">
<span class="post-comments-count disqus-comment-count" data-disqus-identifier="2020/10/05/快速排序/" itemprop="commentCount"></span>
</a>
</span>
<br>
<span class="post-meta-item" title="本文字数">
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">本文字数:</span>
<span>641</span>
</span>
<span class="post-meta-item" title="阅读时长">
<span class="post-meta-item-icon">
<i class="far fa-clock"></i>
</span>
<span class="post-meta-item-text">阅读时长 ≈</span>
<span>1 分钟</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<ol>
<li><p>从数列中挑出一个元素,称为 “基准”(pivot);</p>
</li>
<li><p>重新排序数列,所有元素比基准值小的摆放在基准前面,所有元素比基准值大的摆在基准的后面(相同的数可以到任一边)。在这个分区退出之后,该基准就处于数列的中间位置。这个称为分区(partition)操作;</p>
</li>
<li><p>递归地(recursive)把小于基准值元素的子数列和大于基准值元素的子数列排序;</p>
<figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line">Paritition1(<span class="keyword">int</span> A[], <span class="keyword">int</span> low, <span class="keyword">int</span> high) {</span><br><span class="line"> <span class="keyword">int</span> pivot = A[low];</span><br><span class="line"> <span class="keyword">while</span> (low < high) {</span><br><span class="line"> <span class="keyword">while</span> (low < high && A[high] >= pivot) {</span><br><span class="line"> --high;</span><br><span class="line"> }</span><br><span class="line"> A[low] = A[high];</span><br><span class="line"> <span class="keyword">while</span> (low < high && A[low] <= pivot) {</span><br><span class="line"> ++low;</span><br><span class="line"> }</span><br><span class="line"> A[high] = A[low];</span><br><span class="line"> }</span><br><span class="line"> A[low] = pivot;</span><br><span class="line"> <span class="keyword">return</span> low;</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">QuickSort</span><span class="params">(<span class="keyword">int</span> A[], <span class="keyword">int</span> low, <span class="keyword">int</span> high)</span> <span class="comment">//快排母函数</span></span></span><br><span class="line"><span class="function"></span>{</span><br><span class="line"> <span class="keyword">if</span> (low < high) {</span><br><span class="line"> <span class="keyword">int</span> pivot = Paritition1(A, low, high);</span><br><span class="line"> QuickSort(A, low, pivot - <span class="number">1</span>);</span><br><span class="line"> QuickSort(A, pivot + <span class="number">1</span>, high);</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure>
</li>
</ol>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="http://example.com/2020/10/04/%E5%A0%86%E6%8E%92%E5%BA%8F/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.gif">
<meta itemprop="name" content="note">
<meta itemprop="description" content="c++">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="我的笔记本">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/10/04/%E5%A0%86%E6%8E%92%E5%BA%8F/" class="post-title-link" itemprop="url">堆排序</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-10-04 19:22:48" itemprop="dateCreated datePublished" datetime="2020-10-04T19:22:48+08:00">2020-10-04</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2020-10-05 11:07:37" itemprop="dateModified" datetime="2020-10-05T11:07:37+08:00">2020-10-05</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E7%AE%97%E6%B3%95/" itemprop="url" rel="index"><span itemprop="name">算法</span></a>
</span>
,
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E7%AE%97%E6%B3%95/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/" itemprop="url" rel="index"><span itemprop="name">数据结构与算法</span></a>
</span>
,
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E7%AE%97%E6%B3%95/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/%E6%8E%92%E5%BA%8F/" itemprop="url" rel="index"><span itemprop="name">排序</span></a>
</span>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-comment"></i>
</span>
<span class="post-meta-item-text">Disqus:</span>
<a title="disqus" href="/2020/10/04/%E5%A0%86%E6%8E%92%E5%BA%8F/#disqus_thread" itemprop="discussionUrl">
<span class="post-comments-count disqus-comment-count" data-disqus-identifier="2020/10/04/堆排序/" itemprop="commentCount"></span>
</a>
</span>
<br>
<span class="post-meta-item" title="本文字数">
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">本文字数:</span>
<span>1.1k</span>
</span>
<span class="post-meta-item" title="阅读时长">
<span class="post-meta-item-icon">
<i class="far fa-clock"></i>
</span>
<span class="post-meta-item-text">阅读时长 ≈</span>
<span>1 分钟</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h1 id="堆的性质"><a href="#堆的性质" class="headerlink" title="堆的性质"></a>堆的性质</h1><p>堆从0开始标号</p>
<ul>
<li>索引为i的左孩子的索引是 (2*i+1);</li>
<li>索引为i的左孩子的索引是 (2*i+2);</li>
<li>索引为i的父结点的索引是 floor((i-1)/2); </li>
</ul>
<p>堆是<strong>完全二叉树</strong></p>
<figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="meta-keyword">include</span><span class="meta-string"><iostream></span></span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">include</span><span class="meta-string"><vector></span></span></span><br><span class="line"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="built_in">std</span>;</span><br><span class="line"> </span><br><span class="line"><span class="comment">// 递归方式构建大根堆(len是arr的长度,index是第一个非叶子节点的下标)</span></span><br><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">adjust</span><span class="params">(<span class="built_in">vector</span><<span class="keyword">int</span>> &arr, <span class="keyword">int</span> len, <span class="keyword">int</span> index)</span></span></span><br><span class="line"><span class="function"></span>{</span><br><span class="line"> <span class="keyword">int</span> left = <span class="number">2</span>*index + <span class="number">1</span>; <span class="comment">// index的左子节点</span></span><br><span class="line"> <span class="keyword">int</span> right = <span class="number">2</span>*index + <span class="number">2</span>;<span class="comment">// index的右子节点</span></span><br><span class="line"> </span><br><span class="line"> <span class="keyword">int</span> maxIdx = index;</span><br><span class="line"> <span class="keyword">if</span>(left<len && arr[left] > arr[maxIdx]) maxIdx = left;</span><br><span class="line"> <span class="keyword">if</span>(right<len && arr[right] > arr[maxIdx]) maxIdx = right;</span><br><span class="line"> </span><br><span class="line"> <span class="keyword">if</span>(maxIdx != index)</span><br><span class="line"> {</span><br><span class="line"> swap(arr[maxIdx], arr[index]);</span><br><span class="line"> adjust(arr, len, maxIdx);</span><br><span class="line"> }</span><br><span class="line"> </span><br><span class="line">}</span><br><span class="line"> </span><br><span class="line"><span class="comment">// 堆排序</span></span><br><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">heapSort</span><span class="params">(<span class="built_in">vector</span><<span class="keyword">int</span>> &arr, <span class="keyword">int</span> size)</span></span></span><br><span class="line"><span class="function"></span>{</span><br><span class="line"> <span class="comment">// 构建大根堆(从最后一个非叶子节点向上)</span></span><br><span class="line"> <span class="keyword">for</span>(<span class="keyword">int</span> i=size/<span class="number">2</span> - <span class="number">1</span>; i >= <span class="number">0</span>; i--)</span><br><span class="line"> {</span><br><span class="line"> adjust(arr, size, i);</span><br><span class="line"> }</span><br><span class="line"> </span><br><span class="line"> <span class="comment">// 调整大根堆</span></span><br><span class="line"> <span class="keyword">for</span>(<span class="keyword">int</span> i = size - <span class="number">1</span>; i >= <span class="number">1</span>; i--)</span><br><span class="line"> {</span><br><span class="line"> swap(arr[<span class="number">0</span>], arr[i]); <span class="comment">// 将当前最大的放置到数组末尾</span></span><br><span class="line"> adjust(arr, i, <span class="number">0</span>); <span class="comment">// 将未完成排序的部分继续进行堆排序</span></span><br><span class="line"> }</span><br><span class="line">}</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></span></span><br><span class="line"><span class="function"></span>{</span><br><span class="line"> <span class="built_in">vector</span><<span class="keyword">int</span>> arr = {<span class="number">8</span>, <span class="number">1</span>, <span class="number">14</span>, <span class="number">3</span>, <span class="number">21</span>, <span class="number">5</span>, <span class="number">7</span>, <span class="number">10</span>};</span><br><span class="line"> heapSort(arr, arr.size());</span><br><span class="line"> <span class="keyword">for</span>(<span class="keyword">int</span> i=<span class="number">0</span>;i<arr.size();i++)</span><br><span class="line"> {</span><br><span class="line"> <span class="built_in">cout</span><<arr[i]<<<span class="built_in">endl</span>;</span><br><span class="line"> }</span><br><span class="line"> <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">}</span><br></pre></td></tr></table></figure>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="http://example.com/2020/09/24/%E6%95%B0%E6%8D%AE%E7%AE%A1%E7%90%86/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.gif">
<meta itemprop="name" content="note">
<meta itemprop="description" content="c++">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="我的笔记本">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/09/24/%E6%95%B0%E6%8D%AE%E7%AE%A1%E7%90%86/" class="post-title-link" itemprop="url">数据管理</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-09-24 13:10:37" itemprop="dateCreated datePublished" datetime="2020-09-24T13:10:37+08:00">2020-09-24</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2020-10-04 15:55:51" itemprop="dateModified" datetime="2020-10-04T15:55:51+08:00">2020-10-04</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-comment"></i>
</span>
<span class="post-meta-item-text">Disqus:</span>
<a title="disqus" href="/2020/09/24/%E6%95%B0%E6%8D%AE%E7%AE%A1%E7%90%86/#disqus_thread" itemprop="discussionUrl">
<span class="post-comments-count disqus-comment-count" data-disqus-identifier="2020/09/24/数据管理/" itemprop="commentCount"></span>
</a>
</span>
<br>
<span class="post-meta-item" title="本文字数">
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">本文字数:</span>
<span>3.3k</span>
</span>
<span class="post-meta-item" title="阅读时长">
<span class="post-meta-item-icon">
<i class="far fa-clock"></i>
</span>
<span class="post-meta-item-text">阅读时长 ≈</span>
<span>3 分钟</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h1 id="数据管理的内容"><a href="#数据管理的内容" class="headerlink" title="数据管理的内容"></a>数据管理的内容</h1><p>数据管理的内容可以分为三大类:有些注重<strong>数据治理活动(GovernanceActivities)</strong>,确保组织对数据做出合理、一致的决策;有些注重数据的<strong>生命周期活动(Lifecycle Activities)</strong>,管理从数据的获取到数据的消除整个过程;有些注重数据的<strong>基础活动(Foundational Activities)</strong>,包括数据的管理、维护和使用</p>
<h2 id="数据治理活动"><a href="#数据治理活动" class="headerlink" title="数据治理活动"></a>数据治理活动</h2><p>1)建立数据战略;2)设置相关原则;3)数据管理专责(Stewarding);4)定义数据在组织中的价值;5)为组织能从数据中获取更多价值做准备,从而可借助数据管理实践的不断成熟和企业文化变革影响组织对数据的认知方式。 </p>
<h2 id="数据生命周期活动"><a href="#数据生命周期活动" class="headerlink" title="数据生命周期活动"></a>数据生命周期活动</h2><p>1)数据架构;2)数据建模;3)构建和管理数据仓库和数据集市;4)集成数据,为商务智能分析师和数据科学家使用;5)管理关键的共享数据的生命周期,如参考数据和主数据。</p>
<h2 id="数据基础活动"><a href="#数据基础活动" class="headerlink" title="数据基础活动"></a>数据基础活动</h2><p>1)确保数据受到保护;2)管理元数据(理解和使用数据所需的知识);3)管理数据质量。 </p>
<h3 id="元数据管理"><a href="#元数据管理" class="headerlink" title="元数据管理"></a>元数据管理</h3><p><strong>元数据类别</strong>业务元数据(Business)、技术元数据(Technical)和操作元数据(Operational)。<br>**<strong>业务元数据**</strong>主要关注数据的内容和状态,以及与数据治理相关的细节。业务元数据包括概念、主题域、实体和属性等非技术性的名称和定义;属性类型和其他属性特征;范围的描述;计算规则;算法和业务规则;有效的域值及其定义。业务元数据的例子包括:(1)数据模型、数据集的定义和描述、表和列。(2)业务规则、数据质量规则、转换规则、计算和派生数据。(3)数据来源和数据继承。(4)数据标准和约束。(5)安全/隐私级别的数据。(6)数据中存在的已知问题。(7)数据的备注或说明。<br><strong>技术元数据</strong>提供关于数据的技术细节、存储数据的系统,以及在系统内部和系统之间迁移数据的过程信息。技术元数据的例子包括:(1)物理数据库表、列名和属性。(2)数据访问权限、组、角色。(3)数据CRUD(创建、替换、更新和删除)规则。(4)数据ETL(抽取、转换和加载)任务细节。(5)数据继承文档,包括在上游和下游更改影响信息。(6)内容更新周期、作业进度和依赖项。<br><strong>操作元数据</strong>描述处理和访问数据的详细信息。例如:(1)批处理程序的作业执行日志。(2)审计结果、平衡、控制测量和错误日志。(3)报告和查询访问模式、频率和执行时间。(4)补丁和版本维护计划及执行,当前补丁级别。(5)备份、保留、创建日期、灾难恢复的相关规定。<br>关于<strong>元数据的类别</strong>,应该从元数据来源的角度去考虑,而不是从元数据使用方式的角度去考虑。在使用方面,元数据类型之间的区别并不严格。技术人员和操作人员都可以使用“业务”元数据,反之亦然</p>
<h1 id="数据管理知识领域"><a href="#数据管理知识领域" class="headerlink" title="数据管理知识领域"></a>数据管理知识领域</h1><p>11个<br>(1)<strong>数据治理</strong>(Data Governance)。通过建立数据决策的权限和责任,为数据管理活动和职能提供整体的指导和监督。这些权限和责任的建立应该考虑到组织的整体需求。<br>(2)<strong>数据架构</strong>(Data Architecture)。它是管理数据资产的“蓝图”,指基于组织的战略目标,建立符合战略需求的数据构架。<br>(3)<strong>数据建模和设计</strong>(Data Modeling and Design)。这些活动是探索、分析、表示和沟通数据需求的一个过程,最后表现为数据模型。<br>(4)<strong>数据存储和操作</strong>(Data Storage and Operations)。这些活动包括数据存储的设计、实施和支持,目的是达到利益最大化。这些活动服务于数据的整个生命周期——从数据规划到数据消除。<br>(5)<strong>数据安全</strong>(Data Security)。这一活动确保数据隐私和安全。数据的获得和使用必须要有安全的保障。<br>(6)<strong>数据整合与互操作</strong>(Data Integration&Interoperability)。这一领域包括存在于不同数据系统、应用程序和组织之内,以及组织之间的数据迁移和集成等。<br>(7)<strong>文档和内容管理</strong>(Document and Content Management)。通过规划、实施和监管活动,来管理那些存储于非结构化介质中的数据和它们的生命周期,尤其是那些与法律及合规性相关的文件的管理。<br>(8)<strong>参考数据和主数据管理</strong>(Reference and Master Data Management)。这一活动涉及对核心关键共享数据的持续更新和维护,以便得到最准确、及时并和基础业务相关的数据。<br>(9)<strong>数据仓库和商务智能</strong>(Data Warehousing and Business Intelligence)。通过计划、实施和对系统流程的控制活动,为管理决策提供数据量化支持,使相关工作人员能够通过数据分析和数据报告获取价值。<br>(10)<strong>元数据管理</strong>(Metadata Management)。通过规划、实施和控制活动,支持访问高质量的元数据集,包括定义、模型、数据流和其他对理解数据及其创建、维护和访问至关重要的信息。<br>(11)<strong>数据质量管理</strong>(Data Quality Management)。这一活动包括规划和实施质量管理技术,以衡量、评估和改善组织使用的数据。 </p>
<h3 id="有些生命周期规则仍适用于任何数据"><a href="#有些生命周期规则仍适用于任何数据" class="headerlink" title="有些生命周期规则仍适用于任何数据"></a>有些生命周期规则仍适用于任何数据</h3><p>(1)在数据生命周期中,数据的产生和使用是最主要的关键点。数据管理必须做到确定数据是怎样产生的,或者数据是怎样获取的,以及数据将如何被使用。(2)数据质量管理必须贯穿数据生命周期全过程。因为数据质量往往会受到数据生命周期内一些事件的影响,所以必须将其作为数据生命周期管理的一部分进行规划。数据质量不是“附加物”,也不能“事后补做”。(3)元数据管理必须贯穿数据生命周期全过程。元数据是用来描述其他数据的一类数据。同样的,元数据对于所有数据管理功能来说都是关键的。元数据通常是通过数据生命周期内的其他数据创建的,被看作是数据生命周期的产品(而不是副产品)。元数据要像其他数据一样进行质量管理。(4)数据安全管理必须贯穿数据生命周期全过程。数据管理包括确保数据是安全的,而且相关的风险得到有效控制。数据在贯穿整个生命周期过程中都要受到保护——从产生直到清除。(5)数据管理应该专注于最关键的数据。组织产生了大量的数据,其中有许多并未真正被使用过。管理所有数据,既是不可能的,也是不必要的。生命周期管理需要聚焦到组织最关键的数据上,并且要做到最小化ROT(Redundant,Obsolete,Trivial,即数据是过剩的、废弃的、琐碎的)</p>
<h3 id="不同类型的数据会有不同的生命周期需求"><a href="#不同类型的数据会有不同的生命周期需求" class="headerlink" title="不同类型的数据会有不同的生命周期需求"></a>不同类型的数据会有不同的生命周期需求</h3><p>数据可以进行多种分类:既可以根据数据提供的功能进行分类(如事务数据、参考数据、主数据、元数据、可变数据、源数据、事件数据、事务明细数据),也可以根据数据的内容进行分类(如数据域、主题域),或者根据数据格式进行分类,以及根据数据保护的等级进行分类。因为不同类型的数据会有不同的需求,关联到不同的风险,在同一个组织内会起到不同的作用,所以很多数据管理的工具都聚焦于数据的分类和管控。比如,主数据相对于事务型数据来说,会有不同的应用,因而就会有不同的管理需求。</p>
<h1 id="DAMA数据管理原则"><a href="#DAMA数据管理原则" class="headerlink" title="DAMA数据管理原则"></a>DAMA数据管理原则</h1><p>数据管理成熟度评估(Data Management MaturityAssessment,DMMA)定义了通过不断增加控制,提高数据质量的一个过程。当一个组织了解了过程的特征之后,就可以通过制订计划来提高它的能力。在模型的层次指引下,它也能用来度量改进程度,以及比较竞争对手或者合作伙伴。数据管理成熟度模型描述了可用于此类评估的数据管理过程的细节 。<br>第0级,缺乏能力。<br>第1级,初始级或临时级:成功取决于个人的能力。<br>第2级,可重复级:最小化的流程规则已经到位。<br>第3级,已定义级:相关标准已经设立并使用。<br>第4级,受管理级:流程已量化并可控。<br>第5级,优化级:过程改进的目标被量化。</p>
<h6 id="●-数据是有价值的"><a href="#●-数据是有价值的" class="headerlink" title="● 数据是有价值的"></a>● 数据是有价值的</h6><h6 id="●-数据管理需求是业务需求"><a href="#●-数据管理需求是业务需求" class="headerlink" title="● 数据管理需求是业务需求"></a>● 数据管理需求是业务需求</h6><ul>
<li>数据管理意味着管理数据的质量</li>
<li>数据管理需要元数据</li>
<li>数据管理需要规划</li>
<li>数据管理需求必须推动信息技术决策<h6 id="●-数据管理需要各种不同的技能"><a href="#●-数据管理需要各种不同的技能" class="headerlink" title="● 数据管理需要各种不同的技能"></a>● 数据管理需要各种不同的技能</h6><h6 id="●-数据管理是生命周期管理"><a href="#●-数据管理是生命周期管理" class="headerlink" title="● 数据管理是生命周期管理"></a>● 数据管理是生命周期管理</h6></li>
<li>数据管理是生命周期管理</li>
<li>不同类型的数据具有不同的生命周期特征。</li>
<li>管理数据包括管理与数据相关的风险</li>
</ul>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="http://example.com/2020/09/16/hello-world/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.gif">
<meta itemprop="name" content="note">
<meta itemprop="description" content="c++">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="我的笔记本">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/09/16/hello-world/" class="post-title-link" itemprop="url">hexo的常用命令</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-09-16 20:46:25 / 修改时间:00:45:00" itemprop="dateCreated datePublished" datetime="2020-09-16T20:46:25+08:00">2020-09-16</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E5%BC%80%E6%BA%90%E6%8A%80%E6%9C%AF/" itemprop="url" rel="index"><span itemprop="name">开源技术</span></a>
</span>
,
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E5%BC%80%E6%BA%90%E6%8A%80%E6%9C%AF/hexo/" itemprop="url" rel="index"><span itemprop="name">hexo</span></a>
</span>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-comment"></i>
</span>
<span class="post-meta-item-text">Disqus:</span>
<a title="disqus" href="/2020/09/16/hello-world/#disqus_thread" itemprop="discussionUrl">
<span class="post-comments-count disqus-comment-count" data-disqus-identifier="2020/09/16/hello-world/" itemprop="commentCount"></span>
</a>
</span>
<br>
<span class="post-meta-item" title="本文字数">
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">本文字数:</span>
<span>367</span>
</span>
<span class="post-meta-item" title="阅读时长">
<span class="post-meta-item-icon">
<i class="far fa-clock"></i>
</span>
<span class="post-meta-item-text">阅读时长 ≈</span>
<span>1 分钟</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>Welcome to <a target="_blank" rel="noopener" href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a target="_blank" rel="noopener" href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a target="_blank" rel="noopener" href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a target="_blank" rel="noopener" href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure>
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<script>
window.addEventListener('tabs:register', () => {
let { activeClass } = CONFIG.comments;
if (CONFIG.comments.storage) {
activeClass = localStorage.getItem('comments_active') || activeClass;
}
if (activeClass) {
let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
if (activeTab) {
activeTab.click();
}
}
});
if (CONFIG.comments.storage) {
window.addEventListener('tabs:click', event => {
if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
let commentClass = event.target.classList[1];
localStorage.setItem('comments_active', commentClass);
});
}
</script>
</div>
<div class="toggle sidebar-toggle">
<span class="toggle-line toggle-line-first"></span>
<span class="toggle-line toggle-line-middle"></span>
<span class="toggle-line toggle-line-last"></span>
</div>
<aside class="sidebar">
<div class="sidebar-inner">
<ul class="sidebar-nav motion-element">
<li class="sidebar-nav-toc">
文章目录
</li>
<li class="sidebar-nav-overview">
站点概览
</li>
</ul>
<!--noindex-->
<div class="post-toc-wrap sidebar-panel">
</div>
<!--/noindex-->
<div class="site-overview-wrap sidebar-panel">
<div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
<p class="site-author-name" itemprop="name">note</p>
<div class="site-description" itemprop="description">c++</div>
</div>
<div class="site-state-wrap motion-element">
<nav class="site-state">
<div class="site-state-item site-state-posts">
<a href="/archives/">
<span class="site-state-item-count">5</span>
<span class="site-state-item-name">日志</span>
</a>
</div>
<div class="site-state-item site-state-categories">
<a href="/categories/">
<span class="site-state-item-count">8</span>
<span class="site-state-item-name">分类</span></a>
</div>
<div class="site-state-item site-state-tags">
<a href="/tags/">
<span class="site-state-item-count">5</span>
<span class="site-state-item-name">标签</span></a>
</div>
</nav>
</div>
<div class="links-of-author motion-element">
<span class="links-of-author-item">
<a href="https://github.com/Mr-whoz" title="GitHub → https://github.com/Mr-whoz" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
</span>
<span class="links-of-author-item">
<a href="mailto:[email protected]" title="E-Mail → mailto:[email protected]" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
</span>
</div>
</div>
<div class="back-to-top motion-element">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>
</div>
</aside>
<div id="sidebar-dimmer"></div>
</div>
</main>
<footer class="footer">
<div class="footer-inner">
<div class="copyright">
© 2020.09 –
<span itemprop="copyrightYear">2020</span>
<span class="with-love">
<i class="fa fa-heart"></i>
</span>
<span class="author" itemprop="copyrightHolder">笔记本</span>
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-chart-area"></i>
</span>
<span class="post-meta-item-text">站点总字数:</span>
<span title="站点总字数">6k</span>
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-coffee"></i>
</span>
<span class="post-meta-item-text">站点阅读时长 ≈</span>
<span title="站点阅读时长">5 分钟</span>
</div>
<div class="busuanzi-count">
<script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
<span class="post-meta-item-icon">
<i class="fa fa-user"></i>
</span>
<span class="site-uv" title="总访客量">
<span id="busuanzi_value_site_uv"></span>
</span>
</span>
<span class="post-meta-divider">|</span>
<span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
<span class="post-meta-item-icon">
<i class="fa fa-eye"></i>
</span>
<span class="site-pv" title="总访问量">
<span id="busuanzi_value_site_pv"></span>
</span>
</span>
</div>
</div>
</footer>
</div>
<script src="/lib/anime.min.js"></script>
<script src="/lib/velocity/velocity.min.js"></script>
<script src="/lib/velocity/velocity.ui.min.js"></script>
<script src="/js/utils.js"></script>
<script src="/js/motion.js"></script>
<script src="/js/schemes/pisces.js"></script>
<script src="/js/next-boot.js"></script>
<script defer src="/lib/three/three.min.js"></script>
<script defer src="/lib/three/canvas_lines.min.js"></script>
<script>
(function(){
var canonicalURL, curProtocol;
//Get the <link> tag
var x=document.getElementsByTagName("link");
//Find the last canonical URL
if(x.length > 0){
for (i=0;i<x.length;i++){
if(x[i].rel.toLowerCase() == 'canonical' && x[i].href){
canonicalURL=x[i].href;
}
}
}
//Get protocol
if (!canonicalURL){
curProtocol = window.location.protocol.split(':')[0];
}
else{
curProtocol = canonicalURL.split(':')[0];
}
//Get current URL if the canonical URL does not exist
if (!canonicalURL) canonicalURL = window.location.href;
//Assign script content. Replace current URL with the canonical URL
!function(){var e=/([http|https]:\/\/[a-zA-Z0-9\_\.]+\.baidu\.com)/gi,r=canonicalURL,t=document.referrer;if(!e.test(r)){var n=(String(curProtocol).toLowerCase() === 'https')?"https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif":"//api.share.baidu.com/s.gif";t?(n+="?r="+encodeURIComponent(document.referrer),r&&(n+="&l="+r)):r&&(n+="?l="+r);var i=new Image;i.src=n}}(window);})();
</script>
<script>
function loadCount() {
var d = document, s = d.createElement('script');
s.src = 'https://开始评论.disqus.com/count.js';
s.id = 'dsq-count-scr';
(d.head || d.body).appendChild(s);
}
// defer loading until the whole page loading is completed
window.addEventListener('load', loadCount, false);
</script>
</body>
</html>