-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
1119 lines (991 loc) · 65.8 KB
/
index.html
File metadata and controls
1119 lines (991 loc) · 65.8 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="hexo-theme" content="https://github.com/xaoxuu/hexo-theme-stellar/tree/1.33.1" theme-name="Stellar" theme-version="1.33.1">
<link rel="canonical" href="https://log.cns.red/">
<meta name="generator" content="Hexo 7.1.1">
<meta http-equiv='x-dns-prefetch-control' content='on' />
<meta name="renderer" content="webkit">
<meta name="force-rendering" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="HandheldFriendly" content="True" >
<meta name="mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#000">
<meta name="theme-color" content="#f9fafb">
<title>钟意博客</title>
<meta name="description" content="钟意博客, 记录代码与生活. 这里记载着那个码农钟意的所有文章与游戏等艺术分享. 原钟意的博客, 柒拾柒雅舍, WebGary.">
<meta property="og:type" content="website">
<meta property="og:title" content="钟意博客">
<meta property="og:url" content="https://log.cns.red/">
<meta property="og:site_name" content="钟意博客">
<meta property="og:description" content="钟意博客, 记录代码与生活. 这里记载着那个码农钟意的所有文章与游戏等艺术分享. 原钟意的博客, 柒拾柒雅舍, WebGary.">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://log.cns.red/favicon.ico">
<meta property="article:author" content="钟意">
<meta property="article:tag" content="那个码农">
<meta property="article:tag" content="码农钟意">
<meta property="article:tag" content="钟意的博客">
<meta property="article:tag" content="钟意博客">
<meta property="article:tag" content="That Coder">
<meta property="article:tag" content="thatcoder">
<meta property="article:tag" content="源柒拾柒雅舍">
<meta property="article:tag" content="源WebGary">
<meta property="article:tag" content="giligili.work">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://log.cns.red/favicon.ico">
<meta name="keywords" content="那个码农,码农钟意,钟意的博客,钟意博客,That Coder,thatcoder,源柒拾柒雅舍,源WebGary,giligili.work">
<!-- feed -->
<link rel="alternate" href="/atom.xml" title="钟意博客" type="application/atom+xml">
<link rel="stylesheet" href="/css/main.css?v=1.33.1">
<link rel="shortcut icon" href="/favicon.ico">
<link rel="stylesheet" href="/custom/css/ZYCode.css">
<script type="application/ld+json">{"@context":"https://schema.org","@type":"Website","@id":"https://log.cns.red","author":{"@type":"Person","name":"钟意","sameAs":[],"image":"https://log.cns.red/favicon.ico"},"name":"钟意博客","description":"钟意博客, 记录代码与生活. 这里记载着那个码农钟意的所有文章与游戏等艺术分享. 原钟意的博客, 柒拾柒雅舍, WebGary.","url":"https://log.cns.red","keywords":["那个码农","码农钟意","钟意的博客","钟意博客","That Coder","thatcoder","源柒拾柒雅舍","源WebGary","giligili.work"]}</script>
<link rel="Shortcut Icon" href="/favicon.ico" type="image/x-icon" /><link rel='stylesheet' href='https://public.thatcdn.cn/font/old_song/result.css' /><link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.5.1/css/all.min.css"><link rel="stylesheet" href="/custom/css/ZYTimetmpl.css" /><meta itemprop="name" content="钟意博客"><meta itemprop="author" content="钟意"><meta itemprop="description" content="笔名钟意, 记录代码与生活."><meta name="sogou_site_verification" content="spLj7Zz5dI" /><meta itemprop="image" content="https://upyun.thatcdn.cn/hexo/stellar/image/shot.webp"><link rel="stylesheet" href="/custom/css/ZYGlobal.css"><link rel="stylesheet" href="/custom/css/ZYWaline.css"><link rel="stylesheet" href="/custom/css/ZYPage.css"><script type="text/javascript" src="/custom/js/header.js"></script><!-- Clarity tracking code for https://log.cns.red/ -->
<script> (function(c,l,a,r,i,t,y){ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i+"?ref=bwt"; y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); })(window, document, "clarity", "script", "fi1zg7i5q5");</script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-H6GM3XZWV7"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-H6GM3XZWV7');
</script>
<!-- BaiDu-ZhanZhang
<meta name="baidu-site-verification" content="codeva-8tnFVr706d" />
<!-- BaiDu-Tongji -->
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?233765a020502d5d6a92d4fe306d36c2";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body><div id="l_cover">
</div><div class="l_body index" id="start" layout="undefined" type="undefined" ><aside class="l_left"><div class="sidebg"></div><div class="leftbar-container">
<header class="header"><div class="logo-wrap"><a class="avatar" href="/about/"><div class="bg" style="opacity:0;background-image:url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/rainbow64@3x.webp);"></div><img no-lazy class="avatar" src="/favicon.ico" onerror="javascript:this.classList.add('error');this.src='https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/image/2659360.svg';"></a><a class="title" href="/"><div class="main">钟意博客</div><div class="sub normal cap">感谢你的阅读</div><div class="sub hover cap" style="opacity:0"> ThatCoder's Blog 钟意博客 那个码农</div></a></div></header>
<div class="nav-area">
<nav class="menu dis-select"><a class="nav-item active" title="博客" href="/"><span>博客</span></a><a class="nav-item" title="笔记" href="/wiki/"><span>笔记</span></a><a class="nav-item" title="便签" href="/notes/"><span>便签</span></a><a class="nav-item" title="社交" href="/links/"><span>社交</span></a></nav>
</div>
<div class="widgets">
<div class="search-wrapper" id="search-wrapper"><form class="search-form"><a class="search-button" onclick="document.getElementById("search-input").focus();"><svg t="1705074644177" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1560" width="200" height="200"><path d="M1008.839137 935.96571L792.364903 719.491476a56.783488 56.783488 0 0 0-80.152866 0 358.53545 358.53545 0 1 1 100.857314-335.166073 362.840335 362.840335 0 0 1-3.689902 170.145468 51.248635 51.248635 0 1 0 99.217358 26.444296 462.057693 462.057693 0 1 0-158.255785 242.303546l185.930047 185.725053a51.248635 51.248635 0 0 0 72.568068 0 51.248635 51.248635 0 0 0 0-72.978056z" p-id="1561"></path><path d="M616.479587 615.969233a50.428657 50.428657 0 0 0-61.498362-5.534852 174.655348 174.655348 0 0 1-177.525271 3.484907 49.403684 49.403684 0 0 0-58.833433 6.76482l-3.074918 2.869923a49.403684 49.403684 0 0 0 8.609771 78.10292 277.767601 277.767601 0 0 0 286.992355-5.739847 49.403684 49.403684 0 0 0 8.404776-76.667958z" p-id="1562"></path></svg></a><input type="text" class="search-input" id="search-input" placeholder="站内搜索"></form><div id="search-result"></div><div class="search-no-result">没有找到内容!</div></div>
<widget class="widget-wrapper markdown"><div class="widget-header dis-select"><span class="name">欢迎, 先生亦或是姑娘 <i class="fa-solid fa-square-rss fa-shake" onclick='window.location=window.location.protocol+"//"+location.host+"/atom.xml"'></i></span></div><div class="widget-body fs14"><p>这是一个成分复杂的破站,你将看到博主钟意的<del>诗与远方</del>(代码与苟且)</p>
</div></widget>
<widget class="widget-wrapper recent post-list"><div class="widget-header dis-select"><span class="name">最近更新</span></div><div class="widget-body fs14"><a class="item title" href="/stellar-1.18.5-to-latest/"><span class="title">Stellar 1.18.5 迁移到 latest</span></a><a class="item title" href="/%E9%82%AE%E7%AE%B1%E6%A8%A1%E6%9D%BF%E9%9B%86/"><span class="title">邮件样式模板集</span></a><a class="item title" href="/Stellar-Timeline-More/"><span class="title">Stellar 提高时间线适配范围</span></a><a class="item title" href="/OnlyOffice-Vue-Spring/"><span class="title">OnlyOffice集成到Vue与Spring项目</span></a><a class="item title" href="/Tencent-WxRead-Daily/"><span class="title">微信读书自动阅读</span></a><a class="item title" href="/Blog-Load-Balance/"><span class="title">博客多平台负载均衡方案</span></a></div></widget>
</div>
<footer class="footer dis-select"><div class="social-wrap"><a class="social" style="grid-column: span 3;height:32px;padding: 0;" href="https://space.bilibili.com/1664687779" target="_blank" rel="external nofollow noopener noreferrer"><img height="32px" src="https://upyun.thatcdn.cn/public/img/icon/bilibili-banner.jpg"/></a><a class="social" style="grid-column: span 3;height:32px;padding: 0;" href="https://muselink.cc/naive" target="_blank" rel="external nofollow noopener noreferrer"><img height="32px" src="https://upyun.thatcdn.cn/public/img/icon/wechat-banner.jpg"/></a><a class="social" style="grid-column: span 3;height:32px;padding: 0;" href="https://github.com/tovarsh" target="_blank" rel="external nofollow noopener noreferrer"><img height="32px" src="https://upyun.thatcdn.cn/public/img/icon/github-banner.jpg"/></a><a class="social" href="javascript:ThemeChange('dark');" rel="noopener noreferrer"><img id="ThemeM" src="https://upyun.thatcdn.cn/public/img/icon/Moon.png"/></a><a class="social" href="javascript:ThemeChange('light');" rel="noopener noreferrer"><img id="ThemeL" src="https://upyun.thatcdn.cn/public/img/icon/Sun.png"/></a><a class="social" href="javascript:ThemeChange('auto');" rel="noopener noreferrer"><img id="ThemeAI" src="https://upyun.thatcdn.cn/public/img/icon/AI.png"/></a></div></footer>
</div></aside><div class="l_main" id="main">
<header class="header mobile-only"><div class="logo-wrap"><a class="avatar" href="/about/"><div class="bg" style="opacity:0;background-image:url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/rainbow64@3x.webp);"></div><img no-lazy class="avatar" src="/favicon.ico" onerror="javascript:this.classList.add('error');this.src='https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/image/2659360.svg';"></a><a class="title" href="/"><div class="main">钟意博客</div><div class="sub normal cap">感谢你的阅读</div><div class="sub hover cap" style="opacity:0"> ThatCoder's Blog 钟意博客 那个码农</div></a></div></header>
<div class="navbar top"><div class="navbar-blur"><div class="navbar-container"><nav class="post"><a class="active" href="/">近期发布</a><a href="/categories/">分类</a><a href="/tags/">标签</a><a href="/topic/">专栏</a><a href="/archives/">归档</a></nav></div></div></div>
<div class="post-list post"><div class="post-card-wrap"><a class="post-card post" href="/ai/llm-Indeterminacy/">
<article class="md-text"><div class="post-cover"><img src="https://oss.sov.red/note/img/146a510bdde8b6f1ad2784dd88fa23ac.webp"/></div><h2 class="post-title">大语言模型的不确定性</h2><div class="excerpt"><p>
temperature=0、seed=0 也不等于完全确定, 工程实践的过程中总会有取舍, 请允许理想与现实的偏差.
</p></div><div class="meta cap"><span class="cap" id="post-meta"><svg style="margin-bottom:2px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M6.94 2c.416 0 .753.324.753.724v1.46c.668-.012 1.417-.012 2.26-.012h4.015c.842 0 1.591 0 2.259.013v-1.46c0-.4.337-.725.753-.725s.753.324.753.724V4.25c1.445.111 2.394.384 3.09 1.055c.698.67.982 1.582 1.097 2.972L22 9H2v-.724c.116-1.39.4-2.302 1.097-2.972c.697-.67 1.645-.944 3.09-1.055V2.724c0-.4.337-.724.753-.724"/><path fill="currentColor" d="M22 14v-2c0-.839-.004-2.335-.017-3H2.01c-.013.665-.01 2.161-.01 3v2c0 3.771 0 5.657 1.172 6.828C4.343 22 6.228 22 10 22h4c3.77 0 5.656 0 6.828-1.172C22 19.658 22 17.772 22 14" opacity=".5"/><path fill="currentColor" d="M18 17a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0"/></svg><time datetime="2026-02-07T02:00:00.000Z">2026-02-07</time></span><span class="cap breadcrumb" style="--text-p2:#008080;--theme-block:#00808020"><svg style="margin-bottom:1px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M2 6.95c0-.883 0-1.324.07-1.692A4 4 0 0 1 5.257 2.07C5.626 2 6.068 2 6.95 2c.386 0 .58 0 .766.017a4 4 0 0 1 2.18.904c.144.119.28.255.554.529L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .848.352C14.098 6 14.675 6 15.828 6h.374c2.632 0 3.949 0 4.804.77c.079.07.154.145.224.224c.77.855.77 2.172.77 4.804V14c0 3.771 0 5.657-1.172 6.828C19.657 22 17.771 22 14 22h-4c-3.771 0-5.657 0-6.828-1.172C2 19.657 2 17.771 2 14z" opacity=".5"/><path fill="currentColor" d="M20 6.238c0-.298-.005-.475-.025-.63a3 3 0 0 0-2.583-2.582C17.197 3 16.965 3 16.5 3H9.988c.116.104.247.234.462.45L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .849.352C14.098 6 14.675 6 15.829 6h.373c1.78 0 2.957 0 3.798.238"/><path fill="currentColor" fill-rule="evenodd" d="M12.25 10a.75.75 0 0 1 .75-.75h5a.75.75 0 0 1 0 1.5h-5a.75.75 0 0 1-.75-.75" clip-rule="evenodd"/></svg><span>堆栈</span></span></div></article>
</a></div><div class="post-card-wrap"><a class="post-card post" href="/kykms-arm64/">
<article class="md-text"><h2 class="post-title">科艺知识库 ARM64</h2><div class="excerpt"><p>一款知识库系统,用来将文档整理归类,并在团队内受控共享以充分利用这些文档,或者将文档分享到外部。</p></div><div class="meta cap"><span class="cap" id="post-meta"><svg style="margin-bottom:2px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M6.94 2c.416 0 .753.324.753.724v1.46c.668-.012 1.417-.012 2.26-.012h4.015c.842 0 1.591 0 2.259.013v-1.46c0-.4.337-.725.753-.725s.753.324.753.724V4.25c1.445.111 2.394.384 3.09 1.055c.698.67.982 1.582 1.097 2.972L22 9H2v-.724c.116-1.39.4-2.302 1.097-2.972c.697-.67 1.645-.944 3.09-1.055V2.724c0-.4.337-.724.753-.724"/><path fill="currentColor" d="M22 14v-2c0-.839-.004-2.335-.017-3H2.01c-.013.665-.01 2.161-.01 3v2c0 3.771 0 5.657 1.172 6.828C4.343 22 6.228 22 10 22h4c3.77 0 5.656 0 6.828-1.172C22 19.658 22 17.772 22 14" opacity=".5"/><path fill="currentColor" d="M18 17a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0"/></svg><time datetime="2025-12-02T14:00:00.000Z">2025-12-02</time></span><span class="cap breadcrumb" style="--text-p2:#008080;--theme-block:#00808020"><svg style="margin-bottom:1px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M2 6.95c0-.883 0-1.324.07-1.692A4 4 0 0 1 5.257 2.07C5.626 2 6.068 2 6.95 2c.386 0 .58 0 .766.017a4 4 0 0 1 2.18.904c.144.119.28.255.554.529L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .848.352C14.098 6 14.675 6 15.828 6h.374c2.632 0 3.949 0 4.804.77c.079.07.154.145.224.224c.77.855.77 2.172.77 4.804V14c0 3.771 0 5.657-1.172 6.828C19.657 22 17.771 22 14 22h-4c-3.771 0-5.657 0-6.828-1.172C2 19.657 2 17.771 2 14z" opacity=".5"/><path fill="currentColor" d="M20 6.238c0-.298-.005-.475-.025-.63a3 3 0 0 0-2.583-2.582C17.197 3 16.965 3 16.5 3H9.988c.116.104.247.234.462.45L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .849.352C14.098 6 14.675 6 15.829 6h.373c1.78 0 2.957 0 3.798.238"/><path fill="currentColor" fill-rule="evenodd" d="M12.25 10a.75.75 0 0 1 .75-.75h5a.75.75 0 0 1 0 1.5h-5a.75.75 0 0 1-.75-.75" clip-rule="evenodd"/></svg><span>堆栈</span></span></div></article>
</a></div><div class="post-card-wrap"><a class="post-card post photo" href="/daily/Jiaodong-Peninsula/">
<div class="cover" position="top"><img src="https://origin.picgo.net/2025/10/08/PixPin_2025-10-08_21-20-13b5aa0a187e68e25e.webp"/><div class="cover-info" position="top"style="color:white"><div class="text topic">一面法定潮汐表,丈量着胶东半岛的野性与文明。</div><div class="text headline">胶东半岛观察</div></div></div>
</a></div><div class="post-card-wrap"><a class="post-card post" href="/ai/hygon-vllm/">
<article class="md-text"><div class="post-cover"><img src="https://upyun.thatcdn.cn/myself/typora/hygon-k100.webp"/></div><h2 class="post-title">海光 K100 DCU VLLM 推理环境构建</h2><div class="excerpt"><p>基于国产海光DCU加速卡的硬件基础,通过Docker容器化技术,获取并部署为深度优化定制的软件镜像,以实现高效能计算任务的快速部署与性能释放。</p></div><div class="meta cap"><span class="cap" id="post-meta"><svg style="margin-bottom:2px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M6.94 2c.416 0 .753.324.753.724v1.46c.668-.012 1.417-.012 2.26-.012h4.015c.842 0 1.591 0 2.259.013v-1.46c0-.4.337-.725.753-.725s.753.324.753.724V4.25c1.445.111 2.394.384 3.09 1.055c.698.67.982 1.582 1.097 2.972L22 9H2v-.724c.116-1.39.4-2.302 1.097-2.972c.697-.67 1.645-.944 3.09-1.055V2.724c0-.4.337-.724.753-.724"/><path fill="currentColor" d="M22 14v-2c0-.839-.004-2.335-.017-3H2.01c-.013.665-.01 2.161-.01 3v2c0 3.771 0 5.657 1.172 6.828C4.343 22 6.228 22 10 22h4c3.77 0 5.656 0 6.828-1.172C22 19.658 22 17.772 22 14" opacity=".5"/><path fill="currentColor" d="M18 17a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0"/></svg><time datetime="2025-08-30T02:00:00.000Z">2025-08-30</time></span><span class="cap breadcrumb" style="--text-p2:#008080;--theme-block:#00808020"><svg style="margin-bottom:1px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M2 6.95c0-.883 0-1.324.07-1.692A4 4 0 0 1 5.257 2.07C5.626 2 6.068 2 6.95 2c.386 0 .58 0 .766.017a4 4 0 0 1 2.18.904c.144.119.28.255.554.529L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .848.352C14.098 6 14.675 6 15.828 6h.374c2.632 0 3.949 0 4.804.77c.079.07.154.145.224.224c.77.855.77 2.172.77 4.804V14c0 3.771 0 5.657-1.172 6.828C19.657 22 17.771 22 14 22h-4c-3.771 0-5.657 0-6.828-1.172C2 19.657 2 17.771 2 14z" opacity=".5"/><path fill="currentColor" d="M20 6.238c0-.298-.005-.475-.025-.63a3 3 0 0 0-2.583-2.582C17.197 3 16.965 3 16.5 3H9.988c.116.104.247.234.462.45L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .849.352C14.098 6 14.675 6 15.829 6h.373c1.78 0 2.957 0 3.798.238"/><path fill="currentColor" fill-rule="evenodd" d="M12.25 10a.75.75 0 0 1 .75-.75h5a.75.75 0 0 1 0 1.5h-5a.75.75 0 0 1-.75-.75" clip-rule="evenodd"/></svg><span>堆栈</span></span></div></article>
</a></div><div class="post-card-wrap"><a class="post-card post" href="/Blog-Load-Balance/">
<article class="md-text"><div class="post-cover"><img src="https://upyun.thatcdn.cn/myself/typora/BLOG-CDN-BANNER.jpg"/></div><h2 class="post-title">博客多平台负载均衡方案</h2><div class="excerpt"><p>多平台负载均衡,增强博客的可用性与可持续白嫖性。</p></div><div class="meta cap"><span class="cap" id="post-meta"><svg style="margin-bottom:2px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M6.94 2c.416 0 .753.324.753.724v1.46c.668-.012 1.417-.012 2.26-.012h4.015c.842 0 1.591 0 2.259.013v-1.46c0-.4.337-.725.753-.725s.753.324.753.724V4.25c1.445.111 2.394.384 3.09 1.055c.698.67.982 1.582 1.097 2.972L22 9H2v-.724c.116-1.39.4-2.302 1.097-2.972c.697-.67 1.645-.944 3.09-1.055V2.724c0-.4.337-.724.753-.724"/><path fill="currentColor" d="M22 14v-2c0-.839-.004-2.335-.017-3H2.01c-.013.665-.01 2.161-.01 3v2c0 3.771 0 5.657 1.172 6.828C4.343 22 6.228 22 10 22h4c3.77 0 5.656 0 6.828-1.172C22 19.658 22 17.772 22 14" opacity=".5"/><path fill="currentColor" d="M18 17a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0"/></svg><time datetime="2025-06-21T02:00:00.000Z">2025-06-21</time></span><span class="cap breadcrumb" style="--text-p2:#008080;--theme-block:#00808020"><svg style="margin-bottom:1px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M2 6.95c0-.883 0-1.324.07-1.692A4 4 0 0 1 5.257 2.07C5.626 2 6.068 2 6.95 2c.386 0 .58 0 .766.017a4 4 0 0 1 2.18.904c.144.119.28.255.554.529L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .848.352C14.098 6 14.675 6 15.828 6h.374c2.632 0 3.949 0 4.804.77c.079.07.154.145.224.224c.77.855.77 2.172.77 4.804V14c0 3.771 0 5.657-1.172 6.828C19.657 22 17.771 22 14 22h-4c-3.771 0-5.657 0-6.828-1.172C2 19.657 2 17.771 2 14z" opacity=".5"/><path fill="currentColor" d="M20 6.238c0-.298-.005-.475-.025-.63a3 3 0 0 0-2.583-2.582C17.197 3 16.965 3 16.5 3H9.988c.116.104.247.234.462.45L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .849.352C14.098 6 14.675 6 15.829 6h.373c1.78 0 2.957 0 3.798.238"/><path fill="currentColor" fill-rule="evenodd" d="M12.25 10a.75.75 0 0 1 .75-.75h5a.75.75 0 0 1 0 1.5h-5a.75.75 0 0 1-.75-.75" clip-rule="evenodd"/></svg><span>堆栈</span></span></div></article>
</a></div><div class="post-card-wrap"><a class="post-card post" href="/ai/RAG/">
<article class="md-text"><div class="post-cover"><img src="https://upyun.thatcdn.cn/myself/typora/THATCODER-RGA.webp"/></div><h2 class="post-title">浅谈RAG</h2><div class="excerpt"><p>
RAG是权衡LLM的发散性与其准确性而诞生的产物
</p></div><div class="meta cap"><span class="cap" id="post-meta"><svg style="margin-bottom:2px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M6.94 2c.416 0 .753.324.753.724v1.46c.668-.012 1.417-.012 2.26-.012h4.015c.842 0 1.591 0 2.259.013v-1.46c0-.4.337-.725.753-.725s.753.324.753.724V4.25c1.445.111 2.394.384 3.09 1.055c.698.67.982 1.582 1.097 2.972L22 9H2v-.724c.116-1.39.4-2.302 1.097-2.972c.697-.67 1.645-.944 3.09-1.055V2.724c0-.4.337-.724.753-.724"/><path fill="currentColor" d="M22 14v-2c0-.839-.004-2.335-.017-3H2.01c-.013.665-.01 2.161-.01 3v2c0 3.771 0 5.657 1.172 6.828C4.343 22 6.228 22 10 22h4c3.77 0 5.656 0 6.828-1.172C22 19.658 22 17.772 22 14" opacity=".5"/><path fill="currentColor" d="M18 17a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0"/></svg><time datetime="2025-06-15T02:00:00.000Z">2025-06-15</time></span><span class="cap breadcrumb" style="--text-p2:#008080;--theme-block:#00808020"><svg style="margin-bottom:1px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M2 6.95c0-.883 0-1.324.07-1.692A4 4 0 0 1 5.257 2.07C5.626 2 6.068 2 6.95 2c.386 0 .58 0 .766.017a4 4 0 0 1 2.18.904c.144.119.28.255.554.529L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .848.352C14.098 6 14.675 6 15.828 6h.374c2.632 0 3.949 0 4.804.77c.079.07.154.145.224.224c.77.855.77 2.172.77 4.804V14c0 3.771 0 5.657-1.172 6.828C19.657 22 17.771 22 14 22h-4c-3.771 0-5.657 0-6.828-1.172C2 19.657 2 17.771 2 14z" opacity=".5"/><path fill="currentColor" d="M20 6.238c0-.298-.005-.475-.025-.63a3 3 0 0 0-2.583-2.582C17.197 3 16.965 3 16.5 3H9.988c.116.104.247.234.462.45L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .849.352C14.098 6 14.675 6 15.829 6h.373c1.78 0 2.957 0 3.798.238"/><path fill="currentColor" fill-rule="evenodd" d="M12.25 10a.75.75 0 0 1 .75-.75h5a.75.75 0 0 1 0 1.5h-5a.75.75 0 0 1-.75-.75" clip-rule="evenodd"/></svg><span>堆栈</span></span></div></article>
</a></div><div class="post-card-wrap"><a class="post-card post" href="/Web-Package/">
<article class="md-text"><div class="post-cover"><img src="https://upyun.thatcdn.cn/myself/typora/web-package.png"/></div><h2 class="post-title">Web技术构建桌面应用方案</h2><div class="excerpt"><p>Electron、Tauri、Flutter、pkg...抉择方案</p></div><div class="meta cap"><span class="cap" id="post-meta"><svg style="margin-bottom:2px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M6.94 2c.416 0 .753.324.753.724v1.46c.668-.012 1.417-.012 2.26-.012h4.015c.842 0 1.591 0 2.259.013v-1.46c0-.4.337-.725.753-.725s.753.324.753.724V4.25c1.445.111 2.394.384 3.09 1.055c.698.67.982 1.582 1.097 2.972L22 9H2v-.724c.116-1.39.4-2.302 1.097-2.972c.697-.67 1.645-.944 3.09-1.055V2.724c0-.4.337-.724.753-.724"/><path fill="currentColor" d="M22 14v-2c0-.839-.004-2.335-.017-3H2.01c-.013.665-.01 2.161-.01 3v2c0 3.771 0 5.657 1.172 6.828C4.343 22 6.228 22 10 22h4c3.77 0 5.656 0 6.828-1.172C22 19.658 22 17.772 22 14" opacity=".5"/><path fill="currentColor" d="M18 17a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0"/></svg><time datetime="2025-06-08T02:00:00.000Z">2025-06-08</time></span><span class="cap breadcrumb" style="--text-p2:#008080;--theme-block:#00808020"><svg style="margin-bottom:1px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M2 6.95c0-.883 0-1.324.07-1.692A4 4 0 0 1 5.257 2.07C5.626 2 6.068 2 6.95 2c.386 0 .58 0 .766.017a4 4 0 0 1 2.18.904c.144.119.28.255.554.529L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .848.352C14.098 6 14.675 6 15.828 6h.374c2.632 0 3.949 0 4.804.77c.079.07.154.145.224.224c.77.855.77 2.172.77 4.804V14c0 3.771 0 5.657-1.172 6.828C19.657 22 17.771 22 14 22h-4c-3.771 0-5.657 0-6.828-1.172C2 19.657 2 17.771 2 14z" opacity=".5"/><path fill="currentColor" d="M20 6.238c0-.298-.005-.475-.025-.63a3 3 0 0 0-2.583-2.582C17.197 3 16.965 3 16.5 3H9.988c.116.104.247.234.462.45L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .849.352C14.098 6 14.675 6 15.829 6h.373c1.78 0 2.957 0 3.798.238"/><path fill="currentColor" fill-rule="evenodd" d="M12.25 10a.75.75 0 0 1 .75-.75h5a.75.75 0 0 1 0 1.5h-5a.75.75 0 0 1-.75-.75" clip-rule="evenodd"/></svg><span>堆栈</span></span></div></article>
</a></div><div class="post-card-wrap"><a class="post-card post" href="/Spring-WebSocket/">
<article class="md-text"><div class="post-cover"><img src="https://upyun.thatcdn.cn/myself/typora/websocket-server-spring-boot.png"/></div><h2 class="post-title">SpringBoot WebSocket 代理模式、客户端模式</h2><div class="excerpt"><p>Spring+WebSocket的相关实践</p></div><div class="meta cap"><span class="cap" id="post-meta"><svg style="margin-bottom:2px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M6.94 2c.416 0 .753.324.753.724v1.46c.668-.012 1.417-.012 2.26-.012h4.015c.842 0 1.591 0 2.259.013v-1.46c0-.4.337-.725.753-.725s.753.324.753.724V4.25c1.445.111 2.394.384 3.09 1.055c.698.67.982 1.582 1.097 2.972L22 9H2v-.724c.116-1.39.4-2.302 1.097-2.972c.697-.67 1.645-.944 3.09-1.055V2.724c0-.4.337-.724.753-.724"/><path fill="currentColor" d="M22 14v-2c0-.839-.004-2.335-.017-3H2.01c-.013.665-.01 2.161-.01 3v2c0 3.771 0 5.657 1.172 6.828C4.343 22 6.228 22 10 22h4c3.77 0 5.656 0 6.828-1.172C22 19.658 22 17.772 22 14" opacity=".5"/><path fill="currentColor" d="M18 17a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0"/></svg><time datetime="2025-06-07T08:00:00.000Z">2025-06-07</time></span><span class="cap breadcrumb" style="--text-p2:#008080;--theme-block:#00808020"><svg style="margin-bottom:1px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M2 6.95c0-.883 0-1.324.07-1.692A4 4 0 0 1 5.257 2.07C5.626 2 6.068 2 6.95 2c.386 0 .58 0 .766.017a4 4 0 0 1 2.18.904c.144.119.28.255.554.529L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .848.352C14.098 6 14.675 6 15.828 6h.374c2.632 0 3.949 0 4.804.77c.079.07.154.145.224.224c.77.855.77 2.172.77 4.804V14c0 3.771 0 5.657-1.172 6.828C19.657 22 17.771 22 14 22h-4c-3.771 0-5.657 0-6.828-1.172C2 19.657 2 17.771 2 14z" opacity=".5"/><path fill="currentColor" d="M20 6.238c0-.298-.005-.475-.025-.63a3 3 0 0 0-2.583-2.582C17.197 3 16.965 3 16.5 3H9.988c.116.104.247.234.462.45L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .849.352C14.098 6 14.675 6 15.829 6h.373c1.78 0 2.957 0 3.798.238"/><path fill="currentColor" fill-rule="evenodd" d="M12.25 10a.75.75 0 0 1 .75-.75h5a.75.75 0 0 1 0 1.5h-5a.75.75 0 0 1-.75-.75" clip-rule="evenodd"/></svg><span>堆栈</span></span></div></article>
</a></div></div>
<div class='paginator-wrap dis-select'>
<span class="extend prev" rel="prev"></span><span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="page-number" href="/page/3/">3</a><span class="space">…</span><a class="page-number" href="/page/6/">6</a><a class="extend next" rel="next" href="/page/2/"></a>
</div>
<footer class="page-footer footnote"><hr><div class="text"><p style="text-align:center" >
本站由 <a style="font-weight: bold;" href="/author/ThatCoder/">钟意</a> 使用 <a style="font-weight: bold;" target="_blank" rel="noopener" href="https://github.com/xaoxuu/hexo-theme-stellar/tree/1.33.1">Stellar 1.33.1</a> 主题创建。
<br>
由 <a style="font-weight: bold;" target="_blank" rel="noopener" href="https://www.upyun.com/?utm_source=lianmeng&utm_medium=referral">又拍云</a> 提供CDN加速/云存储服务
<br>
由 <a style="font-weight: bold;" target="_blank" rel="noopener" href="https://vercel.com/">vercel</a>、<a style="font-weight: bold;" target="_blank" rel="noopener" href="https://www.netlify.com/">netlify</a>、<a style="font-weight: bold;" target="_blank" rel="noopener" href="https://www.cloudflare.com/">cloudflare</a> 提供托管服务
<br>
<a href="https://beian.miit.gov.cn/" target="_blank">赣ICP备2021003671号</a>
<br>
<!--不蒜子计数器-->
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<!--添加一个访问量-->
<span>总访问 <span id="busuanzi_value_site_pv" style="font-weight: bold;"></span> 次
<!--本页访问 <span id="busuanzi_value_page_pv" style="font-weight: bold;"></span> 次</span>-->
<div id="siteruntime"></div>
</p>
<script>
function siteTime(){
window.setTimeout("siteTime()", 1000);
var seconds = 1000
var minutes = seconds * 60
var hours = minutes * 60
var days = hours * 24
var years = days * 365
var today = new Date()
var todayYear = today.getFullYear()
var todayMonth = today.getMonth()
var todayDate = today.getDate()
var todayHour = today.getHours()
var todayMinute = today.getMinutes()
var todaySecond = today.getSeconds()
var t1 = Date.UTC(2020,4,30,08,00,00)
var t2 = Date.UTC(todayYear,todayMonth,todayDate,todayHour,todayMinute,todaySecond)
var diff = t2-t1
var diffYears = Math.floor(diff/years)
var diffDays = Math.floor((diff/days)-diffYears*365)
var diffHours = Math.floor((diff-(diffYears*365+diffDays)*days)/hours)
var diffMinutes = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours)/minutes)
var diffSeconds = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours-diffMinutes*minutes)/seconds)
document.getElementById("siteruntime").innerHTML="<p style=\"text-align:center\">小破站已颠沛流离 "+diffYears+" 年 "+diffDays+" 天 "+diffHours+" 小时 "+diffMinutes+" 分钟 "+diffSeconds+" 秒</p>"
}
siteTime();
</script>
</div></footer>
<div class="main-mask" onclick="sidebar.dismiss()"></div></div><aside class="l_right">
<div class="widgets">
<widget class="widget-wrapper markdown"><div class="widget-header dis-select"><span class="name">出没地点</span></div><div class="widget-body fs14"><footer class="footer" style="padding-top: 0.5rem;padding-bottom: 0.5rem;">
<div class="social-wrap">
<a class="social" style="grid-column: span 3;height:32px;padding: 0;filter: grayscale(0%);" href="https://steamcommunity.com/profiles/76561199058275281" target="_blank" rel="external nofollow noopener noreferrer"><img class="lazy entered loaded" height="32px" src="https://upyun.thatcdn.cn/public/img/icon/steam-banner.jpg" data-src="https://upyun.thatcdn.cn/public/img/icon/steam-banner.jpg"></a>
<a class="social" style="grid-column: span 3;height:32px;padding: 0;filter: grayscale(0%);" href="https://music.163.com/#/user/event?id=134968139" target="_blank" rel="external nofollow noopener noreferrer"><img class="lazy entered loaded" height="32px" src="https://upyun.thatcdn.cn/public/img/icon/music-banner.jpg" data-src="https://upyun.thatcdn.cn/public/img/icon/music-banner.jpg"></a>
<a class="social" style="grid-column: span 3;height:32px;padding: 0;filter: grayscale(0%);" href="/atom.xml" rel="noopener noreferrer"><img class="lazy entered loaded" height="32px" src="https://upyun.thatcdn.cn/public/img/icon/rss-banner.jpg" data-src="https://upyun.thatcdn.cn/public/img/icon/rss-banner.jpg"></a>
<a class="social" style="grid-column: span 3; height: 32px; padding: 0px; filter: grayscale(0%);" href="https://mem.cns.red/u/thatcoder" target="_blank" rel="external nofollow noopener noreferrer"><img class="lazy entered loaded" height="32px" src="https://upyun.thatcdn.cn/public/img/icon/memos-banner.jpg" data-src="https://upyun.thatcdn.cn/public/img/icon/memos-banner.jpg"></a>
</div></footer>
</div></widget>
<widget class="widget-wrapper timeline"><div class="widget-header cap theme dis-select"><span class="name">近期动态 <i class="fa-solid fa-chart-line fa-shake" onclick="window.location=window.location=window.location.protocol+'//'+location.host+'/about/#tab_1-1/'"></i></span></div><div class="widget-body fs14"><div class="tag-plugin timetmpl timeline"><div class="timenode" index="0"><div class="header">memos</div><div class="body fs14">
`
{ "api": "https://mem.cns.red/api/v1/memos?filter=creator_id==1&pageSize=10" }
`
</div></div></div></div></widget>
</div></aside><div class='float-panel'>
<button type='button' style='display:none' class='laptop-only rightbar-toggle mobile' onclick='sidebar.rightbar()'>
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6h11m-11 6h11m-11 6h11M4 6h1v4m-1 0h2m0 8H4c0-1 2-2 2-3s-1-1.5-2-1"/></svg>
</button>
<button type='button' style='display:none' class='mobile-only leftbar-toggle mobile' onclick='sidebar.leftbar()'>
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 11c0-3.771 0-5.657 1.172-6.828C4.343 3 6.229 3 10 3h4c3.771 0 5.657 0 6.828 1.172C22 5.343 22 7.229 22 11v2c0 3.771 0 5.657-1.172 6.828C19.657 21 17.771 21 14 21h-4c-3.771 0-5.657 0-6.828-1.172C2 18.657 2 16.771 2 13z"/><path id="sep" stroke-linecap="round" d="M5.5 10h6m-5 4h4m4.5 7V3"/></g></svg>
</button>
</div>
</div><div class="scripts">
<script type="text/javascript">
window.canonical = {"closeEnable":true,"closeText":"关闭提示","originalHost":"log.cns.red","officialHosts":["localhost","blog.thatcoder.cn","log.cns.red","log.sov.red","log.tov.red","hexo.thatcoder.cn","komintern.vercel.app","thatcoder.vercel.app","thatcoder.netlify.app","blog.tovarsh.com","tovarsh.github.io","cnlog.pages.dev"],"encoded":"bG9nLmNucy5yZWQ="};
window.canonical["param"] = {"permalink":"log.cns.red","checklink":"/js/plugins/video.js"};
// Fix: Ensure page is at the correct top position on data load
if (history.scrollRestoration) {
history.scrollRestoration = 'auto';
}
(function() {
const scrollHandler = () => {
const wikiCover = document.querySelector('#l_cover .l_cover.wiki');
const startEl = document.getElementById('start');
if (wikiCover && startEl) {
window.scrollTo(0, startEl.offsetTop);
} else {
window.scrollTo(0, 0);
}
};
if (document.readyState !== 'loading') scrollHandler();
else document.addEventListener('DOMContentLoaded', scrollHandler);
})();
const ctx = {
date_suffix: {
just: `刚刚`,
min: `分钟前`,
hour: `小时前`,
day: `天前`,
},
root : `/`,
tag_plugins: {
chat: Object.assign({"api":"https://siteinfo.listentothewind.cn/api/v1"}),
}
};
// required plugins (only load if needs)
if (`local_search`) {
ctx.search = {};
ctx.search.service = `local_search`;
if (ctx.search.service == 'local_search') {
let service_obj = Object.assign({}, `{"field":"post, page, docs","path":"/search.json","content":true,"skip_search":null,"sort":"-date"}`);
ctx.search[ctx.search.service] = service_obj;
}
}
const def = {
avatar: `https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/3442075.svg`,
cover: `https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/cover/76b86c0226ffd.svg`,
loading: `https://api.iconify.design/eos-icons:three-dots-loading.svg?color=%231cd0fd`,
};
const deps = {
jquery: `https://gcore.jsdelivr.net/npm/jquery@3.7/dist/jquery.min.js`,
marked: `https://gcore.jsdelivr.net/npm/marked@13.0/lib/marked.umd.min.js`,
lazyload: `/%5Bobject%20Object%5D`
}
</script>
<script type="text/javascript">
function RunItem() {
this.list = []; // 存放回调函数
this.start = () => {
for (var i = 0; i < this.list.length; i++) {
this.list[i].run();
}
};
this.push = (fn, name, setRequestAnimationFrame = true) => {
let myfn = fn
if (setRequestAnimationFrame) {
myfn = () => {
utils.requestAnimationFrame(fn)
}
}
var f = new Item(myfn, name);
this.list.push(f);
};
this.remove = (name) => {
// 倒序遍历避免 splice 后的索引问题
for (let index = this.list.length - 1; index >= 0; index--) {
const e = this.list[index];
if (e.name === name) {
this.list.splice(index, 1);
}
}
}
// 构造一个可以run的对象
function Item(fn, name) {
// 函数名称
this.name = name || fn.name;
// run方法
this.run = () => {
try {
fn()
} catch (error) {
console.log(error);
}
};
}
}
const utils = {
// 懒加载 css https://github.com/filamentgroup/loadCSS
css: (href, before, media, attributes) => {
var doc = window.document;
var ss = doc.createElement("link");
var ref;
if (before) {
ref = before;
} else {
var refs = (doc.body || doc.getElementsByTagName("head")[0]).childNodes;
ref = refs[refs.length - 1];
}
var sheets = doc.styleSheets;
if (attributes) {
for (var attributeName in attributes) {
if (attributes.hasOwnProperty(attributeName)) {
ss.setAttribute(attributeName, attributes[attributeName]);
}
}
}
ss.rel = "stylesheet";
ss.href = href;
ss.media = "only x";
function ready(cb) {
if (doc.body) {
return cb();
}
setTimeout(function () {
ready(cb);
});
}
ready(function () {
ref.parentNode.insertBefore(ss, before ? ref : ref.nextSibling);
});
var onloadcssdefined = function (cb) {
var resolvedHref = ss.href;
var i = sheets.length;
while (i--) {
if (sheets[i].href === resolvedHref) {
return cb();
}
}
setTimeout(function () {
onloadcssdefined(cb);
});
};
function loadCB() {
if (ss.addEventListener) {
ss.removeEventListener("load", loadCB);
}
ss.media = media || "all";
}
if (ss.addEventListener) {
ss.addEventListener("load", loadCB);
}
ss.onloadcssdefined = onloadcssdefined;
onloadcssdefined(loadCB);
return ss;
},
// 已加载脚本缓存
_loadedScripts: new Set(),
// 已加载元素缓存 (使用 WeakSet 追踪元素实例,避免 PJAX 导航时的状态混淆)
_loadedElements: new WeakSet(),
js: (src, opt) => new Promise((resolve, reject) => {
if (src.startsWith('/')) {
src = ctx.root + src.substring(1);
}
// 如果脚本已加载,直接返回
if (utils._loadedScripts.has(src)) {
resolve();
return;
}
var script = document.createElement('script');
script.src = src;
if (opt) {
for (let key of Object.keys(opt)) {
script[key] = opt[key]
}
} else {
// 默认异步,如果需要同步,第二个参数传入 {} 即可
script.async = true
}
script.onerror = reject
script.onload = script.onreadystatechange = function () {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
script.onload = script.onreadystatechange = null
utils._loadedScripts.add(src);
resolve()
}
document.head.appendChild(script)
}),
// PJAX 事件监听器管理
_pjaxListeners: new Set(),
jq: (fn, pjax = true) => {
if (typeof jQuery === 'undefined') {
utils.js(deps.jquery).then(fn)
} else {
fn()
}
if (pjax && !fn._pjax_registered) {
document.addEventListener('pjax:complete', fn);
fn._pjax_registered = true;
utils._pjaxListeners.add(fn); // 追踪监听器以便清理
}
},
// 清理所有 PJAX 事件监听器
cleanupPjaxListeners: () => {
utils._pjaxListeners.forEach(fn => {
document.removeEventListener('pjax:complete', fn);
fn._pjax_registered = false;
});
utils._pjaxListeners.clear();
},
onLoading: (el) => {
if (el) {
if ($(el).find('.loading-wrap').length === 0){
$(el).append('<div class="loading-wrap"><svg xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2"><path stroke-dasharray="60" stroke-dashoffset="60" stroke-opacity=".3" d="M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="1.3s" values="60;0"/></path><path stroke-dasharray="15" stroke-dashoffset="15" d="M12 3C16.9706 3 21 7.02944 21 12"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="15;0"/><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></g></svg></div>');
}
}
},
onLoadSuccess: (el) => {
if (el) {
$(el).find('.loading-wrap').remove();
}
},
onLoadFailure: (el) => {
if (el) {
$(el).find('.loading-wrap svg').remove();
$(el).find('.loading-wrap').append('<svg xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="60" stroke-dashoffset="60" d="M12 3L21 20H3L12 3Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.5s" values="60;0"/></path><path stroke-dasharray="6" stroke-dashoffset="6" d="M12 10V14"><animate fill="freeze" attributeName="stroke-dashoffset" begin="0.6s" dur="0.2s" values="6;0"/></path></g><circle cx="12" cy="17" r="1" fill="currentColor" fill-opacity="0"><animate fill="freeze" attributeName="fill-opacity" begin="0.8s" dur="0.4s" values="0;1"/></circle></svg>');
$(el).find('.loading-wrap').addClass('error');
}
},
request: (el, url, callback, onFailure) => {
// 检查元素实例是否已加载 (而不是检查属性)
if (el && utils._loadedElements.has(el)) {
return;
}
const maxRetry = 3;
let retryCount = 0;
return new Promise((resolve, reject) => {
const load = () => {
utils.onLoading?.(el);
let timedOut = false;
const timeout = setTimeout(() => {
timedOut = true;
console.warn('[request] 超时:', url);
if (++retryCount >= maxRetry) {
utils.onLoadFailure?.(el);
onFailure?.();
reject('请求超时');
} else {
setTimeout(load, 1000);
}
}, 5000);
fetch(url).then(resp => {
if (timedOut) return;
clearTimeout(timeout);
if (!resp.ok) throw new Error('响应失败');
return resp;
}).then(data => {
if (timedOut) return;
// 标记元素实例为已加载
if (el) utils._loadedElements.add(el);
utils.onLoadSuccess?.(el);
callback(data);
resolve(data);
}).catch(err => {
clearTimeout(timeout);
console.warn('[request] 错误:', err);
if (++retryCount >= maxRetry) {
utils.onLoadFailure?.(el);
onFailure?.();
reject(err);
} else {
setTimeout(load, 1000);
}
});
};
load();
});
},
requestWithoutLoading: (url, options = {}, maxRetry = 2, timeout = 5000) => {
return new Promise((resolve, reject) => {
let retryCount = 0;
const tryRequest = () => {
let timedOut = false;
const timer = setTimeout(() => {
timedOut = true;
if (++retryCount > maxRetry) reject('timeout');
else tryRequest();
}, timeout);
fetch(url, options)
.then(resp => {
clearTimeout(timer);
if (!resp.ok) throw new Error('bad response');
resolve(resp);
})
.catch(err => {
clearTimeout(timer);
if (++retryCount > maxRetry) reject(err);
else setTimeout(tryRequest, 500);
});
};
tryRequest();
});
},
/********************** requestAnimationFrame ********************************/
// 1、requestAnimationFrame 会把每一帧中的所有 DOM 操作集中起来,在一次重绘或回流中就完成,并且重绘或回流的时间间隔紧紧跟随浏览器的刷新频率,一般来说,这个频率为每秒60帧。
// 2、在隐藏或不可见的元素中,requestAnimationFrame 将不会进行重绘或回流,这当然就意味着更少的的 cpu,gpu 和内存使用量。
requestAnimationFrame: (fn) => {
if (!window.requestAnimationFrame) {
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame;
}
window.requestAnimationFrame(fn)
},
dark: {},
// 插件初始化管理器 - 统一处理 DOMContentLoaded 和 pjax:complete 事件
_pluginInitializers: [],
_pluginCleanups: new Map(), // 存储每个插件的清理函数
initPlugin: (initFn, name, options = {}) => {
if (!initFn || typeof initFn !== 'function') return;
// 避免重复注册
const pluginName = name || initFn.name;
if (utils._pluginInitializers.some(p => p.name === pluginName)) return;
// 包装初始化函数,添加防重复执行的保护
const wrappedInit = () => {
try {
// 在执行前先清理旧的资源
if (utils._pluginCleanups.has(pluginName)) {
const cleanup = utils._pluginCleanups.get(pluginName);
if (typeof cleanup === 'function') {
cleanup();
}
}
// 执行初始化,可能返回清理函数
const cleanup = initFn();
// 如果初始化函数返回了清理函数,保存它
if (typeof cleanup === 'function') {
utils._pluginCleanups.set(pluginName, cleanup);
}
} catch (error) {
console.error(`[Plugin ${pluginName}] 初始化失败:`, error);
}
};
utils._pluginInitializers.push({
fn: wrappedInit,
name: pluginName,
options: options
});
// 如果 DOM 已经加载完成,立即执行
if (document.readyState === 'complete' || document.readyState === 'interactive') {
wrappedInit();
} else {
// 否则等待 DOMContentLoaded
window.addEventListener('DOMContentLoaded', wrappedInit, { once: true });
}
},
// 重新初始化所有插件(用于 PJAX 等场景)
reinitPlugins: () => {
utils._pluginInitializers.forEach(plugin => {
// 跳过标记为不需要重新初始化的插件
if (plugin.options.skipReinit) return;
try {
plugin.fn();
} catch (error) {
console.error(`[Plugin ${plugin.name}] 重新初始化失败:`, error);
}
});
},
// 清理所有插件资源
cleanupPlugins: () => {
utils._pluginCleanups.forEach((cleanup, name) => {
try {
cleanup();
} catch (error) {
console.error(`[Plugin ${name}] 清理失败:`, error);
}
});
utils._pluginCleanups.clear();
},
// 清理所有资源(用于页面卸载或重置)
cleanupAll: () => {
utils.cleanupPlugins();
utils.cleanupPjaxListeners();
},
};
// 自动处理 PJAX 事件
document.addEventListener('pjax:before', () => {
// 在导航前清理旧的 PJAX 监听器(如果需要重新注册)
// 注意:这里不清理,因为监听器应该是持久的
// utils.cleanupPjaxListeners();
});
document.addEventListener('pjax:complete', () => {
utils.reinitPlugins();
});
// utils.dark.mode 当前模式 dark or light
// utils.dark.toggle() 暗黑模式触发器
// utils.dark.push(callBack[,"callBackName"]) 传入触发器回调函数
utils.dark.method = {
toggle: new RunItem(),
};
utils.dark = Object.assign(utils.dark, {
push: utils.dark.method.toggle.push,
});
</script>
<script>
const sidebar = {
leftbar: () => {
if (l_body) {
l_body.toggleAttribute('leftbar');
l_body.removeAttribute('rightbar');
}
},
rightbar: () => {
if (l_body) {
l_body.toggleAttribute('rightbar');
l_body.removeAttribute('leftbar');
}
},
dismiss: () => {
if (l_body) {
l_body.removeAttribute('leftbar');
l_body.removeAttribute('rightbar');
}
},
toggleTOC: () => {
document.querySelector('#data-toc').classList.toggle('collapse');
}
}
</script>
<script type="text/javascript">
(() => {
const tagSwitchers = document.querySelectorAll('.tag-subtree.parent-tag > a > .tag-switcher-wrapper')
for (const tagSwitcher of tagSwitchers) {
tagSwitcher.addEventListener('click', (e) => {
const parent = e.target.closest('.tag-subtree.parent-tag')
parent.classList.toggle('expanded')
e.preventDefault()
})
}
// Get active tag from query string, then activate it.
const urlParams = new URLSearchParams(window.location.search)
const activeTag = urlParams.get('tag')
if (activeTag) {
let tag = document.querySelector(`.tag-subtree[data-tag="${activeTag}"]`)
if (tag) {
tag.querySelector('a').classList.add('active')
while (tag) {
tag.classList.add('expanded')
tag = tag.parentElement.closest('.tag-subtree.parent-tag')
}
}
}
})()
</script>
<script async src="https://gcore.jsdelivr.net/npm/vanilla-lazyload@19.1/dist/lazyload.min.js"></script>
<script>
// https://www.npmjs.com/package/vanilla-lazyload
// Set the options globally
// to make LazyLoad self-initialize
window.lazyLoadOptions = {
elements_selector: ".lazy",
callback_loaded: (el) => {
el.classList.add('loaded');
const wrapper = el.closest('.lazy-box');
const icon = wrapper?.querySelector('.lazy-icon');
if (icon) icon.remove();
}
};
// Listen to the initialization event
// and get the instance of LazyLoad
window.addEventListener(
"LazyLoad::Initialized",
function (event) {
window.lazyLoadInstance = event.detail.instance;
},
false
);
document.addEventListener('DOMContentLoaded', function () {
window.lazyLoadInstance?.update();
});
window.wrapLazyloadImages = (container) => {
if (typeof container === 'string') {
container = document.querySelector(container);
}
if (!container) return;
const images = container.querySelectorAll('img');
images.forEach((img) => {
if (img.classList.contains('lazy')) return;
const src = img.getAttribute('src');
if (!src) return;
const wrapper = document.createElement('div');
wrapper.className = 'lazy-box';
const newImg = img.cloneNode();
newImg.removeAttribute('src');
newImg.setAttribute('data-src', src);
newImg.classList.add('lazy');
const icon = document.createElement('div');
icon.className = 'lazy-icon';
if (def.loading) {
icon.style.backgroundImage = `url("${def.loading}")`;
}
wrapper.appendChild(newImg);
wrapper.appendChild(icon);
img.replaceWith(wrapper);
});
// 通知 LazyLoad 更新
if (window.lazyLoadInstance?.update) {
window.lazyLoadInstance.update();
}
}
</script>
<!-- required -->
<script src="/js/main.js?v=1.33.1" defer></script>
<script type="text/javascript">
const applyTheme = (theme) => {
if (theme === 'auto') {
document.documentElement.removeAttribute('data-theme')
} else {
document.documentElement.setAttribute('data-theme', theme)
}
// applyThemeToGiscus(theme)
}
// FIXME: 这会导致无法使用 preferred_color_scheme 以外的主题
const applyThemeToGiscus = (theme) => {
// theme = theme === 'auto' ? 'preferred_color_scheme' : theme
const cmt = document.getElementById('giscus')
if (cmt) {
// This works before giscus load.
cmt.setAttribute('data-theme', theme)
}
const iframe = document.querySelector('#comments > section.giscus > iframe')
if (iframe) {
// This works after giscus loaded.
const src = iframe.src
const newSrc = src.replace(/theme=[\w]+/, `theme=${theme}`)
iframe.src = newSrc
}
}
const switchTheme = () => {
// light -> dark -> auto -> light -> ...
const currentTheme = document.documentElement.getAttribute('data-theme')
let newTheme;
switch (currentTheme) {
case 'light':
newTheme = 'dark'
break
case 'dark':
newTheme = 'auto'
break
default:
newTheme = 'light'
}
applyTheme(newTheme)
window.localStorage.setItem('Stellar.theme', newTheme)
utils.dark.mode = newTheme === 'auto' ? (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light") : newTheme;
utils.dark.method.toggle.start();
const messages = {
light: `切换到浅色模式`,
dark: `切换到深色模式`,
auto: `切换到跟随系统配色`,
}
hud?.toast?.(messages[newTheme])
}
(() => {
// Apply user's preferred theme, if any.
const theme = window.localStorage.getItem('Stellar.theme')
if (theme !== null) {
applyTheme(theme)
} else {
utils.dark.mode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
}
utils.dark.method.toggle.start();
})()
</script>
<!-- optional -->
<script defer>
const initServices = () => {
// 用于存储需要清理的资源
let timers = [];
ctx.services = Object.assign({}, JSON.parse(`{"mdrender":{"js":"/js/services/mdrender.js"},"siteinfo":{"js":"/js/services/siteinfo.js","api":null},"ghinfo":{"js":"/js/services/ghinfo.js"},"rating":{"js":"/js/services/rating.js","api":"https://star-vote.xaox.cc/api/rating"},"vote":{"js":"/js/services/vote.js","api":"https://star-vote.xaox.cc/api/vote"},"sites":{"js":"/js/services/sites.js"},"friends":{"js":"/js/services/friends.js"},"friends_and_posts":{"js":"/js/services/friends_and_posts.js"},"timeline":{"js":"/js/services/timeline.js"},"fcircle":{"js":"/js/services/fcircle.js"},"weibo":{"js":"/js/services/weibo.js"},"memos":{"js":"/js/services/memos.js"},"voice":{"js":"/js/plugins/voice.js"},"video":{"js":"/js/plugins/video.js"},"download-file":{"js":"/js/plugins/download-file.js"},"twikoo":{"js":"/js/services/twikoo_latest_comment.js"},"waline":{"js":"/js/services/waline_latest_comment.js"},"artalk":{"js":"/js/services/artalk_latest_comment.js"},"giscus":{"js":"/js/services/giscus_latest_comment.js"},"contributors":{"edit_this_page":{"_posts/":null,"wiki/stellar/":"https://github.com/xaoxuu/hexo-theme-stellar-docs/blob/main/"},"js":"/js/services/contributors.js"},"rss":{"js":"/js/services/rss.js"}}`));
for (let id of Object.keys(ctx.services)) {
const js = ctx.services[id].js;
if (id == 'siteinfo') {
const cardlinks = document.querySelectorAll('a.link-card[cardlink]');
if (cardlinks?.length > 0) {
utils.js(js, { defer: true }).then(function () {
setCardLink(cardlinks);
});
}
} else if (id == 'ghinfo') {
const els = document.querySelectorAll('.ds-ghinfo');
if (els.length > 0) {
utils.js(js, { defer: true });
}
} else if (id == 'voice') {
const voiceAudios = document.querySelectorAll('.voice>audio');
if (voiceAudios?.length > 0) {
utils.js(js, { defer: true }).then(function () {
createVoiceDom(voiceAudios);
});
}
} else if (id == 'video') {
const videos = document.querySelectorAll('.video>video');
if (videos?.length > 0) {
utils.js(js, { defer: true }).then(function () {
videoEvents(videos);
});
}
} else if (id == 'download-file') {
const files = document.querySelectorAll('.chat-file');
if (files?.length > 0) {
utils.js(js, { defer: true }).then(function () {
downloadFileEvent(files);
});
}
} else {
const els = document.getElementsByClassName(`ds-${id}`);
if (els?.length > 0) {
utils.jq(() => {
if (id == 'timeline' || id == 'memos' || id == 'marked') {
utils.js(deps.marked).then(function () {
utils.js(js, { defer: true });
});
} else {
utils.js(js, { defer: true });
}
}, false);
}
}
}
// search
if (ctx.search && typeof searchFunc === 'function') {
const $inputArea = $("input#search-input");
if ($inputArea.length > 0 && !$inputArea[0]._searchInitialized) {
const path = ctx.search.path.startsWith('/') ? ctx.root + ctx.search.path.substring(1) : ctx.root + ctx.search.path;
const filter = $inputArea.attr('data-filter') || '';
searchFunc(path, filter, 'search-wrapper', 'search-input', 'search-result');
// 标记为已初始化,防止重复绑定
$inputArea[0]._searchInitialized = true;
}
}
// chat iphone time
let phoneTimes = document.querySelectorAll('.chat .status-bar .time');
let firstAdjustInterval = null;
let mainInterval = null;
if (phoneTimes.length > 0) {
NowTime();
const date = new Date();
const sec = date.getSeconds();
firstAdjustInterval = setInterval(firstAdjustTime, 1000 * (60 - sec));
timers.push(firstAdjustInterval);
function firstAdjustTime() {
NowTime();
if (firstAdjustInterval) {
clearInterval(firstAdjustInterval);
firstAdjustInterval = null;
}
mainInterval = setInterval(NowTime, 1000 * 60);
timers.push(mainInterval);
}
function NowTime() {
for (let i = 0; i < phoneTimes.length; ++i) {
const timeSpan = phoneTimes[i];
const date = new Date();
const hour = date.getHours();
const min = date.getMinutes();
timeSpan.innerHTML = check(hour) + ":" + check(min);
}
};
function check(val) {
if (val < 10) {
return ("0" + val);
}
return (val);
}
}
// chat quote - 存储事件监听器以便清理
const quoteClickHandlers = new Map();
const chat_quote_obverser = new IntersectionObserver((entries, observer) => {
entries.filter((entry) => { return entry.isIntersecting }).sort((a, b) => a.intersectionRect.y !== b.intersectionRect.y ? a.intersectionRect.y - b.intersectionRect.y : a.intersectionRect.x - b.intersectionRect.x).forEach((entry, index) => {
observer.unobserve(entry.target);
setTimeout(() => {
entry.target.classList.add('quote-blink');
setTimeout(() => {
entry.target.classList.remove('quote-blink');
}, 1000);
}, Math.max(100, 16) * (index + 1));
});
});
var chatQuotes = document.querySelectorAll(".chat .talk .quote");
chatQuotes.forEach((quote) => {
const handler = function () {
var chatCellDom = document.getElementById("quote-" + quote.getAttribute("quotedCellTag"));
if (chatCellDom) {
var chatDiv = chatCellDom.parentElement;
var mid = chatDiv.clientHeight / 2;
var offsetTop = chatCellDom.offsetTop;
if (offsetTop > mid - chatCellDom.clientHeight / 2) {
chatDiv.scrollTo({
top: chatCellDom.offsetTop - mid + chatCellDom.clientHeight / 2,
behavior: "smooth"
});
} else {
chatDiv.scrollTo({
top: 0,
behavior: "smooth"
});
}
chat_quote_obverser.observe(chatCellDom);
}
};
quote.addEventListener('click', handler);