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.
 
 
 
 

456 lines
141 KiB

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>EEE.DOG</title>
<subtitle>呓喵酱の博客 - IoTcat&#39;s Blog</subtitle>
<link href="/atom.xml" rel="self"/>
<link href="https://www.eee.dog/"/>
<updated>2020-06-22T13:44:15.208Z</updated>
<id>https://www.eee.dog/</id>
<author>
<name>IoTcat</name>
</author>
<generator uri="https://hexo.io/">Hexo</generator>
<entry>
<title>Hello World</title>
<link href="https://www.eee.dog/tech/hello-world/"/>
<id>https://www.eee.dog/tech/hello-world/</id>
<published>2020-06-20T03:58:52.934Z</published>
<updated>2020-06-22T13:44:15.208Z</updated>
<content type="html"><![CDATA[<p>Hello World</p>]]></content>
<summary type="html">
&lt;p&gt;Hello World&lt;/p&gt;
</summary>
</entry>
<entry>
<title>2018 – Retrospect and Prospect</title>
<link href="https://www.eee.dog/thoughts/2018-retrospect-and-prospect/"/>
<id>https://www.eee.dog/thoughts/2018-retrospect-and-prospect/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-16T13:15:00.404Z</updated>
<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月底,基于Dplayer,改良Yimian Video至第三代,支持hls,搭建了弹幕服务器,增添了弹幕功能,通过第三方API连接B站弹幕</li><li>12月底,基于Aplayer,开发出基于php控制的网页音乐播放插件,可直接播放网易云指定歌单</li><li>12月底,改良以往login页面,增添原创的防robot算法,提升为全动态页面</li><li>12月底,接触pjax,YimianVideo, 视频列表试点应用,并开始着手全站动态化改造</li><li>12月底,入手咕咕机,利用其API每晚自动打印今日站点访问统计</li></ul><h2 id="学习方面:"><a href="#学习方面:" class="headerlink" title="学习方面:"></a>学习方面:</h2><ul><li>英语方面EAP课程结业,雅思互换的话大概6.5分吧,毕竟也全英授课一年半了</li><li>文科方面历史法律学的很开心,考得嘛,,不置评论</li><li>年初恶补了基础心理学,社会心理学,发展心理学,变态心理学,心理咨询学,心理测量学,本打算参加心理咨询师考试的,结果最终因为年龄不到要求挺遗憾的,但是学到了这么多喜欢的东西蛮开心的</li><li>电路嘛,起码能做基础的直流交流分析了</li><li>11月日常物理建模,然后日常最后建得解不出来..</li><li>选修了城市规划的课程,虽然给均分造成的影响不忍直视但是,,现在看城市越来越有感觉了哈</li><li>社团嘛参加了Infoco凭关系进了管理层,然后一直水偶尔参个会出点主意之类的</li></ul><h2 id="研究方面:"><a href="#研究方面:" class="headerlink" title="研究方面:"></a>研究方面:</h2><p>研究方面,主要搞了三个。上半年调查了Personality trait 对Second Language Acquisition 的影响,最终发现只有内倾型和Grammar优势有着significant 相关性。暑假在欧朗期间搞了关于物联网行业的一个调查,发现业内存在显著的客制化和去中心化发展趋势。下半年在暑期结论的基础上研究了一下Fog Computing, 基本上读遍了近两年IEEE上关于Fog 的文章,愈发坚信未来10年互联网云雾结合的趋势。一个感觉,中国会是这一场互联网架构变革中的关键</p><h2 id="生活方面"><a href="#生活方面" class="headerlink" title="生活方面"></a>生活方面</h2><h3 id="番剧"><a href="#番剧" class="headerlink" title="番剧"></a>番剧</h3><ul><li>追番56部,分别是<blockquote><p>《 刀剑乱舞-花丸 》<br>《 少年锦衣卫 》<br>《 四月是你的谎言 》<br>《 摇曳露营 》<br>《 月色真美 》<br>《 擅长捉弄的高木同学 》<br>《 CLANNAD 》<br>《 KANON 》<br>《 AIR 》<br>《 可塑性记忆 》<br>《 冰菓 》<br>《 Charlotte 》<br>《 龙与虎 》<br>《 星之梦 》<br>《 Angel Beats 》<br>《 斩 赤红之瞳 》<br>《 罪恶王冠 》<br>《 言叶之庭 》<br>《 樱花庄的宠物女孩 》<br>《 未闻花名 》<br>《 刀剑神域 》<br>《 凉宫春日的消失 》<br>《 某科学的超电磁炮 》<br>《 紫罗兰永恒花园 》<br>《 萤火之森 》<br>《 声之形 》<br>《 中二病也要谈恋爱 》<br>《 缘之空 》<br>《 东京喰种 》<br>《 实力主义至上教室 》<br>《 工作细胞 》<br>《 绯弹的亚里亚 》<br>《 从零开始的异世界生活 》<br>《 埃罗芒阿老师 》<br>《 我的妹妹不可能有这么可爱 》<br>《 我的青春恋爱物语果然有问题 》<br>《 白色相簿2 》<br>《 境界的彼方 》<br>《 游戏人生 》<br>《 citrus 》<br>《 命运石之门 》<br>《 未来时在做什么?有没有空?可以来拯救吗? 》<br>《 路人女主的养成方法 》<br>《 fate 》<br>《 进击的巨人 》<br>《 玉子市场 》<br>《 小林家的龙女仆 》<br>《 吹响吧,上低音号 》<br>《 夏目友人帐 》<br>《 妖精森林的小不点 》<br>《 银魂 》<br>《 干物妹小埋 》<br>《 魔法禁书目录 》<br>《 吹响吧,上低音号第二季 》<br>《 利兹与青鸟 》<br>《 轻音少女第一季 》 </p></blockquote></li><li>观看电视剧:《lie to me》《硅谷》《谈判官》《翻译官》《非自然死亡》</li></ul><h3 id="调情易趣"><a href="#调情易趣" class="headerlink" title="调情易趣"></a>调情易趣</h3><ul><li>Bilibili看视频425小时,大概刷便了Jack Ma的演讲,最痴迷up主竟然是环球时报。。</li><li>云村听歌1017小时</li><li>倾听了一场交响音乐会</li><li>旅游五次,分别在曲阜,太湖,苏州拙政园,济南,南京</li><li>去过一次酒吧</li><li>三次卡拉OK</li><li>回老家探望姥姥,爷爷,陪表妹外甥玩</li><li>学车,科一,科二,无证驾驶从方特到山口来回</li><li>看了不少电影,就不数了</li><li>后期更加注重生活和头发,,日均2盒奶,渐渐跟上早点</li></ul><h2 id="经济方面"><a href="#经济方面" class="headerlink" title="经济方面"></a>经济方面</h2><ul><li>项目开销渐长,18年花销1000+,但仍可控</li><li>奖学金补助</li><li>比较稳健的投资策略,平均能把七日年化搞到4+,最高的时候到过7</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>熬夜有点小多,目测下半学期平均1点半睡觉</li><li>通宵次数略多,大概有15次,其中3次通宵时间超过30小时</li><li>运动少,只游过一次泳,没怎么跑过步</li><li>经常起不来所以不吃早餐</li><li>编起程来生活节奏就乱掉,太过急切的追求功能完善与完美</li><li>高二下半学期节奏不稳,数学更是基本半学期没怎么学</li><li>过多归因于学校课程设置问题,这本身就很有问题</li></ul><h2 id="展望2019:"><a href="#展望2019:" class="headerlink" title="展望2019:"></a>展望2019:</h2><ul><li>更惬意的生活</li><li>更宜人的节奏</li><li>更真诚的人际</li><li>2020年Github中国区前100</li><li>文体两开花</li></ul><hr><p>本文已完结哦(๑•̀ㅁ•́ฅ)</p>]]></content>
<summary type="html">
&lt;p&gt;白驹过隙,挥别2018,走向2019..&lt;/p&gt;
&lt;p&gt;作为完全独立生活的第一年,失去约束,放飞自我,狠狠地狂野了一把。然后,竟然还意外地做成了不少事情..&lt;/p&gt;
</summary>
<category term="thoughts" scheme="https://www.eee.dog/categories/thoughts/"/>
</entry>
<entry>
<title>wifiduino搭建236宿舍物联网平台</title>
<link href="https://www.eee.dog/tech/build-236-iot-platform-on-wifiduino/"/>
<id>https://www.eee.dog/tech/build-236-iot-platform-on-wifiduino/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-16T13:15:50.975Z</updated>
<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的微型继电器对宿舍大灯的控制,以及,快乐的话考虑自动养一株辣椒什么的…</p><h2 id="最后"><a href="#最后" class="headerlink" title="最后"></a>最后</h2><p>最后附上两个板子的代码,,还会更新的哦//祝生活愉快啦~<br>代码:<a href="https://uk.cloud.yimian.xyz/index.php/s/YbPwdkt2mANYoiS" target="_blank" rel="noopener">https://uk.cloud.yimian.xyz/index.php/s/YbPwdkt2mANYoiS</a></p><hr><h2 id="2019-2-19更新:"><a href="#2019-2-19更新:" class="headerlink" title="2019.2.19更新:"></a>2019.2.19更新:</h2><p>板子运行超过150天,一切运行正常。<br>出现过几次分钟级别的控制失效事件,怀疑宿舍电网供压不稳导致,事后均自动修复。</p><hr><h2 id="2019-2-28更新"><a href="#2019-2-28更新" class="headerlink" title="2019.2.28更新"></a>2019.2.28更新</h2><p>上文代码链接已弃用,如有兴趣,可查看由其代码开发的<a href="https://github.com/iotgod/wIoT" target="_blank" rel="noopener">wIoT项目</a>!</p><hr><h2 id="2019-6-12更新"><a href="#2019-6-12更新" class="headerlink" title="2019.6.12更新"></a>2019.6.12更新</h2><p>稳定运行611天18小时32分钟,正式退役!</p><hr><p>已完结</p>]]></content>
<summary type="html">
&lt;p&gt;重新搭建236的IoT底层平台,并通过Blinker手机控制,实现操控监视。平台拥有很强的扩展性及可移植性,目前实现了夜间自动灯光,火灾烟雾报警,床帘内:上床小夜灯开,自动通风,LED自动感应阅读状态等设计。&lt;/p&gt;
</summary>
<category term="tech" scheme="https://www.eee.dog/categories/tech/"/>
</entry>
<entry>
<title>Build Nextcloud Server on Centos 7.5</title>
<link href="https://www.eee.dog/tech/build-nextcloud-server-on-centos7/"/>
<id>https://www.eee.dog/tech/build-nextcloud-server-on-centos7/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-16T09:46:10.174Z</updated>
<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="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ systemctl start nginx.service</span><br><span class="line">$ systemctl <span class="built_in">enable</span> nginx.service</span><br></pre></td></tr></table></figure><p>Set preference file of nginx. Click here to get recommended nginx.conf file.</p><figure class="highlight bash"><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">$ <span class="built_in">cd</span> /etc/nginx</span><br><span class="line">$ vi nginx.conf</span><br></pre></td></tr></table></figure><p>Apply ssl certification. Rename it with your_domain.crt(key) and download it to your server: /etc/nginx/ssl/</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">$ //Use scp -r (my ssl file route on my windows)/your_domain.crt \root@(your server ip): /etc/nginx/ssl</span><br><span class="line">$ //Use scp -r (my ssl file route on my windows)/your_domain.crt root@(your server ip): /etc/nginx/ssl</span><br><span class="line">$ //On WINDOWS BASH</span><br></pre></td></tr></table></figure><p>Check and restart nginx service.</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><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">$ nginx -t</span><br><span class="line"></span><br><span class="line">$ //If the <span class="built_in">return</span> is successful it is ok, othervise there exists error <span class="keyword">in</span> your nginx.conf file. </span><br><span class="line">$ systemctl restart nginx</span><br></pre></td></tr></table></figure><h2 id="Install-docker"><a href="#Install-docker" class="headerlink" title="Install docker"></a>Install docker</h2><p>Pull and install docker service from official 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">$ curl -sSL https://get.docker.com/ | sh</span><br></pre></td></tr></table></figure><p>Start docker service.</p><figure class="highlight bash"><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 start docker</span><br><span class="line">$ systemctl <span class="built_in">enable</span> docker.service</span><br></pre></td></tr></table></figure><p>Pull nextcloud and mariadb(simplified mysql database on centos ) images from github.</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">$ docker pull rootlogin/nextcloud &amp;&amp; docker pull mariadb:10</span><br></pre></td></tr></table></figure><p>Start image mariadb with docker.</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">$ docker run -d --name nextcloud_db -v /data/mysql:/var/lib/mysql -e \</span><br><span class="line">$ MYSQL_ROOT_PASSWORD=YOUR_PASSWD -e MYSQL_DATABASE=nextcloud \</span><br><span class="line">$ -e MYSQL_USER=nextcloud -e MYSQL_PASSWORD=YOURPASSWD mariadb:10</span><br></pre></td></tr></table></figure><p>Start image nextcloud with docker.</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">$ docker run -d --name nextcloud --link nextcloud_db:nextcloud_db -p 127.0.0.1:9001:80 -v /data/nextcloud:/data rootlogin/nextcloud</span><br></pre></td></tr></table></figure><p>That is the last step on server. Now let’s start <a href="http://YOUR_DOMAIN/" target="_blank" rel="noopener">http://YOUR_DOMAIN/</a> with your explorer.</p><p>Recommend to substitute the “localhost” to “nextcloud_db”.</p><hr><p>Reference List:<br><a href="https://www.moerats.com/archives/420/" target="_blank" rel="noopener">https://www.moerats.com/archives/420/</a><br><a href="https://my.oschina.net/yule526751/blog/799004" target="_blank" rel="noopener">https://my.oschina.net/yule526751/blog/799004</a><br><a href="https://www.moerats.com/archives/420/" target="_blank" rel="noopener">https://www.moerats.com/archives/420/</a></p>]]></content>
<summary type="html">
&lt;p&gt;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.&lt;/p&gt;
</summary>
<category term="tech" scheme="https://www.eee.dog/categories/tech/"/>
<category term="docker" scheme="https://www.eee.dog/tags/docker/"/>
<category term="php" scheme="https://www.eee.dog/tags/php/"/>
<category term="nginx" scheme="https://www.eee.dog/tags/nginx/"/>
</entry>
<entry>
<title>Economy, Environment &amp;amp; Sustainability</title>
<link href="https://www.eee.dog/thoughts/economy-environment-sustainability/"/>
<id>https://www.eee.dog/thoughts/economy-environment-sustainability/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-22T10:08:16.903Z</updated>
<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 --> |consider| AB --> EA --> HI --> |caused by| CI --> A</div><hr><p><strong>参考课件:</strong><br><a href="https://yimian-attachment.obs.myhwclouds.com/ppt/lan104/Week%202%20Economic%20Development%20%20The%20Environment.pdf" target="_blank" rel="noopener">Economic Development and The Environment.pdf</a></p>]]></content>
<summary type="html">
&lt;p&gt;经济学是一门研究选择的学问。人们活在世上总是在进行着各种选择。发展落后的国家希望尽快工业化发展经济,来改善自己的生存环境。而工业化后的国家则希望发展同时兼顾环境。于是落后国家需要50年来发展工业,搞基建,破坏环境。之后的50年则拼命治理环境,发展生态。由于地球生态是一个整体,发达国家非常不爽落后的国家搞工业化污染环境,于是各种矛盾。不过在21世纪,有望利用信息数字科技打破50-50年法则,为新一批的国家崛起提供蹊径( ๑´•ω•) “&lt;/p&gt;
</summary>
<category term="thoughts" scheme="https://www.eee.dog/categories/thoughts/"/>
</entry>
<entry>
<title>Fog Architecture and Internet of Things</title>
<link href="https://www.eee.dog/thoughts/fog-architecture-and-internet-of-things/"/>
<id>https://www.eee.dog/thoughts/fog-architecture-and-internet-of-things/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-16T13:14:11.201Z</updated>
<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 trait becomes crucial for Connected Vehicle [2] to ensure its operation when it is offline or meet with an accident.</p><p>Apart from these reasons,comparing to the current Cloud internet, the architecture of a Fog internet seems to be more eco-friendly, especially for the coming IoT era. In the 21stcentury, environmental protection has been becoming a comparatively important agenda for policy making and business activity. Consumers expect fewer environment-harmful elements in the product or generated from its manufacture. However, accordingto Aazam et al. [1], in the future, everything such as a bottle of cola or a leaf of a tree can be part of Internet, which may require a considerable number of new electrical equipment while each one of them might hurt the environment to some extent. However, this may mean that the ecological environment would be protected if the amount of necessary electrical products could be decreased. Researchers had assessed the suitability of Fog computing and they pointed that a Fog internet can result in less power consumption and lower CO2 emission in the context of IoT [7]. Apparently, these may transform the internet closer to a green net.</p><p>One argument is that the Fog architected IoT was questioned in privacy and security [3]. Since the important internet functions and resources are near the users, it becomes risky for a Fog device of being attacked. However, this might be solved by collaborating with other technics. For example, Zyskind and Nathan [8] designed a decentralized personal data management algorithm basing on blockchain, a powerful encoding method. This algorithm might be one possible solution to cover the data security shortage of Fog net and keep the system safe.</p><p>To conclude, although the IoT based on Fog concept may be currently doubted in privacy and system security, it has satisfactory performance in respect of latency, system reliability and eco-friendliness, which are crucial factors on facilitating IoT construction. However, Fog is still a new concept and nearly all of the relevant research was conducted in the past two years. It is still a long way to go before the Fog concept can be actually applied into the framework of IoT.</p><hr><p><strong>Reference (IEEE)</strong><br>[1] M. Aazam, I. Khan, A. A. Alsaffar and E. Huh, “Cloud of Things: Integrating Internet of Things and cloud computing and the issues involved,” Proceedings of 2014 11th International Bhurban Conference on Applied Sciences &amp; Technology (IBCAST) Islamabad,Pakistan. [Online]. 14th – 18th January, 2014, Islamabad, 2014, pp. 414-419.Available: <a href="https://uk.cloud.yimian.xyz/index.php/s/PAbkLC5bqoWFcJi" target="_blank" rel="noopener">https://uk.cloud.yimian.xyz/index.php/s/PAbkLC5bqoWFcJi</a></p><pre><code>This is an early peer-reviewed article introducingthe concept of Cloud and IoT. It provides me the scope of how researcherslooked at Cloud and how they understood IoT in 2014 (when Cloud Computing beganto be popular). I have used this to provide some background about Cloud inintroduction.</code></pre><p>[2] F. Bonomi, R. Milito, J. Zhu and S. Addepalli, “Fog computing and its role in the internet of things” In Proceedings of the first edition of the MCC workshop on Mobile cloud computing. [Online]. August, 2012, pp.13-16. Available: <a href="https://uk.cloud.yimian.xyz/index.php/s/ZnyXdJKk84dR2QD" target="_blank" rel="noopener">https://uk.cloud.yimian.xyz/index.php/s/ZnyXdJKk84dR2QD</a></p><pre><code>Thispaper firstly pointed out the Fog concept. Its writers were all from Cisco, which is considered the most powerfulcompany on providing Internetworking solution. I have used this sourceto introduce some background of Fog and Fog computing and the Connected Vehicle,one of their imaginary Fog-IoT application.</code></pre><p>[3] M. Chiang and T. Zhang, “Fog and IoT:An Overview of Research Opportunities” in IEEE Internet of Things Journal. [Online]. vol. 3, no. 6, pp.854-864, Dec. 2016. Available: <a href="https://uk.cloud.yimian.xyz/index.php/s/Fi7KELbjE7kR3qq" target="_blank" rel="noopener">https://uk.cloud.yimian.xyz/index.php/s/Fi7KELbjE7kR3qq</a></p><pre><code>This is an invited paper published by IEEE, the most influential organization for Engineer. Chiang is from Princeton and Zhang is from Cisco. After this paper, more researchers began to notice Fog. I have used this source to introduce, evaluate and query Fog because this is a rare high-quality paper.</code></pre><p>[4] J.C. Corbett, J. Dean, M. Epstein, A. Fikes, C. Frost,J.J. Furman, S. Ghemawat, A. Gubarev, C. Heiser, P. Hochschild and W. Hsieh, “Spanner:Google’s globally distributed database”, ACM Transactions on Computer Systems (TOCS). [Online].vol. 31, no. 3,pp. 8, Aug. 2013. Available: <a href="https://uk.cloud.yimian.xyz/index.php/s/oxj4EAm6M78GPN8" target="_blank" rel="noopener">https://uk.cloud.yimian.xyz/index.php/s/oxj4EAm6M78GPN8</a></p><pre><code>This paper detailly introduced Google Spanner. Google Spanner was designed based on this paper. I include this source because I think Google Spanner is are volutionary attempt of Fog storage. And I have used this as an example when I try to describe the concept of Fog storage.</code></pre><p>[5] W. Shi, J. Cao, Q. Zhang, Y. Li and L. Xu, “Edge Computing: Vision and Challenges” in IEEE Internet of Things Journal. [Online]. vol. 3, no. 5, pp. 637-646, Oct. 2016.Available: <a href="https://uk.cloud.yimian.xyz/index.php/s/p4QGJA6AWPDKEK4" target="_blank" rel="noopener">https://uk.cloud.yimian.xyz/index.php/s/p4QGJA6AWPDKEK4</a></p><pre><code>This is a journal from IEEE and have been cited 8422 times. It provides several novel ideas concerning how would the Fog be applied in computing field. I have summarized the Fog control concept from this source and cited their questioning concerning the privacy and security issue of Fog IoT.</code></pre><p>[6] A. Yousefpour, G. Ishigaki and J. P. Jue, “Fog Computing: Towards Minimizing Delay in the Internet of Things” 2017 IEEE International Conference on Edge Computing (EDGE), Honolulu, HI. [Online]. 2017, pp. 17-24. Available: <a href="https://uk.cloud.yimian.xyz/index.php/s/EsDjHnHHGND2SoD" target="_blank" rel="noopener">https://uk.cloud.yimian.xyz/index.php/s/EsDjHnHHGND2SoD</a></p><pre><code>The authors were from Texas University and they are not famous in Fog field. As it is the only paper which evaluated latency, the most significant trait of Fog IoT, mathematically and got a seemly reliable result, I have used this to support my low latency argument. </code></pre><p>[7] S. Sarkar, S. Chatterjee and S. Misra, “Assessment of the Suitability of Fog Computing in the Context of Internet of Things”in IEEE Transactions on Cloud Computing.[Online]. vol. 6, no. 1, pp. 46-59, Jan.-March 2018. Available: <a href="https://uk.cloud.yimian.xyz/index.php/s/m7of3EjZ6Tji7jF" target="_blank" rel="noopener">https://uk.cloud.yimian.xyz/index.php/s/m7of3EjZ6Tji7jF</a></p><pre><code>This paper was just published a few month ago. It was written by two students and one doctor, which makes it not so authoritative. However, since there are few Fog research, I finally decide to use its modeling result to support that Fog IoT is more environment friendly than Cloud.</code></pre><p>[8] G. Zyskind, O. Nathan and A. ‘. Pentland,”Decentralizing Privacy: Using Blockchain to Protect Personal Data” 2015 IEEE Security and Privacy Workshops,San Jose, CA. [Online]. 2015, pp. 180-184. Available: <a href="https://uk.cloud.yimian.xyz/index.php/s/7FirJsrD93wzDxN" target="_blank" rel="noopener">https://uk.cloud.yimian.xyz/index.php/s/7FirJsrD93wzDxN</a></p><pre><code>This paper was published by IEEE. Zyskind was from MIT, which makes the source seems to be credible. I am interested in the blockchain algorithm which is theoretically absolutely safe as it mentioned and I think it is one ideal method to deal with the security problem of Fog IoT.</code></pre><hr><p>Attachment<br>Fog and IoT PPT: <a href="https://uk.cloud.yimian.xyz/index.php/s/GbLfqxX2CBTDdRR" target="_blank" rel="noopener">https://uk.cloud.yimian.xyz/index.php/s/GbLfqxX2CBTDdRR</a></p>]]></content>
<summary type="html">
&lt;p&gt;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.&lt;/p&gt;
</summary>
<category term="thoughts" scheme="https://www.eee.dog/categories/thoughts/"/>
</entry>
<entry>
<title>气候变化与全球环境</title>
<link href="https://www.eee.dog/thoughts/global-climate-change/"/>
<id>https://www.eee.dog/thoughts/global-climate-change/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-22T10:10:39.086Z</updated>
<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>一个公式</h3><p>$$Increase CO_{2} = Increasing Population + \Delta Emission per Person + Efficiency of CO_{2} Use$$<br>这个公式也可以转译为:<br>$$碳排量 = 人口 + 经济 - 科技$$</p><h3 id="一个组织"><a href="#一个组织" class="headerlink" title="一个组织"></a>一个组织</h3><p>Intergovernmental Panel on Climate Change (IPCC) 制定了一个小目标来限制各国温室气体排放,表示到2050年,全球二氧化碳排放量要卡一半。。这其实等同于将排放量和钱联系起来,给每个国家分一部分排放量,如果多排就要交钱来买。结果已经工业化完的发达国家切走了超过40%的蛋糕,国科大校长老丁表示这不能忍啊,发展中国家的人到底还有没有人权啊ヾ(´・ ・`。)ノ”</p><h2 id="气候变暖影响"><a href="#气候变暖影响" class="headerlink" title="气候变暖影响"></a>气候变暖影响</h2><h3 id="Good"><a href="#Good" class="headerlink" title="Good"></a>Good</h3><ul><li>数据表明温度越高,世界范围战争数量越少</li><li>实验表明,温度高时,粮食等植被产量更高</li></ul><h3 id="Bad"><a href="#Bad" class="headerlink" title="Bad"></a>Bad</h3><ul><li>南方动物(虫子)比植物北迁的快,北方无天敌,植物被虫子吃光</li><li>海平面上升,淹没苏州</li></ul><!-- 引入mermaid制图--><div class="mermaid">graph TDA{Climate Change}B[Economy]C[Politic]D[Tech]E[Agriculture]F[Human Health]A --> |influence| EE --> |change| BE --> |change| CB --> |change| CB --> |determine| DC --> |determine| DB --> |influence| FD --> |affect| FD --> AC --> AD --> EE --> |Green Plant| AE --> FF --> E</div><hr><p>参考课件:<br><a href="https://www.eee.dog/usr/uploads/2019/02/3411175553.pdf">Climate change - From past to Future - Yi Zou-2019.pdf</a></p>]]></content>
<summary type="html">
&lt;p&gt;全球气候变化与人类行为有着显著的相关性,人类行为又会改变气候的自然变化。通过研究Ice core等Archive,发现地球历史中温度与$CO_{2}$浓度有着显著正相关性。如今,人类行为使大气$CO_{2}$含量远超其正常水平,其可能引起全球变暖,冰川融化等,但仅为可能..&lt;/p&gt;
</summary>
<category term="thoughts" scheme="https://www.eee.dog/categories/thoughts/"/>
</entry>
<entry>
<title>hello hexo</title>
<link href="https://www.eee.dog/tech/hello-hexo/"/>
<id>https://www.eee.dog/tech/hello-hexo/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-16T12:06:12.105Z</updated>
<content type="html"><![CDATA[<h2 id="神奇的事情"><a href="#神奇的事情" class="headerlink" title="神奇的事情"></a>神奇的事情</h2><p>神奇的事情开始发售了</p><p><img src="https://api.yimian.xyz/img" alt=""></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></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> home = cooo;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> ee = <span class="number">1</span>;</span><br></pre></td></tr></table></figure>]]></content>
<summary type="html">
&lt;h2 id=&quot;神奇的事情&quot;&gt;&lt;a href=&quot;#神奇的事情&quot; class=&quot;headerlink&quot; title=&quot;神奇的事情&quot;&gt;&lt;/a&gt;神奇的事情&lt;/h2&gt;&lt;p&gt;神奇的事情开始发售了&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://api.yimian.xyz/img&quot; al
</summary>
</entry>
<entry>
<title>随机图片API</title>
<link href="https://www.eee.dog/tech/rand-pic-api/"/>
<id>https://www.eee.dog/tech/rand-pic-api/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-22T13:26:53.833Z</updated>
<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-type" class="headerlink" title="4.1 type"></a>4.1 type</h3><p><strong><em>二次元(默认)</em></strong></p><ul><li><code>GET/POST /img?type=moe</code></li><li>图片来源: 呓喵酱的日常收藏(Pivix, Twitter)</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>图片来源: Bing每日壁纸</li><li>示例:<a href="https://api.yimian.xyz/img?type=wallpaper" target="_blank" rel="noopener">https://api.yimian.xyz/img?type=moe</a><br>[scode type=”green”]每日自动更新中[/scode]</li></ul><p><strong><em>二次元头像</em></strong></p><ul><li><code>GET/POST /img?type=head</code></li><li>图片来源: 从二次元图片中选择性截取</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://imgbed.yimian.xyz" target="_blank" rel="noopener">呓喵酱图床</a></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>こいぬちゃん</em></strong></p><ul><li><code>GET/POST /img?type=koino</code></li><li>图片来源: @九条だんぼ(Twitter, Pivix, Google)</li><li>示例:<a href="https://api.yimian.xyz/img?type=koino" target="_blank" rel="noopener">https://api.yimian.xyz/img?type=koino</a></li></ul><p><strong><em>EasyVer人机验证</em></strong></p><ul><li><code>GET/POST /img?type=easyver</code></li><li>图片来源: 呓喵酱优化整理</li><li>示例:<a href="https://api.yimian.xyz/img?type=easyver" target="_blank" rel="noopener">https://api.yimian.xyz/img?type=easyver</a></li></ul><h3 id="4-2-display"><a href="#4-2-display" class="headerlink" title="4.2 display"></a>4.2 display</h3><p>如果本参数置为true,则会禁用302跳转,直接返回完整图片编码。本方法<strong>效率极低</strong>,速度很慢,请慎用。</p><p><strong>false(默认)</strong></p><ul><li><code>GET/POST /img?display=false</code></li><li>描述: 302跳转返回图片,建议使用</li><li>示例:<a href="https://api.yimian.xyz/img?display=false" target="_blank" rel="noopener">https://api.yimian.xyz/img?display=false</a></li></ul><p><strong>true</strong></p><ul><li><code>GET/POST /img?display=true</code></li><li>描述: 直接返回图片,速度慢</li><li>示例:<a href="https://api.yimian.xyz/img?display=true" target="_blank" rel="noopener">https://api.yimian.xyz/img?display=true</a></li></ul><h3 id="4-3-size"><a href="#4-3-size" class="headerlink" title="4.3 size"></a>4.3 size</h3><p>使用本参数限制图片尺寸。本参数支持以下格式:</p><p><strong><em>??x??</em></strong></p><ul><li><code>GET/POST /img?size=??x??</code></li><li>描述: 宽度x高度</li><li>示例:<a href="https://api.yimian.xyz/img?size=1920x1080" target="_blank" rel="noopener">https://api.yimian.xyz/img?size=1920x1080</a></li></ul><p><strong><em>??x*</em></strong></p><ul><li><code>GET/POST /img?size=??x*</code></li><li>描述: 宽度x任意高度<br>!!!<li>示例:<a href="https://api.yimian.xyz/img?size=1920x*" target="_blank">https://api.yimian.xyz/img?size=1920x*</a></li>!!!</li></ul><p><strong><em>\</em>x??*</strong></p><ul><li><code>GET/POST /img?size=*x??</code></li><li>描述: 任意宽度x高度<br>!!!<li>示例:<a href="https://api.yimian.xyz/img?size=*x1080" target="_blank">https://api.yimian.xyz/img?size=*x1080</a></li>!!!</li></ul><p><strong><em>\</em>x**</strong></p><ul><li><code>GET/POST /img?size=*x*</code></li><li>描述: 任意宽度x任意高度(默认)<br>!!!<li>示例:<a href="https://api.yimian.xyz/img?size=*x*" target="_blank">https://api.yimian.xyz/img?size=*x*</a></li>!!!</li></ul><p><strong><em>??-??x??</em></strong></p><ul><li><code>GET/POST /img?size=??-??x??</code></li><li>描述: 宽度范围x高度</li><li>示例:<a href="https://api.yimian.xyz/img?size=1910-1930x1080" target="_blank" rel="noopener">https://api.yimian.xyz/img?size=1910-1930x1080</a></li></ul><p><strong><em>??x??-??</em></strong></p><ul><li><code>GET/POST /img?size=??x??-??</code></li><li>描述: 宽度x高度范围</li><li>示例:<a href="https://api.yimian.xyz/img?size=1920x1070-1090" target="_blank" rel="noopener">https://api.yimian.xyz/img?size=1920x1070-1090</a></li></ul><p><strong><em>??-??x??-??</em></strong></p><ul><li><code>GET/POST /img?size=??-??x??-??</code></li><li>描述: 宽度范围x高度范围</li><li>示例:<a href="https://api.yimian.xyz/img?size=1910-1930x1070-1090" target="_blank" rel="noopener">https://api.yimian.xyz/img?size=1910-1930x1070-1090</a></li></ul><p><strong><em>??-??x*</em></strong></p><ul><li><code>GET/POST /img?size=??-??x*</code></li><li>描述: 宽度范围x任意高度<br>!!!<li>示例:<a href="https://api.yimian.xyz/img?size=1910-1930x*" target="_blank">https://api.yimian.xyz/img?size=1910-1930x*</a></li>!!!</li></ul><p><strong><em>\</em>x??-??*</strong></p><ul><li><code>GET/POST /img?size=*x??-??</code></li><li>描述: 任意宽度x高度范围<br>!!!<li>示例:<a href="https://api.yimian.xyz/img?size=*x1070-1090" target="_blank">https://api.yimian.xyz/img?size=*x1070-1090</a></li>!!!</li></ul><h3 id="4-4-range"><a href="#4-4-range" class="headerlink" title="4.4 range"></a>4.4 range</h3><p>本参数规定允许的size的误差,需搭配size使用,默认为0。</p><p><strong><em>对于??型size参数</em></strong></p><ul><li><code>GET/POST /img?size=??x??&amp;range=100</code></li><li>描述: 宽度±100 x 高度±100</li><li>示例:<a href="https://api.yimian.xyz/img?size=1920x1080&range=100" target="_blank" rel="noopener">https://api.yimian.xyz/img?size=1920x1080&amp;range=100</a></li></ul><p><strong><em>对于??-??型size参数</em></strong></p><ul><li><code>GET/POST /img?size=??-??x??-??&amp;range=100</code></li><li>描述: 最小宽度-100|最大宽度+100 x 最小高度-100|最大高度+100</li><li>示例:<a href="https://api.yimian.xyz/img?size=1910-1930x1070-1090&range=100" target="_blank" rel="noopener">https://api.yimian.xyz/img?size=1910-1930x1070-1090&amp;range=100</a></li></ul><p><strong><em>对于*型size参数</em></strong></p><ul><li><code>GET/POST /img?size=*x*&amp;range=100</code></li><li>描述: range无效</li></ul><h3 id="4-5-id"><a href="#4-5-id" class="headerlink" title="4.5 id"></a>4.5 id</h3><p>每一个种类都有自己的id系统,同一种类下不同图片id唯一。</p><p><strong><em>二次元</em></strong></p><ul><li><code>GET/POST /img?type=moe&amp;id=15</code></li><li>描述:提取id为15的二次元图片</li><li>示例:<a href="https://api.yimian.xyz/img?type=moe&id=15" target="_blank" rel="noopener">https://api.yimian.xyz/img?type=moe&amp;id=15</a></li></ul><p><strong><em>bing每日壁纸</em></strong></p><ul><li><code>GET/POST /img?type=wallpaper&amp;id=2019-07-28</code></li><li>描述:提取2019-07-28的壁纸图片</li><li>示例:<a href="https://api.yimian.xyz/img?type=wallpaper&id=2019-07-28" target="_blank" rel="noopener">https://api.yimian.xyz/img?type=wallpaper&amp;id=2019-07-28</a></li></ul><p><strong><em>二次元头像</em></strong></p><ul><li><code>GET/POST /img?type=head&amp;id=15</code></li><li>描述:提取id为15的头像</li><li>示例:<a href="https://api.yimian.xyz/img?type=head&id=15" target="_blank" rel="noopener">https://api.yimian.xyz/img?type=head&amp;id=15</a></li></ul><p><strong><em>呓喵酱图床</em></strong></p><ul><li><code>GET/POST /img?type=imgbed&amp;id=529745e0</code></li><li>描述:提取id为529745e0的图床图片</li><li>示例:<a href="https://api.yimian.xyz/img?type=imgbed&id=529745e0" target="_blank" rel="noopener">https://api.yimian.xyz/img?type=imgbed&amp;id=529745e0</a></li></ul><h3 id="4-6-path"><a href="#4-6-path" class="headerlink" title="4.6 path"></a>4.6 path</h3><p>使用绝对路径直接提取图片,优先级高于type,<strong>效率最高</strong>。</p><ul><li><code>GET/POST /img?path=xx/xx.xx</code></li><li>路径格式:<code>种类/图片文件名</code></li><li>路径格式示例:<code>imgbed/img_529745e0_900x900_8_null_normal.jpeg</code></li><li>描述:提取在xx/xx.xx的图片</li><li>示例:<a href="https://api.yimian.xyz/img/?path=imgbed/img_529745e0_900x900_8_null_normal.jpeg" target="_blank" rel="noopener">https://api.yimian.xyz/img/?path=imgbed/img_529745e0_900x900_8_null_normal.jpeg</a></li></ul><h3 id="4-7-R18"><a href="#4-7-R18" class="headerlink" title="4.7 R18"></a>4.7 R18</h3><p>是否显示18禁图片,默认为false。</p><ul><li><code>GET/POST /img?type=xx&amp;R18=true</code><ul><li>描述:随机提取xx类别中包含R18内容在内的图片</li><li>示例:<a href="https://api.yimian.xyz/img/?type=koino&R18=true" target="_blank" rel="noopener">https://api.yimian.xyz/img/?type=koino&amp;R18=true</a></li></ul></li></ul><h2 id="5-报错格式"><a href="#5-报错格式" class="headerlink" title="5 报错格式"></a>5 报错格式</h2><h3 id="5-1-找不到指定type类型"><a href="#5-1-找不到指定type类型" class="headerlink" title="5.1 找不到指定type类型"></a>5.1 找不到指定type类型</h3><p>若找不到指定的type类型,将会自动返回一个moe类型的图片。</p><h3 id="5-2-找不到符合条件的图片"><a href="#5-2-找不到符合条件的图片" class="headerlink" title="5.2 找不到符合条件的图片"></a>5.2 找不到符合条件的图片</h3><p>返回JSON</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></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line"> <span class="string">"err"</span>: <span class="string">"错误信息"</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p>[scode type=”yellow”]每台设备每天<strong>全局</strong>调用上限500次!![/scode]</p>]]></content>
<summary type="html">
&lt;p&gt;本API基于华为云对象存储,使用华为CDN云加速,全球平均下载速度达10MB/s。API中已收录1100+张二次元图片,20+张Bing壁纸(每日自动抓取),150+张二次元头像,10+张图床上传图片。&lt;/p&gt;
</summary>
<category term="tech" scheme="https://www.eee.dog/categories/tech/"/>
</entry>
<entry>
<title>总结一下我的代码风格</title>
<link href="https://www.eee.dog/tech/my-code-style/"/>
<id>https://www.eee.dog/tech/my-code-style/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-16T13:10:05.258Z</updated>
<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>如果你不需要标签(比如在一些面向对象的语言中),你可以肆意省略标签。如:</p><figure class="highlight php"><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="function"><span class="keyword">function</span> <span class="title">get_usr_info</span><span class="params">()</span></span>;</span><br><span class="line"><span class="comment">//or</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">db</span>::<span class="title">get_usr_info</span><span class="params">()</span></span>;</span><br></pre></td></tr></table></figure><p>与变量命名不同,函数命名不必要很短,以表达清楚函数功能为目标</p><h2 id="关于注释"><a href="#关于注释" class="headerlink" title="关于注释"></a>关于注释</h2><p>其实如果能把变量函数命名做好,便不需要什么注释了,但遗憾的是,,我们还是不得不注释。。</p><h3 id="文件注释"><a href="#文件注释" class="headerlink" title="文件注释"></a>文件注释</h3><p>文件注释主要用于声明一些文件功能,分类名,文件名,版权等信息,一个样式如下:</p><figure class="highlight php"><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></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * cookie支持 #文件功能</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@category</span> typecho #文件所属的分类</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@package</span> Cookie #文件名称</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@copyright</span> Copyright (c) 2008 Typecho team (http://www.typecho.org) #作者及版权信息</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@license</span> GNU General Public License 2.0 #开源协议</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@version</span> 2.1.1 #版本</span></span><br><span class="line"><span class="comment"> */</span></span><br></pre></td></tr></table></figure><h3 id="类注释"><a href="#类注释" class="headerlink" title="类注释"></a>类注释</h3><p>类注释用于声明类的一些基本信息,如类功能,作者姓名、所属分类、所属文件。例如:</p><figure class="highlight php"><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="comment">/**</span></span><br><span class="line"><span class="comment"> * 数据库支持 #功能说明</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> qining #作者</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@category</span> typecho #所属分类</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@package</span> Cookie #所在文件名称</span></span><br><span class="line"><span class="comment"> */</span></span><br></pre></td></tr></table></figure><h3 id="函数注释"><a href="#函数注释" class="headerlink" title="函数注释"></a>函数注释</h3><p>函数注释在函数前,主要包含函数功能,函数修饰符,其各参数的类型、名称、以及文字说明,返回值的类型及文字说明。</p><figure class="highlight php"><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></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 获取指定的COOKIE值 #函数功能</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@access</span> public #函数修饰符,即函数是否可被外界访问</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> string key 指定的参数 #参数1,类型为string, 名称为key, 功能描述为 指定的参数</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> string default 默认的参数 #参数2,类型string,名称default,功能描述 默认的参数</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@return</span> int #返回整形返回值</span></span><br><span class="line"><span class="comment"> */</span></span><br></pre></td></tr></table></figure><h2 id="一些小细节"><a href="#一些小细节" class="headerlink" title="一些小细节"></a>一些小细节</h2><ul><li>赋值等号两边要有空格,如<code>b = c; b = 15;</code></li></ul>]]></content>
<summary type="html">
&lt;p&gt;我的代码风格大致有以下几种情况:组织中追随组织领导,公司里老板说的都对,学校里大佬教的都好╮(╯▽╰)╭ 仅其它一些自己的开源小项目则遵循以下风格→_→&lt;/p&gt;
</summary>
<category term="tech" scheme="https://www.eee.dog/categories/tech/"/>
</entry>
<entry>
<title>Two Fundamental Demands of Human Beings</title>
<link href="https://www.eee.dog/thoughts/two-fundamental-demands-of-human-beings/"/>
<id>https://www.eee.dog/thoughts/two-fundamental-demands-of-human-beings/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-16T13:13:08.682Z</updated>
<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自然复杂函数(自然规律)的人工智能算法。这就使得大多数非创造型的脑力劳动具备被取代的趋势。那么,这部分原脑力劳动力将何去何从?尤其是在中国和印度这种人口大国,一旦劳动力转型过渡不好,产生的马尔萨斯陷阱代价都将是巨大的,并最终总会由全球承担。</p><p>我的想法是,得益于数字技术的发展,如果如今的我们能够创造出一个能够协调人们创造需求的需求与解决需求的需求的闭环生态系统呢?如果当脑力劳动力被替代时这些原有劳动力能够迅速进入并适应我们创立好的闭环生态系统呢?也许我们便能够避开可怕的马尔萨斯陷阱了。</p><p>经过几千年文明的发展,当代人类已经不再满足于单单解决自然界所需要的要求,而开始尝试并创造一些非常炫酷有意思但并不怎么有利于生存的需求。也就是说,我们并不在需要所有的人类都要努力工作来确保人类能够生存,我们可以空余出好大一部分人类来探索一些新的有意思的领域。</p><p>一个可能的想法是,沉浸型网络游戏。这种网络游戏不同于现有的大部分网络游戏。现有的游戏的商业模式大都是通过程序上限制用户的部分功能体验,只用交了钱的用户才能够使用这些功能。但是我所设想的游戏更像一个平台,玩家可以从中提出自己创造的(游戏中的)需求也可以解决其他人的需求(即交易)。这就意味着一个游戏中可以出现虚拟货币,并且游戏的公众认可度会通过游戏货币与现实货币的汇率得以体现。游戏的开发者将通过开源社区而非企业进行开发,这就意味着开发者与游戏一定程度上非利益相关,从而确保了游戏的纯洁与高效,使之可能具备成为社会基础架构形式的潜能。</p><p>游戏的低门槛性并且游戏符合脑力工作者的思维习惯,使脑力劳动力能够比较轻易的从原有职业转移至相应的沉浸式游戏中。并且,由于是虚拟化技术,游戏有充分的弹性容纳大量新增的人们。不同与现在,届时社会舆论与社会思维也将会掀起一股以转入游戏为荣的热潮,以规避危害更大的战争。</p><p>有点类似于编程中的函数封装观点,现实社会类似于main函数,各个浸入式网络游戏类似于子函数。现在的社会就像是一个只有main函数的程序,所有的功能都在main函数中实现。这就使得当程序功能越复杂,越有可能发生各种bug,表现出来就是冲突甚至战争。而未来的社会更像是包含好多子函数(沉浸式游戏)的main函数。各个函数都是相互独立而又相互依赖的,每个游戏可以协调好自己的闭环生态,同时又与main函数发生部分交互。这样的社会架构将会变的去中心化并且看上去更加稳定与高效。</p><hr><p>注:部分想法启发自<a href="https://www.zhihu.com/" target="_blank" rel="noopener">知乎</a></p>]]></content>
<summary type="html">
&lt;p&gt;人类的需求可以总结为两类,创造需求的需求,与解决需求的需求。&lt;/p&gt;
</summary>
<category term="thoughts" scheme="https://www.eee.dog/categories/thoughts/"/>
</entry>
<entry>
<title>C++建库中遇到的坑</title>
<link href="https://www.eee.dog/tech/cpp-summary/"/>
<id>https://www.eee.dog/tech/cpp-summary/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-22T09:55:40.772Z</updated>
<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 0.0.1"</span>; <span class="comment">//为字符串变量赋值</span></span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">yimian::hi</span><span class="params">()</span></span>&#123; <span class="comment">//定义yimian类中hi()函数内容</span></span><br><span class="line"> <span class="built_in">cout</span> &lt;&lt; <span class="string">"Hellow Yimian~"</span> &lt;&lt; <span class="built_in">endl</span>; <span class="comment">//输出"Hellow Yimian~\n"到屏幕</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p>有了以上文件,一个简单的C++库就建成了φ( ̄∇ ̄o)<br>于是我们新建一个test.cpp文件用来放置main()</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></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="meta-keyword">include</span><span class="meta-string">&lt;iostream&gt; //要用到的lib声明</span></span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">include</span><span class="meta-string">&lt;stdio.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="meta-keyword">include</span><span class="meta-string">"yimian.h"</span> <span class="comment">//引入自定义lib</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命名空间</span></span><br><span class="line"></span><br><span class="line"> <span class="function"><span class="keyword">int</span> <span class="title">main</span><span class="params">()</span></span>&#123;</span><br><span class="line"> yimian $; <span class="comment">//定义一个名字为$的新yimian类</span></span><br><span class="line"></span><br><span class="line"> $.hi(); <span class="comment">//调用yimian类中hi()函数</span></span><br><span class="line"> <span class="built_in">cout</span> &lt;&lt; $.version&lt;&lt; <span class="built_in">endl</span>; <span class="comment">//将yimian类version变量输出到屏幕</span></span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> <span class="number">0</span>; <span class="comment">//主函数结束</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p>然后便可以愉快的使用g++编译啦,指令如下:(win如何搭建GNU环境)</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">$ g++ test.cpp yimian.cpp -o [目标文件的名称]</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">$ .&#x2F;目标文件名称.exe</span><br></pre></td></tr></table></figure><p>如你所料,以上程序的运行结果为:</p><blockquote><p>Hellow Yimian~<br>Version 0.0.1</p></blockquote><hr><p><strong>坑</strong> ::aru:meditation:: </p><ul><li>头文件中声明定义好的类貌似一定要在main()中实例化(调用)才行,不然会报错</li></ul><hr><h2 id="总结一下类相关知识"><a href="#总结一下类相关知识" class="headerlink" title="总结一下类相关知识"></a>总结一下类相关知识</h2><h3 id="类访问修饰符"><a href="#类访问修饰符" class="headerlink" title="类访问修饰符"></a>类访问修饰符</h3><ul><li>*<em>public: *</em>类内外皆可访问的内容</li><li>*<em>private: *</em>类外不可访问,仅可自己和友元访问,子类不可访问</li><li>*<em>protected: *</em>外部不可访问,自己、友元和子类可访问</li></ul><h3 id="特殊函数类型"><a href="#特殊函数类型" class="headerlink" title="特殊函数类型"></a>特殊函数类型</h3><ul><li><p><strong>构造函数:</strong>每次创建对象时会执行,即初始化</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></pre></td><td class="code"><pre><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">Line</span>&#123;</span></span><br><span class="line"> <span class="keyword">public</span>:</span><br><span class="line"> <span class="function"><span class="keyword">void</span> <span class="title">setLength</span><span class="params">( <span class="keyword">double</span> len )</span></span>;</span><br><span class="line"> <span class="function"><span class="keyword">double</span> <span class="title">getLength</span><span class="params">( <span class="keyword">void</span> )</span></span>;</span><br><span class="line"> Line(); <span class="comment">// 这是构造函数</span></span><br><span class="line"> </span><br><span class="line"> <span class="keyword">private</span>:</span><br><span class="line"> <span class="keyword">double</span> length;</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure></li><li><p><strong>析构函数:</strong>删除对象时执行的函数,即善后</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></pre></td><td class="code"><pre><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">Line</span>&#123;</span></span><br><span class="line"> <span class="keyword">public</span>:</span><br><span class="line"> <span class="function"><span class="keyword">void</span> <span class="title">setLength</span><span class="params">( <span class="keyword">double</span> len )</span></span>;</span><br><span class="line"> <span class="function"><span class="keyword">double</span> <span class="title">getLength</span><span class="params">( <span class="keyword">void</span> )</span></span>;</span><br><span class="line"> Line(); <span class="comment">// 这是构造函数声明</span></span><br><span class="line"> ~Line(); <span class="comment">// 这是析构函数声明</span></span><br><span class="line"> </span><br><span class="line"> <span class="keyword">private</span>:</span><br><span class="line"> <span class="keyword">double</span> length;</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure></li><li><p>*<em>拷贝构造函数: *</em>实现复制对象时同一类对象间传参</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><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></pre></td><td class="code"><pre><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">Line</span>&#123;</span></span><br><span class="line"> <span class="keyword">public</span>:</span><br><span class="line"> <span class="function"><span class="keyword">int</span> <span class="title">getLength</span><span class="params">( <span class="keyword">void</span> )</span></span>;</span><br><span class="line"> Line( <span class="keyword">int</span> len ); <span class="comment">// 简单的构造函数</span></span><br><span class="line"> Line( <span class="keyword">const</span> Line &amp;obj); <span class="comment">// 拷贝构造函数</span></span><br><span class="line"> ~Line(); <span class="comment">// 析构函数</span></span><br><span class="line"> </span><br><span class="line"> <span class="keyword">private</span>:</span><br><span class="line"> <span class="keyword">int</span> *ptr;</span><br><span class="line">&#125;;</span><br><span class="line">·········</span><br><span class="line">Line::Line(<span class="keyword">const</span> Line &amp;obj)&#123;</span><br><span class="line"> <span class="built_in">cout</span> &lt;&lt; <span class="string">"调用拷贝构造函数并为指针 ptr 分配内存"</span> &lt;&lt; <span class="built_in">endl</span>;</span><br><span class="line"> ptr = <span class="keyword">new</span> <span class="keyword">int</span>;</span><br><span class="line"> *ptr = *obj.ptr; <span class="comment">// 拷贝值</span></span><br><span class="line">&#125;</span><br><span class="line">·········</span><br><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span><span class="params">( )</span></span>&#123;</span><br><span class="line"> <span class="function">Line <span class="title">line1</span><span class="params">(<span class="number">10</span>)</span></span>;</span><br><span class="line"> </span><br><span class="line"> Line line2 = line1; <span class="comment">// 这里也调用了拷贝构造函数</span></span><br><span class="line"> </span><br><span class="line"> <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></li><li><p>构造与拷贝构造区别:</p><figure class="highlight c++"><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"><span class="function">A <span class="title">x</span><span class="params">(<span class="number">2</span>)</span></span>;  <span class="comment">//直接初始化,调用构造函数</span></span><br><span class="line">A y = x;  <span class="comment">//拷贝初始化,调用拷贝构造函数</span></span><br></pre></td></tr></table></figure></li></ul><h3 id="友元函数-类"><a href="#友元函数-类" class="headerlink" title="友元函数/类"></a>友元函数/类</h3><ul><li><strong>友元:</strong>友元就像老邻居啦,家里东西随便拿<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></pre></td><td class="code"><pre><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">INTEGER</span>&#123;</span></span><br><span class="line"> <span class="function"><span class="keyword">friend</span> <span class="keyword">void</span> <span class="title">Print</span><span class="params">(<span class="keyword">const</span> INTEGER&amp; obj)</span></span>;<span class="comment">//声明友元函数</span></span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">Print</span><span class="params">(<span class="keyword">const</span> INTEGER&amp; obj)&#123;</span></span></span><br><span class="line"><span class="function"><span class="params"> <span class="comment">//函数体</span></span></span></span><br><span class="line"><span class="function"><span class="params">&#125;</span></span></span><br><span class="line"><span class="function"><span class="params"></span></span></span><br><span class="line"><span class="function"><span class="params"><span class="keyword">void</span> main()&#123;</span></span></span><br><span class="line"><span class="function"><span class="params"> INTEGER obj;</span></span></span><br><span class="line"><span class="function"><span class="params"> Print(obj);<span class="comment">//直接调用</span></span></span></span><br><span class="line"><span class="function"><span class="params">&#125;</span></span></span><br></pre></td></tr></table></figure></li></ul><h3 id="内联函数"><a href="#内联函数" class="headerlink" title="内联函数"></a>内联函数</h3><ul><li>总之行数很少,功能很简单,没有循环和开关语句,想提高函数效率,就用内联(╯‵□′)╯︵┴─┴<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></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">inline</span> <span class="keyword">int</span> <span class="title">Max</span><span class="params">(<span class="keyword">int</span> x, <span class="keyword">int</span> y)</span></span>&#123;</span><br><span class="line"> <span class="keyword">return</span> (x &gt; y)? x : y;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 程序的主函数</span></span><br><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span><span class="params">()</span></span>&#123;</span><br><span class="line"> <span class="built_in">cout</span> &lt;&lt; <span class="string">"Max (20,10): "</span> &lt;&lt; Max(<span class="number">20</span>,<span class="number">10</span>) &lt;&lt; <span class="built_in">endl</span>;</span><br><span class="line"> <span class="built_in">cout</span> &lt;&lt; <span class="string">"Max (0,200): "</span> &lt;&lt; Max(<span class="number">0</span>,<span class="number">200</span>) &lt;&lt; <span class="built_in">endl</span>;</span><br><span class="line"> <span class="built_in">cout</span> &lt;&lt; <span class="string">"Max (100,1010): "</span> &lt;&lt; Max(<span class="number">100</span>,<span class="number">1010</span>) &lt;&lt; <span class="built_in">endl</span>;</span><br><span class="line"> <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></li></ul><h3 id="this指针"><a href="#this指针" class="headerlink" title="this指针"></a>this指针</h3><ul><li>类似js中this,指向参数对象本身</li></ul><h3 id=""><a href="#" class="headerlink" title=""></a></h3><hr><p>To Be Continued..</p>]]></content>
<summary type="html">
&lt;p&gt;由于学校课程安排,作为一只电气狗第一次正经的开始搞Cpp ::aru:shy::&lt;br&gt;特记录一些建库过程遇到的坑,,→_→&lt;/p&gt;
</summary>
<category term="tech" scheme="https://www.eee.dog/categories/tech/"/>
</entry>
<entry>
<title>部署新型冠状病毒API</title>
<link href="https://www.eee.dog/tech/coro/"/>
<id>https://www.eee.dog/tech/coro/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-22T13:42:25.103Z</updated>
<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行修改默认端口。</p><h3 id="禁止跨域"><a href="#禁止跨域" class="headerlink" title="禁止跨域"></a>禁止跨域</h3><p>注释掉<code>index.js</code>第13行。</p><h3 id="使用pm2守护进程"><a href="#使用pm2守护进程" class="headerlink" title="使用pm2守护进程"></a>使用pm2守护进程</h3><figure class="highlight shell"><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"><span class="meta">$</span><span class="bash"> npm i -g pm2</span></span><br><span class="line"><span class="meta">$</span><span class="bash"> pm2 start index.js --name coro-api -o /var/<span class="built_in">log</span>/coro/api.out -e /var/<span class="built_in">log</span>/coro/api.err --watch</span></span><br></pre></td></tr></table></figure><h3 id="Nginx配置"><a href="#Nginx配置" class="headerlink" title="Nginx配置"></a>Nginx配置</h3><p>将以下内容加入<code>server{}</code>中 </p><figure class="highlight nginx"><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="attribute">location</span> / &#123;</span><br><span class="line"> <span class="attribute">proxy_pass</span> http://127.0.0.1:17676;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p>如果你不是从根目录映射,记得去<code>index.js</code>中第11行<code>app.get(&#39;/&#39;, f)</code>修改成你的路径。</p><h3 id="爬虫配置"><a href="#爬虫配置" class="headerlink" title="爬虫配置"></a>爬虫配置</h3><p>爬虫使用<a href="https://github.com/iotcat/coro-py" target="_blank" rel="noopener">coro-py</a>, 请参考其文档。</p><h2 id="开源协议"><a href="#开源协议" class="headerlink" title="开源协议"></a>开源协议</h2><p>本项目使用MIT协议,允许非署名商业非商业使用。武汉加油!中国加油!!❤</p>]]></content>
<summary type="html">
&lt;p&gt;一分钟快速部署你自己的新型冠状病毒API ୧(๑•̀⌄•́๑)૭&lt;/p&gt;
</summary>
<category term="tech" scheme="https://www.eee.dog/categories/tech/"/>
</entry>
<entry>
<title>香辣牛肉面</title>
<link href="https://www.eee.dog/tech/awesome-beef-noodle/"/>
<id>https://www.eee.dog/tech/awesome-beef-noodle/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-22T13:41:41.972Z</updated>
<content type="html"><![CDATA[<h2 id="材料准备-两人份"><a href="#材料准备-两人份" class="headerlink" title="材料准备(两人份)"></a>材料准备(两人份)</h2><ul><li>面条</li><li>两个鸡蛋</li><li>两根英国大葱切末</li><li>两片姜切末</li><li>适量牛肉切丁</li><li>准备小碗放一个八角,桂皮,白扣,少许白胡椒粒<a id="more"></a><h2 id="预备步骤"><a href="#预备步骤" class="headerlink" title="预备步骤"></a>预备步骤</h2></li><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>
<summary type="html">
&lt;h2 id=&quot;材料准备-两人份&quot;&gt;&lt;a href=&quot;#材料准备-两人份&quot; class=&quot;headerlink&quot; title=&quot;材料准备(两人份)&quot;&gt;&lt;/a&gt;材料准备(两人份)&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;面条&lt;/li&gt;
&lt;li&gt;两个鸡蛋&lt;/li&gt;
&lt;li&gt;两根英国大葱切末&lt;/li&gt;
&lt;li&gt;两片姜切末&lt;/li&gt;
&lt;li&gt;适量牛肉切丁&lt;/li&gt;
&lt;li&gt;准备小碗放一个八角,桂皮,白扣,少许白胡椒粒
</summary>
<category term="tech" scheme="https://www.eee.dog/categories/tech/"/>
</entry>
<entry>
<title>Arduino中[]=重载导致的String调用问题</title>
<link href="https://www.eee.dog/tech/arduino-operator-string-issue/"/>
<id>https://www.eee.dog/tech/arduino-operator-string-issue/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-22T13:36:27.795Z</updated>
<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>
<summary type="html">
&lt;p&gt;最近在物联网开发中使用Arduino搭建LoRa网关和节点,发现在调用String时总遇到一些奇奇怪怪的现象。经过排查,发现是由于其它地方[]=运算符的重载所导致。&lt;/p&gt;
</summary>
<category term="tech" scheme="https://www.eee.dog/categories/tech/"/>
</entry>
<entry>
<title>公共开支计划系统</title>
<link href="https://www.eee.dog/tech/crown-place-erp/"/>
<id>https://www.eee.dog/tech/crown-place-erp/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-22T13:38:36.188Z</updated>
<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>
<summary type="html">
&lt;p&gt;在英国留学与4个室友合租,为了更好的控制和监管公共支出,以及维持彼此之间的公共支出平衡,我利用迎新周三天时间设计并开发除了此ERP公共开支计划系统。希望此系统能够便捷接下来一年的生活,减少大家之间的矛盾,促使充满幸福感的公共支出项目持久化OωO&lt;/p&gt;
</summary>
<category term="tech" scheme="https://www.eee.dog/categories/tech/"/>
</entry>
<entry>
<title>今天很开心,在这里留个空</title>
<link href="https://www.eee.dog/tech/happy/"/>
<id>https://www.eee.dog/tech/happy/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-22T13:39:24.273Z</updated>
<content type="html"><![CDATA[<p>先在这里留个空,以后慢慢填~</p><a id="more"></a><p>φ( ̄∇ ̄o)</p>]]></content>
<summary type="html">
&lt;p&gt;先在这里留个空,以后慢慢填~&lt;/p&gt;
</summary>
<category term="tech" scheme="https://www.eee.dog/categories/tech/"/>
</entry>
<entry>
<title>意大利申根签攻略</title>
<link href="https://www.eee.dog/tech/ivisa-checklist/"/>
<id>https://www.eee.dog/tech/ivisa-checklist/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-22T13:40:48.094Z</updated>
<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>护照复印件</code></li><li>可参考我们的<code>joint travel confirmation letter</code><br><img src="https://api.yimian.xyz/img/?path=imgbed/img_65e72a51_634x740_8_null_normal.png" alt="joint letter"></li></ul><h3 id="住宿证明"><a href="#住宿证明" class="headerlink" title="住宿证明"></a>住宿证明</h3><ul><li><code>Booking Confirmation</code>上需要有<code>paid</code>字样</li><li>底部需要有网站链接</li><li>所有材料上需要有你的名字</li><li>如果没有你的名字,需要有名字的人提供签过字的<code>joint travel confirmation letter</code>和<code>护照复印件</code></li><li>建议从<code>Booking</code>等知名网站订购</li></ul><h3 id="保险证明"><a href="#保险证明" class="headerlink" title="保险证明"></a>保险证明</h3><ul><li>一定要覆盖旅程</li><li>保期越长,签证时间越长。。</li><li>我们选择的太平保险申根应急签证,供参考</li></ul><h3 id="预约证明"><a href="#预约证明" class="headerlink" title="预约证明"></a>预约证明</h3><ul><li>到楼下前台拿着预约信挂号</li><li>之后预约信就没用了</li></ul><hr><h2 id="成果"><a href="#成果" class="headerlink" title="成果"></a>成果</h2><p>最后展示一下我拿到的签证 ::aru:cheer::<br><img src="https://api.yimian.xyz/img/?path=imgbed/img_f5690b2c_3968x2976_8_null_normal.jpeg" alt="visa"></p>]]></content>
<summary type="html">
&lt;p&gt;在英国留学,圣诞去欧洲旅游,DIY了意大利申根签证。现在游完归来,总结一份申根签攻略。&lt;/p&gt;
</summary>
<category term="tech" scheme="https://www.eee.dog/categories/tech/"/>
</entry>
<entry>
<title>一键激活win10</title>
<link href="https://www.eee.dog/tech/kms/"/>
<id>https://www.eee.dog/tech/kms/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-22T13:42:59.013Z</updated>
<content type="html"><![CDATA[<p>一键激活win10家庭版,专业版,企业版,教育版 φ( ̄∇ ̄o)</p><a id="more"></a><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>]]></content>
<summary type="html">
&lt;p&gt;一键激活win10家庭版,专业版,企业版,教育版 φ( ̄∇ ̄o)&lt;/p&gt;
</summary>
<category term="tech" scheme="https://www.eee.dog/categories/tech/"/>
</entry>
<entry>
<title>Liverpool 学生公寓条件调研</title>
<link href="https://www.eee.dog/tech/liverpool-accom-inves/"/>
<id>https://www.eee.dog/tech/liverpool-accom-inves/</id>
<published>2020-06-16T07:43:54.000Z</published>
<updated>2020-06-22T13:40:10.204Z</updated>
<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><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><h2 id="St-Andrews-Place"><a href="#St-Andrews-Place" class="headerlink" title="St Andrews Place"></a>St Andrews Place</h2><ul><li><code>步行距离</code>: 10 min (西南)</li></ul><h2 id="The-Ascent"><a href="#The-Ascent" class="headerlink" title="The Ascent"></a>The Ascent</h2><ul><li><code>步行距离</code>: 13 min (西)</li></ul><h2 id="Lee-Court"><a href="#Lee-Court" class="headerlink" title="Lee Court"></a>Lee Court</h2><ul><li><code>步行距离</code>: 10 min (北)</li></ul><h2 id="X1-Liverpool-One"><a href="#X1-Liverpool-One" class="headerlink" title="X1 Liverpool One"></a>X1 Liverpool One</h2><ul><li><code>步行距离</code>: 18 min (西)</li></ul><h2 id="X1-The-Edge"><a href="#X1-The-Edge" class="headerlink" title="X1 The Edge"></a>X1 The Edge</h2><ul><li><code>步行距离</code>: 12 min (西北)</li></ul><h2 id="Cambridge-Court"><a href="#Cambridge-Court" class="headerlink" title="Cambridge Court"></a>Cambridge Court</h2><ul><li><code>步行距离</code>: 8 min (南)</li><li><code>google地图</code>: <a href="https://www.google.com/maps/dir/53.4060907,-2.963637/Cambridge+Ct,+Liverpool/@53.4043312,-2.9678762,17z/data=!3m1!4b1!4m9!4m8!1m1!4e1!1m5!1m1!1s0x487b2118d373aed7:0x8824353bb8192424!2m2!1d-2.967738!2d53.4026346" target="_blank" rel="noopener">Cambridge Court</a></li></ul><h2 id="Vita-Student-Liverpool"><a href="#Vita-Student-Liverpool" class="headerlink" title="Vita Student Liverpool"></a>Vita Student Liverpool</h2><ul><li><code>步行距离</code>: 21 min (西)</li></ul>]]></content>
<summary type="html">
&lt;p&gt;为了更清晰更直观的选择出明年居住的公寓,本文汇总了网络上对各公寓的评价信息,供决策参考。&lt;/p&gt;
</summary>
<category term="tech" scheme="https://www.eee.dog/categories/tech/"/>
</entry>
</feed>