-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
467 lines (288 loc) · 19.8 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
<!DOCTYPE html>
<html >
<head>
<!--[if lt IE 9]>
<style>body {display: none; background: none !important} </style>
<meta http-equiv="Refresh" Content="0; url=//outdatedbrowser.com/" />
<![endif]-->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no" />
<meta name="author" content="ruoleng" />
<meta name="description">
<meta property="og:type" content="website">
<meta property="og:title" content="ruoleng'blog">
<meta property="og:url" content="http://ruoleng.github.io/index.html">
<meta property="og:site_name" content="ruoleng'blog">
<meta property="og:description">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="ruoleng'blog">
<meta name="twitter:description">
<link rel="apple-touch-icon" href= "/apple-touch-icon.png">
<link rel="alternative" href="/atom.xml" title="ruoleng'blog" type="application/atom+xml">
<link rel="shortcut icon" href="/favicon.png">
<link href="//cdn.bootcss.com/animate.css/3.5.1/animate.min.css" rel="stylesheet">
<link href="//cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.min.css" rel="stylesheet">
<script src="//cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
<link href="//cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-minimal.css" rel="stylesheet">
<link rel="stylesheet" href="/css/style.css">
<style> .article { opacity: 0;} </style>
<link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
<title>ruoleng'blog</title>
<script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>
<script>
var yiliaConfig = {
fancybox: true,
animate: true,
isHome: true,
isPost: false,
isArchive: false,
isTag: false,
isCategory: false,
open_in_new: false,
fancybox_js: "//cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.min.js",
scrollreveal: "//cdn.bootcss.com/scrollReveal.js/3.1.4/scrollreveal.min.js",
search: undefined
}
</script>
<script> yiliaConfig.jquery_ui = [false]; </script>
<script> yiliaConfig.rootUrl = "\/";</script>
</head>
<body>
<div id="container">
<div class="left-col">
<div class="overlay"></div>
<div class="intrude-less">
<header id="header" class="inner">
<a href="/" class="profilepic">
<img src="/img/avatar.png" class="animated zoomIn">
</a>
<hgroup>
<h1 class="header-author"><a href="/">ruoleng</a></h1>
</hgroup>
<p class="header-subtitle">不积硅步无以至千里 | 生命不息 折腾不止</p>
<div id="switch-btn" class="switch-btn">
<div class="icon">
<div class="icon-ctn">
<div class="icon-wrap icon-house" data-idx="0">
<div class="birdhouse"></div>
<div class="birdhouse_holes"></div>
</div>
<div class="icon-wrap icon-ribbon hide" data-idx="1">
<div class="ribbon"></div>
</div>
<div class="icon-wrap icon-link hide" data-idx="2">
<div class="loopback_l"></div>
<div class="loopback_r"></div>
</div>
<div class="icon-wrap icon-me hide" data-idx="3">
<div class="user"></div>
<div class="shoulder"></div>
</div>
</div>
</div>
<div class="tips-box hide">
<div class="tips-arrow"></div>
<ul class="tips-inner">
<li>菜单</li>
<li>标签</li>
<li>友情链接</li>
<li>关于我</li>
</ul>
</div>
</div>
<div id="switch-area" class="switch-area">
<div class="switch-wrap">
<section class="switch-part switch-part1">
<nav class="header-menu">
<ul>
<li><a href="/">主页</a></li>
<li><a href="/archives/">所有文章</a></li>
<li><a href="/tags/">标签云</a></li>
<li><a href="/about/">关于我</a></li>
</ul>
</nav>
<nav class="header-nav">
<ul class="social">
<a class="fa GitHub" target="_blank" href="#" title="GitHub"></a>
<a class="fa RSS" target="_blank" href="/atom.xml" title="RSS"></a>
</ul>
</nav>
</section>
<section class="switch-part switch-part2">
<div class="widget tagcloud" id="js-tagcloud">
<ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Boost/">Boost</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/C/">C++</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/asio/">asio</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/header-only/">header only</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vs2017/">vs2017</a></li></ul>
</div>
</section>
<section class="switch-part switch-part3">
<div id="js-friends">
<a target="_blank" class="main-nav-link switch-friends-link" href="https://hexo.io">Hexo</a>
<a target="_blank" class="main-nav-link switch-friends-link" href="https://pages.github.com/">GitHub</a>
<a target="_blank" class="main-nav-link switch-friends-link" href="http://moxfive.xyz/">MOxFIVE</a>
</div>
</section>
<section class="switch-part switch-part4">
<div id="js-aboutme">我竟无言以对</div>
</section>
</div>
</div>
</header>
</div>
</div>
<div class="mid-col">
<nav id="mobile-nav">
<div class="overlay">
<div class="slider-trigger"></div>
<h1 class="header-author js-mobile-header hide"><a href="/" title="回到主页">ruoleng</a></h1>
</div>
<div class="intrude-less">
<header id="header" class="inner">
<a href="/" class="profilepic">
<img src="/img/avatar.png" class="animated zoomIn">
</a>
<hgroup>
<h1 class="header-author"><a href="/" title="回到主页">ruoleng</a></h1>
</hgroup>
<p class="header-subtitle">不积硅步无以至千里 | 生命不息 折腾不止</p>
<nav class="header-menu">
<ul>
<li><a href="/">主页</a></li>
<li><a href="/archives/">所有文章</a></li>
<li><a href="/tags/">标签云</a></li>
<li><a href="/about/">关于我</a></li>
<div class="clearfix"></div>
</ul>
</nav>
<nav class="header-nav">
<ul class="social">
<a class="fa GitHub" target="_blank" href="#" title="GitHub"></a>
<a class="fa RSS" target="_blank" href="/atom.xml" title="RSS"></a>
</ul>
</nav>
</header>
</div>
<link class="menu-list" tags="标签" friends="友情链接" about="关于我"/>
</nav>
<div class="body-wrap">
<article id="post-hello-world" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2017/04/30/hello-world/" class="article-date">
<time datetime="2017-04-30T13:23:54.346Z" itemprop="datePublished">2017-04-30</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2017/04/30/hello-world/">你好 博客</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="这是我的第一个自己搭建的博客"><a href="#这是我的第一个自己搭建的博客" class="headerlink" title="这是我的第一个自己搭建的博客^_^"></a>这是我的第一个自己搭建的博客^_^</h2><h3 id="使用是Hexo-和c9-io。可以网上写博客。"><a href="#使用是Hexo-和c9-io。可以网上写博客。" class="headerlink" title="使用是Hexo!和c9.io。可以网上写博客。"></a>使用是Hexo!和c9.io。可以网上写博客。</h3><p>很多Hexo的评论都是用多说,但是多说会把所有文章都同步到他们的服务器,很恶心。赤果果的偷窃用户的文章。<br>所以试用一下多说后就准备换了。但是发现Hexo clean清除,Hexo g -d 后还是无法重新生成该页面。<br>后面想通了,需要这篇文章有修改,重新生成一下 HTML页面才会有变化。显示的评论才会变。<br>所以试试咯。<br>PS:使用多说莫名奇妙的就有好多个评论在我这篇文章。估计是使用Hexo默认文章导致的。</p>
<hr>
<p>见鬼了。还是有。怎么移除“多说”评论。<br>多说的后台真难找到。。。。<br>删除了后台与blog URL的绑定,希望有效吧。</p>
<hr>
<p>好吧,终于删除多说了。原来多说会在 hexo 的 theme 下面产生一个duoshuo.ejs 文件<br>大概在”theme/xxx/layout/_partial/post”或者是”theme/layout/_partial/post”中产生。<br>xxx为你博客当前使用的主题。</p>
<p>折腾一个小东西就这么累。</p>
<p>(改正一下,是yilia主题带着多说的功能所以才一直有。囧…..)</p>
<hr>
<p>加了友言,有个“Share to: ”但是还看到不到东西。</p>
<p>接着折腾。</p>
<p>生命不息,折腾不止。</p>
<hr>
<p>换了个基于yilia主题修改的现在这个主题yelee。打开友言还是看不到评论。<br>好神奇的样子。</p>
<hr>
<p>终于搞定评论了。<br>应该是之前没有点击进文章,所以看不到评论。这个主题的预览模式下只有一篇文章的时候看得很完整。以为已经进到文章里面了。</p>
</div>
<div class="article-info article-info-index">
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-cpp-boost-asio-header-only" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2017/04/30/cpp-boost-asio-header-only/" class="article-date">
<time datetime="2017-04-29T16:35:05.000Z" itemprop="datePublished">2017-04-30</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2017/04/30/cpp-boost-asio-header-only/">Boost 的 asio库只使用头文件模式</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="Boost-asio库只使用头文件的方式"><a href="#Boost-asio库只使用头文件的方式" class="headerlink" title="Boost asio库只使用头文件的方式"></a>Boost asio库只使用头文件的方式</h1><h2 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h2><p>之前用过几个Boost的库,比如智能指针shared_ptr,bind,function,expressive都很好,<br>加上工作中需要跟串口、网口通讯打交道,而之前用的都是自己的简单封装或者直接写了调<br>用。所以就想用用asio。</p>
<p>开始用的那几个库都是根据《Boost程序库完全开发指南》学着用的,这次用的也是。</p>
<h2 id="查找方法"><a href="#查找方法" class="headerlink" title="查找方法"></a>查找方法</h2><p>根据旧版(2010年9月第一版 ISBN 978-121-11577-6)书中 12.2章(493页)所描述,<br>加上以下宏定义<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">#define BOOST_DATE_TIME_SOURCE</span><br><span class="line">#define BOOST_SYSTEM_NO_LIB</span><br><span class="line">#define BOOST_REGEX_NO_LIB</span><br></pre></td></tr></table></figure></p>
<p>就可以不用编译boost的库使用。但是因为这次不在原来的电脑上写程序,在网上搜了此书<br>发现出了新版,然而新版(2015年3月第一版 ISBN 978-121-25313-3) 12.3章(537页)中并没<br>有涉及到不需要<br>编译Boost库而使用asio库的方法,只提到使用asio库的方法:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">#define BOOST_ASIO_DISABLE_STD_CHRONO</span><br><span class="line">#include <boost/asio.hpp</span><br><span class="line">using namespace boost::asio;</span><br></pre></td></tr></table></figure></p>
<p>而Boost的帮助文件中则没有任何只用头文件的说明,只说到不自动链接Boost.Date_Time和<br>Boost.Regex的方法(在链接的命令行中添加 -DBOOST_DATE_TIME_NO_LIB 和<br>-DBOOST_REGEX_NO_LIB);通过Google搜索也只搜到StackOverFlow上的提问,因为无论怎么<br>设置都无法避开Boost的System的lib链接。</p>
<p>通过查看书中的System说明,同时百度也随便搜了其他的方法,终于找到了解决的方法<br>增加多<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">#define BOOST_ERROR_CODE_HEADER_ONLY</span><br></pre></td></tr></table></figure></p>
<h2 id="解决方法"><a href="#解决方法" class="headerlink" title="解决方法"></a>解决方法</h2><p>这个宏的定义就可以以头文件的方式使用Boost.System库。<br>所以要以头文件方式使用Boost.asio库要定义的头文件为<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">#define BOOST_ERROR_CODE_HEADER_ONLY</span><br><span class="line">#define BOOST_DATE_TIME_SOURCE</span><br><span class="line">#define BOOST_SYSTEM_NO_LIB</span><br><span class="line">#define BOOST_REGEX_NO_LIB</span><br><span class="line">#include <boost/asio.hpp</span><br><span class="line">//using namespace boost::asio; 看自己需要是否要加入命名空间的使用</span><br></pre></td></tr></table></figure></p>
<p>增加后在VS2017下编译通过。</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Boost/">Boost</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/C/">C++</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/asio/">asio</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/header-only/">header only</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/vs2017/">vs2017</a></li></ul>
</div>
<div class="clearfix"></div>
</div>
</div>
</article>
</div>
<footer id="footer">
<div class="outer">
<div id="footer-info">
<div class="footer-left">
<i class="fa fa-copyright"></i>
2016-2017 ruoleng
</div>
<div class="footer-right">
<a href="http://hexo.io/" target="_blank" title="快速、简洁且高效的博客框架">Hexo</a> Theme <a href="https://github.com/MOxFIVE/hexo-theme-yelee" target="_blank" title="简而不减 Hexo 双栏博客主题 v3.0">Yelee</a> by MOxFIVE <i class="fa fa-heart animated infinite pulse"></i>
</div>
</div>
<div class="visit">
<span id="busuanzi_container_site_pv" style='display:none'>
<span id="site-visit" >本站到访数:
<span id="busuanzi_value_site_uv"></span>
</span>
</span>
<span>, </span>
<span id="busuanzi_container_page_pv" style='display:none'>
<span id="page-visit">本页阅读量:
<span id="busuanzi_value_page_pv"></span>
</span>
</span>
</div>
</div>
</footer>
</div>
<script data-main="/js/main.js" src="//cdn.bootcss.com/require.js/2.2.0/require.min.js"></script>
<script>
$(document).ready(function() {
var iPad = window.navigator.userAgent.indexOf('iPad');
if (iPad > -1 || $(".left-col").css("display") === "none") {
var bgColorList = ["#9db3f4", "#414141", "#e5a859", "#f5dfc6", "#c084a0", "#847e72", "#cd8390", "#996731"];
var bgColor = Math.ceil(Math.random() * (bgColorList.length - 1));
$("body").css({"background-color": bgColorList[bgColor], "background-size": "cover"});
}
else {
var backgroundnum = 5;
var backgroundimg = "url(/background/bg-x.jpg)".replace(/x/gi, Math.ceil(Math.random() * backgroundnum));
$("body").css({"background": backgroundimg, "background-attachment": "fixed", "background-size": "cover"});
}
})
</script>
<div class="scroll" id="scroll">
<a href="#" title="返回顶部"><i class="fa fa-arrow-up"></i></a>
<a href="#comments" onclick="load$hide();" title="查看评论"><i class="fa fa-comments-o"></i></a>
<a href="#footer" title="转到底部"><i class="fa fa-arrow-down"></i></a>
</div>
<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>
</div>
</body>
</html>