-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1058 lines (672 loc) · 41.3 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
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!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 3.9.0">
<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">
<script id="hexo-configurations">
var NexT = window.NexT || {};
var CONFIG = {"hostname":"yoursite.com","root":"/","scheme":"Pisces","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"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"}},"path":"search.xml"};
</script>
<meta property="og:type" content="website">
<meta property="og:title" content="welcome">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="welcome">
<meta property="og:locale" content="zh-CN">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="welcome">
<link rel="canonical" href="http://yoursite.com/">
<script id="page-configurations">
// https://hexo.io/docs/variables.html
CONFIG.page = {
sidebar: "",
isHome : true,
isPost : false,
lang : 'zh-CN'
};
</script>
<title>welcome</title>
<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">welcome</h1>
<span class="logo-line-after"><i></i></span>
</a>
</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>标签<span class="badge">21</span></a>
</li>
<li class="menu-item menu-item-categories">
<a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类<span class="badge">16</span></a>
</li>
<li class="menu-item menu-item-archives">
<a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档<span class="badge">89</span></a>
</li>
</ul>
</nav>
</div>
</header>
<div class="back-to-top">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</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://yoursite.com/2021/03/28/数据库/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/2.jpg">
<meta itemprop="name" content="银狐">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="welcome">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2021/03/28/数据库/" 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="创建时间:2021-03-28 23:49:48 / 修改时间:23:58:45" itemprop="dateCreated datePublished" datetime="2021-03-28T23:49:48+08:00">2021-03-28</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h2 id="事务"><a href="#事务" class="headerlink" title="事务"></a>事务</h2><p>概念:事务指的是满足ACID特性的一组操作,可以通过Commit提交一个事务,也可以使用Rollback进行回滚。<br>ACID特性:<br>(1)原子性:事务被视为不可分割的最小单元,事务的所有操作要么全部提交成功,要么全部失败回滚。回滚可以用回滚日志来实现,回滚日志记录着事务所执行的修改操作,在回滚时反向执行这些修改操作即可。<br>(2)一致性:数据库在事务执行前后都保持一致性状态。在一致性状态下,所有事务对一个数据的读取结果都是相同的。<br>(3)隔离性:一个事务所做的修改在最终提交以前,对其它事务是不可见的。<br>(4)持久性:一旦事务提交,则其所做的修改将会永远保存到数据库中。即使系统发生崩溃,事务执行的结果也不能丢失。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2021/03/28/数据库/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</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://yoursite.com/2021/03/28/离散数学/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/2.jpg">
<meta itemprop="name" content="银狐">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="welcome">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2021/03/28/离散数学/" 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="创建时间:2021-03-28 23:36:53 / 修改时间:23:48:58" itemprop="dateCreated datePublished" datetime="2021-03-28T23:36:53+08:00">2021-03-28</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h2 id="离散数学的研究内容?"><a href="#离散数学的研究内容?" class="headerlink" title="离散数学的研究内容?"></a>离散数学的研究内容?</h2><p>离散数学是研究离散对象(量)的数学,粗略地来讲,所谓“离散”就是不“连续”的、“可分离”的,比如自然数、书本、人等等,实数则是连续的。用集合论的术语来说,离散对象就是这样的对象:其全体所构成的集合是有限或可数的。</p>
<h2 id="命题和谓词?"><a href="#命题和谓词?" class="headerlink" title="命题和谓词?"></a>命题和谓词?</h2><p>命题:自然语句中能够判定真假的陈述句称为命题;<br>谓词:在陈述句中用来刻画个体词性质以及个体词之间相互关系的词。</p>
<h2 id="什么是等价关系?"><a href="#什么是等价关系?" class="headerlink" title="什么是等价关系?"></a>什么是等价关系?</h2><p>设R是集合A上的关系,如果R是自反的、对称的和传递的,则称R为A上的等价关系。</p>
<h2 id="什么是偏序关系?"><a href="#什么是偏序关系?" class="headerlink" title="什么是偏序关系?"></a>什么是偏序关系?</h2><p>对于非空集合A上的二元关系R,如果R是自反的、反对称的和传递的,···</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2021/03/28/离散数学/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</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://yoursite.com/2021/03/28/数据结构/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/2.jpg">
<meta itemprop="name" content="银狐">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="welcome">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2021/03/28/数据结构/" 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="创建时间:2021-03-28 23:35:50" itemprop="dateCreated datePublished" datetime="2021-03-28T23:35:50+08:00">2021-03-28</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="修改时间:2021-03-29 00:11:41" itemprop="dateModified" datetime="2021-03-29T00:11:41+08:00">2021-03-29</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h2 id="时间复杂度"><a href="#时间复杂度" class="headerlink" title="时间复杂度"></a>时间复杂度</h2><p>通常采用算法中基本运算的频度来分析算法的时间复杂度,一个语句的频度是指该语句在算法中被重复执行的次数,算法中最深层循环内的语句频度就是我们所说的时间复杂度。</p>
<h2 id="空间复杂度"><a href="#空间复杂度" class="headerlink" title="空间复杂度"></a>空间复杂度</h2><p>一个程序在执行时除了需要存储空间来存储本身所用的指令、常数、变量和输入数据外,还需要一些辅助空间来实现,这个辅助空间的大小就是空间复杂度的大小。</p>
<h2 id="什么是算法?算法的性质有哪些。"><a href="#什么是算法?算法的性质有哪些。" class="headerlink" title="什么是算法?算法的性质有哪些。"></a>什么是算法?算法的性质有哪些。</h2><p>算法是由若干条指令组成的有穷序列。<br>性质:<br>(1)输入:具有0个或多个输入<br>(2)输出:至少产生一个输出<br>(3)有穷性:每一条指令的执行次数必须是有限的<br>(4)确定性:每条指令的含义必须是明确,无二含义<br>(5)可行性:每条指令的执行时间都是有限的</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2021/03/28/数据结构/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</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://yoursite.com/2021/03/28/操作系统/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/2.jpg">
<meta itemprop="name" content="银狐">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="welcome">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2021/03/28/操作系统/" 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="创建时间:2021-03-28 23:26:56" itemprop="dateCreated datePublished" datetime="2021-03-28T23:26:56+08:00">2021-03-28</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="修改时间:2021-03-29 00:16:41" itemprop="dateModified" datetime="2021-03-29T00:16:41+08:00">2021-03-29</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h2 id="编译程序的组成结构:"><a href="#编译程序的组成结构:" class="headerlink" title="编译程序的组成结构:"></a>编译程序的组成结构:</h2><p>词法分析、语法分析、语义分析、代码优化、存储分配和代码生成</p>
<h2 id="如果操作系统的源代码是公开的-你认为这样的操作系统是安全的吗"><a href="#如果操作系统的源代码是公开的-你认为这样的操作系统是安全的吗" class="headerlink" title="如果操作系统的源代码是公开的,你认为这样的操作系统是安全的吗?"></a>如果操作系统的源代码是公开的,你认为这样的操作系统是安全的吗?</h2><p>不安全,linux的源代码是公开的。</p>
<h2 id="编译如何实现“括号配对检查”"><a href="#编译如何实现“括号配对检查”" class="headerlink" title="编译如何实现“括号配对检查”"></a>编译如何实现“括号配对检查”</h2><p>1)出现的凡是“左括号”,则进栈;<br>2)出现的是“有括号”,首先检查栈是否空?若栈空,则表明该“右括号”多余,否则和栈顶元素比较,若相匹配,则栈顶“左括号”出栈,否则表明不匹配。<br>3)表达式检验结束时,若栈空,则表明表达式中匹配正确;否则表明“左括号”有余。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2021/03/28/操作系统/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</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://yoursite.com/2021/03/26/算法练习/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/2.jpg">
<meta itemprop="name" content="银狐">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="welcome">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2021/03/26/算法练习/" 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="创建时间:2021-03-26 20:34:06" itemprop="dateCreated datePublished" datetime="2021-03-26T20:34:06+08:00">2021-03-26</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="修改时间:2021-03-28 00:46:48" itemprop="dateModified" datetime="2021-03-28T00:46:48+08:00">2021-03-28</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h1 id="创建结构体(有关有员函数和重载输入输出)"><a href="#创建结构体(有关有员函数和重载输入输出)" class="headerlink" title="创建结构体(有关有员函数和重载输入输出)"></a>创建结构体(有关有员函数和重载输入输出)</h1><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></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="keyword">using</span> <span class="keyword">namespace</span> <span class="built_in">std</span>;</span><br><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">student</span>{</span></span><br><span class="line"> <span class="keyword">private</span>:</span><br><span class="line"> <span class="keyword">int</span> age;</span><br><span class="line"> <span class="built_in">string</span> name;</span><br><span class="line"> <span class="keyword">public</span>:</span><br><span class="line"> <span class="function"><span class="keyword">void</span> <span class="title">get_stu</span><span class="params">()</span></span>{<span class="comment">//输入数据</span></span><br><span class="line"> <span class="built_in">cin</span> >> name >> age;</span><br><span class="line"> }</span><br><span class="line"> <span class="function"><span class="keyword">void</span> <span class="title">out_stu</span><span class="params">()</span></span>{<span class="comment">//输出数据</span></span><br><span class="line"> <span class="built_in">cout</span> << name << <span class="string">" "</span> << age;</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">friend</span> <span class="title">max_stu</span><span class="params">(student s1,student s2)</span></span>;</span><br><span class="line">}; </span><br><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">max_stu</span><span class="params">(student s1,student s2)</span></span>{</span><br><span class="line"> <span class="keyword">if</span>(s1.age > s2.age) s1.out_stu();</span><br><span class="line"> <span class="keyword">else</span> s2.out_stu(); </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"> student stu[<span class="number">2</span>];</span><br><span class="line"> stu[<span class="number">0</span>].get_stu();</span><br><span class="line"> stu[<span class="number">1</span>].get_stu();</span><br><span class="line"> <span class="comment">//使用友元函数 </span></span><br><span class="line"> max_stu(stu[<span class="number">0</span>],stu[<span class="number">1</span>]); </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>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2021/03/26/算法练习/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</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://yoursite.com/2021/03/25/面向对象/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/2.jpg">
<meta itemprop="name" content="银狐">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="welcome">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2021/03/25/面向对象/" 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="创建时间:2021-03-25 23:43:02" itemprop="dateCreated datePublished" datetime="2021-03-25T23:43:02+08:00">2021-03-25</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="修改时间:2021-03-28 16:57:58" itemprop="dateModified" datetime="2021-03-28T16:57:58+08:00">2021-03-28</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h1 id="c-基本知识"><a href="#c-基本知识" class="headerlink" title="c++基本知识"></a>c++基本知识</h1><h2 id="c-对c的增强主要表现在两个方面"><a href="#c-对c的增强主要表现在两个方面" class="headerlink" title="c++对c的增强主要表现在两个方面"></a>c++对c的增强主要表现在两个方面</h2><ul>
<li>在原来面向过程的机制基础上,对c语言的功能做了不少补充。</li>
<li>增加了面向对象的机制。<h2 id="c-的四大特性:抽象、封装、继承和多态"><a href="#c-的四大特性:抽象、封装、继承和多态" class="headerlink" title="c++的四大特性:抽象、封装、继承和多态"></a>c++的四大特性:抽象、封装、继承和多态</h2></li>
<li>抽象的作用是表现同一类事物的本质。类是对象的抽象,对象是类的特例,或者说类的具体表现。</li>
<li>封装主要表现在两个方面:<br>(1)将有关数据和操作代码封装在一个对象中形成一个基本单位,各个对象间相互独立,互不干扰。<br>(2)将对象的某些部分进行隐蔽,即隐蔽其内部细节,只留下部分接口,以便与外界联系,接收外界信息。</li>
<li>继承:在一个已有类的基础上建立一个新的类,该新类获得已有类的已有特征。</li>
<li>多态:对同一信息,不同对象会产生不同的响应。
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2021/03/25/面向对象/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</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://yoursite.com/2021/01/14/c-链表相加/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/2.jpg">
<meta itemprop="name" content="银狐">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="welcome">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2021/01/14/c-链表相加/" class="post-title-link" itemprop="url">c- 链表相加</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="创建时间:2021-01-14 15:42:15" itemprop="dateCreated datePublished" datetime="2021-01-14T15:42:15+08:00">2021-01-14</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="修改时间:2021-03-26 01:01:30" itemprop="dateModified" datetime="2021-03-26T01:01:30+08:00">2021-03-26</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>leetcode题目</p>
<p>给你两个 非空 的链表,表示两个非负的整数。它们每位数字都是按照 逆序 的方式存储的,并且每个节点只能存储 一位 数字。</p>
<p>请你将两个数相加,并以相同形式返回一个表示和的链表。</p>
<p>你可以假设除了数字 0 之外,这两个数都不会以 0 开头。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2021/01/14/c-链表相加/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</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://yoursite.com/2021/01/14/c-unodered-set/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/2.jpg">
<meta itemprop="name" content="银狐">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="welcome">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2021/01/14/c-unodered-set/" class="post-title-link" itemprop="url">c++ unodered_set</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="创建时间:2021-01-14 15:07:36" itemprop="dateCreated datePublished" datetime="2021-01-14T15:07:36+08:00">2021-01-14</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="修改时间:2021-03-26 01:01:34" itemprop="dateModified" datetime="2021-03-26T01:01:34+08:00">2021-03-26</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>c++的哈希集合(unodered_set)</p>
<p>定义</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></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"><span class="comment">//定义</span></span><br><span class="line"><span class="built_in">unordered_set</span><<span class="keyword">int</span>> c1;</span><br><span class="line"></span><br><span class="line"><span class="comment">//operator=</span></span><br><span class="line"><span class="built_in">unordered_set</span><<span class="keyword">int</span>> c2;</span><br><span class="line">c2 = c1;</span><br></pre></td></tr></table></figure>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2021/01/14/c-unodered-set/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</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://yoursite.com/2020/05/01/在mysql-workbench中手动添加表/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/2.jpg">
<meta itemprop="name" content="银狐">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="welcome">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/05/01/在mysql-workbench中手动添加表/" class="post-title-link" itemprop="url">在mysql workbench中手动添加表</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-05-01 14:32:40" itemprop="dateCreated datePublished" datetime="2020-05-01T14:32:40+08:00">2020-05-01</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="修改时间:2021-03-26 01:04:45" itemprop="dateModified" datetime="2021-03-26T01:04:45+08:00">2021-03-26</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<ol>
<li>双击打开sql notifier
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2020/05/01/在mysql-workbench中手动添加表/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</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://yoursite.com/2020/05/01/mysql的基本应用/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/2.jpg">
<meta itemprop="name" content="银狐">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="welcome">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/05/01/mysql的基本应用/" class="post-title-link" itemprop="url">mysql的基本应用</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-05-01 10:57:56" itemprop="dateCreated datePublished" datetime="2020-05-01T10:57:56+08:00">2020-05-01</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="修改时间:2021-03-26 01:05:49" itemprop="dateModified" datetime="2021-03-26T01:05:49+08:00">2021-03-26</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<ol>
<li><p>创建数据库<br>命令: create database <数据库名></p>
</li>
<li><p>显示数据库<br>命令: show databases</p>
</li>
<li><p>删除数据库<br>命令: drop database <数据苦命></p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2020/05/01/mysql的基本应用/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<nav class="pagination">
<span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><span class="space">…</span><a class="page-number" href="/page/9/">9</a><a class="extend next" rel="next" href="/page/2/"><i class="fa fa-angle-right" aria-label="下一页"></i></a>
</nav>
</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">
<img class="site-author-image" itemprop="image" alt="银狐"
src="/images/2.jpg">
<p class="site-author-name" itemprop="name">银狐</p>
<div class="site-description" itemprop="description"></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">89</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">16</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">21</span>
<span class="site-state-item-name">标签</span></a>
</div>
</nav>
</div>
</div>
</div>
</aside>
<div id="sidebar-dimmer"></div>
</div>
</main>
<footer class="footer">
<div class="footer-inner">
<div class="copyright">