-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
1058 lines (716 loc) · 54.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html class="light page-home">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0, user-scalable=0" />
<!--页面窗口自动调整到设备宽度,并禁止用户及缩放页面-->
<meta name="format-detection" content="telephone=no" />
<!--忽略将页面中的数字识别为电话号码-->
<meta name="format-detection" content="email=no" />
<!--忽略Android平台中对邮箱地址的识别-->
<meta name="apple-mobile-web-app-capable" content="yes" />
<!--ios-->
<meta name="mobile-web-app-capable" content="yes" />
<!--安卓 去状态栏-->
<title>Kylin</title>
<meta name="keywords" content="kylin,前端,设计,Hexo主题,前端开发,用户体验,设计,frontend,design,nodejs,JavaScript" />
<meta property="og:type" content="website">
<meta property="og:title" content="Kylin">
<meta property="og:url" content="http://kylin.himmas.cc/index.html">
<meta property="og:site_name" content="Kylin">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Kylin">
<link href="/css/styles.css?v=028c63b1" rel="stylesheet">
<link rel="stylesheet" href="/css/personal-style.css">
<script type="text/javascript">
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?57e94d016e201fba3603a8a2b0263af0";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
<!---->
<div class="head-box">
<div class="head-inner">
<div class="info-box">
<a href="/" class="avatar">
<img src="/images/avatar.jpg" alt="" />
</a>
<div class="detail-info">
<h1 class="name">kylin</h1>
<div class="slogan">醉里论道,醒时折花。</div>
<hr>
<div class="link-box">
<a class="link-item-box td02" href="https://github.com/kylin-z">
<i class="iconfont icon-github"></i>
<span>Github</span>
</a>
<a class="link-item-box td02" href="/">
<i class="iconfont icon-weibo1"></i>
<span>新浪微博</span>
</a>
<a class="link-item-box td02" href="/">
<i class="iconfont icon-twitter"></i>
<span>Twitter</span>
</a>
<a class="link-item-box td02" href="/">
<i class="iconfont icon-facebook1"></i>
<span>facebook</span>
</a>
</div>
</div>
</div>
<div class="menu-box">
<a class="menu-item td02" href="/"
>
<i class="iconfont icon-home"></i></a>
<a class="menu-item td02" href="/archives/"
>
<i class="iconfont icon-filing"></i></a>
<a class="menu-item td02" href="/categories/"
>
<i class="iconfont icon-sort"></i></a>
<a class="menu-item td02" href="/tags/"
>
<i class="iconfont icon-tag"></i></a>
<a class="menu-item td02" href="/link/"
>
<i class="iconfont icon-link"></i></a>
<a class="menu-item td02" href="/atom.xml"
target="_blank"
>
<i class="iconfont icon-rss"></i></a>
<a class="menu-item td02" href="/album/"
>
<i class="iconfont icon-image"></i></a>
<a class="menu-item td02" href="/search/"
>
<i class="iconfont icon-search"></i></a>
</div>
</div>
</div>
<div class="m-head-box" id="m-head-box">
<i class="iconfont icon-m-menu menu-icon" id="m-menu-btn"></i>
<h1 class="name">kylin</h1>
</div>
<div id="m-menu-box">
<a class="menu-item" href="/"
>
<i class="iconfont icon-home"></i>
<span>首页</span>
</a>
<a class="menu-item" href="/archives/"
>
<i class="iconfont icon-filing"></i>
<span>归档</span>
</a>
<a class="menu-item" href="/categories/"
>
<i class="iconfont icon-sort"></i>
<span>分类</span>
</a>
<a class="menu-item" href="/tags/"
>
<i class="iconfont icon-tag"></i>
<span>标签</span>
</a>
<a class="menu-item" href="/link/"
>
<i class="iconfont icon-link"></i>
<span>友链</span>
</a>
<a class="menu-item" href="/atom.xml"
target="_blank"
>
<i class="iconfont icon-rss"></i>
<span>RSS</span>
</a>
<a class="menu-item" href="/album/"
>
<i class="iconfont icon-image"></i>
<span>相册</span>
</a>
<a class="menu-item" href="/search/"
>
<i class="iconfont icon-search"></i>
<span>搜索</span>
</a>
</div>
<script>
var isMenuOpen = false
var $menuBtn = document.getElementById("m-menu-btn")
var $menuBox = document.getElementById("m-menu-box")
var $headBox = document.getElementById("m-head-box")
$menuBtn.onclick = function (e) {
isMenuOpen = !isMenuOpen
$menuBox.style.left = isMenuOpen?'0':'-80%'
$headBox.style.background = isMenuOpen?'rgba(20,20,20,0.9)':'#666'
e.stopPropagation()
}
document.body.onclick = function (e) {
$menuBox.style.left = '-80%'
$headBox.style.background = '#666'
isMenuOpen = false
e.stopPropagation()
}
$menuBox.onclick = function (e) {
e.stopPropagation()
}
</script>
<div class="content content-post CENTER home-content-box">
<div class="container article-container">
<article id="post-FormData" class="article article-type-post"
itemprop="blogPost">
<header class="article-header">
<h1 class="post-title"><a href="/2018/02/28/FormData/">用ajax的姿势伪装一次表单提交</a></h1>
<div class="article-meta">
<span>
<i class="icon-calendar"></i>
<span>2018.02.28</span>
</span>
<span class="article-author">
<i class="icon-user"></i>
<span>Kylin</span>
</span>
<span class="article-category">
<i class="icon-list"></i>
<a class="article-category-link" href="/categories/formData/">formData</a>
</span>
</div>
</header>
<div class="article-content">
<h2 id="方法"><a href="#方法" class="headerlink" title="方法"></a>方法</h2><ul>
<li>新建一个<code>formData</code>将数据<code>append</code>进去</li>
<li>修改<code>header</code>中的<code>Content-Type</code></li>
</ul>
<h2 id="案例"><a href="#案例" class="headerlink" title="案例"></a>案例</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">var</span> file = $file.files[<span class="number">0</span>]</div><div class="line"></div><div class="line"><span class="keyword">let</span> param = <span class="keyword">new</span> FormData()</div><div class="line"></div><div class="line">param.append(<span class="string">'host'</span>,data.host)</div><div class="line">param.append(<span class="string">'policy'</span>,data.policy)</div><div class="line">param.append(<span class="string">'signature'</span>,data.signature)</div><div class="line">param.append(<span class="string">'key'</span>,<span class="string">`<span class="subst">${data.dir}</span>\${filename}`</span>)</div><div class="line">param.append(<span class="string">'OSSAccessKeyId'</span>,data.accessId)</div><div class="line">param.append(<span class="string">'file'</span>,file,file.name)</div><div class="line"></div><div class="line">axios.post(<span class="string">'http://nbicc-lele.oss-cn-hangzhou.aliyuncs.com'</span>,param,{</div><div class="line"> <span class="comment">// multipart/form-data 带文件的表单</span></div><div class="line"> <span class="comment">// application/x-www-form-urlencoded 普通表单</span></div><div class="line"> headers:{<span class="string">'Content-Type'</span>:<span class="string">'multipart/form-data'</span>}</div><div class="line">})</div></pre></td></tr></table></figure>
</div>
</article>
</div>
<!--评论区-->
<div class="br"></div>
<div class="container article-container">
<article id="post-dllPlugin" class="article article-type-post"
itemprop="blogPost">
<header class="article-header">
<h1 class="post-title"><a href="/2018/02/28/dllPlugin/">webpack打包慢的解决方案</a></h1>
<div class="article-meta">
<span>
<i class="icon-calendar"></i>
<span>2018.02.28</span>
</span>
<span class="article-author">
<i class="icon-user"></i>
<span>Kylin</span>
</span>
<span class="article-category">
<i class="icon-list"></i>
<a class="article-category-link" href="/categories/webpack/">webpack</a>
</span>
</div>
</header>
<div class="article-content">
<h2 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h2><p>在开发某基于electron、vue等技术栈的桌面程序的过程中发现,模块越多,webpack打包的速度越慢,居然慢到了令人发指的50min!之后我对整个项目进程了排查,最后发现打包慢的罪魁祸首来自<code>gojs</code>这个模块。由于我对<code>gojs</code>的源代码进行过修改,在<code>.vue</code>组件中引入的是未压缩的<code>gojs/release/go-nw.js</code>,该文件巨大无比多达数万行。起初我以为是<code>Uglify</code>的过程占用了太多时间,然而发现,假如不使用压缩混淆,当只有一个文件引入该模块时,打包时间减少到了两分钟,但若有5、6个文件都引用了该模块,打包速度并没有明显的提升,此时我想到了将该文件直接在<code>index</code>页面中引入的方式来避免将该文件打包,由于种种原因,在这个项目中并不能将变量<code>go</code>作为属性赋值给<code>window</code>,这里我放弃了使用最常见的<code>externals</code>方法,而是采用了另一种方式。</p>
<h2 id="解决方案"><a href="#解决方案" class="headerlink" title="解决方案"></a>解决方案</h2><p><code>DLLPlugin</code>方法能把第三方代码完全分离开,即每次只打包项目自身的代码。</p>
<h3 id="对gojs修改后的版本进行混淆压缩"><a href="#对gojs修改后的版本进行混淆压缩" class="headerlink" title="对gojs修改后的版本进行混淆压缩"></a>对<code>gojs</code>修改后的版本进行混淆压缩</h3><p>这里可以使用任何能达到效果的方式,我使用的是全局模块<a href="https://www.npmjs.com/package/uglify-js"><code>uglyfy-js</code></a></p>
<h3 id="修改gojs模块指向"><a href="#修改gojs模块指向" class="headerlink" title="修改gojs模块指向"></a>修改<code>gojs</code>模块指向</h3><p>先将<code>gojs</code>模块的<code>package.json</code>中的<code>main</code>字段指向想要引入的文件<br><figure class="highlight js"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">{</div><div class="line"><span class="comment">// ...</span></div><div class="line"><span class="string">"main"</span>: <span class="string">"release/go-nw.min.js"</span>,</div><div class="line"><span class="comment">// ...</span></div><div class="line">}</div></pre></td></tr></table></figure></p>
<p class="article-more-link">
<a class="btn btn-primary more-btn" href="/2018/02/28/dllPlugin/#more">阅读全文</a>
</p>
</div>
</article>
</div>
<!--评论区-->
<div class="br"></div>
<div class="container article-container">
<article id="post-vue-plugins" class="article article-type-post"
itemprop="blogPost">
<header class="article-header">
<h1 class="post-title"><a href="/2018/02/08/vue-plugins/">vue插件的打包与发布</a></h1>
<div class="article-meta">
<span>
<i class="icon-calendar"></i>
<span>2018.02.08</span>
</span>
<span class="article-author">
<i class="icon-user"></i>
<span>Kylin</span>
</span>
<span class="article-category">
<i class="icon-list"></i>
<a class="article-category-link" href="/categories/vue/">vue</a>
</span>
</div>
</header>
<div class="article-content">
<h2 id="初始化项目"><a href="#初始化项目" class="headerlink" title="初始化项目"></a>初始化项目</h2><p>以我刚发布的<a href="https://github.com/kylin-z/vue-calendar"><code>vue-calendar</code></a>组件为例</p>
<p>开发插件用<code>webpack-simple</code> 模板比较合适</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">vue init webpack-simple vue-calendar</div><div class="line"><span class="built_in">cd</span> vue-calendar</div><div class="line">npm install</div></pre></td></tr></table></figure>
<h2 id="在跟目录下新建test文件夹用于开发测试"><a href="#在跟目录下新建test文件夹用于开发测试" class="headerlink" title="在跟目录下新建test文件夹用于开发测试"></a>在跟目录下新建<code>test</code>文件夹用于开发测试</h2><p>我这里将原本位于<code>src</code>文件夹下的<code>main.js</code>以及<code>App.vue</code>文件转移到了<code>test</code>文件夹下</p>
<p><img src="http://7xrqm7.com1.z0.glb.clouddn.com/vue-plugin-1.png" alt=""></p>
<h2 id="将插件源码放在src文件夹下,插件入口为src-calendar-main-js"><a href="#将插件源码放在src文件夹下,插件入口为src-calendar-main-js" class="headerlink" title="将插件源码放在src文件夹下,插件入口为src/calendar/main.js"></a>将插件源码放在<code>src</code>文件夹下,插件入口为<code>src/calendar/main.js</code></h2><p><img src="http://7xrqm7.com1.z0.glb.clouddn.com/vue-plugin-2.png" alt=""></p>
<h2 id="修改-webpack-config-js-文件"><a href="#修改-webpack-config-js-文件" class="headerlink" title="修改 webpack.config.js 文件"></a>修改 <code>webpack.config.js</code> 文件</h2><p>根据不同的命令(环境变量)设置不同的入口与输出文件,保证<code>npm run dev</code>与<code>npm run build</code>两个命令都为可用</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">var</span> path = <span class="built_in">require</span>(<span class="string">'path'</span>)</div><div class="line"><span class="keyword">var</span> webpack = <span class="built_in">require</span>(<span class="string">'webpack'</span>)</div><div class="line"></div><div class="line"><span class="comment">//...根据环境变量(package.json script中设置)...</span></div><div class="line"><span class="keyword">var</span> entry = <span class="string">'./test/main.js'</span></div><div class="line"><span class="keyword">var</span> outputFileName = <span class="string">'build.js'</span></div><div class="line"></div><div class="line"><span class="keyword">if</span> (process.env.NODE_ENV === <span class="string">'production'</span>) {</div><div class="line"> entry = <span class="string">'./src/calendar/main.js'</span></div><div class="line"> outputFileName = <span class="string">'vue-calendar.js'</span></div><div class="line">}</div><div class="line"><span class="comment">//......</span></div><div class="line"></div><div class="line"><span class="built_in">module</span>.exports = {</div><div class="line"> <span class="comment">//entry改为变量</span></div><div class="line"> entry: entry,</div><div class="line"> output: {</div><div class="line"> path: path.resolve(__dirname, <span class="string">'./dist'</span>),</div><div class="line"> publicPath: <span class="string">'/dist/'</span>,</div><div class="line"> <span class="comment">//filename</span></div><div class="line"> filename: outputFileName,</div><div class="line"> <span class="comment">//library与libraryTarget一定要添加,否则import进来的对象为空</span></div><div class="line"> library: <span class="string">'vue-calendar'</span>,</div><div class="line"> libraryTarget: <span class="string">'umd'</span></div><div class="line"> },</div><div class="line"> <span class="comment">//...</span></div><div class="line">}</div></pre></td></tr></table></figure>
<p class="article-more-link">
<a class="btn btn-primary more-btn" href="/2018/02/08/vue-plugins/#more">阅读全文</a>
</p>
</div>
</article>
</div>
<!--评论区-->
<div class="br"></div>
<div class="container article-container">
<article id="post-LCS" class="article article-type-post"
itemprop="blogPost">
<header class="article-header">
<h1 class="post-title"><a href="/2018/02/02/LCS/">最长公共子序列(LCS)</a></h1>
<div class="article-meta">
<span>
<i class="icon-calendar"></i>
<span>2018.02.02</span>
</span>
<span class="article-author">
<i class="icon-user"></i>
<span>Kylin</span>
</span>
<span class="article-category">
<i class="icon-list"></i>
<a class="article-category-link" href="/categories/算法/">算法</a>
</span>
</div>
</header>
<div class="article-content">
<h2 id="基本概念"><a href="#基本概念" class="headerlink" title="基本概念"></a>基本概念</h2><blockquote>
<p>(Longest Common Subsequence LCS)是从给定的两个序列X和Y中取出尽可能多的一部分字符,按照它们在原序列排列的先后次序排列得到。LCS问题的算法用途广泛,如在软件不同版本的管理中,用LCS算法找到新旧版本的异同处;在软件测试中,用LCS算法对录制和回放的序列进行比较,在基因工程领域,用LCS算法检查患者DNA连与键康DNA链的异同;在防抄袭系统中,用LCS算法检查论文的抄袭率。LCS算法也可以用于程序代码相似度度量,人体运行的序列检索,视频段匹配等方面,所以对LCS算法进行研究具有很高的应用价值。</p>
</blockquote>
<h3 id="子序列-subsequence"><a href="#子序列-subsequence" class="headerlink" title="子序列(subsequence)"></a>子序列(subsequence)</h3><p>一个特定序列的子序列就是将给定序列中零个或多个元素去掉后得到的结果(不改变元素间相对次序)。例如序列<code><A,B,C,B,D,A,B></code>的子序列有:<code><A,B></code>、<code><B,C,A></code>、<code><A,B,C,D,A></code>等。</p>
<h3 id="公共子序列-common-subsequence"><a href="#公共子序列-common-subsequence" class="headerlink" title="公共子序列(common subsequence)"></a>公共子序列(common subsequence)</h3><p>给定序列X和Y,序列Z是X的子序列,也是Y的子序列,则Z是X和Y的公共子序列。例如X=[A,B,C,B,D,A,B],Y=[B,D,C,A,B,A[,那么序列Z=[B,C,A]为X和Y的公共子序列,其长度为3。但Z不是X和Y的最长公共子序列,而序列[B,C,B,A]和[B,D,A,B]也均为X和Y的最长公共子序列,长度为4,而X和Y不存在长度大于等于5的公共子序列。对于序列[A,B,C]和序列[E,F,G]的公共子序列只有空序列[]。</p>
<h3 id="最长公共子序列"><a href="#最长公共子序列" class="headerlink" title="最长公共子序列"></a>最长公共子序列</h3><p>给定序列X和Y,从它们的所有公共子序列中选出长度最长的那一个或几个。</p>
<h3 id="子串"><a href="#子串" class="headerlink" title="子串"></a>子串</h3><p>将一个序列从最前或最后或同时删掉零个或几个字符构成的新系列。区别与子序列,子序列是可以从中间抠掉字符的。cnblogs这个字符串中子序列有多少个呢?很显然有27个,比如其中的cb,cgs等等都是其子序列</p>
<p><img src="http://7xrqm7.com1.z0.glb.clouddn.com/LCS.png" alt=""></p>
<h2 id="分析"><a href="#分析" class="headerlink" title="分析"></a>分析</h2><p>求解LCS问题,不能使用暴力搜索方法。一个长度为n的序列拥有 2的n次方个子序列,它的时间复杂度是指数阶,太恐怖了。我们先对LCS问题进行特征分析。</p>
<p>结合下图,设A=“a0,a1,…,am”,B=“b0,b1,…,bn”,且Z=“z0,z1,…,zk”为它们的最长公共子序列。不难证明有以下性质:</p>
<ul>
<li>如果am=bn,则zk=am=bn,且“z0,z1,…,z(k-1)”是“a0,a1,…,a(m-1)”和“b0,b1,…,b(n-1)”的一个最长公共子序列;</li>
<li>如果am!=bn,则若zk!=am,蕴涵“z0,z1,…,zk”是“a0,a1,…,a(m-1)”和“b0,b1,…,bn”的一个最长公共子序列;</li>
<li>如果am!=bn,则若zk!=bn,蕴涵“z0,z1,…,zk”是“a0,a1,…,am”和“b0,b1,…,b(n-1)”的一个最长公共子序列。</li>
</ul>
<p><img src="http://7xrqm7.com1.z0.glb.clouddn.com/LCS-example.jpeg" alt=""></p>
<p>由以上特征可得到递归公式如下:</p>
<p class="tip">c[i,j]表示长度为i的S1和长度为j的S2的LCS的长度</p>
<p><img src="http://7xrqm7.com1.z0.glb.clouddn.com/LCS-formula.jpeg" alt=""></p>
<p class="article-more-link">
<a class="btn btn-primary more-btn" href="/2018/02/02/LCS/#more">阅读全文</a>
</p>
</div>
</article>
</div>
<!--评论区-->
<div class="br"></div>
<div class="container article-container">
<article id="post-react-native" class="article article-type-post"
itemprop="blogPost">
<header class="article-header">
<h1 class="post-title"><a href="/2018/01/05/react-native/">react-native踩坑记录</a></h1>
<div class="article-meta">
<span>
<i class="icon-calendar"></i>
<span>2018.01.05</span>
</span>
<span class="article-author">
<i class="icon-user"></i>
<span>Kylin</span>
</span>
<span class="article-category">
<i class="icon-list"></i>
<a class="article-category-link" href="/categories/笔记/">笔记</a>
</span>
</div>
</header>
<div class="article-content">
<h2 id="打包命令说明"><a href="#打包命令说明" class="headerlink" title="打包命令说明"></a>打包命令说明</h2><p>使用 <code>react-native bundle --help</code> 来查看打包的具体参数</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div></pre></td><td class="code"><pre><div class="line">react-native bundle [options]</div><div class="line"> builds the javascript bundle <span class="keyword">for</span> offline use</div><div class="line"></div><div class="line"> Options:</div><div class="line"></div><div class="line"> -h, --help output usage information</div><div class="line"> --entry-file <path> Path to the root JS file, either absolute or relative to JS root</div><div class="line"> --platform [string] Either <span class="string">"ios"</span> or <span class="string">"android"</span></div><div class="line"> --transformer [string] Specify a custom transformer to be used</div><div class="line"> --dev [boolean] If <span class="literal">false</span>, warnings are disabled and the bundle is minified</div><div class="line"> --prepack When passed, the output bundle will use the Prepack format.</div><div class="line"> --bridge-config [string] File name of a a JSON <span class="built_in">export</span> of __fbBatchedBridgeConfig. Used by Prepack. Ex. ./bridgeconfig.json</div><div class="line"> --bundle-output <string> File name <span class="built_in">where</span> to store the resulting bundle, ex. /tmp/groups.bundle</div><div class="line"> --bundle-encoding [string] Encoding the bundle should be written <span class="keyword">in</span> (https://nodejs.org/api/buffer.html<span class="comment">#buffer_buffer).</span></div><div class="line"> --sourcemap-output [string] File name <span class="built_in">where</span> to store the sourcemap file <span class="keyword">for</span> resulting bundle, ex. /tmp/groups.map</div><div class="line"> --assets-dest [string] Directory name <span class="built_in">where</span> to store assets referenced <span class="keyword">in</span> the bundle</div><div class="line"> --verbose Enables logging</div><div class="line"> --reset-cache Removes cached files</div><div class="line"> --config [string] Path to the CLI configuration file</div></pre></td></tr></table></figure>
<p>中文版:<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div></pre></td><td class="code"><pre><div class="line">react-native bundle [参数]</div><div class="line"> 构建 js 离线包 </div><div class="line"></div><div class="line"> Options:</div><div class="line"></div><div class="line"> -h, --help 输出如何使用的信息</div><div class="line"> --entry-file <path> RN入口文件的路径, 绝对路径或相对路径</div><div class="line"> --platform [string] ios 或 andorid</div><div class="line"> --transformer [string] Specify a custom transformer to be used</div><div class="line"> --dev [boolean] 如果为<span class="literal">false</span>, 警告会不显示并且打出的包的大小会变小</div><div class="line"> --prepack 当通过时, 打包输出将使用Prepack格式化</div><div class="line"> --bridge-config [string] 使用Prepack的一个json格式的文件__fbBatchedBridgeConfig 例如: ./bridgeconfig.json</div><div class="line"> --bundle-output <string> 打包后的文件输出目录, 例: /tmp/groups.bundle</div><div class="line"> --bundle-encoding [string] 打离线包的格式 可参考链接https://nodejs.org/api/buffer.html<span class="comment">#buffer_buffer.</span></div><div class="line"> --sourcemap-output [string] 生成Source Map,但0.14之后不再自动生成<span class="built_in">source</span> map,需要手动指定这个参数。例: /tmp/groups.map</div><div class="line"> --assets-dest [string] 打包时图片资源的存储路径</div><div class="line"> --verbose 显示打包过程</div><div class="line"> --reset-cache 移除缓存文件</div><div class="line"> --config [string] 命令行的配置文件路径</div></pre></td></tr></table></figure></p>
<p class="article-more-link">
<a class="btn btn-primary more-btn" href="/2018/01/05/react-native/#more">阅读全文</a>
</p>
</div>
</article>
</div>
<!--评论区-->
<div class="br"></div>
<div class="container article-container">
<article id="post-machine-learning-2" class="article article-type-post"
itemprop="blogPost">
<header class="article-header">
<h1 class="post-title"><a href="/2017/11/26/machine-learning-2/">李宏毅machine learning学习笔记——Regression</a></h1>
<div class="article-meta">
<span>
<i class="icon-calendar"></i>
<span>2017.11.26</span>
</span>
<span class="article-author">
<i class="icon-user"></i>
<span>Kylin</span>
</span>
<span class="article-category">
<i class="icon-list"></i>
<a class="article-category-link" href="/categories/machine-learning学习笔记/">machine learning学习笔记</a>
</span>
</div>
</header>
<div class="article-content">
<h2 id="资料"><a href="#资料" class="headerlink" title="资料"></a>资料</h2><table>
<thead>
<tr>
<th>pdf</th>
<th>video</th>
<th>B站</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="http://speech.ee.ntu.edu.tw/~tlkagk/courses/ML_2017/Lecture/Regression.pdf">链接</a></td>
<td><a href="https://www.youtube.com/watch?v=fegAeph9UaA">链接</a></td>
<td><a href="https://www.bilibili.com/video/av10590361/?from=search&seid=11735940949684226997#page=3">链接</a></td>
</tr>
</tbody>
</table>
<h2 id="例子-预测宝可梦进化后的武力值-cp"><a href="#例子-预测宝可梦进化后的武力值-cp" class="headerlink" title="例子:预测宝可梦进化后的武力值(cp)"></a>例子:预测宝可梦进化后的武力值(cp)</h2><h3 id="输入"><a href="#输入" class="headerlink" title="输入"></a>输入</h3><ul>
<li>用<code>X</code>来表示一只宝可梦</li>
<li>用<code>Xi</code>来表示宝可梦进化前的种种特性(feature)<ul>
<li><code>Xcp</code> 现在的cp值</li>
<li><code>Xs</code> 物种</li>
<li><code>Xhp</code> hp值</li>
<li><code>Xw</code> 体重</li>
<li><code>Xh</code> 身高</li>
</ul>
</li>
</ul>
<h3 id="输出"><a href="#输出" class="headerlink" title="输出"></a>输出</h3><ul>
<li>这只宝可梦进化后的cp值:<code>Y</code></li>
</ul>
<h3 id="Model"><a href="#Model" class="headerlink" title="Model"></a>Model</h3><p class="tip">假设输入与输出间存在<code>Y = w·Xcp</code> 这样的关系(这里省略了X的其他属性)</p>
<p>由于<code>w</code>、<code>b</code>可以为任何值。这里我们将各种数值带入到<code>b</code>、<code>w</code>中,就得到了一个Model(A set of function)</p>
<ul>
<li><code>f1:Y = 10+9·Xcp</code></li>
<li><code>f2:Y = 9.8+9.2·Xcp</code></li>
<li><code>f3:Y = - 0.8-1.2·Xcp</code></li>
<li>…</li>
</ul>
<p>最后得到一个Linear Model<br><img src="http://ozm59jgdk.bkt.clouddn.com/Regression-linear%20mode.png" alt=""></p>
<p class="article-more-link">
<a class="btn btn-primary more-btn" href="/2017/11/26/machine-learning-2/#more">阅读全文</a>
</p>
</div>
</article>
</div>
<!--评论区-->
<div class="br"></div>
<div class="container article-container">
<article id="post-canvas-font-face" class="article article-type-post"
itemprop="blogPost">
<header class="article-header">
<h1 class="post-title"><a href="/2017/11/21/canvas-font-face/">如何在canvas中使用自定义字体图标</a></h1>
<div class="article-meta">
<span>
<i class="icon-calendar"></i>
<span>2017.11.21</span>
</span>
<span class="article-author">
<i class="icon-user"></i>
<span>Kylin</span>
</span>
<span class="article-category">
<i class="icon-list"></i>
<a class="article-category-link" href="/categories/canvas/">canvas</a>
</span>
</div>
</header>
<div class="article-content">
<h2 id="案例"><a href="#案例" class="headerlink" title="案例"></a>案例</h2><h3 id="以font-awesome这个图标库为例"><a href="#以font-awesome这个图标库为例" class="headerlink" title="以font-awesome这个图标库为例"></a>以<code>font-awesome</code>这个图标库为例</h3><p></p><p class="tip">字体图标的展示需要保证图标代码为unicode,需要在code前面加上<code>\u</code></p><br><figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div></pre></td><td class="code"><pre><div class="line"><span class="meta"><!doctype html></span></div><div class="line"><span class="tag"><<span class="name">html</span> <span class="attr">lang</span>=<span class="string">"en"</span>></span></div><div class="line"><span class="tag"><<span class="name">head</span>></span></div><div class="line"> <span class="tag"><<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">"UTF-8"</span>></span></div><div class="line"> <span class="tag"><<span class="name">meta</span> <span class="attr">name</span>=<span class="string">"viewport"</span></span></div><div class="line"> <span class="attr">content</span>=<span class="string">"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"</span>></div><div class="line"> <span class="tag"><<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">"X-UA-Compatible"</span> <span class="attr">content</span>=<span class="string">"ie=edge"</span>></span></div><div class="line"> <span class="tag"><<span class="name">link</span> <span class="attr">rel</span>=<span class="string">"stylesheet"</span> <span class="attr">href</span>=<span class="string">"https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"</span>></span></div><div class="line"> <span class="tag"><<span class="name">title</span>></span>Document<span class="tag"></<span class="name">title</span>></span></div><div class="line"><span class="tag"></<span class="name">head</span>></span></div><div class="line"><span class="tag"><<span class="name">body</span>></span></div><div class="line"><span class="tag"><<span class="name">canvas</span> <span class="attr">id</span>=<span class="string">"canvas"</span> <span class="attr">width</span>=<span class="string">"800"</span> <span class="attr">height</span>=<span class="string">"400"</span>></span><span class="tag"></<span class="name">canvas</span>></span></div><div class="line"><span class="tag"><<span class="name">i</span> <span class="attr">class</span>=<span class="string">"fa fa-hand-pointer-o"</span>></span><span class="tag"></<span class="name">i</span>></span></div><div class="line"><span class="tag"><<span class="name">input</span> <span class="attr">type</span>=<span class="string">"button"</span> <span class="attr">value</span>=<span class="string">"点我画图标"</span> <span class="attr">id</span>=<span class="string">"button"</span>></span></div><div class="line"><span class="tag"><<span class="name">script</span>></span><span class="javascript"></span></div><div class="line"></div><div class="line"> <span class="function"><span class="keyword">function</span> <span class="title">draw</span>(<span class="params"></span>)</span>{</div><div class="line"> <span class="keyword">var</span> canvas=<span class="built_in">document</span>.getElementById(<span class="string">"canvas"</span>);</div><div class="line"> <span class="keyword">var</span> ctx=canvas.getContext(<span class="string">"2d"</span>);</div><div class="line"> ctx.font=<span class="string">'48px FontAwesome'</span>;</div><div class="line"> ctx.fillText(<span class="string">'\uF064 \uF065 \uF0a5'</span>,<span class="number">20</span>,<span class="number">75</span>);</div><div class="line"> }</div><div class="line"> <span class="built_in">document</span>.getElementById(<span class="string">'button'</span>).onclick = draw</div><div class="line"><span class="tag"></<span class="name">script</span>></span></div><div class="line"><span class="tag"></<span class="name">body</span>></span></div><div class="line"><span class="tag"></<span class="name">html</span>></span></div></pre></td></tr></table></figure><p></p>
<p><a class="jsbin-embed" href="http://jsbin.com/cohurap/embed?html,js,output" target="_blank" rel="external">JS Bin on jsbin.com</a><script src="http://static.jsbin.com/js/embed.min.js?4.1.1"></script></p>
</div>
</article>
</div>
<!--评论区-->
<div class="br"></div>
<div class="container article-container">
<article id="post-machine-learning-1" class="article article-type-post"
itemprop="blogPost">
<header class="article-header">
<h1 class="post-title"><a href="/2017/11/18/machine-learning-1/">李宏毅machine learning学习笔记——导论</a></h1>
<div class="article-meta">
<span>
<i class="icon-calendar"></i>
<span>2017.11.18</span>
</span>
<span class="article-author">
<i class="icon-user"></i>
<span>Kylin</span>
</span>
<span class="article-category">
<i class="icon-list"></i>
<a class="article-category-link" href="/categories/machine-learning学习笔记/">machine learning学习笔记</a>
</span>
</div>
</header>
<div class="article-content">
<h2 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h2><p>最近在学习machine learning相关的知识,李宏毅教授的机器学习课程是一套非常好的入门教材,这里使用的2017年的版本。<br><a href="http://speech.ee.ntu.edu.tw/~tlkagk/courses_ML17_2.html">课程日历</a><br><a href="https://www.bilibili.com/video/av10590361/index_2.html?t=61#page=1">B站视频</a></p>
<h2 id="几个概念之间的关系"><a href="#几个概念之间的关系" class="headerlink" title="几个概念之间的关系"></a>几个概念之间的关系</h2><ul>
<li>人工智能<br>人们想要达成的目标</li>
<li>机器学习(machine learning)<br>达成人工智能的一种手段</li>
<li>深度学习(deep learning)<br>机器学习其中的一个方法</li>
</ul>
<p><img src="http://ozm59jgdk.bkt.clouddn.com/%E5%87%A0%E4%B8%AA%E6%A6%82%E5%BF%B5%E7%9A%84%E5%85%B3%E7%B3%BB.png" alt="几个概念之间的关系"></p>
<h2 id="machine-learning"><a href="#machine-learning" class="headerlink" title="machine learning"></a>machine learning</h2><p class="tip">machine learning:让机器具有一个能力,这个能力可以根据提供的资料,寻找到一个人们需要的function</p>
<h3 id="machine-learning的步骤"><a href="#machine-learning的步骤" class="headerlink" title="machine learning的步骤"></a>machine learning的步骤</h3><p>以supervise learning为例</p>
<ol>
<li>定义一个Model —— define a set of function (f1、f2……)</li>
<li>准备一些训练资料 Training Data (正确的输入和输出<code>label</code>的集合),使机器具有衡量function好坏的能力 —— goodness of function</li>
<li>准备一个有效率的演算法寻找Model中最优的funciton(f*) —— pick the best function
<p class="article-more-link">
<a class="btn btn-primary more-btn" href="/2017/11/18/machine-learning-1/#more">阅读全文</a>
</p>
</div>
</article>
</div>
<!--评论区-->
<div class="br"></div>
<div class="container article-container">
<article id="post-fixed" class="article article-type-post"
itemprop="blogPost">
<header class="article-header">
<h1 class="post-title"><a href="/2017/08/02/fixed/">positon:fixed的怪异行为记录</a></h1>
<div class="article-meta">
<span>
<i class="icon-calendar"></i>
<span>2017.08.02</span>
</span>
<span class="article-author">
<i class="icon-user"></i>
<span>Kylin</span>
</span>
<span class="article-category">
<i class="icon-list"></i>
<a class="article-category-link" href="/categories/css/">css</a>
</span>
</div>
</header>
<div class="article-content">
<h2 id="案例"><a href="#案例" class="headerlink" title="案例"></a>案例</h2><p><img src="http://7xrqm7.com1.z0.glb.clouddn.com/position-fixed-example.png" alt=""></p>
<p></p><p class="tip">若定位为fixed的父级元素被设置了transform属性,那么该元素(position:relative/absolute/fixed)就会根据父元素定位</p><p></p>
<blockquote>
<p>参考: <a href="http://meyerweb.com/eric/thoughts/2011/09/12/un-fixing-fixed-elements-with-css-transforms/" target="_blank" rel="external">Un-fixing Fixed Elements with CSS Transforms</a></p>
</blockquote>
</div>
</article>
</div>
<!--评论区-->
<div class="br"></div>
<div class="container article-container">
<article id="post-spread" class="article article-type-post"
itemprop="blogPost">
<header class="article-header">
<h1 class="post-title"><a href="/2017/07/04/spread/">扩展运算符小贴士</a></h1>
<div class="article-meta">
<span>
<i class="icon-calendar"></i>
<span>2017.07.04</span>
</span>
<span class="article-author">
<i class="icon-user"></i>
<span>Kylin</span>
</span>
<span class="article-category">
<i class="icon-list"></i>
<a class="article-category-link" href="/categories/javascript/">javascript</a>
</span>
</div>
</header>
<div class="article-content">
<h2 id="前沿"><a href="#前沿" class="headerlink" title="前沿"></a>前沿</h2><p>es2015引入了扩展运算符(spread operator)<a href="http://es6.ruanyifeng.com/#docs/array"><code>...</code></a>,可以用来进行一些数组和对象操作。</p>
<h2 id="案例"><a href="#案例" class="headerlink" title="案例"></a>案例</h2><p>下面是codewar上的一道题,判断字符串/数字/数组是否对称</p>
<h3 id="题目"><a href="#题目" class="headerlink" title="题目"></a>题目</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div></pre></td><td class="code"><pre><div class="line"></div><div class="line">Give you an obj, it can be 3 types: string, number and number array, Check that they are symmetrical or not, <span class="built_in">return</span> a boolean value. </div><div class="line"></div><div class="line">obj=<span class="string">""</span> <span class="built_in">return</span> <span class="literal">true</span> (Empty string should <span class="built_in">return</span> <span class="literal">true</span>)</div><div class="line">obj=<span class="string">"1"</span> <span class="built_in">return</span> <span class="literal">true</span> (one char should <span class="built_in">return</span> <span class="literal">true</span>)</div><div class="line">obj=<span class="string">"11"</span> <span class="built_in">return</span> <span class="literal">true</span></div><div class="line">obj=<span class="string">"12"</span> <span class="built_in">return</span> <span class="literal">false</span></div><div class="line">obj=<span class="string">"121"</span> <span class="built_in">return</span> <span class="literal">true</span></div><div class="line">obj=1 <span class="built_in">return</span> <span class="literal">true</span> (number<10 should <span class="built_in">return</span> <span class="literal">true</span>)</div><div class="line">obj=-1 <span class="built_in">return</span> <span class="literal">false</span> (negative number should <span class="built_in">return</span> <span class="literal">false</span>)</div><div class="line">obj=10 <span class="built_in">return</span> <span class="literal">false</span></div><div class="line">obj=11 <span class="built_in">return</span> <span class="literal">true</span></div><div class="line">obj=12 <span class="built_in">return</span> <span class="literal">false</span></div><div class="line">obj=121 <span class="built_in">return</span> <span class="literal">true</span></div><div class="line">obj=[] <span class="built_in">return</span> <span class="literal">true</span> (Empty array should <span class="built_in">return</span> <span class="literal">true</span>)</div><div class="line">obj=[1] <span class="built_in">return</span> <span class="literal">true</span> (an array with one element should <span class="built_in">return</span> <span class="literal">true</span>)</div><div class="line">obj=[1,2,3,4,5] <span class="built_in">return</span> <span class="literal">false</span> </div><div class="line">obj=[1,2,3,2,1] <span class="built_in">return</span> <span class="literal">true</span></div><div class="line">obj=[11,12,13,12,11] <span class="built_in">return</span> <span class="literal">true</span> (left element = right element)</div><div class="line">obj=[11,12,21,11] <span class="built_in">return</span> <span class="literal">false</span> (not verify them as a string)</div></pre></td></tr></table></figure>
<p class="article-more-link">
<a class="btn btn-primary more-btn" href="/2017/07/04/spread/#more">阅读全文</a>
</p>
</div>
</article>
</div>
<!--评论区-->
<div class="page-box">
<nav class="pagination">
<!--上一页-->
<!--第一页-->
<a class="page-number current" href="/">1</a>
<a href="/page/2/" class="page-number">2</a>
<span class="space">…</span>
<a href="/page/4/" class="page-number">4</a>
<!--尾页-->
<a class="extend next" rel="next" href="/page/2/">
<i class="iconfont icon-next"></i>
</a>
</nav>
</div>
</div>
<!--<div class="modal" id="modal">
<span id="cover" class="cover hide"></span>
<div id="modal-dialog" class="modal-dialog hide-dialog">
<div class="modal-header">
<span id="close" class="btn-close">关闭</span>
</div>
<hr>
<div class="modal-body">
<ul class="list-toolbox">
<li class="item-toolbox">
<a
class="CIRCLE"
href="/"
target="_self"
>
首页
</a>
</li>
<li class="item-toolbox">
<a
class="CIRCLE"
href="/archives/"
target="_self"
>
归档
</a>
</li>
<li class="item-toolbox">
<a
class="CIRCLE"
href="/categories/"
target="_self"
>
分类
</a>
</li>
<li class="item-toolbox">
<a
class="CIRCLE"
href="/tags/"
target="_self"
>
标签
</a>
</li>
<li class="item-toolbox">
<a
class="CIRCLE"
href="/link/"
target="_self"
>
友链
</a>
</li>
<li class="item-toolbox">
<a
class="CIRCLE"
href="/atom.xml"
target="_blank"
>
RSS
</a>
</li>
<li class="item-toolbox">
<a
class="CIRCLE"
href="/album/"
target="_self"
>
相册
</a>
</li>
<li class="item-toolbox">
<a
class="CIRCLE"
href="/search/"
target="_self"
>
搜索
</a>
</li>
</ul>
</div>
</div>
</div>
-->
<script type="text/javascript">
function loadScript(url, callback) {
var script = document.createElement('script')
script.type = 'text/javascript';
if (script.readyState) { //IE
script.onreadystatechange = function() {
if (script.readyState == 'loaded' ||
script.readyState == 'complete') {
script.onreadystatechange = null;
callback();
}
};
} else { //Others
script.onload = function() {
callback();
};