-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1111 lines (703 loc) · 40.5 KB
/
index.html
File metadata and controls
1111 lines (703 loc) · 40.5 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
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">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 5.4.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/guochaosonghe.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/guochaosonghe.png">
<link rel="mask-icon" href="/images/logo.svg" color="#222">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.0.0/css/all.min.css" integrity="sha256-jTIdiMuX/e3DGJUGwl3pKSxuc6YOuqtJYkM0bGQESA4=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">
<script class="next-config" data-name="main" type="application/json">{"hostname":"qxpblog.github.io","root":"/","images":"/images","scheme":"Pisces","darkmode":false,"version":"8.10.1","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":false,"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果:${query}","hits_time":"找到 ${hits} 个搜索结果(用时 ${time} 毫秒)","hits":"找到 ${hits} 个搜索结果"}}</script><script src="/js/config.js"></script>
<meta name="description" content="银鞍照白马,飒沓如流星">
<meta property="og:type" content="website">
<meta property="og:title" content="清风未曾染秋心の博客">
<meta property="og:url" content="https://qxpblog.github.io/index.html">
<meta property="og:site_name" content="清风未曾染秋心の博客">
<meta property="og:description" content="银鞍照白马,飒沓如流星">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="qxp">
<meta name="twitter:card" content="summary">
<link rel="canonical" href="https://qxpblog.github.io/">
<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":true,"isPost":false,"lang":"zh-CN","comments":"","permalink":"","path":"index.html","title":""}</script>
<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>清风未曾染秋心の博客</title>
<noscript>
<link rel="stylesheet" href="/css/noscript.css">
</noscript>
</head>
<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
<div class="headband"></div>
<main class="main">
<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="切换导航栏" role="button">
<span class="toggle-line"></span>
<span class="toggle-line"></span>
<span class="toggle-line"></span>
</div>
</div>
<div class="site-meta">
<a href="/" class="brand" rel="start">
<i class="logo-line"></i>
<h1 class="site-title">清风未曾染秋心の博客</h1>
<i class="logo-line"></i>
</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 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">7</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">0</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">12</span></a></li>
</ul>
</nav>
</div>
<div class="toggle sidebar-toggle" role="button">
<span class="toggle-line"></span>
<span class="toggle-line"></span>
<span class="toggle-line"></span>
</div>
<aside class="sidebar">
<div class="sidebar-inner sidebar-overview-active">
<ul class="sidebar-nav">
<li class="sidebar-nav-toc">
文章目录
</li>
<li class="sidebar-nav-overview">
站点概览
</li>
</ul>
<div class="sidebar-panel-container">
<!--noindex-->
<div class="post-toc-wrap sidebar-panel">
</div>
<!--/noindex-->
<div class="site-overview-wrap sidebar-panel">
<div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
<img class="site-author-image" itemprop="image" alt="qxp"
src="/images/author.jpg">
<p class="site-author-name" itemprop="name">qxp</p>
<div class="site-description" itemprop="description">银鞍照白马,飒沓如流星</div>
</div>
<div class="site-state-wrap site-overview-item animated">
<nav class="site-state">
<div class="site-state-item site-state-posts">
<a href="/archives/">
<span class="site-state-item-count">12</span>
<span class="site-state-item-name">日志</span>
</a>
</div>
<div class="site-state-item site-state-tags">
<span class="site-state-item-count">7</span>
<span class="site-state-item-name">标签</span>
</div>
</nav>
</div>
</div>
</div>
</div>
</aside>
<div class="sidebar-dimmer"></div>
</header>
<div class="back-to-top" role="button" aria-label="返回顶部">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>
<noscript>
<div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>
<div class="main-inner index posts-expand">
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://qxpblog.github.io/2022/08/18/%E4%BD%8D%E8%BF%90%E7%AE%97/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/author.jpg">
<meta itemprop="name" content="qxp">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="清风未曾染秋心の博客">
<meta itemprop="description" content="银鞍照白马,飒沓如流星">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="undefined | 清风未曾染秋心の博客">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2022/08/18/%E4%BD%8D%E8%BF%90%E7%AE%97/" class="post-title-link" itemprop="url">位运算</a>
</h2>
<div class="post-meta-container">
<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="创建时间:2022-08-18 08:14:31 / 修改时间:08:19:32" itemprop="dateCreated datePublished" datetime="2022-08-18T08:14:31+08:00">2022-08-18</time>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<pre><code>异或运算(⊕)性质:
1. 任何数和 0 做异或运算,结果仍然是原来的数,即a⊕0=a;
2. 任何数和其自身做异或运算,结果是 0,即 a⊕a=0。
3. 异或运算满足交换律和结合律,即a⊕b⊕a=b⊕a⊕a=b⊕(a⊕a)=b⊕0=b。
</code></pre>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://qxpblog.github.io/2022/08/16/%E5%8A%A8%E6%80%81%E8%A7%84%E5%88%92%EF%BC%88DP%E4%BA%94%E9%83%A8%E6%9B%B2%EF%BC%89/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/author.jpg">
<meta itemprop="name" content="qxp">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="清风未曾染秋心の博客">
<meta itemprop="description" content="银鞍照白马,飒沓如流星">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="undefined | 清风未曾染秋心の博客">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2022/08/16/%E5%8A%A8%E6%80%81%E8%A7%84%E5%88%92%EF%BC%88DP%E4%BA%94%E9%83%A8%E6%9B%B2%EF%BC%89/" class="post-title-link" itemprop="url">动态规划(DP五部曲)</a>
</h2>
<div class="post-meta-container">
<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="创建时间:2022-08-16 08:18:08 / 修改时间:08:19:18" itemprop="dateCreated datePublished" datetime="2022-08-16T08:18:08+08:00">2022-08-16</time>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<pre><code>1.确定dp数组(dp table)以及下标的含义
2.确定递推公式
3.dp数组如何初始化
4.确定遍历顺序
5.举例推导dp数组
</code></pre>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://qxpblog.github.io/2022/04/26/%E4%BE%A0%E5%AE%A2%E8%A1%8C/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/author.jpg">
<meta itemprop="name" content="qxp">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="清风未曾染秋心の博客">
<meta itemprop="description" content="银鞍照白马,飒沓如流星">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="undefined | 清风未曾染秋心の博客">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2022/04/26/%E4%BE%A0%E5%AE%A2%E8%A1%8C/" class="post-title-link" itemprop="url">侠客行</a>
</h2>
<div class="post-meta-container">
<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="创建时间:2022-04-26 19:35:27 / 修改时间:19:38:14" itemprop="dateCreated datePublished" datetime="2022-04-26T19:35:27+08:00">2022-04-26</time>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<pre><code>侠客行
赵客缦胡缨,吴钩霜雪明。
银鞍照白马,飒沓如流星。
十步杀一人,千里不留行。
事了拂衣去,深藏身与名。
闲过信陵饮,脱剑膝前横。
将炙啖朱亥,持觞劝侯嬴。
三杯吐然诺,五岳倒为轻。
眼花耳热后,意气素霓生。
救赵挥金槌,邯郸先震惊。
千秋二壮士,烜赫大梁城。
纵死侠骨香,不惭世上英。
谁能书阁下,白首太玄经。
</code></pre>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://qxpblog.github.io/2022/04/20/C%E8%AF%AD%E8%A8%80%E5%A6%82%E4%BD%95%E5%AE%9E%E7%8E%B0%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1%E7%BC%96%E7%A8%8B/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/author.jpg">
<meta itemprop="name" content="qxp">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="清风未曾染秋心の博客">
<meta itemprop="description" content="银鞍照白马,飒沓如流星">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="undefined | 清风未曾染秋心の博客">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2022/04/20/C%E8%AF%AD%E8%A8%80%E5%A6%82%E4%BD%95%E5%AE%9E%E7%8E%B0%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1%E7%BC%96%E7%A8%8B/" class="post-title-link" itemprop="url">C语言如何实现面向对象编程</a>
</h2>
<div class="post-meta-container">
<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="创建时间:2022-04-20 14:40:54 / 修改时间:14:44:47" itemprop="dateCreated datePublished" datetime="2022-04-20T14:40:54+08:00">2022-04-20</time>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>C语言本身并不支持类似于Java或C++那种面向对象的语法,但是C语言其实可以实现面向对象,只不过相对而言比较麻烦。</p>
<p>C语言实现面向对象的三大特性</p>
<p>1.多态</p>
<p>无论是C89还是C99都是不支持函数重载的,但是可以换一种方式间接实现重载。</p>
<p>在定义一个需要考虑多态的类的方法的时候,考虑将该方法的接口作为公用,所有类都可以访问,但是将方法的具体实现作为参数传入该接口,也就是回调函数(recall function)。下面是一段示例代码</p>
<p>第一种方法:使用函数指针实现同名调用</p>
<pre><code>struct ClassA {
int member;
int (*method)(int);
}
struct ClassB {
float member;
float (*method)(float);
}
// 考虑方法的访问限制,最好是把类定义在不同文件中,在不同
// 类中分别实现方法,并用static实现访问限制
static int ClassA_method(int);
static float ClassB_method(float);
int main(void) {
ClassA a;
CLassB b;
a.method = &ClassA_method; // 这一条赋值语句其实可以包装在构造函数中
b.method = &ClassB_method;
printf("%d, %f\n", a.method(1), b.method(1.1));
return 0;
}
static int ClassA_method(int a) {return a;}
static float ClassB_method(float a) {return a;}
</code></pre>
<p>还有一种更为通用的实现多态的方法是将不同类对于同一个接口的实现作为参数,当作回调函数传给接口</p>
<p>2.封装</p>
<p>方法的实现由类定义完成,为其他模块提供标准接口。</p>
<p>3.继承</p>
<p>子类的定义可以包含一个父类成员变量。继承的方法可以通过将子类方法的函数指针成员变量指向父类方法的函数指针<br> // 通过访问父类成员变量来获取函数指针<br> struct ClassA {<br> int member;<br> void (*method)(int);<br> };<br> struct ClassB {<br> struct ClassA;<br> float member;<br> }<br> // 将方法打包在<br> struct ClassA {<br> int member;<br> void *p<br> };<br> struct ClassB {<br> struct ClassA;<br> float member;<br> }</p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://qxpblog.github.io/2022/04/12/Java%E7%9B%B8%E5%85%B3%E7%9F%A5%E8%AF%86/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/author.jpg">
<meta itemprop="name" content="qxp">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="清风未曾染秋心の博客">
<meta itemprop="description" content="银鞍照白马,飒沓如流星">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="undefined | 清风未曾染秋心の博客">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2022/04/12/Java%E7%9B%B8%E5%85%B3%E7%9F%A5%E8%AF%86/" class="post-title-link" itemprop="url">Java相关知识</a>
</h2>
<div class="post-meta-container">
<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="创建时间:2022-04-12 21:04:27 / 修改时间:22:45:21" itemprop="dateCreated datePublished" datetime="2022-04-12T21:04:27+08:00">2022-04-12</time>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>一.Java发展历史:</p>
<p>1.1991 年Sun公司的James Gosling等人开始开发名称为 Oak 的语言。希望开发一种能够在各种消费性电子产品(如机顶盒、冰箱、收音机等)上运行的程序架构;</p>
<p>2.1994年将Oak语言更名为Java;</p>
<p>3.从1995年发布1.0版本开始,到目前为止,最新的Java版本是2022.3 月发布的Java 18</p>
<p>二.Java特性:</p>
<p>1.面向对象、跨平台性(可移植性)、垃圾自动回收机制</p>
<p>2.三大基本特性:封装、继承、多态。Java 是面向对象的高级编程语言,类和对象是 Java 程序的构成核心。围绕着 Java 类和 Java 对象,有三大基本特性:封装是 Java 类的编写规范、继承是类与类之间联系的一种形式、而多态为系统组件或模块之间解耦提供了解决方案。</p>
<p>三.c语言面向对象程序设计:</p>
<p>1.对象=属性+行为。C语言虽然没有类,可结构体好说啊,只不过C语言的结构体里面不能直接定义函数。实际上,结构体里面可以定义函数指针来解决这个问题.取自<a target="_blank" rel="noopener" href="https://blog.csdn.net/">https://blog.csdn.net</a></p>
<p>2.C语言是典型的面向过程的结构化程序设计语言,本身就不支持面向对象编程。结构体与类相似,但是不能定义函数。</p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://qxpblog.github.io/2022/04/12/%E6%95%B0%E6%8D%AE%E5%BA%93%E4%B8%8E%E4%BA%91%E8%AE%A1%E7%AE%97%E7%9A%84%E5%85%B3%E7%B3%BB/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/author.jpg">
<meta itemprop="name" content="qxp">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="清风未曾染秋心の博客">
<meta itemprop="description" content="银鞍照白马,飒沓如流星">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="undefined | 清风未曾染秋心の博客">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2022/04/12/%E6%95%B0%E6%8D%AE%E5%BA%93%E4%B8%8E%E4%BA%91%E8%AE%A1%E7%AE%97%E7%9A%84%E5%85%B3%E7%B3%BB/" class="post-title-link" itemprop="url">数据库与云计算的关系</a>
</h2>
<div class="post-meta-container">
<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="创建时间:2022-04-12 17:47:23 / 修改时间:20:03:34" itemprop="dateCreated datePublished" datetime="2022-04-12T17:47:23+08:00">2022-04-12</time>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>一.云计算:</p>
<p>云计算(cloud computing)是分布式计算的一种,指的是通过网络“云”将巨大的数据计算处理程序分解成无数个小程序,然后,通过多部服务器组成的系统进行处理和分析这些小程序得到结果并返回给用户。用户按所需服务来付费.</p>
<p>二.云计算与数据库的关系:</p>
<p>1.由于云计算本身的特性,天生就面临大数据处理(存储、计算等)问题</p>
<p>2.大数据的特点就是数据量大,数据应用需求大,计算量大.大数据首先所面临的问题就是大数据的存储问题。</p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://qxpblog.github.io/2022/04/12/%E6%95%B0%E6%8D%AE%E5%BA%93%E7%9B%B8%E5%85%B3%E7%9F%A5%E8%AF%86/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/author.jpg">
<meta itemprop="name" content="qxp">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="清风未曾染秋心の博客">
<meta itemprop="description" content="银鞍照白马,飒沓如流星">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="undefined | 清风未曾染秋心の博客">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2022/04/12/%E6%95%B0%E6%8D%AE%E5%BA%93%E7%9B%B8%E5%85%B3%E7%9F%A5%E8%AF%86/" class="post-title-link" itemprop="url">数据库相关知识</a>
</h2>
<div class="post-meta-container">
<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="创建时间:2022-04-12 17:39:24 / 修改时间:17:46:58" itemprop="dateCreated datePublished" datetime="2022-04-12T17:39:24+08:00">2022-04-12</time>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p> 一、相关概念</p>
<ol>
<li><p>Data:数据,是数据库中存储的基本对象,是描述事物的符号记录。</p>
</li>
<li><p>Database:数据库,是长期储存在计算机内、有组织的、可共享的大量数据的集合。</p>
</li>
<li><p>DBMS:数据库管理系统,是位于用户与操作系统之间的一层数据管理软件,用于科学地组织、存储和管理数据、高效地获取和维护数据。</p>
</li>
<li><p>DBS:数据库系统,指在计算机系统中引入数据库后的系统,一般由数据库、数据库管理系统、应用系统、数据库管理员(DBA)构成。</p>
</li>
<li><p>数据模型:是用来抽象、表示和处理现实世界中的数据和信息的工具,是对现实世界的模拟,是数据库系统的核心和基础;其组成元素有数据结构、数据操作和完整性约束。</p>
</li>
<li><p>概念模型:也称信息模型,是按用户的观点来对数据和信息建模,主要用于数据库设计。</p>
</li>
<li><p>逻辑模型:是按计算机系统的观点对数据建模,用于DBMS实现。</p>
</li>
<li><p>物理模型:是对数据最底层的抽象,描述数据在系统内部的表示方式和存取方法,在磁盘或磁带上的存储方式和存取方法,是面向计算机系统的。</p>
</li>
<li><p>实体和属性:客观存在并可相互区别的事物称为实体。实体所具有的某一特性称为属性。</p>
</li>
<li><p>.E-R图:即实体-关系图,用于描述现实世界的事物及其相互关系,是数据库概念模型设计的主要工具。</p>
</li>
<li><p>关系模式:从用户观点看,关系模式是由一组关系组成,每个关系的数据结构是一张规范化的二维表。</p>
</li>
<li><p>型/值:型是对某一类数据的结构和属性的说明;值是型的一个具体赋值,是型的实例。</p>
</li>
<li><p>数据库模式:是对数据库中全体数据的逻辑结构(数据项的名字、类型、取值范围等)和特征(数据之间的联系以及数据有关的安全性、完整性要求)的描述。</p>
</li>
<li><p>数据库的三级系统结构:外模式、模式和内模式。</p>
</li>
<li><p>数据库内模式:又称为存储模式,是对数据库物理结构和存储方式的描述,是数据在数据库内部的表示方式。一个数据库只有一个内模式。</p>
</li>
<li><p>数据库外模式:又称为子模式或用户模式,它是数据库用户能够看见和使用的局部数据的逻辑结构和特征的描述,是数据库用户的数据视图。通常是模式的子集。一个数据库可有多个外模式。</p>
</li>
<li><p>数据库的二级映像:外模式/模式映像、模式/内模式映像。</p>
</li>
<li><p>SQL:结构化查询语言的简称, 是关系数据库的标准语言。SQL 是一种通用的、 功能极强的关系数据库语言, 是对关系数据存取的标准接口, 也是不同数据库系统之间互操作的基础。集数据查询、数据操作、数据定义、和数据控制功能于一体。</p>
</li>
<li><p>数据定义:数据定义功能包括模式定义、表定义、视图和索引的定义。</p>
</li>
<li><p>嵌套查询:指将一个查询块嵌套在另一个查询块的 WHERE 子句或 HAVING 短语的条件中的查询。</p>
</li>
</ol>
<p>二、重点知识点</p>
<ol>
<li><p>数据库系统由数据库、数据库管理系统、应用系统和数据库管理员构成。</p>
</li>
<li><p>数据模型的组成要素是:数据结构、数据操作、完整性约束条件。</p>
</li>
<li><p>实体型之间的联系分为一对一、一对多和多对多三种类型。</p>
</li>
<li><p>常见的数据模型包括:关系、层次、网状、面向对象、对象关系映射等几种。</p>
</li>
<li><p>关系模型的完整性约束包括:实体完整性、参照完整性和用户定义完整性。</p>
</li>
<li><p>阐述数据库三级模式、二级映象的含义及作用。<br>数据库三级模式反映的是数据的三个抽象层次: 模式是对数据库中全体数据的逻辑结构和特征的描述。内模式又称为存储模式,是对数据库物理结构和存储方式的描述。外模式又称为子模式或用户模式,是对特定数据库用户相关的局部数据的逻辑结构和特征的描述。<br>数据库三级模式通过二级映象在 DBMS 内部实现这三个抽象层次的联系和转换。外模式面向应用程序, 通过外模式/模式映象与逻辑模式建立联系, 实现数据的逻辑独立性。 模式/内模式映象建立模式与内模式之间的一对一映射, 实现数据的物理独立性。</p>
</li>
<li><p>关系数据库语言分为关系代数、关系演算和结构化查询语言三大类。</p>
</li>
<li><p>关系的 5 种基本操作是选择、投影、并、差、笛卡尔积。</p>
</li>
<li><p>SQL 数据定义语句的操作对象有:模式、表、视图和索引。</p>
</li>
<li><p>SQL 数据定义语句的命令动词是:CREATE、DROP 和 ALTER。</p>
</li>
<li><p>RDBMS 中索引一般采用 B+树或 HASH 来实现。</p>
</li>
<li><p>索引可以分为唯一索引、非唯一索引和聚簇索引三种类型。</p>
</li>
</ol>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://qxpblog.github.io/2022/03/31/%E6%95%B0%E6%8D%AE%E5%BA%93%E7%9A%84%E6%84%8F%E4%B9%89/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/author.jpg">
<meta itemprop="name" content="qxp">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="清风未曾染秋心の博客">
<meta itemprop="description" content="银鞍照白马,飒沓如流星">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="undefined | 清风未曾染秋心の博客">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2022/03/31/%E6%95%B0%E6%8D%AE%E5%BA%93%E7%9A%84%E6%84%8F%E4%B9%89/" class="post-title-link" itemprop="url">数据库的意义</a>
</h2>
<div class="post-meta-container">
<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="创建时间:2022-03-31 16:42:13 / 修改时间:16:43:09" itemprop="dateCreated datePublished" datetime="2022-03-31T16:42:13+08:00">2022-03-31</time>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>为什么要使用数据库?</p>
<ol>
<li>数据库可以结构化存储大量的数据信息,方便用户进行有效的检索和访问。</li>
</ol>
<p>数据库可以对数据进行分类保存,并且能够提供快速的查询。例如,我们平时使用百度搜索内容时,百度也是基于数据库和数据分类技术来达到快速搜索的目的。</p>
<ol start="2">
<li>数据库可以有效地保持数据信息的一致性、完整性、降低数据冗余。</li>
</ol>
<p>可以很好地保证数据有效、不被破坏,而且数据库自身有避免重复数据的功能,以此来降低数据的冗余。</p>
<ol start="3">
<li>数据库可以满足应用的共享和安全方面的要求,把数据放在数据库中在很多情况下也是出于安全的考虑。</li>
</ol>
<p>例如,如果把所有员工信息和工资数据都放在磁盘文件上,则工资的保密性就无从谈起。如果把员工信息和工资数据放在数据库中,就可以只允许查询和修改员工信息,而工资信息只允许指定人(如财务人员)查看,从而保证数据的安全性。</p>
<ol start="4">
<li>数据库技术能够方便智能化地分析,产生新的有用信息。</li>
</ol>
<p>例如,超市中把物品销售信息保存在数据库中,每个月销售情况的排名决定了下半月的进货数量。数据库查询的结果实际上产生了新的数据信息。</p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://qxpblog.github.io/2022/03/27/%E5%86%9C%E6%B0%91%E4%BC%AF%E4%BC%AF%E7%A7%8D%E8%8F%9C%E9%97%AE%E9%A2%98/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/author.jpg">
<meta itemprop="name" content="qxp">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="清风未曾染秋心の博客">
<meta itemprop="description" content="银鞍照白马,飒沓如流星">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="undefined | 清风未曾染秋心の博客">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2022/03/27/%E5%86%9C%E6%B0%91%E4%BC%AF%E4%BC%AF%E7%A7%8D%E8%8F%9C%E9%97%AE%E9%A2%98/" class="post-title-link" itemprop="url">农民伯伯种菜问题</a>
</h2>
<div class="post-meta-container">
<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="创建时间:2022-03-27 12:27:54 / 修改时间:13:39:44" itemprop="dateCreated datePublished" datetime="2022-03-27T12:27:54+08:00">2022-03-27</time>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<pre><code>问题:
农民伯伯种菜非常辛苦,一种蔬菜一年可能一次收成或者两次收成,可是人们天天都要吃饭,但是人对食 物的需求是低量长期的,而作物的收获是大量但缓慢的。聪明的你想到哪几种方法来解决这个问题呢?
问题分析及思考:
(1)将各种蔬菜按照其习性、适宜种植时期等进行分类。
(2)将一年划分成不同的时期,在每个时期里种植相应适宜种植的蔬菜,这样一年之中每个时间段都可以收获蔬菜,保证了供需平衡。
</code></pre>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://qxpblog.github.io/2022/03/27/%E8%8B%B9%E6%9E%9C%E5%88%86%E5%A0%86/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/author.jpg">
<meta itemprop="name" content="qxp">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="清风未曾染秋心の博客">
<meta itemprop="description" content="银鞍照白马,飒沓如流星">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">