-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
19 lines (19 loc) · 18.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html><html lang="zh-CN"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"><meta content="yes" name="apple-mobile-web-app-capable"><meta content="black-translucent" name="apple-mobile-web-app-status-bar-style"><meta content="telephone=no" name="format-detection"><meta name="description" content="记录生活点滴"><title>Silver Chan | 传银的博客</title><link rel="stylesheet" type="text/css" href="/css/style.css?v=0.0.0"><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/normalize/7.0.0/normalize.min.css"><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/pure/1.0.0/pure-min.css"><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/pure/1.0.0/grids-responsive-min.css"><link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css"><script type="text/javascript" src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script><link rel="Shortcut Icon" type="image/x-icon" href="/favicon.ico"><link rel="apple-touch-icon" href="/apple-touch-icon.png"><link rel="apple-touch-icon-precomposed" href="/apple-touch-icon.png"><link rel="alternate" type="application/atom+xml" href="/atom.xml"></head><body><div class="body_container"><div id="header"><div class="site-name"><h1 class="hidden">Silver Chan</h1><a id="logo" href="/.">Silver Chan</a><p class="description">传银的博客</p></div><div id="nav-menu"><a href="/." class="current"><i class="fa fa-home"> 首页</i></a><a href="/archives/"><i class="fa fa-archive"> 归档</i></a><a href="/about/"><i class="fa fa-user"> 关于</i></a></div></div><div id="layout" class="pure-g"><div class="pure-u-1 pure-u-md-3-4"><div class="content_container"><div class="post"><h1 class="post-title"><a href="/2018/04/04/几个优雅C++ STL算法例子/">几个优雅的C++ STL算法代码</a></h1><div class="post-meta">2018-04-04</div><a data-disqus-identifier="2018/04/04/几个优雅C++ STL算法例子/" href="/2018/04/04/几个优雅C++ STL算法例子/#disqus_thread" class="disqus-comment-count"></a><div class="post-content"><blockquote>
<p>几个使用C++11的算法例子,收藏下。</p>
</blockquote>
<h2 id="插入排序-Insertion-Sort"><a href="#插入排序-Insertion-Sort" class="headerlink" title="插入排序(Insertion Sort)"></a>插入排序(Insertion Sort)</h2><p>代码:<br><figure class="highlight cpp"><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></pre></td><td class="code"><pre><div class="line"><span class="keyword">template</span> <<span class="class"><span class="keyword">class</span> <span class="title">FwdIt</span>> <span class="title">void</span> <span class="title">insertSort</span>(<span class="title">FwdIt</span> <span class="title">first</span>, <span class="title">FwdIt</span> <span class="title">last</span>) {</span></div><div class="line"> <span class="keyword">for</span> (<span class="keyword">auto</span> i = first; i != last; ++i)</div><div class="line"> <span class="built_in">std</span>::rotate(<span class="built_in">std</span>::upper_bound(first, i, *i), i, <span class="built_in">std</span>::next(i));</div><div class="line">}</div></pre></td></tr></table></figure></p></div><p class="readmore"><a href="/2018/04/04/几个优雅C++ STL算法例子/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2018/01/15/《TCP IP高效编程————改造网络程序的44个技巧》学习记录/">《TCP IP高效编程————改造网络程序的44个技巧》学习记录</a></h1><div class="post-meta">2018-01-15</div><a data-disqus-identifier="2018/01/15/《TCP IP高效编程————改造网络程序的44个技巧》学习记录/" href="/2018/01/15/《TCP IP高效编程————改造网络程序的44个技巧》学习记录/#disqus_thread" class="disqus-comment-count"></a><div class="post-content"><ul>
<li><p>技巧1:理解面向链接和无连接协议之间的区别</p>
<ul>
<li>对于无连接协议来说,每个分组的处理都独立于所有其他分组,而对于面向连接的协议来说,协议实现维护了与后继分组有关的状态信息。</li>
<li>对TCP来说,连接完全是想象的,它是由端点所记忆的状态组成的, 并不存在“物理”连接。</li></div><p class="readmore"><a href="/2018/01/15/《TCP IP高效编程————改造网络程序的44个技巧》学习记录/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2018/01/15/cpp目录结构及工具相关的一些工程经验/">cpp目录结构及工具相关的一些工程经验总结</a></h1><div class="post-meta">2018-01-15</div><a data-disqus-identifier="2018/01/15/cpp目录结构及工具相关的一些工程经验/" href="/2018/01/15/cpp目录结构及工具相关的一些工程经验/#disqus_thread" class="disqus-comment-count"></a><div class="post-content"><blockquote>
<p>在开发Linux环境下cpp组件时,自己形成了一套模式框架,对于常规项目开发可以方便套用。</p>
</blockquote>
<h3 id="工具"><a href="#工具" class="headerlink" title="工具"></a>工具</h3><ul></div><p class="readmore"><a href="/2018/01/15/cpp目录结构及工具相关的一些工程经验/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2018/01/08/网络上的一些学习资料列表/">网络上的一些学习资料列表</a></h1><div class="post-meta">2018-01-08</div><a data-disqus-identifier="2018/01/08/网络上的一些学习资料列表/" href="/2018/01/08/网络上的一些学习资料列表/#disqus_thread" class="disqus-comment-count"></a><div class="post-content"><p>GitHub</p>
<ul>
<li><a href="https://www.github.com/mymmsc/books" target="_blank" rel="noopener">mymmsc/books</a>,存储了一些经典书籍,包括《深度学习》,《TCP/IP详解》。</li></div><p class="readmore"><a href="/2018/01/08/网络上的一些学习资料列表/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2017/11/16/golang目录结构及工具相关的一些工程经验总结/">golang目录结构及工具相关的一些工程经验总结</a></h1><div class="post-meta">2017-11-16</div><a data-disqus-identifier="2017/11/16/golang目录结构及工具相关的一些工程经验总结/" href="/2017/11/16/golang目录结构及工具相关的一些工程经验总结/#disqus_thread" class="disqus-comment-count"></a><div class="post-content"><blockquote>
<p>在开发golang组件的时候需要版本管理及组件管理,自己形成了一套模式框架,对于常规项目开发可以方便套用。</p>
</blockquote>
<h3 id="工具"><a href="#工具" class="headerlink" title="工具"></a>工具</h3><ul></div><p class="readmore"><a href="/2017/11/16/golang目录结构及工具相关的一些工程经验总结/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2017/11/13/Makefile中创建已存在目录提示错误的解决方案/">Makefile中重复创建目录提示错误的解决方案</a></h1><div class="post-meta">2017-11-13</div><a data-disqus-identifier="2017/11/13/Makefile中创建已存在目录提示错误的解决方案/" href="/2017/11/13/Makefile中创建已存在目录提示错误的解决方案/#disqus_thread" class="disqus-comment-count"></a><div class="post-content"><p>如题,我们经常需要在构建脚本Makefile中创建目录。例如下面一段脚本:<br><figure class="highlight makefile"><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></pre></td><td class="code"><pre><div class="line"><span class="section">deps:</span></div><div class="line"> git submodule update --init --recursive</div><div class="line"> mkdir -p out</div><div class="line"></div><div class="line"><span class="section">build:</span></div><div class="line"> cd out && cmake -DBUILD_TESTING=OFF ../ && make -j8</div><div class="line"></div><div class="line"><span class="section">package: deps build</span></div><div class="line"></div><div class="line"><span class="section">clean:</span></div><div class="line"> rm -rf out/*</div></pre></td></tr></table></figure></p></div><p class="readmore"><a href="/2017/11/13/Makefile中创建已存在目录提示错误的解决方案/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2017/11/10/pip下载超时解决方案/">pip国内下载失败超时等问题的解决方案</a></h1><div class="post-meta">2017-11-10</div><a data-disqus-identifier="2017/11/10/pip下载超时解决方案/" href="/2017/11/10/pip下载超时解决方案/#disqus_thread" class="disqus-comment-count"></a><div class="post-content"><p>可以通过国内开源镜像来下载python的库,操作步骤如下:<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">mkdir ~/.pip</div><div class="line">vim ~/.pip/pip.conf</div></pre></td></tr></table></figure></p></div><p class="readmore"><a href="/2017/11/10/pip下载超时解决方案/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2017/11/08/交叉编译工具远程调试总结/">交叉编译工具远程调试小结</a></h1><div class="post-meta">2017-11-08</div><a data-disqus-identifier="2017/11/08/交叉编译工具远程调试总结/" href="/2017/11/08/交叉编译工具远程调试总结/#disqus_thread" class="disqus-comment-count"></a><div class="post-content"><blockquote>
<p>我们在开发ARM板子C/C++项目过程中,我们会需要查找定位BUG,一种方式是通过网络发送日志;另一种方式是通过调试方式,而很多板子没有执行GDB性能,<br>因此我们需要远程调试的方式来进行调试。现在总结下项目中使用的两种方式。</p>
</blockquote>
<h2 id="调试可执行程序"><a href="#调试可执行程序" class="headerlink" title="调试可执行程序"></a>调试可执行程序</h2><ol></div><p class="readmore"><a href="/2017/11/08/交叉编译工具远程调试总结/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2017/11/07/git status中文显示不出来问题修复/">git status中文显示不对问题修复</a></h1><div class="post-meta">2017-11-07</div><a data-disqus-identifier="2017/11/07/git status中文显示不出来问题修复/" href="/2017/11/07/git status中文显示不出来问题修复/#disqus_thread" class="disqus-comment-count"></a><div class="post-content"><p>如题,我的mac上git status显示<br><figure class="highlight plain"><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></pre></td><td class="code"><pre><div class="line">➜ hexo git:(master) ✗ gst</div><div class="line">On branch master</div><div class="line">Changes not staged for commit:</div><div class="line"> (use "git add/rm <file>..." to update what will be committed)</div><div class="line"> (use "git checkout -- <file>..." to discard changes in working directory)</div><div class="line"> (commit or discard the untracked or modified content in submodules)</div><div class="line"></div><div class="line"> modified: _config.yml</div><div class="line"> modified: package-lock.json</div><div class="line"> modified: package.json</div><div class="line"> deleted: source/_posts/hello-world.md</div><div class="line"> deleted: "source/_posts/\346\265\213\350\257\225\344\275\277\347\224\250-md.md"</div><div class="line"> deleted: "source/_posts/\347\254\254\344\272\214\344\270\252\346\265\213\350\257\225.md"</div><div class="line"> modified: themes/maupassant (modified content)</div><div class="line"> modified: themes/next (untracked content)</div><div class="line"></div><div class="line">Untracked files:</div><div class="line"> (use "git add <file>..." to include in what will be committed)</div><div class="line"></div><div class="line"> "source/_posts/emacs\346\217\222\345\205\245\345\275\223\345\211\215\346\227\266\351\227\264\346\210\263.md"</div><div class="line"> "source/_posts/\344\277\256\345\244\215GO\345\214\205\347\256\241\347\220\206\345\267\245\345\205\267GLIDE\344\270\215\350\203\275\350\256\277\351\227\256golang.org\347\232\204\346\233\277\344\273\243\346\226\271\346\241\210.md"</div><div class="line"> source/about/</div><div class="line"></div><div class="line">no changes added to commit (use "git add" and/or "git commit -a")</div></pre></td></tr></table></figure></p></div><p class="readmore"><a href="/2017/11/07/git status中文显示不出来问题修复/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2017/11/07/emacs插入当前时间戳/">emacs插入当前时间戳</a></h1><div class="post-meta">2017-11-07</div><a data-disqus-identifier="2017/11/07/emacs插入当前时间戳/" href="/2017/11/07/emacs插入当前时间戳/#disqus_thread" class="disqus-comment-count"></a><div class="post-content"><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">C-u M-! date</div></pre></td></tr></table></figure></div><p class="readmore"><a href="/2017/11/07/emacs插入当前时间戳/">阅读全文</a></p></div><nav class="page-navigator"><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/">下一页</a></nav><script id="dsq-count-scr" src="//chenchuanyin.disqus.com/count.js" async></script></div></div><div class="pure-u-1-4 hidden_mid_and_down"><div id="sidebar"><div class="widget"><form action="//www.google.com/search" method="get" accept-charset="utf-8" target="_blank" class="search-form"><input type="text" name="q" maxlength="20" placeholder="Search"/><input type="hidden" name="sitesearch" value="http://chenchuanyin.github.io"/></form></div><div class="widget"><div class="widget-title"><i class="fa fa-folder-o"> 分类</i></div><ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/学习/">学习</a></li></ul></div><div class="widget"><div class="widget-title"><i class="fa fa-star-o"> 标签</i></div><div class="tagcloud"><a href="/tags/makefile/" style="font-size: 15px;">makefile</a> <a href="/tags/cpp/" style="font-size: 15px;">cpp</a> <a href="/tags/emacs/" style="font-size: 15px;">emacs</a> <a href="/tags/git/" style="font-size: 15px;">git</a> <a href="/tags/golang/" style="font-size: 15px;">golang</a> <a href="/tags/python/" style="font-size: 15px;">python</a> <a href="/tags/network/" style="font-size: 15px;">network</a> <a href="/tags/gdb/" style="font-size: 15px;">gdb</a> <a href="/tags/glide/" style="font-size: 15px;">glide</a> <a href="/tags/resource/" style="font-size: 15px;">resource</a></div></div><div class="widget"><div class="widget-title"><i class="fa fa-file-o"> 最近文章</i></div><ul class="post-list"><li class="post-list-item"><a class="post-list-link" href="/2018/04/04/几个优雅C++ STL算法例子/">几个优雅的C++ STL算法代码</a></li><li class="post-list-item"><a class="post-list-link" href="/2018/01/15/《TCP IP高效编程————改造网络程序的44个技巧》学习记录/">《TCP IP高效编程————改造网络程序的44个技巧》学习记录</a></li><li class="post-list-item"><a class="post-list-link" href="/2018/01/15/cpp目录结构及工具相关的一些工程经验/">cpp目录结构及工具相关的一些工程经验总结</a></li><li class="post-list-item"><a class="post-list-link" href="/2018/01/08/网络上的一些学习资料列表/">网络上的一些学习资料列表</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/11/16/golang目录结构及工具相关的一些工程经验总结/">golang目录结构及工具相关的一些工程经验总结</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/11/13/Makefile中创建已存在目录提示错误的解决方案/">Makefile中重复创建目录提示错误的解决方案</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/11/10/pip下载超时解决方案/">pip国内下载失败超时等问题的解决方案</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/11/08/交叉编译工具远程调试总结/">交叉编译工具远程调试小结</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/11/07/git status中文显示不出来问题修复/">git status中文显示不对问题修复</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/11/07/emacs插入当前时间戳/">emacs插入当前时间戳</a></li></ul></div><div class="widget"><div class="widget-title"><i class="fa fa-comment-o"> 最近评论</i></div><script type="text/javascript" src="//chenchuanyin.disqus.com/recent_comments_widget.js?num_items=5&hide_avatars=1&avatar_size=32&excerpt_length=20&hide_mods=1"></script></div></div></div><div class="pure-u-1 pure-u-md-3-4"><div id="footer">Copyright © 2018 <a href="/." rel="nofollow">Silver Chan.</a> Powered by<a rel="nofollow" target="_blank" href="https://hexo.io"> Hexo.</a><a rel="nofollow" target="_blank" href="https://github.com/tufu9441/maupassant-hexo"> Theme</a> by<a rel="nofollow" target="_blank" href="https://github.com/pagecho"> Cho.</a></div></div></div><a id="rocket" href="#top" class="show"></a><script type="text/javascript" src="/js/totop.js?v=0.0.0" async></script><script type="text/javascript" src="//cdn.bootcss.com/fancybox/3.1.20/jquery.fancybox.min.js" async></script><script type="text/javascript" src="/js/fancybox.js?v=0.0.0" async></script><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/fancybox/3.1.20/jquery.fancybox.min.css"><script type="text/javascript" color="0,0,0" opacity="0.5" zIndex="-2" count="50" src="//cdn.bootcss.com/canvas-nest.js/1.0.1/canvas-nest.min.js"></script><script type="text/javascript" src="/js/codeblock-resizer.js?v=0.0.0"></script><script type="text/javascript" src="/js/smartresize.js?v=0.0.0"></script></div></body></html>