You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

961 lines
261 KiB

<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title>CS, ECE硕士项目调研</title>
<link href="/life/cs-ece-master-programs/"/>
<url>/life/cs-ece-master-programs/</url>
<content type="html"><![CDATA[<p>为了准备2021硕士申请,我对一些喜欢的项目做了一些调查,并汇总在这里。</p><a id="more"></a><blockquote><p>排名来源:<a href="https://www.topuniversities.com/university-rankings/world-university-rankings/2020" target="_blank" rel="noopener">QS2020</a>, <a href="https://www.usnews.com/education/best-global-universities/rankings?page=1" target="_blank" rel="noopener">USNews2020</a>, <a href="http://www.shanghairanking.com/ARWU2019.html" target="_blank" rel="noopener">上海交大2019</a>,<a href="http://csrankings.org/#/index?all&world" target="_blank" rel="noopener">csrank.global.2010-2020</a><br>四个排名代表四种视角(QS-&gt;英国,USNews-&gt;美国,上海交大-&gt;中国,csrank-&gt;cs专业贡献)</p></blockquote><h1 id="英国-选2-3所"><a href="#英国-选2-3所" class="headerlink" title="英国 (选2-3所)"></a>英国 (选2-3所)</h1><h2 id="帝国理工"><a href="#帝国理工" class="headerlink" title="帝国理工"></a>帝国理工</h2><ul><li>排名<blockquote><p><code>QS</code>: 9<br><code>USNews</code>: 20<br><code>上海交大</code>: 23<br><code>csrank</code>: 73</p></blockquote></li></ul><p><strong>申请模式</strong>: </p><p>两个志愿,录取时可以看到你的第二志愿。一年只能提交一次申请。</p><h3 id="MSc-Computing-Science"><a href="#MSc-Computing-Science" class="headerlink" title="MSc Computing Science"></a><a href="https://www.imperial.ac.uk/study/pg/computing/computing-science/" target="_blank" rel="noopener">MSc Computing Science</a></h3><ul><li>学费<code>£33,250</code></li><li>时长一年</li></ul><h4 id="条件"><a href="#条件" class="headerlink" title="条件"></a>条件</h4><ul><li>任何专业一等学位</li><li>雅思6.5小分6/托福92小分20</li></ul><h4 id="案例"><a href="#案例" class="headerlink" title="案例"></a>案例</h4><ul><li>均分85, con 85 (校友利)</li><li>gre330 (优留)</li></ul><h3 id="MSc-Applied-Machine-Learning"><a href="#MSc-Applied-Machine-Learning" class="headerlink" title="MSc Applied Machine Learning"></a><a href="https://www.imperial.ac.uk/study/pg/electrical-engineering/applied-machine-learning/" target="_blank" rel="noopener">MSc Applied Machine Learning</a></h3><ul><li>学费<code>£32,500</code></li><li>时长一年</li></ul><h4 id="条件-1"><a href="#条件-1" class="headerlink" title="条件"></a>条件</h4><ul><li>EEE专业一等学位</li><li>雅思6.5小分6/托福92小分20</li></ul><h2 id="UCL"><a href="#UCL" class="headerlink" title="UCL"></a>UCL</h2><ul><li>排名<blockquote><p><code>QS</code>: 8<br><code>USNews</code>: 21<br><code>上海交大</code>: 15<br><code>csrank</code>: 50</p></blockquote></li></ul><p><strong>申请模式</strong>: </p><p>可以申请多次。申请由授课老师处理,不同院系不互通。</p><h3 id="MSc-Integrated-Machine-Learning-Systems"><a href="#MSc-Integrated-Machine-Learning-Systems" class="headerlink" title="MSc Integrated Machine Learning Systems"></a><a href="https://www.ucl.ac.uk/prospective-students/graduate/taught-degrees/integrated-machine-learning-systems-msc" target="_blank" rel="noopener">MSc Integrated Machine Learning Systems</a></h3><ul><li>学费<code>£28,530</code></li><li>时长一年</li></ul><h4 id="条件-2"><a href="#条件-2" class="headerlink" title="条件"></a>条件</h4><ul><li>EE/CS专业二等一学位</li><li>雅思6.5小分6/托福92小分读写24-30听说20-30</li></ul><h4 id="案例-1"><a href="#案例-1" class="headerlink" title="案例"></a>案例</h4><ul><li>88均分 (校友利)</li><li>85通信(优留)</li></ul><h3 id="MSc-Computer-Science"><a href="#MSc-Computer-Science" class="headerlink" title="MSc Computer Science"></a><a href="https://www.ucl.ac.uk/prospective-students/graduate/taught-degrees/computer-science-msc" target="_blank" rel="noopener">MSc Computer Science</a></h3><ul><li>学费<code>£30,400</code></li><li>时长一年</li></ul><h4 id="条件-3"><a href="#条件-3" class="headerlink" title="条件"></a>条件</h4><ul><li>非CS专
<categories>
<category> life </category>
</categories>
<tags>
<tag> investigation </tag>
<tag> master </tag>
</tags>
</entry>
<entry>
<title>Hello Hexo</title>
<link href="/tech/hello-hexo/"/>
<url>/tech/hello-hexo/</url>
<content type="html"><![CDATA[<p>将blog从Typecho迁移到了Hexo。</p>]]></content>
<categories>
<category> tech </category>
</categories>
<tags>
<tag> hexo </tag>
</tags>
</entry>
<entry>
<title>认知派生论</title>
<link href="/thoughts/cognitive-derived-theory/"/>
<url>/thoughts/cognitive-derived-theory/</url>
<content type="html"><![CDATA[<!--![](https://api.yimian.xyz/img/?path=wallpaper/img_2020-03-17_1920x1080_96_background_normal.jpg)--><p>拜读了毛主席的实践论和矛盾论,第一次系统地接触了辩证唯物论这一方法论,深感其强大与自然。综合我自己先前的所经所悟,提炼出认知派生这一观点。</p><a id="more"></a><h2 id="序"><a href="#序" class="headerlink" title="序"></a>序</h2><p>从巴甫洛夫的狗铃实验[1],到上世纪50年代费斯汀格的认知失调理论[2],再到1971年津巴多教授主导的斯坦福监狱实验[3],这一系列打破预期的心理学生理学实验,一步一步揭示出,人们心理的作用形式,似乎并非大多数人所认为的那样。实际上,这看似重大的心理学发现,其实早在两个世纪前,便已被马克思,恩格斯等人从社会学角度提出,并完善成为理论。后经列宁,斯大林等人通过实践进行完善。传入国内后,被毛泽东所集大成,结合了中国传统文化的底蕴,发展成为唯物辩证法的毛泽东思想。这一论理的形成,源自于这些人对自己所观察到的社会现象以及自己基于论理所实践的社会运动的归纳总结。而这一论理,又指导了中国共产党建国,扎实地完成国内资本原始积累地奇迹。</p><p>辩证唯物论是一套自洽的方法论,它能够有效地指导我们生活实践,从实践中总结论理,再将论理运用于实践的过程。而这一循环的高效运转,正是人类进化出认知的终极意义。</p><h2 id="结论"><a href="#结论" class="headerlink" title="结论"></a>结论</h2><p>方法论是一种十分有效而重要的工具,它为人们提供了一套范式(习惯),帮助人们更有效地践行“社会实践-&gt;认识-&gt;论理-&gt;社会实践”这一模式。</p><h2 id="参考文献"><a href="#参考文献" class="headerlink" title="参考文献"></a>参考文献</h2><p>[1] <a href="https://zh.wikipedia.org/wiki/%E5%B7%B4%E7%94%AB%E6%B4%9B%E5%A4%AB" target="_blank" rel="noopener">巴甫洛夫 - 维基百科</a><br>[2] <a href="https://zh.wikipedia.org/zh/%E8%AA%8D%E7%9F%A5%E5%A4%B1%E8%AA%BF" target="_blank" rel="noopener">認知失調 - 维基百科</a><br>[3] <a href="https://zh.wikipedia.org/zh-hans/%E6%96%AF%E5%9D%A6%E7%A6%8F%E7%9B%91%E7%8B%B1%E5%AE%9E%E9%AA%8C" target="_blank" rel="noopener">斯坦福监狱实验 - 维基百科</a> </p>]]></content>
<categories>
<category> thoughts </category>
</categories>
</entry>
<entry>
<title>左宗棠鸡块</title>
<link href="/cook/zuozongtang-chiken/"/>
<url>/cook/zuozongtang-chiken/</url>
<content type="html"><![CDATA[<p>分享一下改进版炸鸡块做法哦~</p><a id="more"></a><h2 id="材料准备"><a href="#材料准备" class="headerlink" title="材料准备"></a>材料准备</h2><ul><li>鸡胸肉</li><li>一个鸡蛋</li><li>葱末蒜末</li></ul><h2 id="预备步骤"><a href="#预备步骤" class="headerlink" title="预备步骤"></a>预备步骤</h2><ul><li>鸡肉切小块,加料酒,生抽,淀粉,鸡蛋清,搅匀腌10分钟</li><li>鸡块在面粉中打滚</li></ul><h2 id="核心步骤"><a href="#核心步骤" class="headerlink" title="核心步骤"></a>核心步骤</h2><ul><li>热油炸鸡块至焦黄</li><li>植物油蒜末炝锅</li><li>加入一勺生抽,一勺多白醋,一把白糖,番茄酱翻一下</li><li>加入鸡块,让鸡块上沾上酱汁</li><li>撒上葱末</li></ul><h2 id="成品图"><a href="#成品图" class="headerlink" title="成品图"></a>成品图</h2><p><img src="https://api.yimian.xyz/img/?path=imgbed/img_a3b687be_5120x3840_8_null_normal.jpeg" alt="左宗棠鸡块 2020-02-17"></p>]]></content>
<categories>
<category> cook </category>
</categories>
<tags>
<tag> chiken </tag>
</tags>
</entry>
<entry>
<title>欧洲旅行支票兑换攻略</title>
<link href="/travel/traveler-cheque/"/>
<url>/travel/traveler-cheque/</url>
<content type="html"><![CDATA[<!--![](https://api.yimian.xyz/img/?path=imgbed/img_6ae04a26_721x412_8_null_normal.png)--><p>之前去欧洲旅游办签证,由于没有三个月的银行流水,不得已购买了旅行支票作为资金证明。可是到了欧洲才发现旅行支票很难使用,如果不了解行情会被骗收15%-20%的手续费。这篇Blog记录了我们发现的兑换旅行支票的坑和Tips!</p><a id="more"></a><p>[scode type=”info”]<strong>经验一</strong>: 尽可能<strong>不使用</strong>旅行支票[/scode]<br>[scode type=”info”]<strong>经验二</strong>: 旅支兑换<strong>最低手续费</strong>在4%左右[/scode]</p><blockquote><p>若不想看经历,可直接调至文末兑换旅行支票的Tips处哦!</p></blockquote><h2 id="我的经历"><a href="#我的经历" class="headerlink" title="我的经历"></a>我的经历</h2><p>圣诞假和室友一行四人一起DIY游欧洲,去了意大利和奥地利两个国家,共5个城市。由于英国的银行卡还没有使用到三个月,无法通过打印流水来办签证,我们选择了另一种方法—购买American Express的欧元的旅行支票。殊不知啊,兑换和使用旅行支票真真是一个大坑。</p><p>最开始据旅行支票的官网上所说,欧洲很多城市的店铺里都能直接使用旅行支票,照这样来说,旅游时花掉它肯定比回英国后把它换回英镑划算的多(换回英镑的过程需要损失8%)。然鹅,出发前我们通过看他人的游记发现,欧洲现在很多店都无法直接花旅行支票(按我们后来实际旅行情况来看,只在威尼斯的好几家店看到了旅行支票的标识),于是我们决定去了就在机场红色标识的Change那里将它们全数换成欧元。</p><p><img src="https://api.yimian.xyz/img/?path=imgbed/img_6ae04a26_721x412_8_null_normal.png" alt="Change"></p><p>可到了第一站罗马找到了红色的Change后(如图),却发现700欧元只能给我们590多欧元。这可真的亏的不是一丁半点儿。我对象现场查到了American Express的电话,打过去发现人家现在在意大利没有设点,不过对方建议去银行换,说是可以毫无亏损(注意这也是个坑,,,)。由于有两人已经换了,为了止损,我们决定先不换剩下两人的700欧旅行支票,留着去银行换。</p><p>到了第三天,我们去了梵蒂冈那块儿玩,顺便去了附近American Express工作人员推荐的银行,还给中国银行打电话,结果均被告知不接受旅支。这可咋整?</p><p>这时刚好发现梵蒂冈周围有一堆change,于是又去问了问报价。其中有一家本来只报590多的,听见我们说另一家给了610多的价,说他们能给我们一个student discount,然后还算了算,报了个640。这下可好,我们开始发现这里面的门道了:其实哪有什么折扣,不过想找个借口吸引你罢了。这些change都是盈利性质的,你把旅支给了他们,他们再通过自己的途径卖给别的地方的American Express,中间可能有一点税收,但只要他们以比扣掉税收低的价格从你这里买下,他就一定能赚(一般还赚不少),不过是多赚点少赚点的区别罢了。而且当地有好几家change,我们主要发现了红色change标识的一家和蓝色的一家。若这家嫌你要求高不接受,那钱就让别家赚了呗。</p><p>所以这种时候,我们要想拿到高点的报价,就要掐准人家能接受的度(真的逼太狠了断了人家财路那就没辙了呀),然后通过让他们产生危机意识而提高报价。可以先问个几家,看他们一般会给多少,然后跟他说,别家给我了一个多少的价格。接下来这人可能就会开始打电话给上面的看能给个什么更高的价,叭叭一堆后给你一个略高一点的价格哈哈,你如果不太满意,可以再去找一家问问(不过要注意,如果是同一家的不同店面,要稍微注意点,毕竟他们上面的人可
<categories>
<category> travel </category>
</categories>
<tags>
<tag> traveler&#39;s cheque </tag>
<tag> Europe </tag>
</tags>
</entry>
<entry>
<title>一键激活win10</title>
<link href="/tech/kms/"/>
<url>/tech/kms/</url>
<content type="html"><![CDATA[<p>一键激活win10家庭版,专业版,企业版,教育版 φ( ̄∇ ̄o)</p><a id="more"></a><!--![](https://api.yimian.xyz/img/?path=wallpaper/img_2020-02-05_1920x1080_96_background_normal.jpg)--><h2 id="方法一-自动安装"><a href="#方法一-自动安装" class="headerlink" title="方法一(自动安装)"></a>方法一(自动安装)</h2><ul><li>使用此方法请先<strong>关闭所有杀毒软件</strong></li><li>使用此方法请先<strong>关闭所有杀毒软件</strong></li><li>使用此方法请先<strong>关闭所有杀毒软件</strong> </li></ul><blockquote><p>p.s. 如果不放心,请使用 方法二-源码安装</p></blockquote><hr><ul><li>点击<a href="https://github.com/IoTcat/kms/releases/download/v1.0/kms.exe" target="_blank" rel="noopener">这里</a>下载<code>exe</code>程序</li></ul><hr><ul><li>运行刚下载的程序。(<strong>请不要修改解压路径</strong>)</li><li>运行刚下载的程序。(<strong>请不要修改解压路径</strong>)</li></ul><hr><ul><li>点击 更多信息<code>-&gt;</code>仍然运行</li></ul><p><img src="https://api.yimian.xyz/img/?path=imgbed/img_f8f91201_532x498_8_null_normal.png" alt=""><br><img src="https://api.yimian.xyz/img/?path=imgbed/img_5e6b7101_532x498_8_null_normal.png" alt=""></p><ul><li>输入数字进行选择。(可输入数字<code>4</code>获取汉语翻译!!)</li></ul><p><img src="https://api.yimian.xyz/img/?path=imgbed/img_6f4f0165_609x226_8_null_normal.png" alt=""></p><hr><ul><li>耐心等待激活完成~ ::aru:proud:: </li></ul><blockquote><p>脚本已发送到桌面<code>kms.bat</code>,如果不需要您可以删除它~</p></blockquote><h2 id="方法二-源码安装"><a href="#方法二-源码安装" class="headerlink" title="方法二(源码安装)"></a>方法二(源码安装)</h2><ul><li>点击<a href="https://github.com/IoTcat/kms/archive/master.zip" target="_blank" rel="noopener">这里</a>下载压缩文件。</li></ul><hr><ul><li><strong>解压压缩文件</strong>(请<strong>务必解压</strong>,否则无法运行)</li><li><strong>解压压缩文件</strong>(请<strong>务必解压</strong>,否则无法运行)</li><li><strong>解压压缩文件</strong>(请<strong>务必解压</strong>,否则无法运行)</li></ul><hr><ul><li>双击运行文件夹中的<code>kms</code><code>kms.bat</code></li></ul><p><img src="https://api.yimian.xyz/img/?path=imgbed/img_c8d641e0_908x257_8_null_normal.png" alt="压缩文件示例"></p><ul><li>点击 更多信息<code>-&gt;</code>仍然运行</li></ul><p><img src="https://api.yimian.xyz/img/?path=imgbed/img_f8f91201_532x498_8_null_normal.png" alt=""><br><img src="https://api.yimian.xyz/img/?path=imgbed/img_5e6b7101_532x498_8_null_normal.png" alt=""></p><ul><li>输入数字进行选择。(可输入数字<code>4</code>获取汉语翻译!!)</li></ul><p><img src="https://api.yimian.xyz/img/?path=imgbed/img_6f4f0165_609x226_8_null_normal.png" alt=""></p><hr><ul><li>耐心等待激活完成~ ::aru:proud:: </li></ul><h2 id="进阶"><a href="#进阶" class="headerlink" title="进阶"></a>进阶</h2><h3 id="激活码"><a href="#激活码" class="headerlink" title="激活码"></a>激活码</h3><p>您的激活码将保存在<code>C:\Windows\kms.key</code></p><h3 id="运行日志"><a href="#运行日志" class="headerlink" title="运行日志"></a>运行日志</h3><ul><li>激活日志 <code>%temp%\kms.log</code></li><li>在本机尝试过的激活码 <code>%temp%\kms.tried_keys</code></li><li>kms服务器配置 <code>%temp%\kms.skms</code></li><li>ato输出信息 <code>%temp%\kms.ato</code></li></ul><h3 id="恢复未激活状态"><a href="#恢复未激活状态" class="headerlink" title="恢复未激活状态"></a>恢复未激活状态</h3><ul><li>进入<code>kms.bat</code>选择<code>3</code></li><li>等待完成卸载!!!</li></ul><h2 id="源码"><a href="#源码" class="headerlink" title="源码"></a>源码</h2><ul><li>项目地址:<a href="https://github.com/iotcat/kms" target="_blank" rel="noopener">iotcat/kms</a> </li></ul>]
<categories>
<category> tech </category>
</categories>
<tags>
<tag> kms </tag>
<tag> win10 </tag>
</tags>
</entry>
<entry>
<title>部署新型冠状病毒API</title>
<link href="/tech/coro/"/>
<url>/tech/coro/</url>
<content type="html"><![CDATA[<p>一分钟快速部署你自己的新型冠状病毒API ୧(๑•̀⌄•́๑)૭</p><a id="more"></a><h1 id="coro-api"><a href="#coro-api" class="headerlink" title="coro-api"></a>coro-api</h1><p>新型冠状病毒 实时数据 api<br>项目Git地址: <a href="https://github.com/iotcat/coro-api" target="_blank" rel="noopener">iotcat/coro-api</a><br>项目npm地址: <a href="https://www.npmjs.com/package/coro-api" target="_blank" rel="noopener">iotcat/coro-api</a> </p><h2 id="API示例"><a href="#API示例" class="headerlink" title="API示例"></a>API示例</h2><h3 id="获取全部"><a href="#获取全部" class="headerlink" title="获取全部"></a>获取全部</h3><p><a href="https://api.yimian.xyz/coro" target="_blank" rel="noopener">https://api.yimian.xyz/coro</a></p><h3 id="根据省份"><a href="#根据省份" class="headerlink" title="根据省份"></a>根据省份</h3><p><a href="https://api.yimian.xyz/coro?province=%E5%B1%B1%E4%B8%9C" target="_blank" rel="noopener">https://api.yimian.xyz/coro?province=山东</a> </p><h3 id="根据城市"><a href="#根据城市" class="headerlink" title="根据城市"></a>根据城市</h3><p><a href="https://api.yimian.xyz/coro?city=%E6%B3%B0%E5%AE%89" target="_blank" rel="noopener">https://api.yimian.xyz/coro?city=泰安</a></p><h3 id="根据省和城-推荐"><a href="#根据省和城-推荐" class="headerlink" title="根据省和城(推荐)"></a>根据省和城(推荐)</h3><p><a href="https://api.yimian.xyz/coro?province=%E5%B1%B1%E4%B8%9C&city=%E6%B3%B0%E5%AE%89" target="_blank" rel="noopener">https://api.yimian.xyz/coro?province=山东&amp;city=泰安</a> </p><h2 id="快速部署"><a href="#快速部署" class="headerlink" title="快速部署"></a>快速部署</h2><h3 id="环境要求"><a href="#环境要求" class="headerlink" title="环境要求"></a>环境要求</h3><ul><li><code>nodeJS</code>支持<code>express</code>任意版本</li><li><code>git</code>任意版本</li></ul><h3 id="下载文件"><a href="#下载文件" class="headerlink" title="下载文件"></a>下载文件</h3><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">$ git clone https:&#x2F;&#x2F;github.com&#x2F;iotcat&#x2F;coro-api.git &amp; cd coro-api</span><br></pre></td></tr></table></figure><h3 id="安装依赖"><a href="#安装依赖" class="headerlink" title="安装依赖"></a>安装依赖</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> npm install</span></span><br></pre></td></tr></table></figure><h3 id="启动"><a href="#启动" class="headerlink" title="启动"></a>启动</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> node index.js</span></span><br></pre></td></tr></table></figure><h3 id="访问"><a href="#访问" class="headerlink" title="访问"></a>访问</h3><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">http:&#x2F;&#x2F;localhost:17676</span><br></pre></td></tr></table></figure><h2 id="进阶"><a href="#进阶" class="headerlink" title="进阶"></a>进阶</h2><h3 id="GET参数"><a href="#GET参数" class="headerlink" title="GET参数"></a>GET参数</h3><table><thead><tr><th align="center">参数</th><th align="center">描述</th><th align="center">示例</th></tr></thead><tbody><tr><td align="center">province</td><td align="center">省份(国家)</td><td align="center">山东</td></tr><tr><td align="center">city</td><td align="center">城市</td><td align="center">泰安</td></tr></tbody></table><h3 id="修改端口"><a href="#修改端口" class="headerlink" title="修改端口"></a>修改端口</h3><p><code>index.js</code>第9行修改默认端<EFBFBD>
<categories>
<category> tech </category>
</categories>
<tags>
<tag> Covid-19 </tag>
<tag> API </tag>
</tags>
</entry>
<entry>
<title>香辣牛肉面</title>
<link href="/cook/awesome-beef-noodle/"/>
<url>/cook/awesome-beef-noodle/</url>
<content type="html"><![CDATA[<p>自研香辣牛肉面做法~</p><a id="more"></a><h2 id="材料准备-两人份"><a href="#材料准备-两人份" class="headerlink" title="材料准备(两人份)"></a>材料准备(两人份)</h2><ul><li>面条</li><li>两个鸡蛋</li><li>两根英国大葱切末</li><li>两片姜切末</li><li>适量牛肉切丁</li><li>准备小碗放一个八角,桂皮,白扣,少许白胡椒粒</li></ul><h2 id="预备步骤"><a href="#预备步骤" class="headerlink" title="预备步骤"></a>预备步骤</h2><ul><li>热锅植物油香油煎鸡蛋</li><li>热水焯一下牛肉</li></ul><h2 id="核心步骤"><a href="#核心步骤" class="headerlink" title="核心步骤"></a>核心步骤</h2><ul><li>热锅植物油香油,放入葱白部分炝锅</li><li>加入开水和牛肉粒,加入碗中的调料,焖3分钟</li><li>加入一勺生抽,半勺老抽,一勺蚝油</li><li>加入适量鸡精和盐调鲜</li><li>加适量红油藤椒油调辣</li><li>放入面条,煮到熟</li></ul><h2 id="后续"><a href="#后续" class="headerlink" title="后续"></a>后续</h2><ul><li>面条添至碗中,盖上鸡蛋</li><li>加剩下的葱绿末</li></ul><h2 id="配图"><a href="#配图" class="headerlink" title="配图"></a>配图</h2><p><img src="https://api.yimian.xyz/img/?path=imgbed/img_6dff3385_3648x2736_8_null_normal.jpeg" alt="香辣牛肉面-2020-01-19"></p>]]></content>
<categories>
<category> cook </category>
</categories>
<tags>
<tag> beef </tag>
<tag> noodle </tag>
</tags>
</entry>
<entry>
<title>英国意大利申根签攻略</title>
<link href="/travel/ivisa-checklist/"/>
<url>/travel/ivisa-checklist/</url>
<content type="html"><![CDATA[<p>在英国留学,圣诞去欧洲旅游,DIY了意大利申根签证。现在游完归来,总结一份申根签攻略。</p><a id="more"></a><h2 id="大致流程"><a href="#大致流程" class="headerlink" title="大致流程"></a>大致流程</h2><ul><li>仔细阅读<a href="https://www.vfsglobal.com/Italy/UK/London/tourist.html" target="_blank" rel="noopener">官网</a>条件,查看自己是否满足所有要求</li><li>尽早在线<a href="https://www.vfsglobal.com/Italy/UK/London/Schedule_an_Appointment1.html" target="_blank" rel="noopener">面签预约</a>(之后可以修改时间)</li><li>认真研究<a href="https://www.vfsglobal.com/Italy/UK/London/tourist.html" target="_blank" rel="noopener">需要的材料</a>(务必以官网为准)</li><li>生成visa申请表(<a href="https://www.vfsvisaonline.com/OnlineVaf-Italy?Country=QcpCgYPkPBcUOc3/C92SWQ==" target="_blank" rel="noopener">在线生成</a>)</li><li>准备其它材料</li></ul><h2 id="材料类别"><a href="#材料类别" class="headerlink" title="材料类别"></a>材料类别</h2><h3 id="常规签证材料"><a href="#常规签证材料" class="headerlink" title="常规签证材料"></a>常规签证材料</h3><ul><li>Visa申请表</li><li>身份证明</li><li>居住证明</li><li>照片</li></ul><h3 id="附加签证材料"><a href="#附加签证材料" class="headerlink" title="附加签证材料"></a>附加签证材料</h3><ul><li>工作证明</li><li>财产证明</li><li>旅行证明</li><li>住宿证明</li><li>保险证明</li></ul><h2 id="材料CheckList"><a href="#材料CheckList" class="headerlink" title="材料CheckList"></a>材料CheckList</h2><ul><li>visa申请表原件(在线生成后打印)</li><li>护照原件+复印件(黑白)</li><li>BRP原件+复印件(黑白)</li><li>一张证件照-与英国签证一致(<a href="https://www.vfsglobal.com/Italy/UK/London/tourist.html#tourist_photoSpecs" target="_blank" rel="noopener">要求</a>)</li><li>student letter</li><li>旅行支票原件+复印件或三个月银行流水</li><li>往返机票(姓名,日期,to&amp;from)</li><li>火车票(姓名,日期,to&amp;from)</li><li>住宿证明(姓名,日期,地址)</li><li>同行者名单</li><li>旅行保险证明(姓名,地理范围,保额)</li><li>面签预约证明复印件</li></ul><hr><ul><li>旅行行程单(方便跟签证官解释)</li><li>joint travel confirmation letter(如果某个车票或住宿证明上没有你的名字)</li><li>买票者的护照签名页复印件(如果某个车票或住宿证明上没有你的名字)</li></ul><h2 id="材料说明"><a href="#材料说明" class="headerlink" title="材料说明"></a>材料说明</h2><h3 id="visa申请表"><a href="#visa申请表" class="headerlink" title="visa申请表"></a>visa申请表</h3><ul><li>在线填写完第一页记得点SAVE, 记下页面右上角的Reference Number ::aru:shy::</li><li>下一次登录后点击上方<a href="https://www.vfsvisaonline.com/OnlineVAF-Italy/Applicant/Search" target="_blank" rel="noopener">RETRIEVE INCOMPLETE FILLED VAF</a>即可继续填写</li><li>填写参考<a href="https://travel.uk2hand.com/ukvisa/italy-schengen-visa/" target="_blank" rel="noopener">这篇攻略</a></li><li>单面黑白A4打印</li><li>打印好不要填写,不要签字,不要贴照片,到现场签证官会告诉你怎么办</li><li>不要装订,建议用环形针</li></ul><h3 id="Student-Letter"><a href="#Student-Letter" class="headerlink" title="Student Letter"></a>Student Letter</h3><ul><li>去学校FB开</li><li>需要有人签名,电子打印的签名不行</li><li>抬头需要写<code>Italy Consulate</code></li></ul><h3 id="旅行证明"><a href="#旅行证明" class="headerlink" title="旅行证明"></a>旅行证明</h3><ul><li>需要提供付过款的机票和跨城市的火车票</li><li>票的底部需要有网站链接</li><li>所有票上需要有你的名字</li><li>如果某张票没有你的名字,需要票上有名字的人提供签过字的<code>joint travel confirmation letter</code><code>
<categories>
<category> travel </category>
</categories>
<tags>
<tag> uk </tag>
<tag> italy </tag>
<tag> visa </tag>
</tags>
</entry>
<entry>
<title>今天很开心,在这里留个空</title>
<link href="/life/happy/"/>
<url>/life/happy/</url>
<content type="html"><![CDATA[<p>先在这里留个空,以后慢慢填~</p><a id="more"></a><p>φ( ̄∇ ̄o)</p>]]></content>
<categories>
<category> life </category>
</categories>
<tags>
<tag> love </tag>
</tags>
</entry>
<entry>
<title>Liverpool 学生公寓条件调研</title>
<link href="/life/liverpool-accom-inves/"/>
<url>/life/liverpool-accom-inves/</url>
<content type="html"><![CDATA[<p>为了更清晰更直观的选择出明年居住的公寓,本文汇总了网络上对各公寓的评价信息,供决策参考。</p><a id="more"></a><p>[scode type=”green”]大家积极在评论区补充哦,评论推荐使用qq邮箱[/scode]<br>[scode type=”yellow”]持续更新中…[/scode]<br>[scode type=”blue”]望大家能够<strong>补充</strong>更多房源,以便调查[/scode]</p><p><strong>所有步行距离以Guild为中心!!</strong> </p><h2 id="Dover-Court-我们的最终选择"><a href="#Dover-Court-我们的最终选择" class="headerlink" title="Dover Court (我们的最终选择)"></a>Dover Court (我们的最终选择)</h2><ul><li><code>步行距离</code>: 8 min (西北)</li><li><code>google地图</code>: <a href="https://www.google.com/maps/dir/53.4060943,-2.9635088/dover+court/@53.4073115,-2.9710734,16z/data=!3m1!4b1!4m9!4m8!1m1!4e1!1m5!1m1!1s0x487b2117f02af11d:0xa8248cb9d60eb03d!2m2!1d-2.9700754!2d53.408129" target="_blank" rel="noopener">Dover Court</a></li><li><code>Official Guide</code>: <a href="https://www.youtube.com/watch?v=lMyNP1edztE" target="_blank" rel="noopener">Dover Court</a></li><li><code>优点</code>: 距Lidl近,安静,管理好,安全,定期有人清洁,social place好,楼下自习室很安静</li><li><code>缺点</code>: 房间隔音一般,部分房间小,有的地方天花板低</li><li><code>价格</code>: £155.54 pw (Last Year)</li></ul><h2 id="Horizon-Heights"><a href="#Horizon-Heights" class="headerlink" title="Horizon Heights"></a>Horizon Heights</h2><ul><li><code>步行距离</code>: 14 min (西)</li><li><code>google地图</code>: <a href="https://www.google.com/maps/place/Unite+Students+-+Horizon+Heights/@53.4063639,-2.9762904,14.73z/data=!4m5!3m4!1s0x0:0xeb3661ed145a9ca6!8m2!3d53.4068673!4d-2.9785214" target="_blank" rel="noopener">Horizon Heights</a></li></ul><h2 id="St-Luke’s-View"><a href="#St-Luke’s-View" class="headerlink" title="St Luke’s View"></a>St Luke’s View</h2><ul><li><code>步行距离</code>: 13 min (西南)</li><li><code>google地图</code>: <a href="https://www.google.com/maps/place/Unite+Students+-+St+Luke' target="_blank" rel="noopener"s+View,+Liverpool/@53.4032851,-2.9832055,15.1z/data=!4m5!3m4!1s0x487b2123d300f157:0x7aa4464b82196264!8m2!3d53.4026763!4d-2.975033">St Luke’s View</a></li></ul><h2 id="Apollo-Court"><a href="#Apollo-Court" class="headerlink" title="Apollo Court"></a>Apollo Court</h2><ul><li><code>步行距离</code>: 11 min (西北)</li><li><code>同学反映</code>: 不安静(老雷)</li></ul><h2 id="Capital-Gate"><a href="#Capital-Gate" class="headerlink" title="Capital Gate"></a>Capital Gate</h2><ul><li><code>步行距离</code>: 7 min (西北)</li></ul><h2 id="Grand-Central"><a href="#Grand-Central" class="headerlink" title="Grand Central"></a>Grand Central</h2><ul><li><code>步行距离</code>: 12 min (西)</li></ul><h2 id="Philharmonic-Court"><a href="#Philharmonic-Court" class="headerlink" title="Philharmonic Court"></a>Philharmonic Court</h2><ul><li><code>步行距离</code>: 12 min (南)</li></ul><h2 id="The-Railyard"><a href="#The-Railyard" class="headerlink" title="The Railyard"></a>The Railyard</h2><ul><li><code>步行距离</code>: 9 min (东)</li></ul><h2 id="Myrtle-Court"><a href="#Myrtle-Court" class="headerlink" title="Myrtle Court"></a>Myrtle Court</h2><ul><li><code>步行距离</code>: 9 min (东)</li></ul><h2 id="Larch-House"><a href="#Larch-House" class="headerlink" title="Larch House"></a>Larch House</h2><ul><li><code>步行距离</code>: 7 min (西)</li></ul><h2 id="IQ"><a href="#IQ" class="headerlink" title="IQ"></a>IQ</h2><ul><li><code>步行距离</code>: 9 min (西北) </li><li>人脉: 老叶,灯泡</li></ul><h2 id="The-Arch"><a href="#The-Arch" class="headerlink" title="The Arch"></a>The Arch</h2><ul><li><code>步行距离</code>: 18 min (西南)</li></ul><h2 id="Albert-Court"><a href="#Albert-Court" class="headerlink" title="Albert Court"></a>Albert Court</h2><ul><li><code>步行距离</code>: 10 min (北)</li></ul><h
<categories>
<category> life </category>
</categories>
<tags>
<tag> uk </tag>
<tag> liverpool </tag>
<tag> accomodation </tag>
<tag> investigation </tag>
</tags>
</entry>
<entry>
<title>公共开支结算系统</title>
<link href="/tech/crown-place-erp/"/>
<url>/tech/crown-place-erp/</url>
<content type="html"><![CDATA[<p>在英国留学与4个室友合租,为了更好的控制和监管公共支出,以及维持彼此之间的公共支出平衡,我利用迎新周三天时间设计并开发除了此ERP公共开支计划系统。希望此系统能够便捷接下来一年的生活,减少大家之间的矛盾,促使充满幸福感的公共支出项目持久化OωO</p><a id="more"></a><h2 id="1-功能介绍"><a href="#1-功能介绍" class="headerlink" title="1.功能介绍"></a>1.功能介绍</h2><ul><li>统计日均周均流水,让公共支出可视化</li><li>用户申报一次公共支出,并提交发票照片留证</li><li>监视各成员间支出不均衡程度,计算方差,并可视化显示</li><li>对比本周与上周的开支,给出增减比例</li><li>当存在一人支出超出均值阈值,并且存在至少一人支出少于均值阈值,则会邮件这两个人产生一次内部交易</li><li>当上例中收款人收到款项后,需要到平台确认收到</li><li>平台所有历史公共开支及发票可查</li></ul><h2 id="2-系统架构"><a href="#2-系统架构" class="headerlink" title="2.系统架构"></a>2.系统架构</h2><h3 id="2-1-前端"><a href="#2-1-前端" class="headerlink" title="2.1 前端"></a>2.1 前端</h3><p>前端基于一个网上找到的比特币网站平台模板,深度改造实现。值得一提的是,前端使用<a href="https://github.com/iotcat/ushio-js" target="_blank" rel="noopener">Ushio-js项目</a>作为安全及日志插件,并得到了<a href="https://ushio.xyz" target="_blank" rel="noopener">Ushio</a>系统做背后支持。</p><h3 id="2-2-后端"><a href="#2-2-后端" class="headerlink" title="2.2 后端"></a>2.2 后端</h3><p>后端使用php语言编写。提供5个接口,分别提供获取账户事件,获取内部流通信息,获取公共支出信息,获取周报表,操作的功能。</p><p>mail系统使用<a href="https://www.eee.dog/tech/mail-api.html">Yimian Mail API</a>快速构建。</p><h3 id="2-3-数据库"><a href="#2-3-数据库" class="headerlink" title="2.3 数据库"></a>2.3 数据库</h3><p>数据库使用yimian-db/mysql。构建了三个表,分别用于存储流水,公共支出详情,内部流通。</p><h3 id="2-4-图片上传"><a href="#2-4-图片上传" class="headerlink" title="2.4 图片上传"></a>2.4 图片上传</h3><p>直接引用<a href="https://imgbed.yimian.xyz" target="_blank" rel="noopener">呓喵酱の图床</a>代码,少量改写。</p><h3 id="2-5-用户系统"><a href="#2-5-用户系统" class="headerlink" title="2.5 用户系统"></a>2.5 用户系统</h3><p>目前用额外网页简单实现,等待<a href="https://github.com/iotcat/auth" target="_blank" rel="noopener">ushio-auth项目</a>完成后统一整合。</p><h2 id="3-外观"><a href="#3-外观" class="headerlink" title="3. 外观"></a>3. 外观</h2><p>没啥可说的,摆图,自己看<br><img src="https://api.yimian.xyz/img/?path=imgbed/img_ed08c497_1080x6654_8_null_normal.jpeg" alt="imgbed_ed08c497"></p><p><img src="https://api.yimian.xyz/img/?path=imgbed/img_ea04ad82_1080x5082_8_null_normal.jpeg" alt="imgbed_ea04ad82"></p><p><img src="https://api.yimian.xyz/img/?path=imgbed/img_a8b3adb0_1080x2160_8_null_normal.jpeg" alt="imgbed_a8b3adb0"></p>]]></content>
<categories>
<category> tech </category>
</categories>
<tags>
<tag> uk </tag>
<tag> liverpool </tag>
<tag> crown-place </tag>
<tag> erp </tag>
<tag> system </tag>
</tags>
</entry>
<entry>
<title>在家中部署智慧家庭系统</title>
<link href="/tech/smart-home/"/>
<url>/tech/smart-home/</url>
<content type="html"><![CDATA[<p>基于Home Assisstant搭建综合家庭照明系统,多媒体系统,水流系统的智慧家庭。技术点:天猫精灵交互,LoRa通信,MQTT协议,frp内网穿透,NAS存储,拨动开关电路改造。</p><a id="more"></a><p>结合所学知识,运用前沿技术,造福生活,是我长期以来的不懈追求。为了让家人体验到更加稳定、舒适智能的生活方式,同时也为了巩固憨实先前在学校smartfarm项目和我自己的ushio系统中所积累的技术基础以及架构经验,我决定在出国前,使用20到23整天时间,重构家中老旧的物联网系统。采用分层架构和面向接口、面向测试、<strong>面向文档</strong>开发原则,以<strong>稳定性(Available)</strong><strong>可靠性(Reliable)</strong>为最优先指标,搭建一个运行目标3年以上的高度模块化的,易于远程操控的,开源的家庭软件硬件智能传感控制系统。</p><h2 id="0-架构综述"><a href="#0-架构综述" class="headerlink" title="0 架构综述"></a>0 架构综述</h2><h2 id="1-硬件设计"><a href="#1-硬件设计" class="headerlink" title="1 硬件设计"></a>1 硬件设计</h2><h3 id="1-1-单片机选材"><a href="#1-1-单片机选材" class="headerlink" title="1.1 单片机选材"></a>1.1 单片机选材</h3><p>使用Arduino UNO作为计算单元。一方面,Arduino Uno拥有高可靠性,我之前的智慧窗帘系统使用Arduino Uno作为主控板,平稳运行1年半未出现硬件问题。另一方面,Arduino Uno拥有较大的RAM,无需为了争夺RAM而在单片机编程上煞费苦心。</p><p>Arduino UNO的缺陷主要是价格高,但是为保障长期稳定运行,这个成本是必要的。</p><h3 id="1-2-WiFi通信模块选材"><a href="#1-2-WiFi通信模块选材" class="headerlink" title="1.2 WiFi通信模块选材"></a>1.2 WiFi通信模块选材</h3><p>使用ESP-01作为WiFi的通信模块。主要原因是之前学校课程使用过ESP-01搭建遥控小车,对其工作方式和性能比较了解,降低开发成本。</p><h3 id="1-3-LoRa通信模块选材"><a href="#1-3-LoRa通信模块选材" class="headerlink" title="1.3 LoRa通信模块选材"></a>1.3 LoRa通信模块选材</h3><p>使用<strong>安信可 LORA RA-02 LORA</strong>作为LoRa节点和LoRa网关通信模块。原因是surf项目使用的就是这个模块,比较了解它。</p><h3 id="1-4-智能音箱选材"><a href="#1-4-智能音箱选材" class="headerlink" title="1.4 智能音箱选材"></a>1.4 智能音箱选材</h3><p>智能音箱作为此物联网系统人机交互的最主要界面,发挥着举足轻重的作用。经研究,我使用天猫精灵方糖R作为家用智能音箱。一方面,天猫精灵的性价比摆在那里,非常便宜。第二,与小米开发小爱同学不同,阿里开发天猫精灵的目的是提供平台,它运行开发者以各种形式接入其网络,这一点对我至关重要。</p><h3 id="1-5-灯拨动开关"><a href="#1-5-灯拨动开关" class="headerlink" title="1.5 灯拨动开关"></a>1.5 灯拨动开关</h3><p>初期设想: 单向控制+复位器。<br>实际实现:将原有单开改造为双开,一路与继电器串联,另一路与两个pin口相连。</p><h2 id="2-通信设计"><a href="#2-通信设计" class="headerlink" title="2 通信设计"></a>2 通信设计</h2><p><img src="https://api.yimian.xyz/img/?path=imgbed/img_43b85bd4_1096x660_8_null_normal.png" alt="网络拓扑图"></p><p>采用WiFi+LoRa两种通信模式。在需要高速高质量通信的场景,如天猫精灵,手机,笔记本,使用WiFi作为通信手段。在WiFi信号不稳定的地方,使用LoRa进行通信。</p><h2 id="3-主控系统设计"><a href="#3-主控系统设计" class="headerlink" title="3 主控系统设计"></a>3 主控系统设计</h2><p>使用python3开源项目Home Assistant 为基础搭建本项目的主控系统。</p><h2 id="4-多媒体系统设计"><a href="#4-多媒体系统设计" class="headerlink" title="4 <EFBFBD>
<categories>
<category> tech </category>
</categories>
<tags>
<tag> Arduino </tag>
<tag> iot </tag>
<tag> smart-home </tag>
<tag> LoRa </tag>
<tag> WiFi </tag>
<tag> ESP8266 </tag>
<tag> MQTT </tag>
</tags>
</entry>
<entry>
<title>2019 SURF SmartFarming Proj 架构说明</title>
<link href="/tech/smartfarming-surf/"/>
<url>/tech/smartfarming-surf/</url>
<content type="html"><![CDATA[<p>本文详细介绍了XJTLU大学2019暑期科研SmartFarming Proj物联网架构的设计思路,实施情况以及缺陷反思。</p><a id="more"></a><h2 id="1-背景"><a href="#1-背景" class="headerlink" title="1 背景"></a>1 背景</h2><h3 id="1-1-需求"><a href="#1-1-需求" class="headerlink" title="1.1 需求"></a>1.1 需求</h3><p>为了探究农业物联网技术的可行性,Alam Mohammed导师希望我们能够提供一个<strong>稳定(Available)</strong><strong>可靠(Reliable)</strong>的物联网系统,以实现对农田的智能监控和管理。这个系统将能够适时地探测土壤以及空气中与植物健康相关的参数,处理并存储这些数据(由Alam提出)。同时,自动化控制的灌溉功能(由Caleb提出)以及一些数据展示方法(由Alam提出的可选需求)也被期待由本系统提供。</p><h3 id="1-2-定位"><a href="#1-2-定位" class="headerlink" title="1.2 定位"></a>1.2 定位</h3><p>由于是针对农业物联网设计的小型科研项目,项目的目标是对农业物联网的可行性进行探究,愿景是模拟最普遍的小型农业物联网应用场景。因此本架构的定位是<strong>适用于大部分具备感知,控制和展示功能的小型农业物联网工程</strong></p><h2 id="2-名词解释"><a href="#2-名词解释" class="headerlink" title="2 名词解释"></a>2 名词解释</h2><blockquote><ul><li><code>MQTT</code>: MQTT消息队列遥测传输(Message Queuing Telemetry Transport)是ISO 标准(ISO/IEC PRF 20922)下基于发布/订阅范式的消息协议。它工作在 TCP/IP协议族上,是为硬件性能低下的远程设备以及网络状况糟糕的情况下而设计的发布/订阅型消息协议[1]。</li></ul></blockquote><blockquote><ul><li><code>LoRa</code>: LoRa是当前市场上的一种新兴技术,其在1 GHz以下的公共频段中运行,用于远距离低功耗通信[2]。</li></ul></blockquote><h2 id="3-设计目标"><a href="#3-设计目标" class="headerlink" title="3 设计目标"></a>3 设计目标</h2><h3 id="3-1-实现功能"><a href="#3-1-实现功能" class="headerlink" title="3.1 实现功能"></a>3.1 实现功能</h3><p>本架构功能性需求主要包括土地数据采集,气象数据采集,灌溉系统控制,与无人机小组系统进行交互,网页控制台(可查看实时和历史传感数据,指标数据;能够控制系统)。</p><h3 id="3-2-性能指标"><a href="#3-2-性能指标" class="headerlink" title="3.2 性能指标"></a>3.2 性能指标</h3><ul><li><code>通信范围(测试)</code>:半径不低于1km</li><li><code>通信范围(生产)</code>:半径不低于3km</li><li><code>延时</code>:平均小于1s</li><li><code>超时率</code>:不超过5%</li><li><code>资源占用</code>:节点RAM不超过2k</li><li><code>运行周期</code>:1分 (测试) | 15分 (生产)</li></ul><h2 id="4-系统环境"><a href="#4-系统环境" class="headerlink" title="4 系统环境"></a>4 系统环境</h2><h3 id="4-1-相关软件及硬件"><a href="#4-1-相关软件及硬件" class="headerlink" title="4.1 相关软件及硬件"></a>4.1 相关软件及硬件</h3><p>!!!</p><table><tr> <td style="vertical-align: middle;text-align: center;"><strong>节点名称</strong></td> <td style="vertical-align: middle;text-align: center;"><strong>硬件设施</strong></td> <td style="vertical-align: middle;text-align: center;"><strong>软件集群</strong></td></tr><tr> <td rowspan="6" style="vertical-align: middle;text-align: center;">土地节点<br/>Ground Nodes</td> <td>Arduino Nano</td> <td>Arduino.h</td></tr><tr> <td><a href="https://item.taobao.com/item.htm?spm=a230r.1.14.11.58a54915TdUHKS&id=556174103413&ns=1&abbucket=14#detail" target="_blank" rel="noopener">SX1278 LORA模块</a></td> <td>SPI.h</td></tr><tr> <td><a href="https://detail.tmall.com/item.htm?spm=a230r.1.14.20.161f53ed47xg5U&id=41414863412&ns=1&abbucket=10" target="_blank" rel="noopener">LM35DZ 温度传感</a></td> <td><a href="https://git
<categories>
<category> tech </category>
</categories>
<tags>
<tag> Arduino </tag>
<tag> iot </tag>
<tag> LoRa </tag>
<tag> MQTT </tag>
<tag> smart-farming </tag>
</tags>
</entry>
<entry>
<title>Arduino中[]=重载导致的String调用问题</title>
<link href="/tech/arduino-operator-string-issue/"/>
<url>/tech/arduino-operator-string-issue/</url>
<content type="html"><![CDATA[<p>最近在物联网开发中使用Arduino搭建LoRa网关和节点,发现在调用String时总遇到一些奇奇怪怪的现象。经过排查,发现是由于其它地方[]=运算符的重载所导致。</p><a id="more"></a><p>为了方便,在开发节点时,我们使用了<a href="https://github.com/iotcat/lora-socket" target="_blank" rel="noopener">LoRa-Socket</a>和<a href="https://arduinojson.org/" target="_blank" rel="noopener">ArduinoJSON</a>作为依赖。我们发现这两个依赖分别使用时表现良好,但如果在同一个项目文件中使用,则会导致一些怪异的问题。</p><h2 id="情况一"><a href="#情况一" class="headerlink" title="情况一"></a>情况一</h2><p>通过指针调用函数时String参数传递异常。代码如下:</p><figure class="highlight c"><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"><span class="keyword">inline</span> <span class="keyword">static</span> <span class="keyword">void</span> _onReceived(<span class="keyword">const</span> <span class="keyword">String</span>&amp; msg, <span class="keyword">const</span> <span class="keyword">String</span>&amp; from, <span class="keyword">const</span> <span class="keyword">String</span>&amp; to, <span class="keyword">const</span> <span class="keyword">String</span>&amp; type)&#123;</span><br><span class="line"> (*_f)(msg, from, to, type);</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure><p>在这个案例中,我们发现msg等String在此函数中的数值是一切正常的,可是却没有能够成功传递到_f中。经过一系列骚操作,我们得出如下结论:</p><ul><li>发现如果将String换成int或其它类型,则参数传递至_f一切正常。有问题的只有String和char类型。</li><li>我们尝试过将String转换为其它类型,再转回,但是没有效果。</li><li>String或char类型全局变量的声明会使单片机崩溃。</li><li>当我们将ArduinoJSON依赖删去,String参数的传递则一切正常。</li></ul><p>我们从而可以得出,这种怪异现象是由于与ArduinoJSON包的冲突所致。</p><h2 id="情况二"><a href="#情况二" class="headerlink" title="情况二"></a>情况二</h2><p>在使用<a href="https://github.com/tomstewart89/Vector" target="_blank" rel="noopener">ArduinoVector</a>制作String类型Vector时,我们也发现了String类型的不稳定现象。神奇的是,这种现象只出现在String的使用中,其它如int类型运作良好。</p><p>这些不稳定现象可以总结如下:</p><ul><li>赋值时被截断</li><li>String值局部乱序</li><li>String值部分乱码</li><li>作为参数传给函数时会失败,读取出来是空(与案例一类似)</li></ul><h2 id="综述"><a href="#综述" class="headerlink" title="综述"></a>综述</h2><p>通过上述两个案例,我们可以初步总结出,这是由于[]=赋值运算符的重载与String有冲突。只要使用[]=重新定义String,即有可能出现String怪异的问题。</p>]]></content>
<categories>
<category> tech </category>
</categories>
<tags>
<tag> Arduino </tag>
<tag> cpp </tag>
</tags>
</entry>
<entry>
<title>随机图片API</title>
<link href="/tech/rand-pic-api/"/>
<url>/tech/rand-pic-api/</url>
<content type="html"><![CDATA[<p>本API基于华为云对象存储,使用华为CDN云加速,全球平均下载速度达10MB/s。API中已收录1100+张二次元图片,20+张Bing壁纸(每日自动抓取),150+张二次元头像,10+张图床上传图片。</p><a id="more"></a><p>[scode type=”red”]本API不承诺<strong>永久</strong>维护,使用前请务必斟酌<strong>使用风险</strong>!![/scode]</p><h2 id="1-API地址"><a href="#1-API地址" class="headerlink" title="1 API地址"></a>1 API地址</h2><ul><li><code>https://api.yimian.xyz/img</code></li></ul><h2 id="2-快速入门"><a href="#2-快速入门" class="headerlink" title="2 快速入门"></a>2 快速入门</h2><p><strong><em>随机二次元图片</em></strong></p><ul><li><code>GET/POST /img?type=moe</code></li><li>示例:<a href="https://api.yimian.xyz/img?type=moe" target="_blank" rel="noopener">https://api.yimian.xyz/img?type=moe</a></li></ul><p><strong><em>随机Bing壁纸</em></strong></p><ul><li><code>GET/POST /img?type=wallpaper</code></li><li>示例:<a href="https://api.yimian.xyz/img?type=wallpaper" target="_blank" rel="noopener">https://api.yimian.xyz/img?type=wallpaper</a></li></ul><p><strong><em>随机二次元头像</em></strong></p><ul><li><code>GET/POST /img?type=head</code></li><li>示例:<a href="https://api.yimian.xyz/img?type=head" target="_blank" rel="noopener">https://api.yimian.xyz/img?type=head</a></li></ul><p><strong><em>随机图床图片</em></strong></p><ul><li><code>GET/POST /img?type=imgbed</code></li><li>示例:<a href="https://api.yimian.xyz/img?type=imgbed" target="_blank" rel="noopener">https://api.yimian.xyz/img?type=imgbed</a></li></ul><p><strong><em>随机1920x1080尺寸二次元图片</em></strong></p><ul><li><code>GET/POST /img?type=moe&amp;size=1920x1080</code></li><li>示例:<a href="https://api.yimian.xyz/img?type=moe&size=1920x1080" target="_blank" rel="noopener">https://api.yimian.xyz/img?type=moe&amp;size=1920x1080</a></li></ul><h2 id="3-参数列表"><a href="#3-参数列表" class="headerlink" title="3 参数列表"></a>3 参数列表</h2><table><thead><tr><th align="center">名称</th><th align="center">描述</th><th align="center">格式</th><th align="center">示例</th></tr></thead><tbody><tr><td align="center"><strong>type</strong></td><td align="center">图片种类</td><td align="center"><code>moe</code>/<code>wallpaper</code>/<code>head</code>/<code>imgbed</code></td><td align="center"><code>type=moe</code></td></tr><tr><td align="center"><strong>size</strong></td><td align="center">根据图片大小筛选</td><td align="center"><code>??x??</code>;<br><code>*x??</code>;<br><code>*x*</code>;<br><code>??-??x??</code>;<br><code>??-??x??-??</code>;<br><code>??-??x*</code></td><td align="center"><code>display=1920x1080</code>;<br><code>display=1920x*</code>;<br><code>display=1920-1950x230-500</code>;<br><code>display=1920-1950x*</code>;</td></tr><tr><td align="center"><strong>range</strong></td><td align="center">尺寸误差范围</td><td align="center">number</td><td align="center"><code>range=100</code></td></tr><tr><td align="center"><strong>id</strong></td><td align="center">根据图片id筛选</td><td align="center">number</td><td align="center"><code>id=15</code></td></tr><tr><td align="center"><strong>path</strong></td><td align="center">根据路径提取图片</td><td align="center">abs path</td><td align="center"><code>path=wallpaper/img_··mal.jpg</code></td></tr><tr><td align="center"><strong>display</strong></td><td align="center">是否以网页格式展示</td><td align="center"><code>true</code>/<code>false</code>(default)</td><td align="center"><code>display=true</code></td></tr><tr><td align="center"><strong>R18</strong></td><td align="center">是否显示18禁图片</td><td align="center"><code>true</code>/<code>false</code>(default)</td><td align="center"><code>R18=true</code></td></tr></tbody></table><h2 id="4-参数详解"><a href="#4-参数详解" class="headerlink" title="4 参数详解"></a>4 参数详解</h2><h3 id="4-1-type"><a href="#4-1-t
<categories>
<category> tech </category>
</categories>
<tags>
<tag> api </tag>
<tag> img </tag>
<tag> random </tag>
<tag> moe </tag>
</tags>
</entry>
<entry>
<title>wIoT - 轻松物联</title>
<link href="/tech/wiot/"/>
<url>/tech/wiot/</url>
<content type="html"><![CDATA[<p>基于NodeJS搭建的物联网系统,配合D1 MINI单片机,帮助你灰常快速实现物联~</p><a id="more"></a><p>[scode type=”green”]正式开发文档见<a href="https://wiot.eee.dog" target="_blank" rel="noopener"><strong>这里</strong></a>[/scode]</p><h2 id="wIoT-for-NodeJS"><a href="#wIoT-for-NodeJS" class="headerlink" title="wIoT for NodeJS"></a>wIoT for NodeJS</h2><p>适用于NodeJS的wIoT服务器控制组件,轻松物联</p><h2 id="先觉条件"><a href="#先觉条件" class="headerlink" title="先觉条件"></a>先觉条件</h2><ul><li>拥有烧录好<a href="https://wiot.yimian.xyz/ota/get.php" target="_blank" rel="noopener">wIoT固件</a><strong>D1 MINI</strong>单片机</li><li>一台或多台无线WiFi路由器2.4G/5G</li><li>局域网内拥有一台装有<strong>NodeJS</strong>的服务器或电脑 (NodeJS装法非常简单, 请自行Google或百度)</li><li>配置好<strong>npm</strong></li></ul><h2 id="快速开始"><a href="#快速开始" class="headerlink" title="快速开始"></a>快速开始</h2><h3 id="单片机接入"><a href="#单片机接入" class="headerlink" title="单片机接入"></a>单片机接入</h3><ol><li>使用MicroUSB, 5V, 或3V pin脚给单片机供电</li><li>用一根导线连接D0脚与3V3脚,持续一秒以上拔出,以重置单片机</li><li>用手机或电脑搜索它的WiFi热点,名称格式<code>wiot-xx:xx:xx:xx:xx:xx</code></li><li>连接上此热点,密码为<code>1234567890</code></li><li>用浏览器打开网址<code>http://192.168.0.1</code>,记录网页中的MAC地址,这将用于识别此单片机</li><li>配置你无线路由器的ssid(即wifi名称,注意不能有非ASCII字符,比如汉字)和密码</li><li>配置完成后热点将自动断开,单片机将连接到你的无线路由器</li></ol><h3 id="依赖安装"><a href="#依赖安装" class="headerlink" title="依赖安装"></a>依赖安装</h3><p>在你的项目文件夹下打开命令行,输入以下指令安装wiot:</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> npm install wiot</span></span><br></pre></td></tr></table></figure><h3 id="使用方法"><a href="#使用方法" class="headerlink" title="使用方法"></a>使用方法</h3><p>在你的项目文件夹中新建一个app.js文件,输入以下内容:</p><figure class="highlight js"><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><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> wiot = <span class="built_in">require</span>(<span class="string">'wiot'</span>); <span class="comment">//引入wiot依赖包</span></span><br><span class="line"></span><br><span class="line"><span class="comment">// 新建一个单片机对象</span></span><br><span class="line"><span class="comment">// 这里使用了两个参数,MAC是单片机的MAC地址,pin中指定需要OUTPUT输出的端口</span></span><br><span class="line"><span class="comment">// 请自行修改MAC地址的值</span></span><br><span class="line"><span class="keyword">var</span> MyMCU = <span class="keyword">new</span> wiot.client(&#123;<span class="attr">MAC</span>
<categories>
<category> tech </category>
</categories>
<tags>
<tag> nodeJS </tag>
<tag> iot </tag>
<tag> WiFi </tag>
</tags>
</entry>
<entry>
<title>中美贸易战-解</title>
<link href="/thoughts/trade-war/"/>
<url>/thoughts/trade-war/</url>
<content type="html"><![CDATA[<p>中美贸易战的解不在美国,而是在我们自己身上。</p><a id="more"></a><p>关于谈判,党内争议比较大,但最终很有可能会拒绝做出让步。<br>当美关税抬升,国内相关产业链将大批转移至台湾及东南亚国家,累计将造成1亿人口的就业问题。与前几次的危机不同,这一次我们不但要提防房市泡沫的激化,也没有那麽多的基建可提供就业。从另一方面看,近几年来,中国的产能过剩问题主要通过出口得以解决,拿着贸易顺差来发展国内经济,以实现不可思议的经济增长。如今特朗普政府征加关税,将使得这一策略不再行得通。</p><p>如果在谈判中妥协,中方将丧失好不容易占来的第四次工业革命先机,并经济将会想日本,韩国一样任人摆布。</p><p>我认为,在不妥协的前提下,中共有三个破局之法。</p><ol><li>武统台湾<br>这个需要看明年台湾大选,是否能找到正当的武统理由。但的确有助于缓解国内社会焦点问题。</li><li>房市改革<br>可能性极大,把泡沫危机转变成创造就业机会的资本。</li><li>游戏<br>将社会上的过剩劳动力转移进游戏产业空转,以缓解社会矛盾的形成。</li></ol><p>为了缓解失业冲击的强度,央行将通过印人民币使人民币贬值来增进出口,吸引他国来补充美资撤离的空缺。</p><p>以上。。</p>]]></content>
<categories>
<category> thoughts </category>
</categories>
<tags>
<tag> war </tag>
</tags>
</entry>
<entry>
<title>自动发邮件API</title>
<link href="/tech/mail-api/"/>
<url>/tech/mail-api/</url>
<content type="html"><![CDATA[<p>重整自己先前的mail模块,顺便封装了一个API出来,欢迎大家调用~</p><a id="more"></a><h2 id="方法"><a href="#方法" class="headerlink" title="方法"></a>方法</h2><h3 id="参数-接受GET和POST"><a href="#参数-接受GET和POST" class="headerlink" title="参数(接受GET和POST)"></a>参数(接受GET和POST)</h3><ul><li><code>to</code>收信人邮箱地址</li><li><code>subject</code>邮件主题</li><li><code>body</code>邮件内容(建议使用html格式)</li><li><code>from</code>发件人名称</li></ul><h3 id="请求地址"><a href="#请求地址" class="headerlink" title="请求地址"></a>请求地址</h3><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">https:&#x2F;&#x2F;api.yimian.xyz&#x2F;mail</span><br></pre></td></tr></table></figure><h3 id="示例"><a href="#示例" class="headerlink" title="示例"></a>示例</h3><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">https:&#x2F;&#x2F;api.yimian.xyz&#x2F;mail&#x2F;?to&#x3D;收信邮箱&amp;subject&#x3D;邮件主题&amp;body&#x3D;邮件内容&amp;from&#x3D;发件人名称</span><br></pre></td></tr></table></figure><p>[scode type=”yellow”]如遇到GET传递邮件内容错误,请尝试使用POST[/scode]</p><h3 id="返回值-json格式"><a href="#返回值-json格式" class="headerlink" title="返回值(json格式)"></a>返回值(json格式)</h3><ul><li>参数<code>state</code>::<code>true</code>(成功)或<code>false</code>(失败)</li></ul><p>[scode type=”dangerous”]每个IP每天请求上限50个[/scode]</p>]]></content>
<categories>
<category> tech </category>
</categories>
<tags>
<tag> api </tag>
<tag> mail </tag>
</tags>
</entry>
<entry>
<title>JS中那些惊艳的操作</title>
<link href="/tech/js-notes/"/>
<url>/tech/js-notes/</url>
<content type="html"><![CDATA[<p>教你如何一步步迷上JS.. ╮(╯▽╰)╭ </p><a id="more"></a><p>好嘀~只是一些总结 </p><h2 id="JS中的那些萌点"><a href="#JS中的那些萌点" class="headerlink" title="JS中的那些萌点"></a>JS中的那些萌点</h2><ul><li><script>标签中,合理使用``defer="defer"``(延迟执行),``async="async"``(异步执行)</li><li>外部JS可以使用其它扩展名(如.php),但必须返回正确MINE类型</li><li>使用<code>var obj = preferredObj || backupObj;</code> 提供后备值 ::aru:surprised:: </li><li>函数中使用<code>arguements[]</code>获取参数</li><li>无函数签名,再见吧重载 ::aru:meditation:: </li><li>函数无引用传参,只要不作死用全局变量,封装就很完美</li><li>神奇的垃圾收集功能,开发时无需考虑手动释放内存</li><li>函数传参使用<code>function hh({})</code>直接传包含参数的对象,更加灵活</li><li>数组每一个位置可以存不同类型的数据 ::aru:blood2:: </li><li>数组支持模拟栈操作,如<code>push()</code>和<code>pop()</code></li><li>数组支持模拟队列操作,如<code>push()</code>和<code>shift()</code></li><li>数组支持从相反方向模拟队列,如<code>unshift()</code>和<code>pop()</code></li><li><code>sort()</code>可自定义比较函数为参数</li><li>数组<code>splice()</code>可太好用了吧</li><li>函数是对象,函数名是指针</li><li>可以像传递参数一样把一个函数传给另一个函数,也可以将一个函数作为另一个函数的结果返回</li><li>函数中可通过<code>arguments.callee</code>获取当前函数名指针</li><li>使用<code>arguments.callee.caller</code>获取调用当前函数的引用</li><li>使用<code>function.apply(this/*作用域*/, arguments)</code>或<code>function.call(this, arg1, arg2...)</code>指定作用域运行函数</li><li>使用函数固有属性<code>function.length</code>获取其期待的参数个数</li><li>通过函数继承属性<code>toLocaleString()````toString()````valueOf()</code>返回代码,方便调试</li><li>使用<code>indexOf()````lastIndexOf()</code>查找元素出现位置</li><li><code>trim()</code>删除字符串开头结尾空格</li><li>支持正则<code>RegExp</code></li><li>神奇但可怕的<code>eval(&quot;&quot;)</code>可将字符串转译成代码并就地执行</li><li><code>encodeURI()/decodeURI()</code>与<code>encodeURIComponent()/decodeURICompoent()</code>处理uri</li><li>立即调用函数<code>function(){}();</code></li><li>内置Math对象</li><li>Math中<code>ceil()````floor()````round()</code>向上,向下,标准舍入</li><li><code>Math.random()</code>大于零小于一随机数</li><li>对象中使用<code>functionName: function(){}</code>直接定义函数</li><li>ES6中<code>(x)=&gt;x+1</code>等价于<code>function(x){return x+1;}</code></li><li>使用<code>;(function(name, context, definition){moudle.exports = definition();})(&#39;funationName&#39;, this, function(){});</code>封装模块</li></ul><h2 id="小心得"><a href="#小心得" class="headerlink" title="小心得"></a>小心得</h2><ul><li>不建议使用<code>with</code>语句</li><li><code>label</code>标签少用</li><li><code>0.1 + 0.2 != 0.3</code> 浮点型天坑,与C类似</li><li><code>~26 == -27</code> 利用按位非提高效率</li><li>标识符查询由内部环境向外部环境进行</li><li>没有块级作用域,与C++不同</li><li><code>var obj2 = obj1;</code>实际是引用</li><li>函数传参时传对象,实际传的是指针</li><li>全局变量用完及时置为null以提性能</li><li>使用变量属性访问对象只能使用<code>obj[var]</code></li><li><code>var sum = function sum(){};</code>在Safari中会报错</li><li>不能为基本类型值添加属性和方法</li><li><code>new Number(&quot;25&quot;)</code>返回对象,而<code>Number(&quot;25&quot;)</code>返回25</li><li>布尔表达式中对象均为true</li></ul>]]></content>
<categories>
<category> tech </category>
</categories>
<tags>
<tag> nodeJS </tag>
</tags>
</entry>
<entry>
<title>Centos7下 Nginx 配置ssl证书自动续期</title>
<link href="/tech/ssl-auto-apply/"/>
<url>/tech/ssl-auto-apply/</url>
<content type="html"><![CDATA[<p>断断续续玩web已经一年了,一些之前从腾讯云申的TrustAsia证书已经陆陆续续开始过期,很方..于是开始尝试申请Let’s Encrypt的免费证书,并实现自动续期|´・ω・)ノ</p><a id="more"></a><h2 id="前提条件"><a href="#前提条件" class="headerlink" title="前提条件"></a>前提条件</h2><ul><li>必须是Centos7系统,其它未测试,不保证有效</li><li>有自己的域名</li><li>确认dns已将域名指向服务器</li><li>防火墙放行80与443端口</li><li>已配置好nginx代理,并<code>可以通过http访问域名</code>(一定确定能访问)</li></ul><h2 id="安装certbot"><a href="#安装certbot" class="headerlink" title="安装certbot"></a>安装certbot</h2><p>通过yum安装certbot</p><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">$ yum update #更新yum源</span><br><span class="line">$ yum install -y epel-release #安装epel源</span><br><span class="line">$ yum install -y certbot #安装certbot</span><br></pre></td></tr></table></figure><h2 id="初次申领证书"><a href="#初次申领证书" class="headerlink" title="初次申领证书"></a>初次申领证书</h2><h3 id="初次申领某域名证书"><a href="#初次申领某域名证书" class="headerlink" title="初次申领某域名证书"></a>初次申领某域名证书</h3><p>格式为</p><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">$ certbot certonly --webroot -w [Web站点目录] -d [站点域名] -m [联系人email地址] --agree-tos</span><br></pre></td></tr></table></figure><p>例如</p><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">$ certbot certonly --webroot -w &#x2F;opt&#x2F;www&#x2F;demo.yourdomain.com -d demo.yourdomain.com -m yourname@gmail.com --agree-tos</span><br></pre></td></tr></table></figure><h3 id="证书位置"><a href="#证书位置" class="headerlink" title="证书位置"></a>证书位置</h3><p>证书存放在<code>/etc/letsencrypt/live/demo.yourdomain.com/</code>文件夹中。<br>一共有4个文件,你可能要用到的是<code>fullchain.pem</code><code>privkey.pem</code></p><h3 id="配置nginx"><a href="#配置nginx" class="headerlink" title="配置nginx"></a>配置nginx</h3><p>在相应的<code>server{}</code>中加入以下内容:</p><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><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">listen 443 ssl;</span><br><span class="line"></span><br><span class="line">ssl_certificate &#x2F;etc&#x2F;letsencrypt&#x2F;live&#x2F;demo.yourdomain.com&#x2F;fullchain.pem; #2</span><br><span class="line">ssl_certificate_key &#x2F;etc&#x2F;letsencrypt&#x2F;live&#x2F;demo.yourdomain.com&#x2F;privkey.pem; #3</span><br><span class="line"></span><br><span class="line">ssl_session_cache shared:SSL:1m;</span><br><span class="line">ssl_session_timeout 5m;</span><br><span class="line">ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;</span><br><span class="line">ssl_protocols TLSv1 TLSv1.1 TLSv1.2;</span><br><span class="line">ssl_prefer_server_ciphers on;</span><br><span class="line">error_page 404 &#x3D; &#x2F;404.php;</span><br></pre></td></tr></table></figure><p>例如</p><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</spa
<categories>
<category> tech </category>
</categories>
<tags>
<tag> centos7 </tag>
<tag> ssl </tag>
</tags>
</entry>
<entry>
<title>Economy, Environment &amp;amp; Sustainability</title>
<link href="/thoughts/economy-environment-sustainability/"/>
<url>/thoughts/economy-environment-sustainability/</url>
<content type="html"><![CDATA[<p>经济学是一门研究选择的学问。人们活在世上总是在进行着各种选择。发展落后的国家希望尽快工业化发展经济,来改善自己的生存环境。而工业化后的国家则希望发展同时兼顾环境。于是落后国家需要50年来发展工业,搞基建,破坏环境。之后的50年则拼命治理环境,发展生态。由于地球生态是一个整体,发达国家非常不爽落后的国家搞工业化污染环境,于是各种矛盾。不过在21世纪,有望利用信息数字科技打破50-50年法则,为新一批的国家崛起提供蹊径( ๑´•ω•) “</p><a id="more"></a><h2 id="为什么追求发展"><a href="#为什么追求发展" class="headerlink" title="为什么追求发展"></a>为什么追求发展</h2><p>自然环境较为恶劣,不完全适合人类生存。于是具备主观能动性的人类开始由改造环境的冲动。这一心理行为逐步早就了名为“发展”的宏伟故事,大家都对其深信不已。就像故事中所描述的一样,人们为了实现这一目标开始减少内耗(战争),社会趋于高度分工化。</p><p>人类有一种基本心理效应叫蔡格尼克效应,讲的是人如果开始做一件事情便会难以在中途停下来。这一效应在群体行为中则会变本加厉的体现。当人们开始追求发展,并且得到了一定的激励(生活的确更舒适了,至少人们是这样认为的),于是这个势头便不会轻易停下来了,于是人类进入了千年级别的发展时期。</p><p>发展初期,太多的基础设施需要建设,太多的工业需要发展,最重要的是这个时候大家都很穷,都只是在一个信念的支撑下在向着发展的目标努力搞生产。而且一般当这个时候,往往会有其他强国对你虎视眈眈,所以这个时候,大家都会很团结,但不会像祖先以及后辈一样在乎什么环境生态的。只有一个想法便是希望发展起来。</p><p>经过大约50年的发展,生活好了,底气足了,开始关注一些更长久的事情,比如教育和环境。于是接下来的50年,开始拼命治理环境,搞教育。于是渐渐的环境好了,下一代也成长起来了。于是年轻一代们便利用他们头脑中的书本知识,开始批判祖先们破坏环境这不好那不好,开始投科研资金,股市凡是跟环保相关的板块开始居高不下,可持续发展开始成为许多人的口头禅。而这时,当时那些破坏环境的罪魁祸首们正退休在家里乐呵呵的看着这一切的发生。大概就是这么一个过程了。</p><h2 id="Environmental-Kuznet-Curve"><a href="#Environmental-Kuznet-Curve" class="headerlink" title="Environmental Kuznet Curve"></a>Environmental Kuznet Curve</h2><p><img src="https://yimian-image.obs.myhwclouds.com/blog/70-1.png" alt="Environmental Kuznet Curve"></p><p>上图的曲线非常科学地向我们展示出了一个国家在发展与环境之间摇摆的必然趋势。在这一图表的背后,反应出了以下几点:</p><ul><li>人们倾向于只考虑自己的假设</li><li>不同于个体的人群特性</li><li>生存资源稀缺</li><li>生产资料流通低效</li></ul><p>这意味着,如果能够改变上述的任何一个条件,Kuznet 诅咒便有希望得以改变,从而减小摆动周期和幅度,控制环境重建与修复成本,真正在宏观上实现人们所希望的高效率可持续发展。而新一代的数字信息技术正是这一可能性得以实践的关键。</p><h2 id="概念图"><a href="#概念图" class="headerlink" title="概念图"></a>概念图</h2><!-- 引入mermaid制图--><div class="mermaid">graph TDA{Environment}B{Economy}C{Society}D[GDB Based]E[NNI** HDI]F[Kuznet Curve]G[Env Kuznet Curve]H((Human Nature))I[Human Behavior]J[Improve Living Environment]K[Request for Dev]A --> JJ --> KK --> BB --> |measured by| DD --> |neglect| CB --> |predicted by| FF --> CD --> |foments| ID --> |spoils| AG --> CH --> IE --> |
<categories>
<category> thoughts </category>
</categories>
<tags>
<tag> development </tag>
<tag> environment </tag>
</tags>
</entry>
<entry>
<title>数电期中总结</title>
<link href="/notes/digital-circuit/"/>
<url>/notes/digital-circuit/</url>
<content type="html"><![CDATA[<p>上学期掉了魔电的坑,这学期来搞点数电小攻略掩饰一下(☆ω☆)</p><a id="more"></a><h1 id="1-数制与码制"><a href="#1-数制与码制" class="headerlink" title="1. 数制与码制"></a>1. 数制与码制</h1><h2 id="二进制运算"><a href="#二进制运算" class="headerlink" title="二进制运算"></a>二进制运算</h2><h3 id="补码"><a href="#补码" class="headerlink" title="补码"></a>补码</h3><p>常用补码来表示负数,以便于计算。<br>正数和零补码是其自身,负数的补码方法如下:<br>二进制减法可以通过被减数加要减数的补码来实现。<br><strong>&lt;法一&gt;直接法</strong><br>$$(N)_{COMP}=\begin{cases}N&amp;\text{N为正数}\2^{n}-N&amp; \text{N为负数} \end{cases}$$</p><p>符号位为零(正数)时,补码与源码相同,符号位为1(负数)时,补码为$2^{n}-N$.<br><strong>&lt;法二&gt;观察法</strong><br>欲求补码,可以先找其反码。<br>$$(N)_{INV}=\begin{cases}N&amp;\text{N为正数}\(2^{n}-1)-N&amp; \text{N为负数} \end{cases}$$</p><p>即,除符号位外其他值0变1,1变0。<br>随后反码整体加1即可得到补码~</p><h2 id="常用编码"><a href="#常用编码" class="headerlink" title="常用编码"></a>常用编码</h2><h3 id="DCB"><a href="#DCB" class="headerlink" title="DCB"></a>DCB</h3><p>即8421恒权码。DCB作为10进制显示时,须在每一个Invalid位(&gt;9)上加6。</p><h3 id="Signed-Numbers"><a href="#Signed-Numbers" class="headerlink" title="Signed Numbers"></a>Signed Numbers</h3><p>使用8位,最左边一位表示符号,其余7位表示数值。</p><h2 id="期中总结"><a href="#期中总结" class="headerlink" title="期中总结"></a>期中总结</h2><h3 id="第一周-初识数电"><a href="#第一周-初识数电" class="headerlink" title="第一周 - 初识数电"></a>第一周 - 初识数电</h3><ul><li>模拟量太复杂,不符合人类思维</li><li>三极管MOS管等非线性器件为魔转数提供了器件基础</li><li>因为模电太难,所以我们要学数电<br><strong>一些要点</strong></li><li>TTL意思是指晶体管逻辑电路,由各种三极管和电阻组成,特点是速度快</li><li>TTL中0-0.8V为低电平,2-5V为高电平</li><li>二进制与十进制相互转换(整数/小数)</li><li>LSB(Least Significant Bit)/MSB(Most S B)</li></ul><h3 id="第二周-数制"><a href="#第二周-数制" class="headerlink" title="第二周 - 数制"></a>第二周 - 数制</h3><ul><li>反码 1’s Complement</li><li>补码 2’s Complement</li><li>有时候二进制太长不好用,这使16进制很方便</li><li>16进制类似2进制的助记符,如观察<code>1100 0101</code>可直接写出<code>C5</code></li><li>BCD是用一个16进制表示一个10进制数</li><li>BCD很符合人类的思维习惯,但造成极大的资源浪费</li><li>BCD四则运算,我觉得最好转成10进制算完再转回去,反正很方便</li><li>计算机BCD加法采取+6进位法</li><li>数字储存时最左一位是符号位</li><li>负数使用补码来存储(<a href="https://zhidao.baidu.com/question/1692306348989800588.html" target="_blank" rel="noopener">栗子</a>)</li><li>1字节signed数字范围<code>-128-127</code></li><li>合理设计存储位数,小心溢出</li><li><a href="https://zhidao.baidu.com/question/293829485.html" target="_blank" rel="noopener">二进制乘法</a></li><li><a href="https://zhidao.baidu.com/question/304091753926723564.html" target="_blank" rel="noopener">二进制除法</a> 与十进制类似</li></ul><h3 id="第三周-逻辑门与电路封装类型"><a href="#第三周-逻辑门与电路封装类型" class="headerlink" title="第三周 - 逻辑门与电路封装类型"></a>第三周 - 逻辑门与电路封装类型</h3><ul><li>非门 NOT</li><li>与门 AND</li><li>或门 OR</li><li>非与门 NAND</li><li>非或门 NOR</li><li>异或门 XOR</li><li>常见有TTL和CMOS两类</li><li>CMOS按照供压可分为3.3V和5V两类</li><li>fan-out是指有效input个数</li>
<categories>
<category> notes </category>
</categories>
<tags>
<tag> circuit </tag>
</tags>
</entry>
<entry>
<title>气候变化与全球环境</title>
<link href="/thoughts/global-climate-change/"/>
<url>/thoughts/global-climate-change/</url>
<content type="html"><![CDATA[<p>全球气候变化与人类行为有着显著的相关性,人类行为又会改变气候的自然变化。通过研究Ice core等Archive,发现地球历史中温度与$CO_{2}$浓度有着显著正相关性。如今,人类行为使大气$CO_{2}$含量远超其正常水平,其可能引起全球变暖,冰川融化等,但仅为可能..</p><a id="more"></a><h2 id="概念简介"><a href="#概念简介" class="headerlink" title="概念简介"></a>概念简介</h2><h3 id="天气与气候"><a href="#天气与气候" class="headerlink" title="天气与气候"></a>天气与气候</h3><p>天气是指一段较短时间段内的大气状态,而气候研究的主要使更长时间中周期行动大气状态规律。简言之,气候是周期变化的天气。气候具备地域性,随纬度与海陆分布密切相关。在更长的时间维度上,我们发现地球的气候变迁也呈现出显著的周期性。</p><p><img src="https://yimian-image.obs.myhwclouds.com/blog/34-1.png" alt="地球历史温度变迁"></p><p>上图描述了地球的历史温度,其具有明显的周期性。值得注意的是,每当全球气候变暖,便会激发物种爆炸。而现在,正处于一次小规模的温度上升期,且温度上升速度与历史数据并无太大异常,因此无法确凿证明其与人类二氧化碳排放有关。</p><h2 id="研究方法"><a href="#研究方法" class="headerlink" title="研究方法"></a>研究方法</h2><h3 id="直接法(研究现代)"><a href="#直接法(研究现代)" class="headerlink" title="直接法(研究现代)"></a>直接法(研究现代)</h3><ol><li>记录温度</li><li>记录降雨量 (Precipitation)</li><li>研究植被 (Vegetation)</li><li>海平面</li><li>冰川 (Glaciers) :: 主要通过研究冰盖融化与生成的Balance</li></ol><h3 id="间接法(研究历史)"><a href="#间接法(研究历史)" class="headerlink" title="间接法(研究历史)"></a>间接法(研究历史)</h3><ol><li>Proxy</li><li>Archive e.g. “Ice Core” ::从冰层(Ice Sheet)中提取的分层的冰棍标本</li></ol><h3 id="Ice-Core分层原因"><a href="#Ice-Core分层原因" class="headerlink" title="Ice Core分层原因"></a>Ice Core分层原因</h3><p>积雪后,随着时间推移,积雪会经历以下几种状态:</p><ol><li>Snow (几小时,主要成分是空气)</li><li>Firn (几天,粒雪)</li><li>Glacial Ice (数年)</li></ol><h3 id="时间追溯方法"><a href="#时间追溯方法" class="headerlink" title="时间追溯方法"></a>时间追溯方法</h3><p>由于积雪时的温度不同,因此冰层中会以年为单位周期变化,通过计数层数即可获得某一冰层的所属年代。<br><img src="https://yimian-image.obs.myhwclouds.com/blog/34-2.jpg" alt="冰层"></p><h3 id="历史温度研究方法"><a href="#历史温度研究方法" class="headerlink" title="历史温度研究方法"></a>历史温度研究方法</h3><p>大气中${}^{18}O/{}^{16}O$比值与温度密切相关,因此通过测量冰层中相应位置的同位素比值即可间接推得当时的温度。<br>此外,还可以通过类似的方法测得各历史时期的$CO_{2}$浓度。</p><h2 id="研究发现"><a href="#研究发现" class="headerlink" title="研究发现"></a>研究发现</h2><h3 id="二氧化碳浓度与温度密切相关"><a href="#二氧化碳浓度与温度密切相关" class="headerlink" title="二氧化碳浓度与温度密切相关"></a>二氧化碳浓度与温度密切相关</h3><p><img src="https://yimian-image.obs.myhwclouds.com/blog/34-3.png" alt="历史二氧化碳与温度"></p><p>由上图可看出,地球历史上,二氧化碳浓度与温度具备密切的相关性。直到近150年,这一规律被打破,大气二氧化碳浓度极具上升。人表示慌得一批⌇●﹏●⌇</p><h2 id="与人类"><a href="#与人类" class="headerlink" title="与人类"></a>与人类</h2><h3 id="一个公式"><a href="#一个公式" class="headerlink" title="一个公式"></a>一个公式<
<categories>
<category> thoughts </category>
</categories>
<tags>
<tag> environment </tag>
<tag> climate </tag>
</tags>
</entry>
<entry>
<title>总结一下我的代码风格</title>
<link href="/tech/my-code-style/"/>
<url>/tech/my-code-style/</url>
<content type="html"><![CDATA[<p>我的代码风格大致有以下几种情况:组织中追随组织领导,公司里老板说的都对,学校里大佬教的都好╮(╯▽╰)╭ 仅其它一些自己的开源小项目则遵循以下风格→_→</p><a id="more"></a><h2 id="关于强迫症"><a href="#关于强迫症" class="headerlink" title="关于强迫症"></a>关于强迫症</h2><p>首先说好,</p><p>四个空格的Tab缩进大法好!!!<br>四个空格的Tab缩进大法好!!!<br>四个空格的Tab缩进大法好!!!</p><p>大括号不换行!!!<br>大括号不换行!!!<br>大括号不换行!!!</p><h2 id="关于命名"><a href="#关于命名" class="headerlink" title="关于命名"></a>关于命名</h2><p>命名以让别人一眼就能明白为佳,理想中看你的代码就像读一首英语小诗般惬意 ::aru:insidious:: </p><h3 id="常-变量命名"><a href="#常-变量命名" class="headerlink" title="常/变量命名"></a>常/变量命名</h3><p>编译器常量全大写,字符间用单下划线连接。如:</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="meta-keyword">define</span> WIFI_PASSWD 12345</span></span><br></pre></td></tr></table></figure><p>变量基本采用小驼峰命名,规则是单词之间直接连接(无需下划线),第一个单词全小写,之后的单词首字母大写。如:</p><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">String</span> usrName = <span class="string">"IoTgod"</span>;</span><br></pre></td></tr></table></figure><p>频繁调用的变量名称不易过长,但却要表意清晰。<br>要实现这一点,可以尝试部分省略单词中的非首字母元音,如 user 可以简写为 usr,password 可省略为 passwd 或 psswd。但简化后的名字仍需容易辨识。</p><p>全局变量使用 g_ 加变量名称命名,如</p><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">global <span class="keyword">int</span> g_isLightOn = <span class="number">0</span>;</span><br></pre></td></tr></table></figure><p>局部静态变量使用 s_ 加变量名称,如</p><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">static</span> <span class="keyword">int</span> s_errorCounter = <span class="number">0</span>;</span><br></pre></td></tr></table></figure><p>常量变量,命名与普通变量一致,如</p><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> <span class="keyword">float</span> pi = <span class="number">3.14159265</span>;</span><br></pre></td></tr></table></figure><h3 id="函数命名"><a href="#函数命名" class="headerlink" title="函数命名"></a>函数命名</h3><p>函数命名技巧偷师自大名鼎鼎的<a href="https://nginx.org" target="_blank" rel="noopener">Nginx</a>,并在其基础上稍有变动。<br>基本法则为 <em>小写标签名+__(双下划线)+小写动词+小写名词()</em><br>名词与名词间用单下滑线链接。<br>例如:</p><figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">db__get_usr_info</span><span class="params">()</span></span>;</span><br></pre></td></tr></table></figure><p>其中db意为Database, 提示这个函数属于数据库操作标签,作用是获取用户信息。</p><p>如果你不需要标签(比如在一些面向对象的语言中),你可以肆意省略标签。如:<
<categories>
<category> tech </category>
</categories>
<tags>
<tag> cpp </tag>
</tags>
</entry>
<entry>
<title>工程电磁学</title>
<link href="/notes/electromagnetism/"/>
<url>/notes/electromagnetism/</url>
<content type="html"><![CDATA[<p>麦克斯韦大法好!!</p><a id="more"></a><h3 id="先供上麦克斯韦方程-膜拜膜拜-o-•ェ•-o"><a href="#先供上麦克斯韦方程-膜拜膜拜-o-•ェ•-o" class="headerlink" title="先供上麦克斯韦方程 膜拜膜拜( o=^•ェ•)o"></a>先供上麦克斯韦方程 膜拜膜拜( o=^•ェ•)o</h3><p>$$<br>\begin{eqnarray}<br>\nabla\cdot\vec{E} &amp;=&amp; \frac{\rho}{\varepsilon_0} \<br>\nabla\cdot\vec{B} &amp;=&amp; 0 \<br>\nabla\times\vec{E} &amp;=&amp; -\frac{\partial B}{\partial t} \<br>\nabla\times\vec{B} &amp;=&amp; \mu_0\left(\vec{J}+\varepsilon_0\frac{\partial E}{\partial t} \right)<br>\end{eqnarray}<br>$$</p><hr><h2 id="第一话-高斯生库伦"><a href="#第一话-高斯生库伦" class="headerlink" title="第一话 - 高斯生库伦"></a>第一话 - 高斯生库伦</h2><ul><li>假设空间中两点电荷$Q_{1}$,$Q_{2}$,相距d,欲求其相互作用的电场力。</li><li>现以$Q_{1}$为圆心,$d$为半径做球。根据高斯law可知球面上的电通量只与球内电荷量有关,本例中为$\frac{Q_{1}}{\varepsilon_0}$。</li><li>将上式中电通量除以求表面积可得电场强度$\frac{Q_{1}}{4\pi d^{2}\varepsilon_0}$</li><li>场强乘以$Q_{2}$即可得库仑力$\frac{Q_{1}Q_{2}}{4\pi d^{2}\varepsilon_0}$</li><li>令$k=\frac{1}{4\pi \varepsilon_0}$整理得<br>$$F = \frac{k Q_{1}Q_{2}}{d^{2}}$$<br>证毕</li></ul><h2 id="第二话-高斯金箍棒"><a href="#第二话-高斯金箍棒" class="headerlink" title="第二话 - 高斯金箍棒"></a>第二话 - 高斯金箍棒</h2><ul><li>假设一均匀带电长度正无穷细杆,电荷密度为$\lambda$,求距其$d$处场强。</li><li>绕杆画一个过待求点的圆柱,设高为$x$。</li><li>由于杆长无限,圆柱两底面电场被抵消。</li><li>圆柱侧面积为$2\pi dx$</li><li>圆柱内电荷量为$\lambda x$</li><li>引入高斯,得<br>$$<br>2\pi dxE = \frac{\lambda x}{\varepsilon_{0}}<br>$$<br>整理得<br>$$<br>E = \frac{\lambda}{2\pi d\varepsilon_{0}}<br>$$<br>证毕</li></ul><h2 id="高斯球球球"><a href="#高斯球球球" class="headerlink" title="高斯球球球"></a>高斯球球球</h2><ul><li>首先要有一个带电小球,电量$Q$,想求其外部距其圆心$d$处场强。</li><li>然后可列式<br>$$<br>4\pi d^2 E = \frac{Q}{\varepsilon_0}<br>$$<br>整理得<br>$$<br>E = \frac{Q}{4\pi \varepsilon_0 d^2}<br>$$<br>毕</li></ul><h2 id="高斯大面"><a href="#高斯大面" class="headerlink" title="高斯大面"></a>高斯大面</h2><ul><li>首先有一个均匀带电无穷面,带电面密度$\rho$,欲求距其$d$的点场强。</li><li>以无穷面为中央横截面,做一个底面圆心为待求点的圆柱,半径为$r$。</li><li>由于电场线皆平行,只有两个底面有电场线穿过。</li><li>可列式<br>$$<br>2\pi r^2 E = \frac{\rho \pi r^2}{\varepsilon_0}<br>$$<br>整理得<br>$$<br>E = \frac{\rho}{2\varepsilon_0}<br>$$<br>完事</li></ul><hr><p>To Be Continued…</p>]]></content>
<categories>
<category> notes </category>
</categories>
<tags>
<tag> maxwell </tag>
</tags>
</entry>
<entry>
<title>Centos7脚本一键安装Typecho</title>
<link href="/tech/centos7-auto-install-typecho/"/>
<url>/tech/centos7-auto-install-typecho/</url>
<content type="html"><![CDATA[<p>一时兴起,帮番茄同学(<a href="https://tomatotrees.xyz" target="_blank" rel="noopener">@番茄树</a>)配置了博客,在此记录一下流程 ::aru:confuse:: </p><a id="more"></a><h2 id="先觉条件"><a href="#先觉条件" class="headerlink" title="先觉条件"></a>先觉条件</h2><ul><li>只测试过阿里云腾讯云Centos7学生机</li><li>系统很干净,最好刚重装过</li><li>使用root权限</li></ul><h2 id="一键安装"><a href="#一键安装" class="headerlink" title="一键安装"></a>一键安装</h2><p>无聊写了一个一键搭建脚本,使用如下指令运行(详见<a href="https://github.com/IoTcat/typecho-auto-install-centos7" target="_blank" rel="noopener">github</a></p><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">$ wget https:&#x2F;&#x2F;yimian-setup.obs.myhwclouds.com&#x2F;sh&#x2F;auto.sh &amp;&amp; sh auto.sh</span><br></pre></td></tr></table></figure><p>如果不出意外安装将自动进行,安装最后需要你手动输入如下数据库配置指令。</p><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></pre></td><td class="code"><pre><span class="line">use mysql</span><br><span class="line">UPDATE user SET Password &#x3D; &#39;你的密码&#39; WHERE User &#x3D; &#39;root&#39;;</span><br><span class="line">create database typecho;</span><br><span class="line">quit</span><br></pre></td></tr></table></figure><h2 id="轻松开始"><a href="#轻松开始" class="headerlink" title="轻松开始"></a>轻松开始</h2><p>安装完成后,使用你的浏览器访问以下链接</p><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">http:&#x2F;&#x2F;你的服务器ip</span><br></pre></td></tr></table></figure><p>根据页面提示安装typecho<br>大部分内容保持默认即可,只需填写:</p><ul><li>数据库密码(你刚才设置的)</li><li>管理员用户名</li><li>管理员登录密码</li><li>管理员邮箱地址</li></ul><h2 id="自定义域名配置"><a href="#自定义域名配置" class="headerlink" title="自定义域名配置"></a>自定义域名配置</h2><p>首先在你的域名服务商(腾讯云,阿里云)将你的域名A解析到你的服务器ip<br><strong>打开服务器上nginx配置文件</strong></p><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">$ vi &#x2F;etc&#x2F;nginx&#x2F;nginx.conf</span><br></pre></td></tr></table></figure><p>将文件中第42,47,48行的 your_domain 替换成你自己的域名即可。<br><strong>重启nginx服务</strong></p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ systemctl nginx -t # nginx.conf 语法检查</span><br><span class="line">$ systemctl restart nginx # 重启nginx</span><br></pre></td></tr></table></figure><p>然后大约经过10分钟,你就可以通过<code>https://你的域名</code>访问typecho了</p><h2 id="https配置"><a href="#https配置" class="headerlink" title="https配置"></a>https配置</h2><p>如果你任然无法访问,而是被引导到一个备案页面,那么你可能需要使用https</p><h3 id="法一"><a href="#法一" class="headerlink" title="法一"></a>法一</h3><p>配置自动续费ssl证书可参考我的另一篇文章(<a href="https://www.eee.dog/tech/ssl-auto-apply.html">Centos7下 Nginx 配置ssl证书自动续期</a>)</p><h3 id="法二"><a href="#法二" class="headerlink" title="法二"></a>法二</h3><ul><li><p>从腾讯云等申请并下载证书,然后上传nginx文件夹中的两个证书到服务器</p></li><li><p>去掉前<EFBFBD>
<categories>
<category> tech </category>
</categories>
<tags>
<tag> php </tag>
<tag> centos7 </tag>
<tag> typecho </tag>
</tags>
</entry>
<entry>
<title>C++建库中遇到的坑</title>
<link href="/tech/cpp-summary/"/>
<url>/tech/cpp-summary/</url>
<content type="html"><![CDATA[<p>由于学校课程安排,作为一只电气狗第一次正经的开始搞Cpp ::aru:shy::<br>特记录一些建库过程遇到的坑,,→_→</p><a id="more"></a><h2 id="关于-h文件"><a href="#关于-h文件" class="headerlink" title="关于.h文件"></a>关于.h文件</h2><p>作为头文件,.h中一般放有相应类及函数的声明。<br>一个典型的.h文件如下:(FileName: yimian.h)</p><figure class="highlight c++"><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><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="meta-keyword">ifndef</span> YIMIAN_H <span class="comment">//防止本文件被多次编译</span></span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">define</span> YIMIAN_H <span class="comment">//'YIMIAN_H'的值需自定义</span></span></span><br><span class="line"></span><br><span class="line"><span class="comment">//.h中可能用到的lib</span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">include</span><span class="meta-string">&lt;iostream&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">include</span><span class="meta-string">&lt;string&gt;</span></span></span><br><span class="line"></span><br><span class="line"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="built_in">std</span>; <span class="comment">//使用std命名空间,这样下面就可以不用写如std::cout了</span></span><br><span class="line"></span><br><span class="line"><span class="comment">//声明yimian类</span></span><br><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">yimian</span>&#123;</span></span><br><span class="line"> <span class="keyword">public</span>: <span class="comment">//公共域(可外界直接调用)</span></span><br><span class="line"> <span class="function"><span class="keyword">void</span> <span class="title">hi</span><span class="params">()</span></span>;</span><br><span class="line"> <span class="keyword">static</span> <span class="built_in">string</span> version;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">private</span>: <span class="comment">//私有(不对外公开)</span></span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="meta">#<span class="meta-keyword">endif</span> <span class="comment">//与文件开头防多次编译相对应</span></span></span><br></pre></td></tr></table></figure><p>为了安全起见,函数以及变量的初始化一般不放在.h文件中进行。而是习惯于建一个新的同名.cpp文件。<br>下面是一个与上午相对应的.cpp文件示例:(FileName: yimian.cpp)</p><figure class="highlight c++"><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><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="meta-keyword">include</span><span class="meta-string">"yimian.h"</span> <span class="comment">//需要指向yimian.h</span></span></span><br><span class="line"></span><br><span class="line"><span class="built_in">string</span> yimian::version = <span class="string">"Version
<categories>
<category> tech </category>
</categories>
<tags>
<tag> cpp </tag>
</tags>
</entry>
<entry>
<title>2018 – Retrospect and Prospect</title>
<link href="/life/2018-retrospect-and-prospect/"/>
<url>/life/2018-retrospect-and-prospect/</url>
<content type="html"><![CDATA[<p>白驹过隙,挥别2018,走向2019..</p><p>作为完全独立生活的第一年,失去约束,放飞自我,狠狠地狂野了一把。然后,竟然还意外地做成了不少事情..</p><a id="more"></a><h2 id="代码方面:"><a href="#代码方面:" class="headerlink" title="代码方面:"></a>代码方面:</h2><ul><li>最大的收获是发现并加入了Github</li><li>掌握了不少新语言,嗯数一数有C, C++, PHP, JavaScript, vbs, HTML, CSS, Python, shell, dos, Matlab (大致是按照熟练顺序吧)</li><li>经营着7台服务器,一台win2012在上海(第一台),三台cent在悉尼,亚特兰大和伦敦,国内两台Cent 在深圳和北京,再加上宿舍里的ubuntu树莓派,哈哈哈,,,</li></ul><h3 id="上半年"><a href="#上半年" class="headerlink" title="上半年"></a>上半年</h3><ul><li>上半年帮爸爸搞万宗商业,通过ftp连上海服务器,勉强搞了个公司网站出来,可惜暑假被‘拉脱维亚’(至少IP是)的黑客朋友搞掉了,从此弃坑windows</li><li>5,6月份尝试搞过一个Steel15高中同学平台,但因为企划模式不切实际等原因,进度一直搁置,最终也在8月份一起被黑掉了(从此养成勤备份好习惯( •̀ ω •́ )y)</li><li>7月在欧朗研发部时和组员一起做了一个基于微信小程序的学生电子ID卡,我在其中算是担任后端工程师吧,并且最后还在学校和企业大佬面前做了项目答辩哦</li><li>暑假在家中用wifiduino搞了两个项目,太阳能自动加水和走廊灯的自感应化,设计和采购材料时接触了一些水管和电线的知识。据说目前板子仍然运行良好哦</li></ul><h3 id="9,10月份"><a href="#9,10月份" class="headerlink" title="9,10月份"></a>9,10月份</h3><ul><li>9月份的话,开始进军Linux, 通过Vultr搞了不少服务器做尝试,搭建了私人的ss服务器,自此科学上网</li><li>9月份,基于开源的NextCloud在伦敦docker搭建了第一个私人网盘,一直使用至今,只是国内访问速度,,( ̄▽ ̄)”,,希望去英国后能好一点</li><li>9月份,重建了宿舍的IoT系统,目前虽然出过几次bug但总体而言运行良好</li><li>10月份,不爽于诸多被禁番剧,着手搭建第一代Yimian Video视频平台</li><li>10月份,多次尝试搞Linux Mail服务,均失败,至今沿用5月份的Windows Mail</li><li>10,11月份,C语言as搞了一个数据联网同步,有背景音乐的石头剪刀小游戏</li><li>10月份,开发了一个短信验证码login系统</li><li>10月,基于shell以及一系列Linux软件结合Nginx搞了一个ss服务器的端口流量管理和统计系统,然后对同学朋友开放帮助他们科学上网(不过北京朋友反应上不了,大概是北京的墙比较高吧,望今年通过增添混淆解决)</li></ul><h3 id="11,12月份"><a href="#11,12月份" class="headerlink" title="11,12月份"></a>11,12月份</h3><ul><li>11月,跟着北大一个网课,尝试搞Python TensorFlow的图像识别,然后成功半途而废掉了。。不过终于对AI有了实践性的了解,理解到目前的神经网络本质是用一坨多项式去fit一个复杂的自然函数</li><li>11月,入手了人生第一台树莓派,搭配上红外摄像头,目前呢,可以提供流媒体视频直播服务,,</li><li>12月,尝试开发一个上课自动签到的微信小程序,结果被ICE强大的限制算法降伏,,失败</li><li>12月,基于Wordpress搭建了一个加载慢慢的Blog平台,</li><li>12月,偶然发现了frp,成功实现服务内网穿透,并将其应用到树莓派以及我的PC上</li><li>12月,和C语言小组5人一起搞了一个酒店管理系统,然后我最大的contribution是从零搭建了一个底层数据库系统,处理速度,额,炒鸡慢,尽管已经引入了哈希算法..</li><li>12月底,入了Github的坑,接触到了DIYgod大神</li><li>12月底,基于Dpla
<categories>
<category> life </category>
</categories>
<tags>
<tag> summary </tag>
</tags>
</entry>
<entry>
<title>Two Fundamental Demands of Human Beings</title>
<link href="/thoughts/two-fundamental-demands-of-human-beings/"/>
<url>/thoughts/two-fundamental-demands-of-human-beings/</url>
<content type="html"><![CDATA[<p>人类的需求可以总结为两类,创造需求的需求,与解决需求的需求。</p><a id="more"></a><h2 id="历史缘由"><a href="#历史缘由" class="headerlink" title="历史缘由"></a>历史缘由</h2><p>在过去的几亿年中,由于生存资源的稀缺,自然界不断通过“物竞天择,适者生存”的法则筛选物种。这使得“一切为了生存”成为了几乎所有物种的“目标函数”。在众多存活下来的物种中,只有人类创造并有效利用了语言这一工具。语言使得人类能够进行更加复杂的推理思维(想象)以及更加有效的个体间信息交流。得益于语言,人类机智地通过预测潜在的自然选择要求提前准备必要的生存资源并建立了协调资源创造(分工)与资源分配的有效体制(市场,贸易)。不可避免地,基于“一切为了生存”这一习惯以及想象与预测这一种能力,人类形成了自主创造需求以及解决需求的行为模式,由此产生了两种基本行为动机,即创造需求的需求与解决需求的需求。</p><h2 id="理论验证"><a href="#理论验证" class="headerlink" title="理论验证"></a>理论验证</h2><p>观察现有人类社会架构,无论社会群体形态是政府,社会组织还是企业(公司),其本质都是一个协调不同人类创造需求的需求与解决需求的需求的闭环生态中的一环。如果一个政府,社会组织或企业无法再继续充当好一个协调人类需求中的闭环生态的一个环节,它将迅速的被其它能更高效发挥其角色的同类或非同类社会群体替代掉。</p><p>马云是一位伟大的企业家与战略家,他一手缔造的淘宝电商平台与移动快捷支付使得人们创造需求的需求与解决需求的需求的协调变得更加高效。这使阿里巴巴获得了极大的群众的信任,表现出来就是阿里具备的极高的资源支配权,也就是其极高的市值。</p><h2 id="理论预测"><a href="#理论预测" class="headerlink" title="理论预测"></a>理论预测</h2><p>当人类内部的资源因为某种原因(生产或流通环节出问题)不足以支持所有人的生存时,多余出的人类数量总会以某种形式被抹掉,也就是著名的马尔萨斯陷阱。当一个国家或民族自身遭遇马尔萨斯陷阱时,它总会选择向外发动战争来解决。因为既然要抹掉的人口数量是相对固定的,那么如果向外发动战争就会有更多的本族或本国人能够活下来,只是要将部分的死亡转移至外邦人口。古时的匈奴,二战的德国和日本都是非常典型的例子。</p><p>观察历史上的战争,有两次规模很大,我们称之为第一,二次世界大战。第一次世界大战是由于大批量机器取代人力,使得大量原有人力劳动力需要转移。但是劳动力太多没办法短时间转移,表现出来就是失业率飞涨,太多的人无所事事,没有收入,难以生存。为了防止这部分劳动力失控闹事,只得转移其注意力向外发动战争。这就是协调人创造需求的需求与满足需求的需求的市场体制出问题所导致的资源流通停滞所导致的。二战亦是如此,当电力驱动将以往的蒸汽驱动取代,大量劳动力亟需转型。1933年美国率先出现此类问题,罗斯福政府因为有多年发展积累下来的资本,因此可以通过新政建设大量民用设置强行修正资源流通生态链。但是刚因为一战被洗劫一空的德国和国土狭小资源稀缺的日本就没这么幸运了,只得将自身不可避免的马尔萨斯陷阱向犹太人和东亚转移。</p><p>如今计算技术充分发展,出现了可以通过建立多项式来fit自然复杂函数(自然规律)的人工智能算法。这就使得大多数非创造型的脑力劳动具备被取代的趋势。那么,这部分原脑力劳动力将何去何从?尤其是在中国和印度这种人<EFBFBD>
<categories>
<category> thoughts </category>
</categories>
<tags>
<tag> society </tag>
</tags>
</entry>
<entry>
<title>Hello Typecho</title>
<link href="/tech/hello-typecho/"/>
<url>/tech/hello-typecho/</url>
<content type="html"><![CDATA[<p>将blog从wordpress迁移到了Typecho。</p>]]></content>
<categories>
<category> tech </category>
</categories>
<tags>
<tag> hexo </tag>
</tags>
</entry>
<entry>
<title>Fog Architecture and Internet of Things</title>
<link href="/thoughts/fog-architecture-and-internet-of-things/"/>
<url>/thoughts/fog-architecture-and-internet-of-things/</url>
<content type="html"><![CDATA[<p>In the past few decades, Internet has been rapidly expanding and it plays an increasingly important role in people’s life. After the involvement of nearly all humans on the earth [1], developers, inevitably, expected to make more things available for the internet, which then generated the idea of the Internet of Things (IoT). Regrettably, in the case that a considerable number of things connect to the internet, its current architecture seems not to be a so efficient solution for IoT. Bonomi et al. [2] from Cisco firstly noticed this issue and they then put forward a revolutionary concept of Fog to satisfy the access of a surging number and variety of devices in the coming IoT era. This essay will argue that the Fog concept can have considerable impact on promoting IoT construction.</p><a id="more"></a><p>Internet’s architecture had been widely controverted concerning whether it should be centralized or distributed. In the past few years, centralization, which is also regarded as the Cloud, has been gradually applied to the practical structure for modern internet. Under this concept, it has become a popular trend to move functions such as computing, storage and control from end-user devices to Cloud servers [3].Different from the Cloud, the Fog proposes to distribute these functions from servers to the users and let users share them with each other.</p><p>Fog can be classified into three dimensions: Fog computing, Fog storage, and Fog control. According to Bonomi et al. [2], Fog computing means to make full use of the computing resources not only from the user devices, but from the location anywhere between users and traditional Cloud servers.An ideal example is that, video game players’ smartphone can access the idle computing resource such as the Central Processing Unit (CPU) of players’ laptop to improve their game experience. Similar to the Fog computing, Fog storage,the second dimension, proposes to distribute user’s data from single storage to many storage devices through certain algorithm [3]. One brave practice for this is Google Spanner [4], which is a public database functioning by distributing user’s data to data centers all around the world to protect these data from being attacked. Shi et al. [5] indicated that the third dimension of Fog, Fog control, tends to split a traditional control system into many small independent and interactive fog systems which only concentrate on providing single function. In this case, if a fog light control system breaks down, the host system can still get the command of the light through another similar fog control system to keep the service incessantly in a Smart Home.</p><p>One reason why the Fog contributes to the construction of IoT is that the internet under the concept of Fog can meet the challenging minimized delay requirement of IoT. Prof. Chiang &amp; Zhang [3] indicated that, IoT applications such as Virtual Reality(VR) games, vehicle-to-vehicle communications and unmanned aerial vehicle (UAV)control applications appear to require latencies, the time spent between one device sending a message and the target device receiving the message, lower than tens of milliseconds, which the Cloud services cannot achieve. However, in a Fog computing model proposed by Yousefpour, Ishigaki &amp; Jue [6], the low-level service delay character of Fog architecture had been proved to be persistent and stable. This may mean that latency-sensitive IoT applications can benefit from their delay-minimizing policy.</p><p>Another factor of why the Fog facilitates IoT construction is that a Fog structured internet can provide uninterrupted services, which IoT applications are desirous of. In a Fog structure a control behavior is achieved by several parallel control systems working together while each system has the potentiality to support the whole control behavior independently. This makes it possible that a Fog service can still function when devices disconnect with the server or part of the Fog net is updating or even broken [3]. This tra
<categories>
<category> thoughts </category>
</categories>
<tags>
<tag> iot </tag>
<tag> internet </tag>
<tag> fog </tag>
</tags>
</entry>
<entry>
<title>Build Nextcloud Server on Centos 7.5</title>
<link href="/tech/build-nextcloud-server-on-centos7/"/>
<url>/tech/build-nextcloud-server-on-centos7/</url>
<content type="html"><![CDATA[<p>Nextcloud is an open-source software project coded with PHP. It had provided a ideal private cloud-storage solution which was considered to be reliable and stable. This blog aims to present a Nextcloud Building instruction step by step for the purpose of helping freshman and future reviewing. Nextcloud is an open-source software project coded with PHP. It had provided a ideal private cloud-storage solution which was considered to be reliable and stable. This blog aims to present a Nextcloud Building instruction step by step for the purpose of helping freshman and future reviewing. Nextcloud is an open-source software project coded with PHP. It had provided a ideal private cloud-storage solution which was considered to be reliable and stable. This blog aims to present a Nextcloud Building instruction step by step for the purpose of helping freshman and future reviewing.</p><a id="more"></a><h2 id="Change-linux-core-to-BBR-vision"><a href="#Change-linux-core-to-BBR-vision" class="headerlink" title="Change linux core to BBR vision"></a>Change linux core to BBR vision</h2><p>If your server is a new one, it is strongly recommended to update it to an upper version supporting bbr mode, which is a senior centos system core provide by google and it could make your server more efficient.</p><p>Firstly download and install bbr core from github.</p><figure class="highlight bash"><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">$ wget -N --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh &amp;&amp;\</span><br><span class="line">$ chmod +x bbr.sh &amp;&amp; \</span><br><span class="line">$ bash bbr.sh</span><br></pre></td></tr></table></figure><p>Use the code to check the core version. If it’s large than 4.9.0 it’s OK.</p><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">$ uname -r</span><br></pre></td></tr></table></figure><p>Expected return:net.ipv4.tcp_available_congestion_control = bbr cubic reno</p><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">$ sysctl net.ipv4.tcp_available_congestion_control</span><br></pre></td></tr></table></figure><p>Expected return: net.ipv4.tcp_congestion_control = bbr</p><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">$ sysctl net.ipv4.tcp_congestion_control</span><br></pre></td></tr></table></figure><p>Expected return: net.core.default_qdisc = fq</p><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">$ sysctl net.core.default_qdisc</span><br></pre></td></tr></table></figure><p>Expected return: xxxxxxxx tcp_bbr</p><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">$ lsmod | grep bbr</span><br></pre></td></tr></table></figure><h2 id="Install-Nginx-Service"><a href="#Install-Nginx-Service" class="headerlink" title="Install Nginx Service"></a>Install Nginx Service</h2><p>Pull nginx package from nginx orginzation website.</p><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">rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm</span><br></pre></td></tr></table></figure><p>Install Nginx.</p><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">$ yum install -y nginx</span><br></pre></td></tr></table></figure><p>Start nginx service.</p><figure class="highlight bash"><table><tr><td class="g
<categories>
<category> tech </category>
</categories>
<tags>
<tag> docker </tag>
<tag> php </tag>
<tag> nginx </tag>
</tags>
</entry>
<entry>
<title>wifiduino搭建236宿舍物联网平台</title>
<link href="/tech/build-236-iot-platform-on-wifiduino/"/>
<url>/tech/build-236-iot-platform-on-wifiduino/</url>
<content type="html"><![CDATA[<p>重新搭建236的IoT底层平台,并通过Blinker手机控制,实现操控监视。平台拥有很强的扩展性及可移植性,目前实现了夜间自动灯光,火灾烟雾报警,床帘内:上床小夜灯开,自动通风,LED自动感应阅读状态等设计。</p><a id="more"></a><h2 id="搭建缘由"><a href="#搭建缘由" class="headerlink" title="搭建缘由"></a>搭建缘由</h2><p>早在大一上学期,意外接触Arduino,开始了解单片机。17年11到12月份,曾利用Arduino uno 3搭建了一台功能简易的自动控制平台,主要实现了由红外遥控器控制床帘Light以及小夜灯的功能。在运行一个半月后,由于一次上传代码时意外短路,导致单片机烧毁,自此系统报废,但线路依旧保留。</p><p>考虑到第一次搭建完全新手,代码缺少必要注释,更有通向床帘的数十根线路完全缠绕在一起,无法分清具体那几根控制什么传感器或设备,故设重建计划暂时搁置。</p><p>半年后的暑假,参加欧朗中国的IETE项目,课程中与公司研发组的软件和硬件工程师愉快得体验了一些单片机的应用研发,了解了单片机及物联网的基础组成及发展现状,在工作闲余,对原有线路进行了测试,分类,贴标签,使其得以正常使用。</p><p>8月份,项目结束,回到家中。考虑到家中原有太阳能需加水后需手动关闭,时常发生晚上洗澡后加水忘关情况,造成大量水资源浪费。于是结合欧朗所学,以及自己的实践经验,搭建了一套基于wifiduino和电磁阀的太阳能自动加水系统。为了照顾年老的姥姥方便夜间上厕所,在走廊过道利用原有废弃有线网络线路,搭建了与手动开关密切集合的自动感应开灯系统。由此收获了许多关于家用线路的架设经验。</p><p>回到苏州,考虑到一年来的相关经验,认为是时候尝试搭建一套可长期使用的商品级的强扩展性的IoT系统,于是…start搞事情</p><h2 id="搭建经历"><a href="#搭建经历" class="headerlink" title="搭建经历"></a>搭建经历</h2><p>搭建初期,一切还算顺利。但是随着系统逐渐趋于完善,代码逐渐复杂,经典的Arduino式软硬件兼容问题又逐渐开始捣乱啦~</p><p>首先遇到的问题是(大概是由于esp8266与wifiduino的一些神奇的勾当)当把代码通过usb传给wifiduino的时候,代码运行是正常的,但是在断电重启或者Reset后,它就死掉了。。。而且,这个问题只在上传占用了大约十个左右Digital通信口的程序之后才出现,如果只是上传简单的示例程序则运行正常,,最后从淘宝钓了一只路由器用的USB-DC9V升压线,用其持续供电,才确保了板子的正常运行。</p><p>遇见的第二个问题也是很神奇。就是,wifiduino在连接tx与rx后竟然无法上传代码!!!当时我一直以为是板子坏掉了</p><p>本来是只有一块板子的,但是当他装载了太多控制端之后,大概是死掉了,wifi无法正常连接Blinker..于是我只用它作为控制器,然后将另一块板子连接wifi,将接受信息通过串口传递给主板子执行。于是,运行终于正常了,,,莫名想到了欧朗当时考试的译码器</p><h2 id="主要功能"><a href="#主要功能" class="headerlink" title="主要功能"></a>主要功能</h2><p>功能的话目前看来也不是很多,4只传感:2只超神波测距,1只光敏,1只烟雾,4个控制端:1只床外探照灯ledB, 1只小夜灯,1只床头灯,1个小风扇。实现的话,无非就是其相互配合,目前可以准确识别我的存在位置4个,室友的存在位置1个。然后配合行为习惯编程调整灯与风扇。</p><p>未来的话,还打算逐步实现–传感层:对室内是否有人的识别 智能层:对室友在宿舍时间规律的学习(神经网络) 控制层:空调红外控制,基于esp8266的微型继<EFBFBD><EFBFBD>
<categories>
<category> tech </category>
</categories>
<tags>
<tag> Arduino </tag>
<tag> iot </tag>
</tags>
</entry>
<entry>
<title>Hello World</title>
<link href="/tech/hello-world/"/>
<url>/tech/hello-world/</url>
<content type="html"><![CDATA[<p>Hello World!</p><a id="more"></a><p>在我19周岁生日这一天,我的第一个通过wordpress自建的Blog网站正式上线啦~</p>]]></content>
<categories>
<category> tech </category>
</categories>
<tags>
<tag> php </tag>
<tag> wordpress </tag>
</tags>
</entry>
</search>