-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
779 lines (548 loc) · 45.7 KB
/
index.html
File metadata and controls
779 lines (548 loc) · 45.7 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>linyl</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta property="og:type" content="website">
<meta property="og:title" content="linyl">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="linyl">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="linyl">
<link rel="alternate" href="/atom.xml" title="linyl" type="application/atom+xml">
<link rel="icon" href="/favicon.png">
<link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<div id="container">
<div id="wrap">
<header id="header">
<div id="banner"></div>
<div id="header-outer" class="outer">
<div id="header-title" class="inner">
<h1 id="logo-wrap">
<a href="/" id="logo">linyl</a>
</h1>
</div>
<div id="header-inner" class="inner">
<nav id="main-nav">
<a id="main-nav-toggle" class="nav-icon"></a>
<a class="main-nav-link" href="/">Home</a>
<a class="main-nav-link" href="/archives">Archives</a>
</nav>
<nav id="sub-nav">
<a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
<a id="nav-search-btn" class="nav-icon" title="Suche"></a>
</nav>
<div id="search-form-wrap">
<form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit"></button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
</div>
</div>
</div>
</header>
<div class="outer">
<section id="main">
<article id="post-suanfa" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2018/08/18/suanfa/" class="article-date">
<time datetime="2018-08-18T10:32:30.000Z" itemprop="datePublished">2018-08-18</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2018/08/18/suanfa/">suanfa</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h4 id="第一题-确定字符串互异"><a href="#第一题-确定字符串互异" class="headerlink" title="第一题 确定字符串互异"></a>第一题 确定字符串互异</h4><p>题目描述<br>请实现一个算法,确定一个字符串的所有字符是否全都不同。这里我们要求不允许使用额外的存储结构。</p>
<p>给定一个string iniString,请返回一个bool值,True代表所有字符全都不同,False代表存在相同的字符。保证字符串中的字符为ASCII字符。字符串的长度小于等于3000。</p>
<p>测试样例:<br>“aeiou”<br>返回:True<br>“BarackObama”<br>返回:False</p>
<hr>
<p>常规做法:</p>
<pre><code>class Different:
def checkDifferent(self, iniString):
# write code here
for i in range(len(iniString)):
_char = iniString[i]
for j in range(i+1,len(iniString)):
if _char == iniString[j]:
return False
return True
</code></pre><hr>
<p>正则做法:</p>
<pre><code>class Different:
def checkDifferent(self, iniString):
# write code here
import re
regx = re.compile('.*(.)(.*\\1).*')
if regx.match(iniString):
return False
return True
</code></pre><h4 id="第二题:原串反转"><a href="#第二题:原串反转" class="headerlink" title="第二题:原串反转"></a>第二题:原串反转</h4><p>请实现一个算法,在不使用额外数据结构和储存空间的情况下,翻转一个给定的字符串(可以使用单个过程变量)。</p>
<p>给定一个string iniString,请返回一个string,为翻转后的字符串。保证字符串的长度小于等于5000。</p>
<p>测试样例:<br>“This is nowcoder”<br>返回:”redocwon si sihT”</p>
<p>Python解决办法:</p>
<pre><code>class Reverse:
def reverseString(self, iniString):
# write code here
return iniString[::-1]
</code></pre><h4 id="第三题:确定两串乱序同构"><a href="#第三题:确定两串乱序同构" class="headerlink" title="第三题:确定两串乱序同构"></a>第三题:确定两串乱序同构</h4><p>给定两个字符串,请编写程序,确定其中一个字符串的字符重新排列后,能否变成另一个字符串。这里规定大小写为不同字符,且考虑字符串中的空格。</p>
<p>给定一个string stringA和一个string stringB,请返回一个bool,代表两串是否重新排列后可相同。保证两串的长度都小于等于5000。</p>
<pre><code>class Same:
def checkSam(self, stringA, stringB):
# write code here
if len(stringA) != len(stringB):
return False
dictA = {}
dictB = {}
for _ch in stringA:
if _ch not in dictA:
dictA[_ch] = 1
else:
dictA[_ch] += 1
for _ch in stringB:
if _ch not in dictB:
dictB[_ch] = 1
else:
dictB[_ch] += 1
for item in dictA:
if item not in dictB or dictA[item] != dictB[item]:
return False
return True
</code></pre>
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2018/08/18/suanfa/" data-id="cjkzabkuk000866rx7g97hvf0" class="article-share-link">Teilen</a>
</footer>
</div>
</article>
<article id="post-Nginx" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2018/07/25/Nginx/" class="article-date">
<time datetime="2018-07-25T01:37:27.000Z" itemprop="datePublished">2018-07-25</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2018/07/25/Nginx/">Nginx</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h3 id="初探Nginx架构"><a href="#初探Nginx架构" class="headerlink" title="初探Nginx架构"></a>初探Nginx架构</h3>
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2018/07/25/Nginx/" data-id="cjkzabkue000566rxcmnu08t7" class="article-share-link">Teilen</a>
</footer>
</div>
</article>
<article id="post-tornado" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2018/06/22/tornado/" class="article-date">
<time datetime="2018-06-22T08:08:08.000Z" itemprop="datePublished">2018-06-22</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2018/06/22/tornado/">tornado</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="一、异步和非阻塞I-O"><a href="#一、异步和非阻塞I-O" class="headerlink" title="一、异步和非阻塞I/O"></a>一、异步和非阻塞I/O</h2><p>实时web功能需要为每个用户提供一个多数时间被闲置的长连接,在传统的同步web服务器中,这意味着要为每个用户提供一个线程,当然每个线程的开销都是很昂贵的。</p>
<p>为了尽量减少并发连接造成的开销,Tornado使用了一种单线程事件循环的方式,这就意味着所有的应用代码都应该是异步非阻塞的,因为在同一时间只有一个操作是有效的。</p>
<h3 id="1、阻塞"><a href="#1、阻塞" class="headerlink" title="1、阻塞"></a>1、阻塞</h3><p>一个函数在等待某些事情的返回值的时候回被<strong>阻塞</strong>。函数被阻塞的原因有很多:网络I/O,磁盘I/O,互斥锁等。事实上,每个函数在运行和使用CPU的时候都或多或少会被阻塞(举个极端的例子来说明为什么对待CUP阻塞要和对待一般阻塞一样的严肃:比如密码哈希函数bcrypt,需要消耗几百毫秒的CPU时间,这已经远远超过了一般的网络或者磁盘请求时间了)。</p>
<p>一个函数可以在某些方面阻塞在另外一些方面不阻塞.例如,<code>tornado.httpclient</code>在默认的配置下,会在DNS解析上面阻塞,但是在其他网络请 求的时候不阻塞 (为了减轻这种影响,可以用<code>ThreadedResolver</code>或者是 通过正确配置<code>libcurl</code>用<code>tornado.curl_httpclient</code>来做). 在Tornado的上下文中,我们一般讨论网络I/O上下文的阻塞,尽管各种阻塞已经被最小化。</p>
<h3 id="2、异步"><a href="#2、异步" class="headerlink" title="2、异步"></a>2、异步</h3><p><strong>异步</strong>函数在会在完成之前返回,在应用中触发下一个动作之前通常会在后 台执行一些工作(和正常的<strong>同步</strong>函数在返回前就执行完所有的事情不同)。这里列举了几种风格的异步接口:</p>
<ul>
<li>回调参数</li>
<li>返回一个占位符 (Future, Promise, Deferred)</li>
<li>传送给一个队列</li>
<li>回调注册表 (POSIX信号)</li>
</ul>
<p>不论使用哪种类型的接口, 按照定义 异步函数与它们的调用者都有着不同的交互方 式;也没有什么对调用者透明的方式使得同步函数异步(类似<a href="http://www.gevent.org/" target="_blank" rel="noopener">gevent</a>使用轻量级线程的系统性能虽然堪比异步系统,但它们并没有真正的让事情异步).</p>
<h3 id="3、例子"><a href="#3、例子" class="headerlink" title="3、例子"></a>3、例子</h3><p>一个简单的同步函数</p>
<pre><code>from tornado.httpclient import HTTPClient
def synchronous_fetch(url):
http_client = HTTPClient()
response = http_client.fetch(url)
return response.body
</code></pre>
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2018/06/22/tornado/" data-id="cjkzabkup000a66rxh3vdkz9c" class="article-share-link">Teilen</a>
</footer>
</div>
</article>
<article id="post-python-re" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2018/06/06/python-re/" class="article-date">
<time datetime="2018-06-06T09:18:52.000Z" itemprop="datePublished">2018-06-06</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2018/06/06/python-re/">python-re</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2018/06/06/python-re/" data-id="cjkzabkw9000e66rxeqta2hqg" class="article-share-link">Teilen</a>
</footer>
</div>
</article>
<article id="post-rabbitmq" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2018/03/19/rabbitmq/" class="article-date">
<time datetime="2018-03-18T23:52:30.000Z" itemprop="datePublished">2018-03-19</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2018/03/19/rabbitmq/">RabbitMQ队列使用</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2018/03/19/rabbitmq/" data-id="cjkzabkui000766rxvcyff1tm" class="article-share-link">Teilen</a>
</footer>
</div>
</article>
<article id="post-rjsjs" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2018/03/16/rjsjs/" class="article-date">
<time datetime="2018-03-16T11:39:51.000Z" itemprop="datePublished">2018-03-16</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2018/03/16/rjsjs/">软件设计师</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="1-计算机组成与结构"><a href="#1-计算机组成与结构" class="headerlink" title="1. 计算机组成与结构"></a>1. 计算机组成与结构</h1><h2 id="1-计算机基本工作原理"><a href="#1-计算机基本工作原理" class="headerlink" title="1)计算机基本工作原理"></a>1)计算机基本工作原理</h2><h3 id="一、计算机中数据的表示"><a href="#一、计算机中数据的表示" class="headerlink" title="一、计算机中数据的表示"></a>一、计算机中数据的表示</h3><h4 id="1-定点数与浮点数"><a href="#1-定点数与浮点数" class="headerlink" title="1.定点数与浮点数"></a>1.定点数与浮点数</h4><h4 id="2-数的机器码表示"><a href="#2-数的机器码表示" class="headerlink" title="2.数的机器码表示"></a>2.数的机器码表示</h4><h4 id="3-校验码"><a href="#3-校验码" class="headerlink" title="3.校验码"></a>3.校验码</h4><h4 id="4-各种数制之间的转换"><a href="#4-各种数制之间的转换" class="headerlink" title="4.各种数制之间的转换"></a>4.各种数制之间的转换</h4><p>常用的数制有二级制(基数为2)、八进制、十进制和十六进制,其间的转换关系如下:<br> (1) 十六进制与二进制</p>
<pre><code>十六进制表示法是用16个二进制数组成的,每4位二进制数字表示一位十六进制数,十六进制的数字表示从0~9,A~F共16个字符组成。十六进制与二进制的转换就是一个十六进制字符与四位二进制数字的相互转换过程。
</code></pre><p> (2) 十进制与二进制</p>
<pre><code>十进制向二进制转换分两步进行:首先把该数的整数部分和小数部分转换为二进制,然后再把这两部分合并起来即可。十进制的整数部分向二进制转换是通过对十进制不断地除2取余数得到,十进制小数部分通过乘2取整的方法获得,直到小数部分为0(或者达到位数要求),所得到的整数部分就形成了二进制编码。
</code></pre><p> (3) 八进制与二进制</p>
<pre><code>八进制向二进制转换的方法是从小数点开始分别向左右每三位二进制数编成一组,若不够3位,则小数点左侧的最高位和右侧的最低为用"0"补充,每一组用对应的八进制的数码表示即可;八进制向二进制转换的方法是从小数点开始,把每一位八进制的数码转成对应的3位二进制即可,其余小数点左侧的最高位或右侧的最低位的0可以省去。
</code></pre><h3 id="二、计算机组成和中央处理器CPU"><a href="#二、计算机组成和中央处理器CPU" class="headerlink" title="二、计算机组成和中央处理器CPU"></a>二、计算机组成和中央处理器CPU</h3><h4 id="1-计算机组成"><a href="#1-计算机组成" class="headerlink" title="1.计算机组成"></a>1.计算机组成</h4><h4 id="2-中央处理器"><a href="#2-中央处理器" class="headerlink" title="2.中央处理器"></a>2.中央处理器</h4><p>指运算器和控制器的合称,即CPU,主要功能有指令控制、操作控制、时间控制和数据加工。</p>
<h6 id="1-运算器"><a href="#1-运算器" class="headerlink" title="(1) 运算器"></a>(1) 运算器</h6><p> 运算器由算数逻辑单元(Arithmetic and Logic Unit,ALU)、累加寄存器、数据缓冲寄存器和状态条件寄存器组成,它是数据加工处理部件,完成计算机的各种算数和逻辑运算。相对控制器而言,运算器接收控制器的命令而进行动作,即运算器所进行的全部操作都是由控制器发出的控制信号来指挥的,所以它是执行部件。<br> 运算器有如下两个主要功能:<br> 1) 执行所有的算数运算,如加减乘除等基本运算及附加运算。<br> 2) 执行所有的逻辑运算并进行逻辑测试,如与、或、非、零值测试或两个值的比较等。</p>
<h6 id="2-控制器"><a href="#2-控制器" class="headerlink" title="(2) 控制器"></a>(2) 控制器</h6><p> 运算器只能完成运算,而控制器用于控制整个CPU的工作,它决定了计算机运行过程的自动化。它不仅要保证程序的正确执行,而且要能够处理异常事件。控制器一般包括指令控制逻辑、时序控制逻辑、总线控制逻辑和中断控制逻辑等几个部分。</p>
<p> 1) 指令寄存器(instruction register IR)。当CPU执行一条指令时,先把它从内存储器取到缓冲寄存器中,再送入指令寄存器(IR)暂存,指令译码器根据IR的内容产生各种伪操作指令,控制其他的组成部件工作,完成所需的功能。</p>
<p> 2) 程序计数器(PC)。PC具有寄存信息和计数两种功能,又称为指令计数器。程序的执行分两种情况,一种是顺序执行,二是转移执行。</p>
<p> 3) 地址寄存器(AR)。AR保存当前CPU索访问的内存单元的地址。由于内存和CPU存在着操作速度上的差异,所以需要使用AR保持地址信息,直到内存的读/写操作完成为止。<br> 4) 指令译码器(ID)。指令分为操作码和地址码两部分,为了能执行任何给定的指令,必须对操作码进行分析,以便识别所完成的操作。指令译码器就是对指令中的操作码字段进行分析解释,识别该指令规定的操作,向操作控制器发出具体的控制器发出具体的控制信号,控制各部件工作,完成所需的功能。</p>
<p> 时序控制逻辑要为每条指令按时间顺序提供应有的控制信号。总线控制逻辑是为多个功能部件服务的信息通路的控制电路。中断控制逻辑用于控制各种中断请求,并根据优先级的高低对中断请求进行排队,逐个交给CPU处理。</p>
<h6 id="3-寄存器组"><a href="#3-寄存器组" class="headerlink" title="(3) 寄存器组"></a>(3) 寄存器组</h6><p> 寄存器组可分为专用寄存器和通用寄存器。运算器和控制器中的寄存器是专用寄存器,其作用是固定的。通用寄存器用途广泛并可由程序员规定其用途,其数目因处理器不同有所差异。</p>
<h2 id="2-存储系统"><a href="#2-存储系统" class="headerlink" title="2)存储系统"></a>2)存储系统</h2><h3 id="一、存储器的层次结构"><a href="#一、存储器的层次结构" class="headerlink" title="一、存储器的层次结构"></a>一、存储器的层次结构</h3><p> 大多数计算器都采用3层存储器层次结构。高速缓存(cache)->主存(MM)->辅存。</p>
<h3 id="二、存储器的分类"><a href="#二、存储器的分类" class="headerlink" title="二、存储器的分类"></a>二、存储器的分类</h3><ol>
<li>读写存储器(RAM):既能读取数据,也能存入数据的存储器。</li>
<li>只读存储器(ROM):所存储的信息由生产厂家在生产时一次性写入,使用时只能读出,不能写入,断电后信息不会丢失。分以下几类:</li>
</ol>
<ul>
<li>固定只读存储器(ROM)。</li>
<li>可编程的只读存储器(PROM)。</li>
<li>可擦除的可编程只读存储器(EPROM)。</li>
<li>电可擦除的可编程只读存储器(EEPROM)。</li>
<li>闪速存储器(Flash Memory)。</li>
</ul>
<h3 id="三、相连存储器"><a href="#三、相连存储器" class="headerlink" title="三、相连存储器"></a>三、相连存储器</h3><p> 相连存储器(CAM)是一种按内容寻址的存储器。其工作原理就是把数据或数据的某一部分作为关键字,将该关键字与存储器中每一个单元进行比较,找出存储器中所有与关键字相同 数据。</p>
<h3 id="四、Cache"><a href="#四、Cache" class="headerlink" title="四、Cache"></a>四、Cache</h3><h4 id="1-基本原理"><a href="#1-基本原理" class="headerlink" title="1. 基本原理"></a>1. 基本原理</h4><p> Cache即高速缓冲存储器,为了解决CPU和主存之间速度匹配问题而设置的。介于CPU与主存之间的小容量存储器,存取速度比主存快。改善系统性能的依据是程序的局部性原理。</p>
<h4 id="2-性能分析"><a href="#2-性能分析" class="headerlink" title="2. 性能分析"></a>2. 性能分析</h4><p>  (1) 命中率:在Cache中访问到的概率。一般用模拟实验的方法得到。H=N1/(N1+N2)。N1为访问cache次数,N2为访问主存次数。<br>  (2) 平均实际存取时间:可以用cache和主存的访问周期T1、T2和命中率H来表示:T=H<em>T1+(1-H)</em>T2。当命中率H->1时,T->T1,即平均实际存取时间T接近于速度比较快的Cache的访问周期T1。<br>  (3) 访问效率:e=T1/T。</p>
<h4 id="3-地址映像"><a href="#3-地址映像" class="headerlink" title="3. 地址映像"></a>3. 地址映像</h4><p>   (1) 直接相联映像:主存按Cache的大小分成区,主存每一个分区内的块数与Cache的总块数正好相等,把主存各个区中相对块号相同的那些块映像到Cache中同一块号的那个确定块中。<br>   直接映像方式的优点是地址变换简单,但是灵活性差。<br>   (2) 全相联映像:主存中的任意一块可以映射到Cache中的任意一块中。<br>   全相联映像的主要优点是主存的块调入Cache的位置不受限制,十分灵活,但是因为无法从主存块号中直接获得Cache的块号,变换复杂,速度比较慢。<br>   (3)组相联映像:介于全相联和直接相联之间的一种折中方案,是目前在Cache中用得比较多的一种地址映像和变换方式。组相联映像方式也把主存和Cache按同样大小划分成块。所不同的地方是,组相联映像方式还把主存和Cache按同样大小划分成组,每一组都由相同的块数组成。</p>
<h4 id="4-替换算法"><a href="#4-替换算法" class="headerlink" title="4. 替换算法"></a>4. 替换算法</h4><p>常用替换算法有以下几种:</p>
<p>  (1) 随机替换算法RAND:用随机数发生器产生一个要替换的块号,将该块替换出去。<br>  (2) 先进先出算法FIFO:总是把最先调入的Cache字块替换出去。<br>  (3) 最近最少使用算法LRU:把当前近期Cache中使用次数最少的那块信息块替换出去,是命中率最高的替换算法。<br>  (4) 优化替换算法:先执行一次程序,统计Cache的替换情况,有了先验信息,在第二次执行程序时便可以用最有效的方式来替换。</p>
<h4 id="5-虚拟存储器"><a href="#5-虚拟存储器" class="headerlink" title="5. 虚拟存储器"></a>5. 虚拟存储器</h4><p>  其管理方式分为如下几种:<br>  (1)页式虚拟存储器:以页为信息传送单位的虚拟存储器。<br>  (2)段式虚拟存储器:一种以程序的逻辑结构形成的段作为主存分配依据的管理方式。<br>  (3)段页式虚拟存储器:页式和段式虚拟存储器结合的一种管理方式。程序按逻辑结构分段,每一段再分成若干大小固定的页。</p>
<h3 id="五、磁盘"><a href="#五、磁盘" class="headerlink" title="五、磁盘"></a>五、磁盘</h3><h4 id="1-磁盘存储器"><a href="#1-磁盘存储器" class="headerlink" title="1. 磁盘存储器"></a>1. 磁盘存储器</h4><p>  由盘片、驱动器、控制器和接口组成。其存储容量有两种指标:格式化容量和非格式化容量。计算公式分别为:<br>   emsp;非格式化容量=面数<em>(磁道数/面)</em>内圆周长<em>最大位密度<br>   emsp;格式化容量=面数</em>(磁道数/面)<em>(扇区数/道)</em>(字节数/扇区)</p>
<h4 id="2-光盘存储器"><a href="#2-光盘存储器" class="headerlink" title="2. 光盘存储器"></a>2. 光盘存储器</h4><p>  采用聚焦激光束在盘式介质上非接触地记录高密度信息的新型存储装置。根据性能和用途,可分为只读性光盘(CD-ROM)、只写一次型光盘(WROM)和可擦除型光盘。</p>
<h1 id="2-程序语言"><a href="#2-程序语言" class="headerlink" title="2. 程序语言"></a>2. 程序语言</h1><h1 id="3-操作系统"><a href="#3-操作系统" class="headerlink" title="3. 操作系统"></a>3. 操作系统</h1><h1 id="4-系统开发和运行"><a href="#4-系统开发和运行" class="headerlink" title="4. 系统开发和运行"></a>4. 系统开发和运行</h1><h1 id="5-计算机网络"><a href="#5-计算机网络" class="headerlink" title="5. 计算机网络"></a>5. 计算机网络</h1><h1 id="6-多媒体"><a href="#6-多媒体" class="headerlink" title="6. 多媒体"></a>6. 多媒体</h1><h1 id="7-数据库技术"><a href="#7-数据库技术" class="headerlink" title="7. 数据库技术"></a>7. 数据库技术</h1><h1 id="8-算法与数据结构"><a href="#8-算法与数据结构" class="headerlink" title="8.算法与数据结构"></a>8.算法与数据结构</h1><h1 id="9-面向对象技术"><a href="#9-面向对象技术" class="headerlink" title="9. 面向对象技术"></a>9. 面向对象技术</h1><h1 id="10-标准化和知识产权"><a href="#10-标准化和知识产权" class="headerlink" title="10. 标准化和知识产权"></a>10. 标准化和知识产权</h1><h1 id="11-专业英语"><a href="#11-专业英语" class="headerlink" title="11. 专业英语"></a>11. 专业英语</h1><h1 id="12-数据流图"><a href="#12-数据流图" class="headerlink" title="12. 数据流图"></a>12. 数据流图</h1><h1 id="13-UML分析与设计"><a href="#13-UML分析与设计" class="headerlink" title="13. UML分析与设计"></a>13. UML分析与设计</h1><h1 id="14-数据库设计"><a href="#14-数据库设计" class="headerlink" title="14. 数据库设计"></a>14. 数据库设计</h1><h1 id="15-数据结构及算法设计"><a href="#15-数据结构及算法设计" class="headerlink" title="15. 数据结构及算法设计"></a>15. 数据结构及算法设计</h1><h1 id="16-C-程序设计"><a href="#16-C-程序设计" class="headerlink" title="16. C++程序设计"></a>16. C++程序设计</h1><h1 id="17-Java程序设计"><a href="#17-Java程序设计" class="headerlink" title="17. Java程序设计"></a>17. Java程序设计</h1>
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2018/03/16/rjsjs/" data-id="cjkzabkut000b66rxqjr5j6fu" class="article-share-link">Teilen</a>
</footer>
</div>
</article>
<article id="post-PEP-8" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2018/03/16/PEP-8/" class="article-date">
<time datetime="2018-03-16T10:46:48.000Z" itemprop="datePublished">2018-03-16</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2018/03/16/PEP-8/">Python编码规范</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="Python编码规范"><a href="#Python编码规范" class="headerlink" title="Python编码规范"></a>Python编码规范</h2><p>本编码规范为PEP-8的精简版。</p>
<h3 id="代码缩进"><a href="#代码缩进" class="headerlink" title="代码缩进"></a>代码缩进</h3><ol>
<li>使用4个空格表示Python的缩进,不要使用Tab缩进,更不能混合使用Tab和空格。</li>
</ol>
<h3 id="空行"><a href="#空行" class="headerlink" title="空行"></a>空行</h3><ol>
<li>Class和top-level的function的定义之间需要两行间隔;</li>
<li>Class的method定义之间空一行;</li>
<li>Function内逻辑无关段落之间空一行;</li>
<li>其他地方尽量不要再空行。</li>
</ol>
<h3 id="模块的Import"><a href="#模块的Import" class="headerlink" title="模块的Import"></a>模块的Import</h3><ol>
<li>Import的顺序:<ol>
<li>标准模块,如os,sys</li>
<li>第三方模块</li>
<li>当前系统的模块</li>
</ol>
</li>
</ol>
<h3 id="空格"><a href="#空格" class="headerlink" title="空格"></a>空格</h3><p>总体原则,避免不必要的空格。</p>
<ol>
<li>右括号前不要加空格;</li>
<li>逗号、冒号、分号前不要加空格;</li>
<li>函数的左括号前不要加空格。如Func(1);</li>
<li>序列的左括号前不要加空格。list[2];</li>
<li>操作符左右各加一个空格,不要为了对其增加空格;</li>
<li>函数默认参数使用的赋值符左右省略空格;</li>
<li>不要将多句语句写在同一行;</li>
<li>if/for/while语句中,即使执行语句只有一句,也必须另起一行。</li>
</ol>
<h3 id="命名规范"><a href="#命名规范" class="headerlink" title="命名规范"></a>命名规范</h3><ul>
<li>CamelCase:<a href="https://baike.baidu.com/item/camelCase/636859" target="_blank" rel="noopener">https://baike.baidu.com/item/camelCase/636859</a></li>
<li>snake_case:<a href="https://en.wikipedia.org/wiki/Snake_case" target="_blank" rel="noopener">https://en.wikipedia.org/wiki/Snake_case</a></li>
</ul>
<ol>
<li>模块名采用全部小写的snake_case;</li>
<li>Class的名采用UppuerCamelCase</li>
<li>自定义的异常命名规则为UpperCamelClassError的方式</li>
<li>模块内部变量和类的名前下划线</li>
<li>函数命名使用snake_case</li>
<li>常量使用全部大写的SNAKE_CASE</li>
<li>Class的methods命名采用全部小写的snake_case</li>
<li>当methods名称和keyword冲突时,加一个下划线后缀</li>
<li>Class的普通methods的第一个参数为self</li>
<li><p>Class的Class methods的第一个参数为cls</p>
<p>9.</p>
</li>
</ol>
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2018/03/16/PEP-8/" data-id="cjkzabku7000266rx0855fymo" class="article-share-link">Teilen</a>
</footer>
</div>
</article>
<article id="post-hello-world" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2018/03/15/hello-world/" class="article-date">
<time datetime="2018-03-15T11:41:40.253Z" itemprop="datePublished">2018-03-15</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2018/03/15/hello-world/">Hello World</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="noopener">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="noopener">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="noopener">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="noopener">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="noopener">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="noopener">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/deployment.html" target="_blank" rel="noopener">Deployment</a></p>
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2018/03/15/hello-world/" data-id="cjkzabkug000666rx6nq1icm2" class="article-share-link">Teilen</a>
</footer>
</div>
</article>
<article id="post-git-method" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2018/02/12/git-method/" class="article-date">
<time datetime="2018-02-12T14:14:55.000Z" itemprop="datePublished">2018-02-12</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2018/02/12/git-method/">git常用命令</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h3 id="版本库初始化"><a href="#版本库初始化" class="headerlink" title="版本库初始化"></a>版本库初始化</h3><p>创建文件夹,通过git init命令把这个目录变成Git可以管理的仓库:</p>
<pre><code>git init
</code></pre><p>忽略某些文件:在Git工作区的根目录下创建一个特殊的.gitignore文件,把需要忽略的文件名填进去,Git会自动忽略这些文件。</p>
<p>不需要从头写.gitignore文件,Github已经为我们准备各种配置文件,只需要组合一下就可以使用了。所有配置文件可以直接在线浏览:<a href="https://github.com/github/gitignore" target="_blank" rel="noopener">https://github.com/github/gitignore</a></p>
<p>增加文件:<br> git add</p>
<pre><code>git commit
</code></pre><p>查看仓库当前状态:</p>
<pre><code>git status
</code></pre><p>查看修改内容:</p>
<pre><code>git diff
</code></pre><p>查看历史记录:</p>
<pre><code>git log
</code></pre><p>以便确定回到哪个版本</p>
<p>在git中,用HEAD表示当前版本,也就是最新的提交,上一个版本是HEAD^,上上一个版本是HEAD^^,HEAD~100。</p>
<p>版本回退:</p>
<pre><code>git reset --hard HEAD
git reset --hard 3218811
</code></pre><p>Git提供了一个命令git reflog用来记录你的每一次命令,以便确定回到未来哪个版本</p>
<pre><code>git reflog
</code></pre><h3 id="工作区"><a href="#工作区" class="headerlink" title="工作区"></a>工作区</h3><p>就是在电脑里能看到的目录</p>
<h3 id="版本库"><a href="#版本库" class="headerlink" title="版本库"></a>版本库</h3><p>工作区有一个隐藏目录.git,这个不算工作区,而是Git的版本库</p>
<p>git add 把文件放到暂存区(stage)</p>
<p>撤销修改:</p>
<p>git checkout可以丢弃工作区的修改</p>
<pre><code>git checkout -- file
</code></pre><p>一种是自修改后还没有放到暂存区(版本库),一种是修改后添加到暂存区,又做了修改(回到添加到暂存区后的状态)<br>让该文件回到最近一次git commit或git add时的状态</p>
<p>删除文件:<br> git rm<br> git commit</p>
<h3 id="远程仓库"><a href="#远程仓库" class="headerlink" title="远程仓库"></a>远程仓库</h3><p>git remote add origin <a href="mailto:git@github.com" target="_blank" rel="noopener">git@github.com</a>:linylgithub/learngit.git</p>
<p>git push -u origin master</p>
<p>把本地库的内容推送到远程,用git push命令,实际上是把当前分支master推送到远程。</p>
<p>由于远程库是空的,我们第一次推送master分支时,加上了-u参数,Git不但会把本地的master分支内容推送的远程新的master分支,还会把本地的master分支和远程的master分支关联起来,在以后的推送或者拉取时就可以简化命令。</p>
<p>每次本地提交后,只要有必要,就可以使用git push origin master推送最新修改;</p>
<p>从远程库克隆:<br> git clone git@github,com:linylgithub/learngit.git</p>
<h3 id="分支管理:"><a href="#分支管理:" class="headerlink" title="分支管理:"></a>分支管理:</h3><p>创建分支:</p>
<pre><code>git checkout -b dev
</code></pre><p>-b 表示创建并切换,相当于以下两条命令:</p>
<pre><code>git branch dev
git checkout dev
</code></pre><p>用git branch 命令查看当前分支</p>
<p>切换回分支:</p>
<pre><code>git checkout master
</code></pre><p>将dev分支合并到master分支上:</p>
<pre><code>git merge dev
</code></pre><p>git merge命令用于合并指定分支到当前分支</p>
<p>删除分支</p>
<pre><code>git branch -d dev
</code></pre>
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2018/02/12/git-method/" data-id="cjkzabktx000066rx8wq5m56j" class="article-share-link">Teilen</a>
</footer>
</div>
</article>
<article id="post-linux-command" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2018/02/12/linux-command/" class="article-date">
<time datetime="2018-02-12T08:31:42.000Z" itemprop="datePublished">2018-02-12</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2018/02/12/linux-command/">linux_command</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h4 id="2018-02-12"><a href="#2018-02-12" class="headerlink" title="2018-02-12"></a>2018-02-12</h4><h5 id="sed"><a href="#sed" class="headerlink" title="sed"></a>sed</h5><p>#匹配行前加</p>
<p>sed -i ‘/allow 361way.com/iallow <a href="http://www.361way.com'" target="_blank" rel="noopener">www.361way.com'</a> the.conf.file</p>
<p>#匹配行前后</p>
<p>sed -i ‘/allow 361way.com/aallow <a href="http://www.361way.com'" target="_blank" rel="noopener">www.361way.com'</a> the.conf.file</p>
<p>i: insert 前插入</p>
<p>a: append 后追加</p>
<p>而在书写的时候为方便区分,往往会在i和a后面加一个反斜杠:<br> sed -i ‘/sourcesthing/i\addstring’ file<br> sed -i ‘/sourcesthing/a\addstring’ file</p>
<h1 id="Linux最常用命令及快捷键"><a href="#Linux最常用命令及快捷键" class="headerlink" title="Linux最常用命令及快捷键"></a>Linux最常用命令及快捷键</h1><h2 id="常用命令:"><a href="#常用命令:" class="headerlink" title="常用命令:"></a>常用命令:</h2><h3 id="文件和目录"><a href="#文件和目录" class="headerlink" title="文件和目录"></a>文件和目录</h3><h4 id="cd"><a href="#cd" class="headerlink" title="cd:"></a>cd:</h4><pre><code># cd /home 进入'/home'目录
# cd .. 返回上一级
# cd ../../返回上两级目录
# cd - 返回上次所在目录
</code></pre><h4 id="cp-a-d-f-i-p-r-l"><a href="#cp-a-d-f-i-p-r-l" class="headerlink" title="cp: -a -d -f -i -p -r -l"></a>cp: -a -d -f -i -p -r -l</h4><pre><code>-d 复制时保留链接
-f 覆盖已经存在的目标文件而不给出提示
-i 与-f选项相反
-p 除复制文件的内容外,还把修改时间和访问权限也复制到新文件中。
-r 若给出的源文件是一个目录文件,此时将复制该目录下所有的子目录和文件。
-l 不复制文件,只生成链接文件。
# cp file1 file2 将file1复制为file2
# cp -a dir1 dir2 复制dir1目录为dir2目录 --此选项通常在复制目录时使用,它保留链接、文件属性,并复制目录下的所有内容。其作用等于dpR参数组合。-a 等同于-dpr
</code></pre><h4 id="ls"><a href="#ls" class="headerlink" title="ls:"></a>ls:</h4><pre><code># ls 查看目录中的文件
# ls -a 查看目录中的文件(包括隐藏文件)
# ls -l 显示详细信息
# ls -lrt 按时间显示文件(r表示反向排序,t表示按时间)
</code></pre><h4 id="pwd"><a href="#pwd" class="headerlink" title="pwd:"></a>pwd:</h4><pre><code># pwd 显示工作路径
</code></pre><h4 id="mkdir"><a href="#mkdir" class="headerlink" title="mkdir:"></a>mkdir:</h4><pre><code># mkdir dir1 创建‘dir1’目录
# mkdir dir1 dir2 同时创建两个目录
# mkdir -p /tmp/dir1/dir2 创建一个目录树,即递归的创建创建目录
</code></pre><h4 id="mv"><a href="#mv" class="headerlink" title="mv"></a>mv</h4><pre><code># mv dir1 dir2 移动/重命名一个目录
</code></pre><h4 id="rm"><a href="#rm" class="headerlink" title="rm"></a>rm</h4><pre><code># rm -f file1 删除 ‘file1’
# rm -rf dir1 删除目录‘dir1’及其子目录
</code></pre><h3 id="查看文件内容:"><a href="#查看文件内容:" class="headerlink" title="查看文件内容:"></a>查看文件内容:</h3><h4 id="cat"><a href="#cat" class="headerlink" title="cat"></a>cat</h4><pre><code># cat file1 从第一个字节开始正向查看文件的内容
</code></pre><h4 id="head"><a href="#head" class="headerlink" title="head"></a>head</h4><pre><code># head -2 file1 查看一个文件的前两行
</code></pre><h4 id="more"><a href="#more" class="headerlink" title="more"></a>more</h4><pre><code># more file1 查看一个长文件的内容
</code></pre><h4 id="tac"><a href="#tac" class="headerlink" title="tac"></a>tac</h4><pre><code># tac file1 从最后一行开始反向查看一个文件的内容
</code></pre><h4 id="tail"><a href="#tail" class="headerlink" title="tail"></a>tail</h4><pre><code># tail -3 file1 查看一个文件的最后三行
</code></pre><h3 id="文本处理"><a href="#文本处理" class="headerlink" title="文本处理"></a>文本处理</h3><h4 id="grep"><a href="#grep" class="headerlink" title="grep"></a>grep</h4><pre><code># grep str /tmp/test 在文件'/tmp/test'中查找“str”
# grep ^str /tmp/test 在文件'/tmp/test'中查找以'str'开始的行
# grep [0-9] /tmp/test 在文件'/tmp/test'中查找所以包含数字的行
# grep -r str /tmp/* 在'/tmp'及其子目录中查找'str'
</code></pre><h4 id="diff"><a href="#diff" class="headerlink" title="diff"></a>diff</h4><pre><code># diff file1 file2 找出两个文件的不同处
# sdiff file1 file2 以对比的方式显示两个文件的不同
</code></pre>
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2018/02/12/linux-command/" data-id="cjkzabku9000366rx09m91re7" class="article-share-link">Teilen</a>
</footer>
</div>
</article>
<nav id="page-nav">
<span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="extend next" rel="next" href="/page/2/">weiter »</a>
</nav>
</section>
<aside id="sidebar">
<div class="widget-wrap">
<h3 class="widget-title">Archiv</h3>
<div class="widget">
<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/08/">August 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/07/">July 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/06/">June 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/03/">March 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/02/">February 2018</a></li></ul>
</div>
</div>
<div class="widget-wrap">
<h3 class="widget-title">letzter Beitrag</h3>
<div class="widget">
<ul>
<li>
<a href="/2018/08/18/suanfa/">suanfa</a>
</li>
<li>
<a href="/2018/07/25/Nginx/">Nginx</a>
</li>
<li>
<a href="/2018/06/22/tornado/">tornado</a>
</li>
<li>
<a href="/2018/06/06/python-re/">python-re</a>
</li>
<li>
<a href="/2018/03/19/rabbitmq/">RabbitMQ队列使用</a>
</li>
</ul>
</div>
</div>
</aside>
</div>
<footer id="footer">
<div class="outer">
<div id="footer-info" class="inner">
© 2018 Lin Yuanlin<br>
Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
</div>
</div>
</footer>
</div>
<nav id="mobile-nav">
<a href="/" class="mobile-nav-link">Home</a>
<a href="/archives" class="mobile-nav-link">Archives</a>
</nav>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script src="/js/script.js"></script>
</div>
</body>
</html>