-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.xml
More file actions
4682 lines (4671 loc) · 624 KB
/
search.xml
File metadata and controls
4682 lines (4671 loc) · 624 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
<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title>Markdown + Latex test</title>
<url>/posts/91ac7065.html</url>
<content><![CDATA[<h1 id="Latex测试"><a href="#Latex测试" class="headerlink" title="Latex测试"></a>Latex测试</h1><script type="math/tex; mode=display">x^y=(1+{\rm e}^x)^{-2xy}</script><script type="math/tex; mode=display">sqrt(9)</script><script type="math/tex; mode=display">c^{2} = a^{2} + b^{2}</script><p>$ c^{2} = a^{2} + b^{2} $<br><a id="more"></a></p>
<script type="math/tex; mode=display">\displaystyle \int_{}^{}</script><script type="math/tex; mode=display">\begin{flushleft}
积分`\int_{}^{}`:
$$ \int_{-\infty}^{+\infty} f(x) \mathrm{d}x</script><p>双重积分<code>\iint</code>:<script type="math/tex">\iint_{-\infty}^{+\infty} f(x,y) \mathrm{d}x \mathrm{d}y</script><br>行内积分:$\int<em>{-\infty}^{+\infty} f(x) \mathrm{d}x$<br>行内积分limits模式`\int\limits</em>{}^{}<code>:$\int\limits_{-\infty}^{+\infty} f(x) \mathrm{d}x$
行内积分display模式</code>\displaystyle \int<em>{}^{}`:$\displaystyle \int</em>{-\infty}^{+\infty} f(x) \mathrm{d}x$</p>
<h4 id=""><a href="#" class="headerlink" title=" "></a> </h4><p><strong>这是加粗的文字</strong><br><em>这是倾斜的文字</em>`<br><strong><em>这是斜体加粗的文字</em></strong><br><del>这是加删除线的文字</del></p>
<hr>
<hr>
<hr>
<hr>
<h1 id="Markdown中Latex常用语法"><a href="#Markdown中Latex常用语法" class="headerlink" title="Markdown中Latex常用语法"></a>Markdown中Latex常用语法</h1><h2 id="常用希腊字母表"><a href="#常用希腊字母表" class="headerlink" title="常用希腊字母表"></a>常用希腊字母表</h2><div class="table-container">
<table>
<thead>
<tr>
<th>Name</th>
<th style="text-align:center">Display</th>
<th>Capital Case</th>
<th style="text-align:center">Display</th>
<th>Var Case</th>
<th style="text-align:center">Display</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>\alpha</code></td>
<td style="text-align:center">$\alpha$</td>
<td></td>
<td style="text-align:center"></td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\beta</code></td>
<td style="text-align:center">$\beta$</td>
<td></td>
<td style="text-align:center"></td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\gamma</code></td>
<td style="text-align:center">$\gamma$</td>
<td><code>\Gamma</code></td>
<td style="text-align:center">$\Gamma$</td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\theta</code></td>
<td style="text-align:center">$\theta$</td>
<td><code>\Theta</code></td>
<td style="text-align:center">$\Theta$</td>
<td><code>\vartheta</code></td>
<td style="text-align:center">$\vartheta$</td>
</tr>
<tr>
<td><code>\mu</code></td>
<td style="text-align:center">$\mu$</td>
<td></td>
<td style="text-align:center"></td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\delta</code></td>
<td style="text-align:center">$\delta$</td>
<td><code>\Delta</code></td>
<td style="text-align:center">$\Delta$</td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\epsilon</code></td>
<td style="text-align:center">$\epsilon$</td>
<td></td>
<td style="text-align:center"></td>
<td><code>\varepsilon</code></td>
<td style="text-align:center">$\varepsilon$</td>
</tr>
<tr>
<td><code>\sigma</code></td>
<td style="text-align:center">$\sigma$</td>
<td><code>\Sigma</code></td>
<td style="text-align:center">$\Sigma$</td>
<td><code>\varsigma</code></td>
<td style="text-align:center">$\varsigma$</td>
</tr>
<tr>
<td><code>\pi</code></td>
<td style="text-align:center">$\pi$</td>
<td><code>\Pi</code></td>
<td style="text-align:center">$\Pi$</td>
<td><code>\varpi</code></td>
<td style="text-align:center">$\varpi$</td>
</tr>
<tr>
<td><code>\omega</code></td>
<td style="text-align:center">$\omega$</td>
<td><code>\Omega</code></td>
<td style="text-align:center">$\Omega$</td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\xi</code></td>
<td style="text-align:center">$\xi$</td>
<td><code>\Xi</code></td>
<td style="text-align:center">$\Xi$</td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\zeta</code></td>
<td style="text-align:center">$\zeta$</td>
<td></td>
<td style="text-align:center"></td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\chi</code></td>
<td style="text-align:center">$\chi$</td>
<td></td>
<td style="text-align:center"></td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\rho</code></td>
<td style="text-align:center">$\rho$</td>
<td></td>
<td style="text-align:center"></td>
<td><code>\varrho</code></td>
<td style="text-align:center">$\varrho$</td>
</tr>
<tr>
<td><code>\phi</code></td>
<td style="text-align:center">$\phi$</td>
<td><code>\Phi</code></td>
<td style="text-align:center">$\Phi$</td>
<td><code>\varphi</code></td>
<td style="text-align:center">$\varphi$</td>
</tr>
<tr>
<td><code>\eta</code></td>
<td style="text-align:center">$\eta$</td>
<td></td>
<td style="text-align:center"></td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\lambda</code></td>
<td style="text-align:center">$\lambda$</td>
<td><code>\Lambda</code></td>
<td style="text-align:center">$\Lambda$</td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\kappa</code></td>
<td style="text-align:center">$\kappa$</td>
<td></td>
<td style="text-align:center"></td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\nu</code></td>
<td style="text-align:center">$\nu$</td>
<td></td>
<td style="text-align:center"></td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\upsilon</code></td>
<td style="text-align:center">$\upsilon$</td>
<td><code>\Upsilon</code></td>
<td style="text-align:center">$\Upsilon$</td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\psi</code></td>
<td style="text-align:center">$\psi$</td>
<td><code>\Psi</code></td>
<td style="text-align:center">$\Psi$</td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\tau</code></td>
<td style="text-align:center">$\tau$</td>
<td></td>
<td style="text-align:center"></td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>\iota</code></td>
<td style="text-align:center">$\iota$</td>
<td></td>
<td style="text-align:center"></td>
<td></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td><code>o</code></td>
<td style="text-align:center">$o$</td>
<td></td>
<td style="text-align:center"></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<h2 id="常用特殊字符表"><a href="#常用特殊字符表" class="headerlink" title="常用特殊字符表"></a>常用特殊字符表</h2><div class="table-container">
<table>
<thead>
<tr>
<th>Name</th>
<th style="text-align:center">Display</th>
<th>Name</th>
<th style="text-align:center">Display</th>
<th>Name</th>
<th style="text-align:center">Display</th>
<th>Name</th>
<th style="text-align:center">Display</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>\times</code></td>
<td style="text-align:center">$\times$</td>
<td><code>\div</code></td>
<td style="text-align:center">$\div$</td>
<td><code>\pm</code></td>
<td style="text-align:center">$\pm$</td>
<td><code>\mp</code></td>
<td style="text-align:center">$\mp$</td>
</tr>
<tr>
<td><code>\otimes</code></td>
<td style="text-align:center">$\otimes$</td>
<td><code>\ominus</code></td>
<td style="text-align:center">$\ominus$</td>
<td><code>\oplus</code></td>
<td style="text-align:center">$\oplus$</td>
<td><code>\odot</code></td>
<td style="text-align:center">$\odot$</td>
</tr>
<tr>
<td><code>\oslash</code></td>
<td style="text-align:center">$\oslash$</td>
<td><code>\triangleq</code></td>
<td style="text-align:center">$\triangleq$</td>
<td><code>\ne</code></td>
<td style="text-align:center">$\ne$</td>
<td><code>\equiv</code></td>
<td style="text-align:center">$\equiv$</td>
</tr>
<tr>
<td><code>\lt</code></td>
<td style="text-align:center">$\lt$</td>
<td><code>\gt</code></td>
<td style="text-align:center">$\gt$</td>
<td><code>\le</code></td>
<td style="text-align:center">$\le$</td>
<td><code>\ge</code></td>
<td style="text-align:center">$\ge$</td>
</tr>
<tr>
<td><code>\cup</code></td>
<td style="text-align:center">$\cup$</td>
<td><code>\cap</code></td>
<td style="text-align:center">$\cap$</td>
<td><code>\Cup</code></td>
<td style="text-align:center">$\Cup$</td>
<td><code>\Cap</code></td>
<td style="text-align:center">$\Cap$</td>
</tr>
<tr>
<td><code>\bigcup</code></td>
<td style="text-align:center">$\bigcup$</td>
<td><code>\bigcap</code></td>
<td style="text-align:center">$\bigcap$</td>
<td><code>\ast</code></td>
<td style="text-align:center">$\ast$</td>
<td><code>\star</code></td>
<td style="text-align:center">$\star$</td>
</tr>
<tr>
<td><code>\bigotimes</code></td>
<td style="text-align:center">$\bigotimes$</td>
<td><code>\bigoplus</code></td>
<td style="text-align:center">$\bigoplus$</td>
<td><code>\circ</code></td>
<td style="text-align:center">$\circ$</td>
<td><code>\bullet</code></td>
<td style="text-align:center">$\bullet$</td>
</tr>
<tr>
<td><code>\bigcirc</code></td>
<td style="text-align:center">$\bigcirc$</td>
<td><code>\amalg</code></td>
<td style="text-align:center">$\amalg$</td>
<td><code>\to</code></td>
<td style="text-align:center">$\to$</td>
<td><code>\infty</code></td>
<td style="text-align:center">$\infty$</td>
</tr>
<tr>
<td><code>\vee</code></td>
<td style="text-align:center">$\vee$</td>
<td><code>\wedge</code></td>
<td style="text-align:center">$\wedge$</td>
<td><code>\lhd</code></td>
<td style="text-align:center">$\lhd$</td>
<td><code>\rhd</code></td>
<td style="text-align:center">$\rhd$</td>
</tr>
<tr>
<td><code>\bigvee</code></td>
<td style="text-align:center">$\bigvee$</td>
<td><code>\bigwedge</code></td>
<td style="text-align:center">$\bigwedge$</td>
<td><code>\unlhd</code></td>
<td style="text-align:center">$\unlhd$</td>
<td><code>\unrhd</code></td>
<td style="text-align:center">$\unrhd$</td>
</tr>
<tr>
<td><code>\sqcap</code></td>
<td style="text-align:center">$\sqcap$</td>
<td><code>\sqcup</code></td>
<td style="text-align:center">$\sqcup$</td>
<td><code>\prec</code></td>
<td style="text-align:center">$\prec$</td>
<td><code>\succ</code></td>
<td style="text-align:center">$\succ$</td>
</tr>
<tr>
<td><code>\subset</code></td>
<td style="text-align:center">$\subset$</td>
<td><code>\supset</code></td>
<td style="text-align:center">$\supset$</td>
<td><code>\sim</code></td>
<td style="text-align:center">$\sim$</td>
<td><code>\approx</code></td>
<td style="text-align:center">$\approx$</td>
</tr>
<tr>
<td><code>\subseteq</code></td>
<td style="text-align:center">$\subseteq$</td>
<td><code>\supseteq</code></td>
<td style="text-align:center">$\supseteq$</td>
<td><code>\cong</code></td>
<td style="text-align:center">$\cong$</td>
<td><code>\doteq</code></td>
<td style="text-align:center">$\doteq$</td>
</tr>
<tr>
<td><code>\setminus</code></td>
<td style="text-align:center">$\setminus$</td>
<td><code>\mid</code></td>
<td style="text-align:center">$\mid$</td>
<td><code>\ll</code></td>
<td style="text-align:center">$\ll$</td>
<td><code>\gg</code></td>
<td style="text-align:center">$\gg$</td>
</tr>
<tr>
<td><code>\parallel</code></td>
<td style="text-align:center">$\parallel$</td>
<td><code>\Join</code></td>
<td style="text-align:center">$\Join$</td>
<td><code>\in</code></td>
<td style="text-align:center">$\in$</td>
<td><code>\notin</code></td>
<td style="text-align:center">$\notin$</td>
</tr>
<tr>
<td><code>\propto</code></td>
<td style="text-align:center">$\propto$</td>
<td><code>\neg</code></td>
<td style="text-align:center">$\neg$</td>
<td><code>\ldots</code></td>
<td style="text-align:center">$\ldots$</td>
<td><code>\cdots</code></td>
<td style="text-align:center">$\cdots$</td>
</tr>
<tr>
<td><code>\forall</code></td>
<td style="text-align:center">$\forall$</td>
<td><code>\exists</code></td>
<td style="text-align:center">$\exists$</td>
<td><code>\vdots</code></td>
<td style="text-align:center">$\vdots$</td>
<td><code>\ddots</code></td>
<td style="text-align:center">$\ddots$</td>
</tr>
<tr>
<td><code>\aleph</code></td>
<td style="text-align:center">$\aleph$</td>
<td><code>\nabla</code></td>
<td style="text-align:center">$\nabla$</td>
<td><code>\imath</code></td>
<td style="text-align:center">$\imath$</td>
<td><code>\jmath</code></td>
<td style="text-align:center">$\jmath$</td>
</tr>
<tr>
<td><code>\ell</code></td>
<td style="text-align:center">$\ell$</td>
<td><code>\partial</code></td>
<td style="text-align:center">$\partial$</td>
<td><code>\int</code></td>
<td style="text-align:center">$\int$</td>
<td><code>\oint</code></td>
<td style="text-align:center">$\oint$</td>
</tr>
<tr>
<td><code>\uplus</code></td>
<td style="text-align:center">$\uplus$</td>
<td><code>\biguplus</code></td>
<td style="text-align:center">$\biguplus$</td>
<td></td>
<td style="text-align:center"></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<h3 id="其他"><a href="#其他" class="headerlink" title="其他"></a>其他</h3><div class="table-container">
<table>
<thead>
<tr>
<th>Name</th>
<th style="text-align:center">Display</th>
<th>Name</th>
<th style="text-align:center">Display</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>\triangleleft</code></td>
<td style="text-align:center">$\triangleleft$</td>
<td><code>\triangleright</code></td>
<td style="text-align:center">$\triangleright$</td>
</tr>
<tr>
<td><code>\bigtriangleup</code></td>
<td style="text-align:center">$\bigtriangleup$</td>
<td><code>\bigtriangledown</code></td>
<td style="text-align:center">$\bigtriangledown$</td>
</tr>
<tr>
<td><code>\uparrow</code></td>
<td style="text-align:center">$\uparrow$</td>
<td><code>\downarrow</code></td>
<td style="text-align:center">$\downarrow$</td>
</tr>
<tr>
<td><code>\leftarrow</code></td>
<td style="text-align:center">$\leftarrow$</td>
<td><code>\rightarrow</code></td>
<td style="text-align:center">$\rightarrow$</td>
</tr>
<tr>
<td><code>\Leftarrow</code></td>
<td style="text-align:center">$\Leftarrow$</td>
<td><code>\Rightarrow</code></td>
<td style="text-align:center">$\Rightarrow$</td>
</tr>
<tr>
<td><code>\longleftarrow</code></td>
<td style="text-align:center">$\longleftarrow$</td>
<td><code>\longrightarrow</code></td>
<td style="text-align:center">$\longrightarrow$</td>
</tr>
<tr>
<td><code>\Longleftarrow</code></td>
<td style="text-align:center">$\Longleftarrow$</td>
<td><code>\Longrightarrow</code></td>
<td style="text-align:center">$\Longrightarrow$</td>
</tr>
<tr>
<td><code>\leftrightarrow</code></td>
<td style="text-align:center">$\leftrightarrow$</td>
<td><code>\longleftrightarrow</code></td>
<td style="text-align:center">$\longleftrightarrow$</td>
</tr>
<tr>
<td><code>\Leftrightarrow</code></td>
<td style="text-align:center">$\Leftrightarrow$</td>
<td><code>\Longleftrightarrow</code></td>
<td style="text-align:center">$\Longleftrightarrow$</td>
</tr>
<tr>
<td><code>\leftharpoonup</code></td>
<td style="text-align:center">$\leftharpoonup$</td>
<td><code>\rightharpoonup</code></td>
<td style="text-align:center">$\rightharpoonup$</td>
</tr>
<tr>
<td><code>\leftharpoondown</code></td>
<td style="text-align:center">$\leftharpoondown$</td>
<td><code>\rightharpoondown</code></td>
<td style="text-align:center">$\rightharpoondown$</td>
</tr>
<tr>
<td><code>\rightleftharpoons</code></td>
<td style="text-align:center">$\rightleftharpoons$</td>
<td><code>\S</code></td>
<td style="text-align:center">$\S$</td>
</tr>
<tr>
<td><code>\nwarrow</code></td>
<td style="text-align:center">$\nwarrow$</td>
<td><code>\nearrow</code></td>
<td style="text-align:center">$\nearrow$</td>
</tr>
<tr>
<td><code>\swarrow</code></td>
<td style="text-align:center">$\swarrow$</td>
<td><code>\searrow</code></td>
<td style="text-align:center">$\searrow$</td>
</tr>
<tr>
<td><code>\triangle</code></td>
<td style="text-align:center">$\triangle$</td>
<td><code>\box</code></td>
<td style="text-align:center">$\Box$</td>
</tr>
<tr>
<td><code>\diamond</code></td>
<td style="text-align:center">$\diamond$</td>
<td><code>\diamondsuit</code></td>
<td style="text-align:center">$\diamondsuit$</td>
</tr>
<tr>
<td><code>\heartsuit</code></td>
<td style="text-align:center">$\heartsuit$</td>
<td><code>\clubsuit</code></td>
<td style="text-align:center">$\clubsuit$</td>
</tr>
<tr>
<td><code>\spadesuit</code></td>
<td style="text-align:center">$\spadesuit$</td>
<td></td>
</tr>
</tbody>
</table>
</div>
<h2 id="公式语法"><a href="#公式语法" class="headerlink" title="公式语法"></a>公式语法</h2><ul>
<li>上下标<code>_ ^ , _{}^{}</code>:<script type="math/tex; mode=display">y = x_i^{a_1^2}</script></li>
<li>公式中插入文本<code>\mbox{}</code>:<script type="math/tex; mode=display">y = x^2 \; \mbox{(二次函数)}</script></li>
<li><p>公式中插入空格<code>\, \; \quad \qquad</code>间隔依次变宽:</p>
<script type="math/tex; mode=display">ab $$ $$ a\,b $$ $$ a\;b $$ $$ a\quad b $$ $$ a\qquad b</script></li>
<li><p>字母上方横线<code>\overline{}, \bar{}</code>:</p>
<script type="math/tex; mode=display">\overline{xyz} \mbox{ 或 } \bar{x}</script></li>
<li>字母下方横线<code>\underline{}</code>:<script type="math/tex; mode=display">\underline{ABC}</script></li>
<li>字母上方波浪线<code>\tilde{}, \widetilde{}</code>:<script type="math/tex; mode=display">\tilde{A} \mbox{ 或 } \widetilde{ABC}</script></li>
<li>字母上方尖号^<code>\hat{}, \widehat{}</code>:<script type="math/tex; mode=display">\hat{A} \mbox{ 或 } \widehat{ABC}</script></li>
<li>字母上方箭头<code>\vec{}, \overleftarrow{}, \overrightarrow{}</code>:<script type="math/tex; mode=display">\vec{ab} \mbox{ 或 } \overleftarrow{ab} \mbox{ 或 } \overrightarrow{ab}</script></li>
<li>字母上方花括号<code>\overbrace{}</code>,或下方花括号<code>\underbrace{}</code>:<script type="math/tex; mode=display">\overbrace{1+2+3} \mbox{ 或 } \underbrace{1+2+3}</script></li>
<li>字母上方点号<code>\dot{}, \ddot{}</code>:<script type="math/tex; mode=display">\dot{a} \mbox{ 或 } \ddot{a}</script></li>
<li><p>省略号<code>\dots, \cdots</code></p>
<script type="math/tex; mode=display">1,2,\dots \qquad 1,2,\cdots</script></li>
<li><p>积分<code>\int_{}^{}</code>:</p>
<script type="math/tex; mode=display">\int_{-\infty}^{+\infty} f(x) \mathrm{d}x</script><p> 双重积分<code>\iint</code>:<script type="math/tex">\iint_{-\infty}^{+\infty} f(x,y) \mathrm{d}x \mathrm{d}y</script><br> 行内积分:$\int<em>{-\infty}^{+\infty} f(x) \mathrm{d}x$<br> 行内积分limits模式`\int\limits</em>{}^{}<code>:$\int\limits_{-\infty}^{+\infty} f(x) \mathrm{d}x$
行内积分display模式</code>\displaystyle \int<em>{}^{}`:$\displaystyle \int</em>{-\infty}^{+\infty} f(x) \mathrm{d}x$</p>
<p> 圆圈积分<code>\oint</code>:<script type="math/tex">\oint_{-\infty}^{+\infty}</script></p>
</li>
<li><p>求和<code>\sum_{}^{}</code>:</p>
<script type="math/tex; mode=display">\sum_{i=1}^{n} i^2</script><p> 行内求和:$\sum<em>{i=1}^{n} i^2$<br> 行内求和limits模式`\sum\limits</em>{}^{}<code>:$\sum\limits_{i=1}^{n} i^2$
行内求和display模式</code>\displaystyle \sum<em>{}^{}`:$\displaystyle \sum</em>{i=1}^{n} i^2$</p>
</li>
<li><p>求乘积<code>\prod_{}^{}</code>:</p>
<script type="math/tex; mode=display">\prod_{i=1}^{n} a_i</script></li>
<li><p>分数<code>\frac{up}{down}</code>:</p>
<script type="math/tex; mode=display">x_1,x_2 = \frac{b^2 \pm 4ac}{2a}</script></li>
<li><p>根号<code>\sqrt</code>:</p>
<script type="math/tex; mode=display">r = \sqrt{x^2+y^2}</script><p> 多次根号<code>\sqrt[n]</code>: <script type="math/tex">x^{2/3} = \sqrt[3]{x^2}</script></p>
</li>
</ul>
<h2 id="编号"><a href="#编号" class="headerlink" title="编号"></a>编号</h2><ul>
<li><p>插入编号:<br> 使用<code>\tag</code>指令指定公式的具体编号,并使用<code>\label</code>指令埋下锚点。如<code>y=x^2 \tag{1.5a} \label{eq:test}</code>:</p>
<script type="math/tex; mode=display">y=x^2 \tag{1.5a}\label{eq:test}</script></li>
<li><p>引用编号:<br> 使用<code>\eqref</code>指令引用前面埋下的锚点,<code>\eqref{eq:test}</code>将显示为:</p>
<script type="math/tex; mode=display">\eqref{eq:test}</script></li>
</ul>
<h2 id="方程组"><a href="#方程组" class="headerlink" title="方程组"></a>方程组</h2><ul>
<li><p>左侧花括号</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">\begin{equation}</span><br><span class="line">% \begin{equation*} 加'*'去掉公式编号</span><br><span class="line">\left\{</span><br><span class="line">\begin{aligned} %请使用'aligned'或'align*'</span><br><span class="line">2x + y &= 1 \\ %加'&'指定对齐位置</span><br><span class="line">2x + 2y &= 2</span><br><span class="line">\end{aligned}</span><br><span class="line">\right.</span><br><span class="line">\end{equation}</span><br><span class="line">% \end{equation*} 加'*'去掉公式编号</span><br><span class="line"></span><br><span class="line">% 注意:在 markdown 环境下,某些特殊字符,如'\', '*'等,会首先被 markdown 语法转义,然后再被 Latex 转义。</span><br><span class="line">% 因此有时候 '\{'需要写作'\\{','*'需要写作'\*','\\'需要写作'\\\\'等,视不同的解释环境而定</span><br></pre></td></tr></table></figure>
<script type="math/tex; mode=display">\begin{equation}
\left\\{
\begin{aligned}
2x + y &= 1 \\\\
2x + 2y &= 2
\end{aligned}
\right.
\end{equation}</script><p> <strong>注</strong>:如果各个方程需要在某个字符处对齐(如等号对齐),只需在所有要对齐的字符前加上 <code>&</code> 符号。如果不需要公式编号,只需在宏包名称后加上 <code>*</code> 号。</p>
</li>
</ul>
<ul>
<li><p>分情况讨论方程式</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">f(x) =</span><br><span class="line">\begin{cases}</span><br><span class="line">x^2 \qquad & a \gt 0 \\</span><br><span class="line">e^x \qquad & a \le 0</span><br><span class="line">\end{cases}</span><br></pre></td></tr></table></figure>
<script type="math/tex; mode=display">f(x) = \begin{cases}
x^2 \qquad & a \gt 0 \\\\
e^x \qquad & a \le 0
\end{cases}</script><script type="math/tex; mode=display">\begin{aligned}
a &= 1 \\\\
bcd &= 2
\end{aligned}</script></li>
</ul>
]]></content>
</entry>
<entry>
<title>TED收藏夹 | 视频</title>
<url>/posts/ed5b5e99.html</url>
<content><![CDATA[<hr>
<p><a href="https://www.bilibili.com/video/av8075494?from=search&seid=16957981070641973847" target="_blank" rel="noopener external nofollow noreferrer">理解世界的秘诀:数学</a></p>
<a id="more"></a>
<p>跟着罗杰・安东森(Roger Antonsen)一起,通过最具想象力的艺术形式——数学,揭秘世界的奥秘和内部运转本质。他向我们解释,细微的角度变化能帮我们理解模式、数字和公式,并指引我们通向与人共鸣和理解万物的大门。</p>
<hr>
<p>为什么要学习编程? 每人都应该学习编程</p>
<p><a href="https://v.youku.com/v_show/id_XNTIxMDc1OTcy.html" target="_blank" rel="noopener external nofollow noreferrer">https://v.youku.com/v_show/id_XNTIxMDc1OTcy.html</a></p>
<p>为什么屏幕剥夺了我们的快乐?</p>
<p><a href="https://www.bilibili.com/video/av925224433/" target="_blank" rel="noopener external nofollow noreferrer">https://www.bilibili.com/video/av925224433/</a></p>
<p>有抱负的程序员应看的10个TED演讲<br><a href="https://www.open-open.com/news/view/1435010" target="_blank" rel="noopener external nofollow noreferrer">https://www.open-open.com/news/view/1435010</a></p>
]]></content>
<categories>
<category>TED</category>
</categories>
<tags>
<tag>TED</tag>
</tags>
</entry>
<entry>
<title>ActivitypubProject</title>
<url>/posts/activitypubproject.html</url>
<content><![CDATA[<h1 id="Intro-介绍"><a href="#Intro-介绍" class="headerlink" title="Intro 介绍"></a>Intro 介绍</h1><p>ActivitypubProject 项目招人(具体项目在介绍之后)</p>
<p>一些相关介绍</p>
<a id="more"></a>
<h2 id="Mastodon-长毛象"><a href="#Mastodon-长毛象" class="headerlink" title="Mastodon 长毛象"></a>Mastodon 长毛象</h2><p><a href="https://mastodon.social/" target="_blank" rel="noopener external nofollow noreferrer">Mastodon</a> <strong>长毛象</strong>(开源去中心化的社交平台):<br>Mastodon 是一个免费的开源社交网络程序,一个商业平台的替代方案,避免了单个公司垄断你沟通的风险。选择你信任的服务器,无论选择的是哪个,你都可以与其他人进行互动。任何人都可以运行自己的 Mastodon 实例,并无缝地参与到社交网络中。</p>
<blockquote>
<p>如果你没有使用过 mastodon 等软件,强烈建议你使用一番。</p>
</blockquote>
<p>它是当前推特最好的替代品,好到连推特都感到有压力。推特曾经<a href="https://www.nytimes.com/2022/12/18/business/twitter-ban-social-media-competitors-mastodon.html" target="_blank" rel="noopener external nofollow noreferrer">修改用户使用协议</a>,禁止用户在其平台上推广 Mastodon 等竞争对手,但迫于大面积的用户反对而取消。</p>
<p><strong>去中心化</strong>的好处是即使有人做恶,那也不会影响到整个系统。去中心化使得整个系统保持了最大程度的健壮性。也就是说,我们每个人发言的权利通过去中心化技术得到了保障。</p>
<blockquote>
<p>我们已然失去了最初的互联网精神。——Tim Berners-Lee</p>
</blockquote>
<h2 id="ActivityPub-协议"><a href="#ActivityPub-协议" class="headerlink" title="ActivityPub 协议"></a>ActivityPub 协议</h2><p>Mastodon 的核心是 <a href="https://www.w3.org/TR/activitypub/" target="_blank" rel="noopener external nofollow noreferrer">ActivityPub 协议</a>,Mastodon 就是通过支持 ActivityPub 协议来实现去中心化的。而 ActivityPub 协议早在 Mastodon 之前就存在了,目前已由 <a href="https://www.w3.org/" target="_blank" rel="noopener external nofollow noreferrer">W3C</a> 将制定并发布为标准。</p>
<p><strong>ActivityPub 协议的神奇之处在于,只要是实现了这个协议的服务都可以相互交互,所以其他 ActivityPub 服务可以和 Mastodon 进行交互,也就是说你不用 Mastodon 就可以看 Mastodon 上的帖子以及关注 Mastodon 上的账户。</strong></p>
<p>这就引出 <a href="https://en.wikipedia.org/wiki/Fediverse" target="_blank" rel="noopener external nofollow noreferrer">Fediverse</a> 的概念,Mastodon 就是诞生于这样的概念之下的。Fediverse 是由 “federation” 和 “universe” 组合而成的新词,意思是“联邦宇宙”。</p>
<blockquote>
<p>关于 Fediverse 更详细的解释,请看 <a href="https://wzyboy.im/post/1486.html#:~:text=Fediverse%20%E6%98%AF%20federation,%2B%20universe%20%E7%9A%84%E9%80%A0%E8%AF%8D%EF%BC%8C%E4%B8%80%E8%88%AC%E8%AF%91%E4%B8%BA%E8%81%94%E9%82%A6%E5%AE%87%E5%AE%99%EF%BC%8C%E5%8D%B3%E6%98%AF%E7%94%B1%E5%90%84%E7%A7%8D%E7%A4%BE%E4%BA%A4%E7%BD%91%E7%BB%9C%E7%AB%99%E7%82%B9%E7%BB%84%E6%88%90%E7%9A%84%E4%B8%80%E4%B8%AA%E5%85%81%E8%AE%B8%E4%B8%8D%E5%90%8C%E7%AB%99%E7%82%B9%E4%B8%8A%E7%9A%84%E7%94%A8%E6%88%B7%E4%B9%8B%E9%97%B4%E4%BA%92%E7%9B%B8%E4%BA%A4%E6%B5%81%E7%9A%84%E8%81%94%E9%82%A6%E3%80%82" target="_blank" rel="noopener external nofollow noreferrer">Fediverse 联邦宇宙</a></p>
</blockquote>
<p>联邦宇宙这个社交网络不同于主流平台(脸书、推特、Instagram、Pinterest 等)。主流平台会把上亿的用户集中在同一个网站里,然后他们就可以完全掌控决策权,监控用户,强迫内容审查,把用户的数据用于每一个可能的商业利益。<strong>而联邦宇宙的目标则是去中心化和高度用户自治。</strong></p>
<p>Fediverse 是一个宏伟的概念,Mastodon 只是联邦宇宙这个中的一个小成员,还有很多符合 ActivityPub 协议的平台都可以被纳入其中,比如说 <a href="https://pleroma.social/" target="_blank" rel="noopener external nofollow noreferrer">Pleroma</a>、<a href="https://misskey-hub.net/en/" target="_blank" rel="noopener external nofollow noreferrer">Misskey</a>、<a href="https://gotosocial.org/" target="_blank" rel="noopener external nofollow noreferrer">GoToSocial</a>、<a href="https://friendi.ca/" target="_blank" rel="noopener external nofollow noreferrer">Friendica</a>、<a href="https://funkwhale.audio/" target="_blank" rel="noopener external nofollow noreferrer">Funkwhale</a>、<a href="https://joinpeertube.org/" target="_blank" rel="noopener external nofollow noreferrer">PeerTube</a>、<a href="https://joinbookwyrm.com/" target="_blank" rel="noopener external nofollow noreferrer">BookWyrm</a> 等等。</p>
<p>基于 ActivityPub 协议的服务都是可以相互交互的,所以在这个联邦宇宙中的所有软件都是互通的,比如说,你可以在 Mastodon 这样的微博客平台直接欣赏 Funkwhale 上的音乐,也可以在 Misskey 里直接观看 PeerTube 上的视频,也可以在 Pleroma 上阅读 BookWyrm 里别人的阅读笔记和书评……这就好比一下子打通了 Facebook、Twitter、YouTube、Spotify、Blogger 和 GoodRead!</p>
<p><strong>这将会是一个万物互联,万物互通的宇宙!</strong></p>
<hr>
<p><em>请注意:</em></p>
<p><strong>本项目为爱发电(我们不提供酬劳),但根据 <a href="https://patreon.com/mastodon" target="_blank" rel="noopener external nofollow noreferrer">Patreon</a> 数据显示:目前有将近一万人在 <a href="https://patreon.com/mastodon" target="_blank" rel="noopener external nofollow noreferrer">Patreon</a> 上为 Mastodon 项目资助,每月有近 4 万美元。</strong></p>
<hr>
<h1 id="Project-项目"><a href="#Project-项目" class="headerlink" title="Project 项目"></a>Project 项目</h1><h2 id="Project-1-项目-1"><a href="#Project-1-项目-1" class="headerlink" title="Project 1 项目 1"></a>Project 1 项目 1</h2><p> ActivityPub 协议是公开的,用户也可以随意选择使用任何客户端来连接联邦宇宙,为此,我们想为各联邦软件提供客户端(包括 iOS 、Android、Web),如 PeerTube、Misskey、Funkwhale、BookWyrm 等。</p>
<p><strong>有人想问,既然这个没有酬劳,为什么还会有人愿意参加呢??</strong><br>是的,这是一个没有酬劳的项目,Mastodon 也是一样,我们参加的动力在于兴趣、对自由的信念以及对互联网的信仰。其实,为 Mastodon 工作的人,还有很多其他的因素,例如与志同道合的人交流、分享知识、拓展人际关系等等。 所以,即使没有酬劳,也有很多人会参与其中,因为它给他们带来了很多其他的价值。</p>
<p><strong>那么我可以获得什么呢?</strong><br>帮助增强自我能力和技能,团队合作和沟通能力,可能的捐赠收入,成功的自豪感、成就感!在这样的环境中,你可以不断学习和成长,从而提高自身价值,利于个人发展和成长。</p>
<blockquote>
<p>我总是深入思考,我希望别人也能想远一点。我为理想而工作,并从别人身上学习,我不喜欢拒人于外。我是个完美主义者,但我不会要求出版界也精益求精。除了教育和娱乐以外,我不会浪费时间在那些不会有影响的事情上。我不记恨他人,因为这于创造无益。但我从自身经历中学习,我想让世界变得更美好。</p>
<p>——Aaron Swartz</p>
</blockquote>
<h2 id="Project-2-项目-2"><a href="#Project-2-项目-2" class="headerlink" title="Project 2 项目 2"></a>Project 2 项目 2</h2><p>开发自动化工具,为广大的联邦节点主提供便捷的自动化工具,让节点主可以快速部署或卸载 ActivityPub 服务、备份和恢复数据、迁移、监控服务数据等。</p>
<p>在项目 1 成熟的情况下,这个会有利润,所以目前我们着力发展项目 1。</p>
<h1 id="We-need-我们需要"><a href="#We-need-我们需要" class="headerlink" title="We need 我们需要"></a>We need 我们需要</h1><ul>
<li>iOS 开发(Swift、Objective-C)</li>
<li>Web 开发(语言不限)</li>
<li>后端开发(语言不限)</li>
<li>Android 开发(语言不限)</li>
</ul>
<h1 id="We-hope-you-我们希望你"><a href="#We-hope-you-我们希望你" class="headerlink" title="We hope you 我们希望你"></a>We hope you 我们希望你</h1><p>别担心自己的能力,我们需要志同道合的朋友!</p>
<ul>
<li>阅读英文文档能力</li>
<li>保持好奇心</li>
<li>学习的激情</li>
<li>热爱开源</li>
</ul>
<blockquote>
<p>Success is not the key to happiness. Happiness is the key to success. If you love what you are doing, you will be successful. —— John Ruskin</p>
</blockquote>
<h1 id="Contact-联系"><a href="#Contact-联系" class="headerlink" title="Contact 联系"></a>Contact 联系</h1><p>如果你感兴趣,请联系 QQ:1750421753</p>
<p>期待与你合作~</p>
]]></content>
</entry>
<entry>
<title>2020上半年总结</title>
<url>/posts/2020-half-summary.html</url>
<content><![CDATA[<p>2020半年度总结</p>
<a id="more"></a>
<h1 id="上半年总结"><a href="#上半年总结" class="headerlink" title="上半年总结"></a>上半年总结</h1><p>2020是个不平凡的一年,也是具有历史性的一年。</p>
<p>疫情来的很突然,整个暑假和下学期都是在家里度过的,这个时期除了学习还是学习,也想了很多,比如应当有副业,有被动收入的;要有计划、规划;</p>
<p><del>当然,在此期间还遇到了一个非常重要的人,就是我女朋友啦😘,这一定是特别的缘分,才使得我们的相遇,希望我和她永不分离。</del></p>
<p>在这半年,我初步了解到理财和投资(虽然以前就知道,但一直没怎么了解),这个是需要长期学习的。推荐下香帅的北大金融学课程。</p>
<p>博客的建立也是在这个时期,对博客进行了一些优化。</p>
<p>阅读了:</p>
<ul>
<li>《小狗钱钱》</li>
</ul>
<p>正在看:</p>
<ul>
<li>《线性代数及其应用》</li>
</ul>
<p>看了电影和电视剧:</p>
<ul>
<li><p>遇见你之前</p>
</li>
<li><p>决胜21点</p>
</li>
<li><p>他是龙</p>
</li>
<li><p>隐秘的角落</p>
</li>
</ul>
<h1 id="计划"><a href="#计划" class="headerlink" title="计划"></a>计划</h1><p>养成读书的习惯,每学期都要读书</p>
<p>学习专业知识,提高专业素养。</p>
<p>其他兴趣技能的发展。</p>
<p>个人IP的打造。</p>
]]></content>
</entry>
<entry>
<title>6分钟教你选数学老师</title>
<url>/posts/chose-teacher.html</url>
<content><![CDATA[<h1 id="6分钟教你选数学老师"><a href="#6分钟教你选数学老师" class="headerlink" title="6分钟教你选数学老师"></a>6分钟教你选数学老师</h1><a id="more"></a>
<video id="video" controls="" preload="none" poster="http://om2bks7xs.bkt.clouddn.com/2017-08-26-Markdown-Advance-Video.jpg"> <source id="mp4" src="http://121.199.76.139/mt.mp4" type="video/mp4"> </video>
]]></content>
</entry>
<entry>
<title>二叉树的遍历</title>
<url>/posts/binarytree-traverse.html</url>
<content><![CDATA[<h1 id="后序遍历"><a href="#后序遍历" class="headerlink" title="后序遍历"></a>后序遍历</h1><p>后序遍历按照“左孩子-右孩子-根结点”的顺序进行访问。</p>
<h2 id="递归实现"><a href="#递归实现" class="headerlink" title="递归实现"></a>递归实现</h2><a id="more"></a>
<figure class="highlight c"><table><tr><td class="code"><pre><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">postOrder1</span><span class="params">(BinTree *root)</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>(root!=<span class="literal">NULL</span>)</span><br><span class="line"> {</span><br><span class="line"> postOrder1(root->lchild);</span><br><span class="line"> postOrder1(root->rchild);</span><br><span class="line"> <span class="built_in">cout</span><<root->data<<<span class="string">""</span>;</span><br><span class="line"> } </span><br><span class="line">}</span><br></pre></td></tr></table></figure>
<h2 id="迭代实现"><a href="#迭代实现" class="headerlink" title="迭代实现"></a>迭代实现</h2><p>第一种思路:对于任一结点P,将其入栈,然后沿其左子树一直往下搜索,直到搜索到没有左孩子的结点,此时该结点出现在栈顶,但是此时不能将其出栈并访问,因此其右孩子还为被访问。所以接下来按照相同的规则对其右子树进行相同的处理,当访问完其右孩子时,该结点又出现在栈顶,此时可以将其出栈并访问。这样就保证了正确的访问顺序。可以看出,在这个过程中,每个结点都两次出现在栈顶,只有在第二次出现在栈顶时,才能访问它。因此需要多设置一个变量标识该结点是否是第一次出现在栈顶。</p>
<figure class="highlight c"><table><tr><td class="code"><pre><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">postOrder2</span><span class="params">(BinTree *root)</span> <span class="comment">// postorder iteration</span></span></span><br><span class="line"><span class="function"></span>{</span><br><span class="line"> <span class="built_in">stack</span><BTNode*> s;</span><br><span class="line"> BinTree *p=root;</span><br><span class="line"> BTNode *temp;</span><br><span class="line"> <span class="keyword">while</span>(p!=<span class="literal">NULL</span>||!s.empty())</span><br><span class="line"> {</span><br><span class="line"> <span class="keyword">while</span>(p!=<span class="literal">NULL</span>) <span class="comment">//沿左子树一直往下搜索,直至出现没有左子树的结点 </span></span><br><span class="line"> {</span><br><span class="line"> BTNode *btn=(BTNode *)<span class="built_in">malloc</span>(<span class="keyword">sizeof</span>(BTNode));</span><br><span class="line"> btn->btnode=p;</span><br><span class="line"> btn->isFirst=<span class="literal">true</span>;</span><br><span class="line"> s.push(btn);</span><br><span class="line"> p=p->lchild;</span><br><span class="line"> }</span><br><span class="line"> <span class="keyword">if</span>(!s.empty())</span><br><span class="line"> {</span><br><span class="line"> temp=s.top();</span><br><span class="line"> s.pop();</span><br><span class="line"> <span class="keyword">if</span>(temp->isFirst==<span class="literal">true</span>) <span class="comment">//表示是第一次出现在栈顶 </span></span><br><span class="line"> {</span><br><span class="line"> temp->isFirst=<span class="literal">false</span>;</span><br><span class="line"> s.push(temp);</span><br><span class="line"> p=temp->btnode->rchild; </span><br><span class="line"> }</span><br><span class="line"> <span class="keyword">else</span><span class="comment">//第二次出现在栈顶 </span></span><br><span class="line"> {</span><br><span class="line"> <span class="built_in">cout</span><<temp->btnode->data<<<span class="string">" "</span>;</span><br><span class="line"> p=<span class="literal">NULL</span>;</span><br><span class="line"> }</span><br><span class="line"> }</span><br><span class="line"> } </span><br><span class="line">}</span><br></pre></td></tr></table></figure>
<p> 第二种思路:要保证根结点在左孩子和右孩子访问之后才能访问,因此对于任一结点P,先将其入栈。如果P不存在左孩子和右孩子,则可以直接访问它;或者P存在左孩子或者右孩子,但是其左孩子和右孩子都已被访问过了,则同样可以直接访问该结点。若非上述两种情况,则将P的右孩子和左孩子依次入栈,这样就保证了每次取栈顶元素的时候,左孩子在右孩子前面被访问,左孩子和右孩子都在根结点前面被访问。</p>
<figure class="highlight c"><table><tr><td class="code"><pre><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">postOrder3</span><span class="params">(BinTree *root)</span> <span class="comment">// postorder iteration</span></span></span><br><span class="line"><span class="function"></span>{</span><br><span class="line"> <span class="built_in">stack</span><BinTree*> s;</span><br><span class="line"> BinTree *cur; <span class="comment">//当前结点 </span></span><br><span class="line"> BinTree *pre=<span class="literal">NULL</span>; <span class="comment">//前一次访问的结点 </span></span><br><span class="line"> s.push(root);</span><br><span class="line"> <span class="keyword">while</span>(!s.empty())</span><br><span class="line"> {</span><br><span class="line"> cur=s.top();</span><br><span class="line"> <span class="keyword">if</span>((cur->lchild==<span class="literal">NULL</span>&&cur->rchild==<span class="literal">NULL</span>)||</span><br><span class="line"> (pre!=<span class="literal">NULL</span>&&(pre==cur->lchild||pre==cur->rchild)))</span><br><span class="line"> {</span><br><span class="line"> <span class="built_in">cout</span><<cur->data<<<span class="string">" "</span>; <span class="comment">//如果当前结点没有孩子结点或者孩子节点都已被访问过 </span></span><br><span class="line"> s.pop();</span><br><span class="line"> pre=cur; </span><br><span class="line"> }</span><br><span class="line"> <span class="keyword">else</span></span><br><span class="line"> {</span><br><span class="line"> <span class="keyword">if</span>(cur->rchild!=<span class="literal">NULL</span>)</span><br><span class="line"> s.push(cur->rchild);</span><br><span class="line"> <span class="keyword">if</span>(cur->lchild!=<span class="literal">NULL</span>) </span><br><span class="line"> s.push(cur->lchild);</span><br><span class="line"> }</span><br><span class="line"> } </span><br><span class="line">}</span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>Code</category>
</categories>
<tags>
<tag>C</tag>
</tags>
</entry>
<entry>
<title>Codeblocks 问题总结</title>
<url>/posts/codeblocks-skills.html</url>
<content><![CDATA[<h1 id="codeblocks-mingw实现静态编译"><a href="#codeblocks-mingw实现静态编译" class="headerlink" title="codeblocks+mingw实现静态编译"></a>codeblocks+mingw实现静态编译</h1><a id="more"></a>
<p>最直接的办法:在设置->编译器与调试器->连接器设置->其他链接器选项 里面加:-static</p>
]]></content>
<categories>
<category>Code</category>
</categories>
<tags>
<tag>codeblocks</tag>
</tags>
</entry>
<entry>
<title>C++学习</title>
<url>/posts/cpp-study.html</url>
<content><![CDATA[<p>记录c++的学习</p>
<a id="more"></a>
<h1 id="ios-sync-with-stdio-false-提高C-读写速度"><a href="#ios-sync-with-stdio-false-提高C-读写速度" class="headerlink" title="ios::sync_with_stdio(false)提高C++读写速度"></a>ios::sync_with_stdio(false)提高C++读写速度</h1><p>C++为了兼容C,默认使iostream与stdio关联,使cin与scanf、cout和printf保持同步,保证混用过程中文件指针不混乱。<br> 此方式会造成性能损失,导致使用cin/cout效率远远低于使用scanf/printf。若保证程序只是用一套指令,可取消同步:</p>
<figure class="highlight c++"><table><tr><td class="code"><pre><span class="line"><span class="built_in">std</span>::ios::sync_with_stdio(<span class="literal">false</span>);</span><br></pre></td></tr></table></figure>
<p>取消后使用cin/cout速度有明显提升,但注意不要混用iostream与stdio(玄学)</p>
<figure class="highlight c++"><table><tr><td class="code"><pre><span class="line"><span class="built_in">std</span>::<span class="built_in">cin</span>.tie(<span class="number">0</span>);</span><br></pre></td></tr></table></figure>
<blockquote>
<p>C++98:In terms of <em>static initialization order</em>, cin is guaranteed to be properly constructed and initialized no later than the first time an object of type <a href="http://www.cplusplus.com/ios_base::Init" target="_blank" rel="noopener external nofollow noreferrer">ios_base::Init</a> is constructed.</p>
<p>C++11:In terms of <em>static initialization order</em>, cin is guaranteed to be properly constructed and initialized no later than the first time an object of type <a href="http://www.cplusplus.com/ios_base::Init" target="_blank" rel="noopener external nofollow noreferrer">ios_base::Init</a> is constructed, with the inclusion of <a href="http://www.cplusplus.com/" target="_blank" rel="noopener external nofollow noreferrer"></a> counting as at least one initialization of such objects with <em>static duration</em>.</p>
<p>cin is <em><a href="http://www.cplusplus.com/ios::tie" target="_blank" rel="noopener external nofollow noreferrer">tied</a></em> to the standard output stream <a href="http://www.cplusplus.com/cout" target="_blank" rel="noopener external nofollow noreferrer">cout</a> (see <a href="http://www.cplusplus.com/ios::tie" target="_blank" rel="noopener external nofollow noreferrer">ios::tie</a>), which indicates that <a href="http://www.cplusplus.com/cout" target="_blank" rel="noopener external nofollow noreferrer">cout</a>‘s buffer is <em>flushed</em> (see <a href="http://www.cplusplus.com/ostream::flush" target="_blank" rel="noopener external nofollow noreferrer">ostream::flush</a>) before each i/o operation performed on cin.</p>
<p>(来源:<a href="http://www.cplusplus.com/reference/iostream/cin/" target="_blank" rel="noopener external nofollow noreferrer">http://www.cplusplus.com/reference/iostream/cin/</a> <a href="http://网址" target="_blank" rel="noopener external nofollow noreferrer">网址</a>)</p>
</blockquote>
<p>当传入参数为0时,实现cin与cout独立运行,不会等待,提高cin速度</p>
<p>全局域的通过静态常量初始化一个lambda的方式实现对此代码的优先调用</p>
<figure class="highlight c++"><table><tr><td class="code"><pre><span class="line"><span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> _ = []() {</span><br><span class="line"> ios::sync_with_stdio(<span class="literal">false</span>);<span class="comment">//ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);</span></span><br><span class="line"> <span class="built_in">cin</span>.tie(<span class="literal">nullptr</span>);</span><br><span class="line"> <span class="built_in">cout</span>.tie(<span class="literal">nullptr</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>
<p><strong>Ref</strong>:</p>
<p>原文:<a href="https://www.coologic.cn/2017/11/275/" target="_blank" rel="noopener external nofollow noreferrer">ios::sync_with_stdio(false)提高C++读写速度</a></p>
<h1 id="自定义sort函数中的比较函数"><a href="#自定义sort函数中的比较函数" class="headerlink" title="自定义sort函数中的比较函数"></a>自定义sort函数中的比较函数</h1><p>c++ sort的官方文档<br><a href="http://www.cplusplus.com/reference/algorithm/sort/" target="_blank" rel="noopener external nofollow noreferrer">http://www.cplusplus.com/reference/algorithm/sort/</a></p>
<p>可以看到comp的定义:comp函数返回一个bool类型的值,这个值表示了在严格弱排序中(可以理解为升序排序)第一参数是否位于第二个参数之前。<br> 也就是说如果comp返回true,则第一个参数小于第二个参数,sort根据compare的返回值将第一个参数排在第二个参数之前。<br> 如果comp返回false,则第一个参数大于第二个参数,sort根据compare的返回值将第一个参数排在第二个参数之后。</p>
<p> <strong>sort函数根据comp函数的返回值,对comp函数的两个参数排序。</strong><br> <strong>如果comp返回true,排序为“参数1”“参数2”,否则排序为“参数2”“参数1”。</strong> </p>
<p>例如降序排列,则return a>b;</p>
]]></content>
<categories>
<category>Code</category>
</categories>
<tags>
<tag>C++</tag>
<tag>Note</tag>
</tags>
</entry>
<entry>
<title>CTF基础 i春秋学习笔记</title>
<url>/posts/3495768f.html</url>
<content><![CDATA[<p>课程来源于i春秋 <a href="https://www.ichunqiu.com/course/63212" target="_blank" rel="noopener external nofollow noreferrer">https://www.ichunqiu.com/course/63212</a></p>
<h2 id="第一章-竞赛简介"><a href="#第一章-竞赛简介" class="headerlink" title="第一章 竞赛简介"></a>第一章 竞赛简介</h2><h3 id="1-二进制安全学习规划指南"><a href="#1-二进制安全学习规划指南" class="headerlink" title="1.二进制安全学习规划指南"></a>1.二进制安全学习规划指南</h3><p>核心基础课程-计算机的工作原理</p>
<ul>
<li>体系结构</li>
<li>编译原理</li>
<li>操作系统</li>
</ul>
<a id="more"></a>
<p>其他基础课程-系统软件开发基础</p>
<ul>
<li>编程语言</li>
<li>网络协议</li>
<li>数据结构与算法</li>
</ul>
<p>基础课程学习—体系结构</p>
<p>CPU的设计与实现</p>
<ul>
<li>机器指令与汇编语言</li>
<li>指令的解码、执行</li>
<li>内存管理</li>
</ul>
<p>CMU 18-447 Introduction to Computer Architecture</p>
<ul>
<li><a href="https://www.ece.cmu.edu/~ece447/s15/doku.php" target="_blank" rel="noopener external nofollow noreferrer">https://www.ece.cmu.edu/~ece447/s15/doku.php</a></li>
<li>Labs: Implement a MIPS CPU using Verilog</li>
</ul>
<p>编译原理的设计与实现</p>
<ul>
<li>自动机、词法分析、语法分析</li>
<li>运行时</li>
<li>程序静态分析</li>
</ul>
<p>Stanford CS143-Compilers</p>
<ul>
<li><a href="http://web.stanford.edu/class/cs143/" target="_blank" rel="noopener external nofollow noreferrer">http://web.stanford.edu/class/cs143/</a></li>
<li>PA: Compilers for Cool language</li>
</ul>
<p>基础课程学习—操作系统</p>
<p>操作系统的设计与实现</p>
<ul>
<li>系统的加载与引导</li>
<li>用户与内核态、系统调用、中断和驱动</li>
<li>进程与内存管理、文件系统</li>
<li>虚拟机</li>
</ul>
<p>MIT 6.828-Operating System Engineering</p>
<ul>
<li><a href="https://pdos.csail.mit.edu/6.828/2016/" target="_blank" rel="noopener external nofollow noreferrer">https://pdos.csail.mit.edu/6.828/2016/</a></li>
<li>Labs: Implement jos</li>
<li>Xv6, a simple Unix-like teaching operating system</li>
</ul>
<p>CTF历史资料库:<a href="https://github.com/ctfs" target="_blank" rel="noopener external nofollow noreferrer">https://github.com/ctfs</a></p>
<p>Wargames</p>
<ul>
<li><a href="https://pwnable.kr/" target="_blank" rel="noopener external nofollow noreferrer">https://pwnable.kr/</a></li>
<li><a href="https://smashthestack.org/" target="_blank" rel="noopener external nofollow noreferrer">https://smashthestack.org/</a></li>
</ul>
<p>漏洞挖掘与利用实战-目标</p>
<p>网络协议的实现</p>
<ul>
<li>http/SMB/DNS/SPnp-Server</li>
</ul>
<p>脚本列表</p>
<ul>
<li>javascript Engine</li>
<li>ActionScript Engine</li>
<li>PHP/Java Sandbox Escape</li>
</ul>
<p>内核</p>
<ul>
<li>Linux/Android</li>
<li>Freebsd</li>
<li>Apple ios</li>
<li>Sony PS4</li>
</ul>
<p>漏洞挖掘与利用实战-准备</p>
<p>学习历史漏洞-CVEs</p>
<p>挖掘新漏洞</p>
<ul>
<li>逆向分析+代码审计<ul>
<li>快速逆向与快速理解</li>
<li>对漏洞的感觉</li>
</ul>
</li>
<li>模糊测试<ul>
<li>测试框架</li>
<li>样例生成的想法</li>
</ul>
</li>
</ul>
<p>构建系统防护-研究与探索</p>
<p>漏洞自动挖掘技术</p>
<ul>
<li>静态程序分析</li>
<li>符号执行</li>
<li>机器学习?</li>
</ul>
<p>漏洞利用防护机制</p>
<ul>
<li>Intel SGX</li>
<li>控制流完整性(CFI)</li>
<li>拟态?</li>
</ul>
<h3 id="2-Web安全学习规划指南"><a href="#2-Web安全学习规划指南" class="headerlink" title="2.Web安全学习规划指南"></a>2.Web安全学习规划指南</h3><p>漏洞类型</p>
<p>注入类</p>
<ul>
<li>sql注入</li>
<li>xss</li>
<li>xxe</li>
<li>命令执行、命令注入</li>
<li>文件上传、文件下载</li>
</ul>
<p>信息泄露</p>
<ul>
<li>源码泄露</li>
<li>敏感信息接口</li>
<li>员工资料泄露</li>
<li>服务器信息泄露</li>
</ul>
<p>逻辑类</p>
<ul>
<li>权限绕过</li>
<li>条件竞争</li>
<li>数据篡改</li>
</ul>
<p>基础课程学习</p>
<p>核心基础课程-网站工作原理</p>
<ul>
<li>http协议<ul>
<li>http-header构成(request,response)</li>
<li>http-body构成(request,response)</li>
<li>http方法</li>
</ul>
</li>
<li>webserver<ul>
<li>webserver分类</li>
<li>webserver解析流程</li>
<li>webserver基础安全</li>
</ul>
</li>
</ul>
<p>其他基础课程-软件开发基础</p>
<ul>
<li>编程语言<ul>
<li>前端:html、js、css</li>
<li>后端、脚本语言:php、java、python</li>
</ul>
</li>
<li>数据库原理<ul>
<li>关系型数据库</li>
<li>非关系型数据库</li>
</ul>
</li>
</ul>
<p>漏洞挖掘与利用</p>
<p>准备</p>
<p>信息收集工具</p>
<ul>
<li>端口</li>
<li>子域名</li>
<li>代码泄露</li>
<li>员工字典</li>
</ul>
<p>数据包抓取修改重放工具</p>
<p>顺手的浏览器以及插件</p>
<p>vps,漏洞验证</p>
<p>挖掘</p>
<p>分析业务功能</p>
<p>分析web架构</p>
<p>针对罗列可能的漏洞类型</p>
<p>详细测试:不要放过任何一个数据包</p>
<p>利用举例</p>
<p>单一利用</p>
<ul>
<li>getshell</li>
<li>敏感信息接口</li>
</ul>