<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Dreamer2q’s Blog</title>
        <link>https://dreamer2q.wang/</link>
        <description>记录学习、分享生活</description>
        <lastBuildDate>Tue, 07 Jan 2025 16:16:52 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en-US</language>
        <copyright>All rights reserved 2025, dreamer2q</copyright>
        <item>
            <title><![CDATA[2024 年度总结 — 成长与探索]]></title>
            <link>https://dreamer2q.wang/article/2024-summary</link>
            <guid>https://dreamer2q.wang/article/2024-summary</guid>
            <pubDate>Sat, 04 Jan 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[2024年经历了工作晋升、薪资增长和核心项目的参与，生活成本高且租车体验丰富，尝试炒股获得正收益，虽然在找对象上失败，但在成长与探索中收获了更多的经历和自信。希望在新的一年能在事业上更进一步，结识更多人。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-1716ae3b63708049b03bd092c23e356d"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-1716ae3b637080389ae8c2cc95748aa5">又到了写年度总结的时候，好像也只有这个时候才有动力写点什么留念吧，那就随便写点吧。</div><div class="notion-text notion-block-1716ae3b637080789938d3a8409440a2">回顾2024年，这算是作为全职打工人身份正式的一年，23年只能说开启了打工人生涯。从2022年1月15号独自一人来到上海到今，也算是沪漂的第三年了。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1716ae3b637080959e07d2f2e91d8503" data-id="1716ae3b637080959e07d2f2e91d8503"><span><div id="1716ae3b637080959e07d2f2e91d8503" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1716ae3b637080959e07d2f2e91d8503" title="工作"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">工作</span></span></h3><div class="notion-text notion-block-1716ae3b637080b9994bd57afcb57234">说说工作吧，毕竟这是来上海的首要条件。</div><div class="notion-text notion-block-1716ae3b637080228f90e38f04bec2cc">一句话概括：涨薪两次，晋升一级，拒绝了一个offer。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1716ae3b637080b68859dde115fc8fe8" data-id="1716ae3b637080b68859dde115fc8fe8"><span><div id="1716ae3b637080b68859dde115fc8fe8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1716ae3b637080b68859dde115fc8fe8" title="TL;DR;"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">TL;DR;</span></span></h4><div class="notion-text notion-block-1716ae3b637080748b29e1fd704a5fa2">在象牙塔读书的时候，容易被外界的声音干扰，还以为年薪xx是很容易的一件事情，尤其是网上经常看到拿高薪的offer案例。这种认知差异让我在刚开始工作的时候非常焦虑，这种情况随着我阅历的增加，慢慢得到缓解，最终能比较理性的看待这种差异。</div><div class="notion-text notion-block-1716ae3b6370805a9787f09e410ea292">24年重点项目是鸿蒙端的适配工作，相当于从头零开发一款App，幸运的是我在这过程中参与了不少核心内容，和鸿蒙一起成长。我能深度参与进来，我想一方面可能是我的主观能动性，另一方面则是老板对我的认可，能放手让一个初出茅庐的小伙负责核心的模块开发，对此我非常感激。</div><div class="notion-text notion-block-1716ae3b6370808fa97ac0546c08ab39">在适配鸿蒙端过程中，我们居然决定在上架前几个月用C++重写底层容器实现，并对接到全新的C-API接口上。从这时候开始下班时间就变得不可控了，记得有几次去金桥那边加班到凌晨多，不过好在老板陪着一起加班。这个时期也是我成长最快的一个阶段了，我也借这个机会对我们维护的框架有了更深入的理解，只是没想到工作后能这么快写上C++代码。</div><div class="notion-text notion-block-1716ae3b6370809a96efc191b92e2f5b">适配鸿蒙告一段落后，我又作为“支援方”被借给业务，做了几个业务需求。刚开始做业务需求还挺难受的，大部分时间都花在熟悉写法上（尤其是双端不一致问题），但是随着对业务代码理解的深入，也发现似乎不那么难了，反而变得简单轻松了。</div><div class="notion-text notion-block-1716ae3b637080a0b0aff90a76fd63c3">总之，经过这一波后，我几乎把整个环节都经历了一遍，从底层框架到业务代码，都能说出个一二来，后续做事情也得心应手了许多。后续的话自然还是要深耕技术的，至少目前是我的核心优势。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1736ae3b637080609b5ef64c39bf8e9d" data-id="1736ae3b637080609b5ef64c39bf8e9d"><span><div id="1736ae3b637080609b5ef64c39bf8e9d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1736ae3b637080609b5ef64c39bf8e9d" title="认知迭代"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">认知迭代</span></span></h3><blockquote class="notion-quote notion-block-1736ae3b63708003af47dd14083a4b8d"><div>2025.01.07补充，可能和上下文不连贯</div></blockquote><div class="notion-text notion-block-1736ae3b637080b79c40cacb8ee2444d">这一年自己亲历了不少事情，好的坏的；也旁观过不少事情，悲的喜的。</div><blockquote class="notion-quote notion-block-1736ae3b637080c5a2f0f85da3578ebf"><div>今年是过去十年最差的一年，也是未来十年最好的一年。</div></blockquote><div class="notion-text notion-block-1736ae3b63708001aa8dee5a37039aa6">初听时还在象牙塔，还不知道这句话的含金量，如今已成局中人，对此颇有感触。今年难得几次出行需要打车，和一些司机有所交流，整体听下来司机师傅过得都不容易，每个月扣除用车、生活成本实际到手的没有多少，如果司机还要负担家庭的负担，就更辛苦了。此外还有不少极端突发事件，只是很快就消失在互联网上了，虽说互联网没有记忆……</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1716ae3b6370801fb4cde5dda7785e49" data-id="1716ae3b6370801fb4cde5dda7785e49"><span><div id="1716ae3b6370801fb4cde5dda7785e49" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1716ae3b6370801fb4cde5dda7785e49" title="生活"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">生活</span></span></h3><div class="notion-text notion-block-1716ae3b637080388f91c3a01f971214">打工人就不对生活有太多的期望了，但是最基础的双休不能少，否则得赶紧跑路了。</div><div class="notion-text notion-block-1726ae3b6370803a811fea5b7a6c3b43">吐槽下生活成本吧。房租是绝对的大头，相当于给老板打完工再给房东打工，然后还得被歧视。</div><div class="notion-text notion-block-1726ae3b637080739dcedea9592c9e16">加上吃喝每个月开销不算不知道，一算吓一跳，基本上存不来啥钱。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1726ae3b637080bbb9e2c63de92a19ec" data-id="1726ae3b637080bbb9e2c63de92a19ec"><span><div id="1726ae3b637080bbb9e2c63de92a19ec" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1726ae3b637080bbb9e2c63de92a19ec" title="租车"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">租车</span></span></h4><div class="notion-text notion-block-1726ae3b6370800ebbe8e051b9327901">不知道从啥时开始关注车，记得最早租一辆19年的毛豆3，开着它周末出去玩，中间还给保险杠给剐蹭了，最后赔了800块，影响比较深刻。后面几乎周末都租车出去玩，我记得有小鹏p7、深蓝sl03、蔚来es6、毛豆Y等。当然这中间还租了三个月的老荣威开，虽说是十几年的车了，但是依旧能开能开，路上也没抛锚过，舒适质量顶呱呱。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1726ae3b637080dba89ce8cdee4889ac" data-id="1726ae3b637080dba89ce8cdee4889ac"><span><div id="1726ae3b637080dba89ce8cdee4889ac" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1726ae3b637080dba89ce8cdee4889ac" title="Dream Car"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Dream Car</span></span></h4><div class="notion-text notion-block-1726ae3b637080f5b9a9c5344d2766d5">租车久了自然比较担心剐蹭啥的，尤其是加上保险并不便宜，如果是自己的车就不用担心这么多的问题了。就冲这一点，我打算搞辆车。首先得是一辆电车，其次是预算不多（兜里没有钱），那必定是一辆二手电车了。其实到这里结论已经很明确了，二手电车只能看特斯拉了。但是我还是兜了一个超级大的圈子，终于搞到了属于自己的二手小破车。</div><blockquote class="notion-quote notion-block-1726ae3b63708045a906d63b7c628ce0"><div>这里有个小插曲，记得有个瓜子的销售给我打电话，问我啥时候买车准备买啥样的车。我一通分析下来给的结论就是很可能明年会买台特斯拉。只是没想到这个饼落实的还挺快的。</div></blockquote><div class="notion-text notion-block-1726ae3b637080cf9132d6695f45bf48">终于有了属于自己的Dream Car了。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1726ae3b63708041859eeda9c95c4f7e" data-id="1726ae3b63708041859eeda9c95c4f7e"><span><div id="1726ae3b63708041859eeda9c95c4f7e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1726ae3b63708041859eeda9c95c4f7e" title="走出去"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">走出去</span></span></h4><div class="notion-text notion-block-1726ae3b6370807b8bd8db44c81f2015">中秋的时候和朋友一起去了趟泰国，能走出看看外面的世界还是很幸运的。走出去之后才感觉到之前的自己太封闭了，虽然能在互联网上获取各种信息，但是其实自己是被困在信息茧房中而不知。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1726ae3b637080bf98a3dec0511d2643" data-id="1726ae3b637080bf98a3dec0511d2643"><span><div id="1726ae3b637080bf98a3dec0511d2643" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1726ae3b637080bf98a3dec0511d2643" title="找对象"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">找对象</span></span></h4><div class="notion-text notion-block-1726ae3b637080bd9cc0d042cf669ffe">非常失败！Sigh.</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1726ae3b637080b09079c49c5f928e7f" data-id="1726ae3b637080b09079c49c5f928e7f"><span><div id="1726ae3b637080b09079c49c5f928e7f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1726ae3b637080b09079c49c5f928e7f" title="第二职业"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">第二职业</span></span></h3><div class="notion-text notion-block-1726ae3b63708033b21ddb153a155f1a">除了主业之外，也在尝试第二职业的可能性。在过去一年内有自己的一些心得。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1726ae3b63708018a178e0fecc2fbe43" data-id="1726ae3b63708018a178e0fecc2fbe43"><span><div id="1726ae3b63708018a178e0fecc2fbe43" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1726ae3b63708018a178e0fecc2fbe43" title="炒股"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">炒股</span></span></h4><div class="notion-text notion-block-1726ae3b637080408e6ac2e66f4e6e8c">去年开了moomoo账户，打通了港、美股。一通乱买，年底一看，居然收益还是正的，还是美股比较强势。目前暂不打算去A股当韭菜，在哪当不是当呢！</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1726ae3b6370801e9a3bd5ac655ee7ac" data-id="1726ae3b6370801e9a3bd5ac655ee7ac"><span><div id="1726ae3b6370801e9a3bd5ac655ee7ac" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1726ae3b6370801e9a3bd5ac655ee7ac" title="回顾与展望"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">回顾与展望</span></span></h3><div class="notion-text notion-block-1726ae3b637080ccb6cdf74692889185">回顾2023年，属于自己踏出的第一步，其实已经在起点上落后别人很多了，不过还在自己也在努力追赶了。如果给23年取的词是迷茫与孤独，那么成长与探索则适合我的2024年度总结。成长是我在24年经历了很多事情不论好的坏的，这些杀不死我的只会让我更加强大；探索则是我出门的次数和频率都变多了，不再局限于自己的封闭空间了，而是能够多出去看看，多去接触外面的世界了。</div><div class="notion-text notion-block-1726ae3b637080d38fc6c08936a47c2a">当然24年也存在不少遗憾，我觉得最遗憾的是找对象失败，让我更加不自信了。这个很可能是我性格缺陷所致，至于性格缺陷则和原生家庭有很大的关系。有些人在用一生去弥补自己缺失的东西。</div><div class="notion-text notion-block-1726ae3b6370809faa36c16d98cde317">在新的一年，我希望能在事业上有更近的一步，以及能够认识更多的人，看更广阔的世界。</div><div class="notion-text notion-block-1726ae3b6370803690ecf76747014807">2025.01.06</div><div class="notion-blank notion-block-1736ae3b637080b599cceca683cdfa46"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2023 年度总结 — 迷茫与孤独]]></title>
            <link>https://dreamer2q.wang/article/summary-2023</link>
            <guid>https://dreamer2q.wang/article/summary-2023</guid>
            <pubDate>Sun, 31 Dec 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[2023年度总结，包括回归学校进行毕业设计、进厂打工、找房、出去走走、转正等经历。同时提到了买车、搞副业、提升认知、养猫、生病等生活琐事。总结时表达了迷茫与孤寂的感受。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-6aa0384e639b4d6f9c2f7851f4c54740"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-f89b28a3704a4ecf9b34b970f4dd50e1">2023年的主要分为两个阶段，前半年在学校中躺平，后半年毕业后进厂打工。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-d2049036633f4e0e8cf8526d54bb57a2" data-id="d2049036633f4e0e8cf8526d54bb57a2"><span><div id="d2049036633f4e0e8cf8526d54bb57a2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#d2049036633f4e0e8cf8526d54bb57a2" title="回归学校"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">回归学校</span></span></h2><div class="notion-text notion-block-079f2c89f2f04818b8f36c168eb665d6">2023年初我其实还在厂里实习，只不过实习阶段挺忙的，那段时间还有11小时工时要求，每天要得到9点后才能走，实在有点难顶就辞职滚回学校了。</div><div class="notion-text notion-block-2fd3da2ac4ab453eb2a2df8e46a6f059">回到学校已经是2月份了，在学校唯一需要做的事情就是搞毕业设计。我的毕设是关于人体姿势识别的，简单的说就是通过手机摄像头检测人体坐姿情况，针对错误坐姿进行提醒，帮助人们建立正确的坐姿习惯。核心内容还是来自林亦关于人体姿势识别的视频，我做的工作也就是用 Flutter 重写成跨端软件，让之能跑在 iOS 上。整体搞下来算是熟悉了一波移动端轻量模型的部署和使用了，也算是接触过 AI 了吧。</div><div class="notion-text notion-block-43734be1fdfd46b3a63b36c357dbe1e5">23年春节的时候给介绍过一个相亲对象，在苏州读研，这期间还顺带去了几次苏州。不过好景不长，最后还是崩了，我也没搞懂为什么，看来我也是要孤老终生的了。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3b738fcd89e641d2b321194a8e250c7c" data-id="3b738fcd89e641d2b321194a8e250c7c"><span><div id="3b738fcd89e641d2b321194a8e250c7c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b738fcd89e641d2b321194a8e250c7c" title="进厂当社畜"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">进厂当社畜</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-b52fb1a4d1fd4957bd23577e494bf0cd" data-id="b52fb1a4d1fd4957bd23577e494bf0cd"><span><div id="b52fb1a4d1fd4957bd23577e494bf0cd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b52fb1a4d1fd4957bd23577e494bf0cd" title="找房"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">找房</span></span></h3><div class="notion-text notion-block-d1fc7ae3437c4889947bfccb33cd4331">6月份去找房，找了个中介看了一圈房子感到非常失望，这都啥破烂房子，我表示没法住。后面我自己在暖房上找到了一个还不错的房子，优点是离厂近，价格也挺实惠。只要3000块，就可以整租一居室，可以避免合租的很多问题（事实证明，一个人住就是比较爽）。转租给我的是一个姐姐（还是老乡哈），她要回老家创业开店去了，说实话我挺羡慕的，后来在朋友圈看到开业的消息，应该是个烘培+咖啡的精品小店，这里也祝福这个姐姐能够早日财务自由吧。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3ace7b88f23146358f4bbc8fb36dd375" data-id="3ace7b88f23146358f4bbc8fb36dd375"><span><div id="3ace7b88f23146358f4bbc8fb36dd375" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3ace7b88f23146358f4bbc8fb36dd375" title="出去走走"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">出去走走</span></span></h3><div class="notion-text notion-block-8ee339f9c11244fe833cc13b7ca56028">毕业时本来想规划要好好出去走走的，但是考虑到自己孑然一身，瞬间对出去玩没有了啥兴趣。不过好在还是要出去走走的，就去长沙到了朋友那里过了几天。期间还遇到了初中同学，不过他是带着女朋友来玩的，属实给我吃了大波狗粮。说实话，感觉出去玩就是花钱找罪受，后面我就回去了，也就没有所谓的毕业旅行了吧，不知道多年以后会不会后悔没有好好出去玩玩呢？</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-65f766a008e34d3c8f688e6209d3d89a" data-id="65f766a008e34d3c8f688e6209d3d89a"><span><div id="65f766a008e34d3c8f688e6209d3d89a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#65f766a008e34d3c8f688e6209d3d89a" title="打工人"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">打工人</span></span></h3><div class="notion-text notion-block-45e11cddba6b4246af2521d713754e9f">每天打工干活的生活总是枯燥无聊的，这里也没有啥好说的。此外打工人之间也是差异挺多的，有的人刚进来就能拿30k，有些人进来好多年了也没有这个数，直接被倒挂。打工也没啥出路，现在这情况有个工打就已经不错了，先这样吧。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-66b22cb33d2f4825b8150486564d668f" data-id="66b22cb33d2f4825b8150486564d668f"><span><div id="66b22cb33d2f4825b8150486564d668f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#66b22cb33d2f4825b8150486564d668f" title="转正"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">转正</span></span></h3><div class="notion-text notion-block-ad3f2840eb4d49659208c50bc8680102">不知不觉都打工5个多月了，也到了要转正的时候，真的非常折磨打工人，还要写自评，转正后也没有啥奖励，唉。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-6625d85e6d4d45e68be40d3153f384e7" data-id="6625d85e6d4d45e68be40d3153f384e7"><span><div id="6625d85e6d4d45e68be40d3153f384e7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#6625d85e6d4d45e68be40d3153f384e7" title="工作之外"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">工作之外</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-42a8c2e306d245d39db72ad80613d9bf" data-id="42a8c2e306d245d39db72ad80613d9bf"><span><div id="42a8c2e306d245d39db72ad80613d9bf" class="notion-header-anchor"></div><a class="notion-hash-link" href="#42a8c2e306d245d39db72ad80613d9bf" title="去骑车"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">去骑车</span></span></h3><div class="notion-text notion-block-73d00da633a54f6a82ed2c519771dee9">为了方便通勤，我买了一辆二手山地车，花了1k多，事实证明后面这辆破车修修补补让我在这个花费上干到了2k多，不如一开始就花2k多买辆新车，吃了没文化的亏。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-5e688bbe4b46450bbea9b062d25e0ac9" data-id="5e688bbe4b46450bbea9b062d25e0ac9"><span><div id="5e688bbe4b46450bbea9b062d25e0ac9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5e688bbe4b46450bbea9b062d25e0ac9" title="搞副业"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">搞副业</span></span></h3><div class="notion-text notion-block-05b9e88273bc4cef9e2302cb0b21520a">打工没啥出息，就搞搞副业，虽然没有啥成果，但是让自己饿不死还是可以的。副业顶峰时，比一天打工收入还多一些，可惜只是昙花一现，这种情况无法持久。但是搞副业可以让自己学到很多东西，也让我看明白了许多东西，这比进厂打工要舒服多了。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-78872bf4b3054ceaac9c0ad97055cd80" data-id="78872bf4b3054ceaac9c0ad97055cd80"><span><div id="78872bf4b3054ceaac9c0ad97055cd80" class="notion-header-anchor"></div><a class="notion-hash-link" href="#78872bf4b3054ceaac9c0ad97055cd80" title="提升认知"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">提升认知</span></span></h3><div class="notion-text notion-block-99e242a985814197b3d943ed4dde8a13">在学校的时候我关注的事情比较少，很多东西也不太了解。成为打工人后，才逐渐去了解一些社会上的事情。了解的越多就感到越迷茫与无助，自己看不到啥希望，只能说多读读历史吧。如果有机会，一定要出趟国门，去看看外面的大千世间。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-ecafa808d6f8450e953a0f87300f7021" data-id="ecafa808d6f8450e953a0f87300f7021"><span><div id="ecafa808d6f8450e953a0f87300f7021" class="notion-header-anchor"></div><a class="notion-hash-link" href="#ecafa808d6f8450e953a0f87300f7021" title="当铲屎官"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">当铲屎官</span></span></h3><div class="notion-text notion-block-3a485453256c4febafaf782871eb143d">最初原因是厨房有不少老鼠，我用捕鼠粘也没有抓到任何老鼠，就养只猫吧。由于是第一次养猫，就选择最好养的狸花猫，于是房东给我抱了一只狸花猫。当时小猫刚过来只有2个月大，还是挺小的。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-d9fb8dfee1904da2911213fed305e6e6"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F4827ce48-fc12-40d6-af42-f7c2dfab4029%2Faa2de07d-367e-48d0-8ac6-48cc03b6ee49%2FUntitled.jpeg?table=block&amp;id=d9fb8dfe-e190-4da2-9112-13fed305e6e6&amp;t=d9fb8dfe-e190-4da2-9112-13fed305e6e6&amp;width=624.9921875&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-27699a9551ca4973a3b41127778acc4e">有个猫猫陪着你，同时又不嫌弃你，真的挺好的。现在疫苗也打完了，过段时间就要去绝育了，哈哈。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-7debfe93dd744f0f9273410b27cda885" data-id="7debfe93dd744f0f9273410b27cda885"><span><div id="7debfe93dd744f0f9273410b27cda885" class="notion-header-anchor"></div><a class="notion-hash-link" href="#7debfe93dd744f0f9273410b27cda885" title="生病"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">生病</span></span></h3><div class="notion-text notion-block-a75d06ec4b7e4b5b9f7336ca40e9f3c3">水这篇文章的时候，正是我发烧生病的时候。季节变化之际，非常容易感冒发烧，前几星期就着凉生病过，不过今天的烧比较高39度，基本上就是躺在床上啥也做不了，非常的难受，发烧来的太突然，我都没有反应过来，今天就已经彻底被迫躺平了。希望能有个健康的身体，真的非常重要。此外也需要多学习一些相关生病的知识，比如说感冒的类型，诱因，吃什么药，要注意什么等。这些属于生活常识，但是中国式教育才不care这些，这也是我所缺失的。平时也注意囤一些药品，口罩事件你懂的。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-d0bc88b291864702ab91d3241e58f1aa" data-id="d0bc88b291864702ab91d3241e58f1aa"><span><div id="d0bc88b291864702ab91d3241e58f1aa" class="notion-header-anchor"></div><a class="notion-hash-link" href="#d0bc88b291864702ab91d3241e58f1aa" title="总结"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">总结</span></span></h2><div class="notion-text notion-block-1a2802317cfb4eb89ad43d1d05d14b23">23年是我正式踏入社会的一年，也是我需要从学生思维向打工人思维转型的过程，有很多东西需要去适应，有许多能力需要提升，有许多观念需要去转变。认知对一个人的影响挺大的，很多时候选择是大于努力的，在这个过程中我深刻的体会到了社会的固化，损不足而补有余（此处省略…）。</div><div class="notion-text notion-block-2f3fcbf7cca64c2180ef4e41401c8575">23年是我迷茫的一年，也是孤寂的一年。</div><div class="notion-blank notion-block-e5e5ed74cd78457da252b0eb0cc86bde"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[入坑！我的第一辆公路车]]></title>
            <link>https://dreamer2q.wang/article/my-first-road-bicycle</link>
            <guid>https://dreamer2q.wang/article/my-first-road-bicycle</guid>
            <pubDate>Sat, 09 Dec 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[这篇文章介绍了作者的通勤需求和购买第一辆公路车的经历。作者提到了购买二手单车的需求和装备安排上的错误，以及后续维修和更换零件的经历。最后，作者分享了对公路车的第一次骑行体验和总结。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-89e85ff9311941cba423b21cc0cd51f5"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2544571533b440f3abcf731e62cddbc9" data-id="2544571533b440f3abcf731e62cddbc9"><span><div id="2544571533b440f3abcf731e62cddbc9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2544571533b440f3abcf731e62cddbc9" title="我的通勤需求"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">我的通勤需求</span></span></h2><div class="notion-text notion-block-7106c8c34ec54373885484dde289dbb5">入职以后由于住的地方离公司较远，走路要半个小时，最好的通勤就是骑车了。一开始是骑小单车通勤，但是小区不让进单车，此外到了上下班的时候，单车特别难找。所以，拥有一辆单车的需求就愈发的凸现出来了，能够提供稳定的通勤时间，也就不用担心找不到车的尴尬了。</div><div class="notion-text notion-block-71cf0ffd85784e35acab9b21a743d467">于是乎，在一个周末，在朋友的推荐下，在某鱼上买了一台二手单车，面交。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-8b67e60e3a094c8893f2cee63663f636"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F4827ce48-fc12-40d6-af42-f7c2dfab4029%2F1edeefc3-cfdd-4366-addd-e3562fdc31b7%2FUntitled.jpeg?table=block&amp;id=8b67e60e-3a09-4c88-93f2-cee63663f636&amp;t=8b67e60e-3a09-4c88-93f2-cee63663f636&amp;width=4032&amp;cache=v2" alt="捷安特 ATX830 s码" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption">捷安特 ATX830 s码</figcaption></div></figure><div class="notion-text notion-block-c0910fe8a5044b708da49849bd067900">当时是1200成交的，车很不错，即使比较老旧了，但是骑起来还是很顺畅的。然后当天就第一次去骑滨江，我也是第一次骑山地车，对能够换挡的车还是很新奇的，骑一路换一路的档位，骑的爽呢。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-62fa6e5f0950482c887f6dd8a73ef676" data-id="62fa6e5f0950482c887f6dd8a73ef676"><span><div id="62fa6e5f0950482c887f6dd8a73ef676" class="notion-header-anchor"></div><a class="notion-hash-link" href="#62fa6e5f0950482c887f6dd8a73ef676" title="小白踩坑"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">小白踩坑</span></span></h2><div class="notion-text notion-block-78ae622071884c64a4058a605bb0b0b3">如果就此打住了，估计也没有本文了。有了车之后，自然也没有闲下来，装备安排上！然后就搞了码表、踏频器、前后灯。要不是功率计太贵了，我都想弄个来。然后自己又不懂，想给车保养一下，就买了WD40到到处喷喷，结果给碟刹搞出异响来了。现在想想，真他么的愚蠢，碟刹能乱搞吗？然后碟片+来令片全部换掉，才解决到异响问题，花了260块修被自己弄坏的刹车，亏死。</div><div class="notion-text notion-block-4e8311eaabc245a2a4d8a50d1aaf695f">后面骑久了，发现有异响，到店里检查老板说要换个中轴，花了85快；后面又换了两次脚踏，因为第一次换后被我给骑坏了，又有异响；第二次换了个好点的，要75快。最近一次修车，是塔基被我骑坏了，换了个后轮，花了315快。然后还有一次前轮爆胎，换胎30快。到这里，这台车的成本已经来到了2000快的大洋了，已经完全丧失刚到手时的性价比了。所以，新手第一次买车，最好是去实体店买，也不要贪图所谓的性价比，刚开始骑车，根本就区分不出来这些东西。</div><blockquote class="notion-quote notion-block-0dddbd4cbcd3422ab1c51299f399617c"><div>第一辆车最好是实体店买，新or二手都可以，售后是关键。</div></blockquote><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-07e3042de57b41779efeee844277fc67" data-id="07e3042de57b41779efeee844277fc67"><span><div id="07e3042de57b41779efeee844277fc67" class="notion-header-anchor"></div><a class="notion-hash-link" href="#07e3042de57b41779efeee844277fc67" title="入坑公路车"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">入坑公路车</span></span></h2><div class="notion-text notion-block-b11ce8676d874926875eac8520b7493f">自从那台山地车在我上班的时候坏掉后，我TM的就想要换车了。好巧不巧，它坏的时候就在我刚出小区门口的时候，然后我只能尴尬的推着它去上班。于是在这修车的几天，我只能骑共享单车，也不能出去兜风了。这也是我迫切的需要一台新的原因，看来我还是挺喜欢出去骑的。</div><div class="notion-text notion-block-d1c8e0243fd04a14a2c38b1324dcb059">话说回来，其实在骑山地的时候，就羡慕骑公里的，无它，就是山地太重了，同样的速度山地车需要更高的公里才能维持。于是，我给自己定了一下预算，大概是5k的样子。</div><div class="notion-text notion-block-55d3fe3d49b249a78790758dd867c282">于是就有了我的第一辆公路车。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-75d8379d470e4fd38eb5cb157c38469e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F4827ce48-fc12-40d6-af42-f7c2dfab4029%2Fede93ce8-4923-4240-9127-1c8200e70e1e%2FIMAGE_2023-12-10_163116.jpg?table=block&amp;id=75d8379d-470e-4fd3-8eb5-cb157c38469e&amp;t=75d8379d-470e-4fd3-8eb5-cb157c38469e&amp;width=1280&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-766a35c98e8e4b2496cf75d55e2a8a1e">这辆车的性价比其实很一般，但是我可能更看重售后，因为刚入门肯定会遇到不到问题，能有个靠谱的老板给你售后，真的能省很多事情和避免不必要的吃亏。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-3b0d41f688d24f02b0798b432a0a5a14"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F4827ce48-fc12-40d6-af42-f7c2dfab4029%2F342af311-71ec-467b-8b7e-9e5abb37c009%2FUntitled.jpeg?table=block&amp;id=3b0d41f6-88d2-4f02-b079-8b432a0a5a14&amp;t=3b0d41f6-88d2-4f02-b079-8b432a0a5a14&amp;width=4032&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-697d5c5973b64432938686f050abd54f">同价位的肯定会有更好的选择，但是嘛还是之前的理由，对新手友好，没有大坑就足以。后续真的要发烧，大可以再花几万买好的车子。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-248847469ea6414d833803dbef67cd47" data-id="248847469ea6414d833803dbef67cd47"><span><div id="248847469ea6414d833803dbef67cd47" class="notion-header-anchor"></div><a class="notion-hash-link" href="#248847469ea6414d833803dbef67cd47" title="第一次骑公路车"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">第一次骑公路车</span></span></h3><div class="notion-text notion-block-c77c0c7023304ff78d16f43e5ac74534">第一次骑的体验是，公路车真不太好骑，对车手的要求还是很高的。</div><div class="notion-text notion-block-28694e0795c74bc6837e4bfd657f4d41">1）车子轻，车把短，对控车的能力要求很高；</div><div class="notion-text notion-block-48501e10c4fa4b45bfde4836a5bf2a39">2）几何激进，公路车骑上去身体会往前倾的，核心力量不足只能用手来支持，比较费手臂；</div><div class="notion-text notion-block-d26b3aef97ba4aa095ba04fa8c1f23c7">3）车架小，公路车买小不卖大，感觉没有山地车可以完全伸展自己的身体。</div><div class="notion-text notion-block-b8c96f6bc85f44359c82ad687e2be513">上面是第一次骑的直观感觉，具体的还是需要去适应它，锻炼自己的身体。</div><div class="notion-text notion-block-d0d6e3b27223432ba3c505dab05a0cbb">公路车最直观的一个好处，就是骑起来特别的轻，轻轻踩就上20码，用力踩一下就能上30码。这点在我骑山地车，还是很感觉到很明显的速度差异的。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-664a59de5a3945f381efea308f4a14f3" data-id="664a59de5a3945f381efea308f4a14f3"><span><div id="664a59de5a3945f381efea308f4a14f3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#664a59de5a3945f381efea308f4a14f3" title="总结"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">总结</span></span></h2><div class="notion-text notion-block-585a1e0d15df41fdb6de6e6e06f090c0">小白入坑，还有需要地方要踩坑；此外，公路车的定位不再是通勤工具了，而是作为一个小众的健身器材，还是比较费钱的。后续将继续更新踩坑内容。</div><div class="notion-blank notion-block-9e523f8777894a52a1baa434a9ac01ba"> </div><div class="notion-blank notion-block-fc769a4b59244d7e8ddf76b304690035"> </div><div class="notion-blank notion-block-4032b3cc64c4444f937a20f4ab06f143"> </div><div class="notion-blank notion-block-189d25ea4460498cbf85a4ac2ae1dd97"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NodeJS createReadStream 踩坑记]]></title>
            <link>https://dreamer2q.wang/article/the-fucking-createReadStream</link>
            <guid>https://dreamer2q.wang/article/the-fucking-createReadStream</guid>
            <pubDate>Sun, 26 Nov 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[本文介绍了在处理大文件时，使用Node.js中的Stream（数据流）的重要性。通过将文件拆分成子任务来处理，可以避免将整个文件加载到内存中。文章还提供了关于计算文件MD5和文件分片的示例代码，并指出了在使用createReadStream时需要注意的细节。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-d1beb440988c4d789a90619b21e5cf92"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-29b1a7aa183b48b4974ae8f3dcf7f754" data-id="29b1a7aa183b48b4974ae8f3dcf7f754"><span><div id="29b1a7aa183b48b4974ae8f3dcf7f754" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29b1a7aa183b48b4974ae8f3dcf7f754" title="背景"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">背景</span></span></h2><div class="notion-text notion-block-d587b0e19523418493bfad1d04f0be86">上传文件超过 2GB 时候，Nodejs 给报错了…</div><div class="notion-text notion-block-b10d3425cf8c46c29327352335e9d88d">定位一下代码后，发现是下面这句有问题：</div><div class="notion-text notion-block-5f9c4331a29a4931b5ff0cd50e2d5689">当 <code class="notion-inline-code">filepath</code> 指向的文件超过 2GB 后，就有了刚才的异常了。</div><div class="notion-blank notion-block-7c2b72b74c3c4ba0ae512c3df9a36638"> </div><div class="notion-text notion-block-7b4db66dd45a4519833e70d685ecd22a">其实挺好理解的，因为上面的代码尝试将文件加载到内存中，超出了 <code class="notion-inline-code">v8</code> 的内存限制了。这也引出了今天的问题：Node.js 中要如何处理大文件？</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-f6c9fb87836746189e4cf544b941b57b" data-id="f6c9fb87836746189e4cf544b941b57b"><span><div id="f6c9fb87836746189e4cf544b941b57b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#f6c9fb87836746189e4cf544b941b57b" title="在 Node.js 中处理大文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">在 Node.js 中处理大文件</span></span></h2><div class="notion-text notion-block-356bae3eae2e4a019089d6b7b8179b2e">Node.js 中有个很核心的东西叫 <code class="notion-inline-code">Stream</code> 也就是「数据流」。这个挺好理解：一次性无法完成的任务，例如加载2GB的文件到内容，就将其拆分成子任务来进行，例如一次处理1M数据，分成2048次处理就能处理2GB的文件了。这里的子任务无限进行细分，就变成了「数据流」了，也就是 <code class="notion-inline-code">Stream</code> 最核心的概念。</div><div class="notion-blank notion-block-26cb01bbd0bf4fc09d1e381fdd19c341"> </div><div class="notion-text notion-block-146b59f3574b4b6e95b86273cd98affb">现在我们带着 Stream 这把利器后，重新来审视刚才的代码，就发现确实没有必要将文件一次性加载到内存中，这么做纯粹是当初写的时候偷懒了，现在问题暴露出来了。</div><div class="notion-blank notion-block-1589d3daeddb4474ad62c4cceb673168"> </div><div class="notion-text notion-block-32af6140ad3e4e0a891d8689332d6855">那么我们审视一下拿到文件数据后，看看我都干了啥吧：</div><div class="notion-blank notion-block-134f7b5124e742968b038c13c6317b13"> </div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1256ef089723418491d594fca527e5ab" data-id="1256ef089723418491d594fca527e5ab"><span><div id="1256ef089723418491d594fca527e5ab" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1256ef089723418491d594fca527e5ab" title="操作1：计算文件 MD5"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">操作1：计算文件 MD5</span></span></h3><div class="notion-text notion-block-21530e5a01034eb19617f8b2adba5bf0">计算一段数据的 MD5 是一个很常见的需求，这里直接怼数据进行计算，不符合 Stream 的概念，下面我们来进行改造：</div><div class="notion-text notion-block-0cda446f51e5491d9a3d295a88bc7df7">改造后，引入了一个新的 API：<code class="notion-inline-code">createReadStream</code></div><ul class="notion-list notion-list-disc notion-block-c1e4b81aedfa41a9a98fefebfcd28ee2"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://nodejs.org/api/fs.html#filehandlecreatereadstreamoptions">https://nodejs.org/api/fs.html#filehandlecreatereadstreamoptions</a></li></ul><blockquote class="notion-quote notion-block-f1e0f2c1445948a9978da1ad6c259ecc"><div>这里建议提前看一下文档，等会就知道踩坑点在哪里了。设计这个 API 的人，估计脑袋有点进水了，呵呵。</div></blockquote><div class="notion-blank notion-block-3ded1e41929c4fa4bf9bb56fcf4e1f77"> </div><div class="notion-text notion-block-c7cd6f74a3f047c1b4c2b91d3a2a851e">在引入 <code class="notion-inline-code">stream.Readable</code> 概念后，我们计算 MD5 就不再是梭哈了，而是根据「data」事件累计计算所有的分配（chunk），最后当「end」触发时候，表示没有数据了，这个时候才对数据汇总，输出最后的 MD5。</div><div class="notion-blank notion-block-b49685beaf5341ee912180c2dc595d3f"> </div><div class="notion-text notion-block-deec975db64a4a19b1b5e563e71ecc0f">进过此番改造后，再次计算大文件的MD5即可正常运行，唯一的区别就是要稍微多等待那么一段时间。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-7e504a63b7d544b8bed1bb08c67b14a6" data-id="7e504a63b7d544b8bed1bb08c67b14a6"><span><div id="7e504a63b7d544b8bed1bb08c67b14a6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#7e504a63b7d544b8bed1bb08c67b14a6" title="操作2：文件分片&amp;计算分片MD5"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">操作2：文件分片&amp;计算分片MD5</span></span></h3><div class="notion-text notion-block-092b1da512e74050ad59535c6170378d">改造前的分配，就是暴力的对整个 Buffer 进行分片，虽然效率很高，但是招架不住内存问题，也因此需要改造。</div><div class="notion-text notion-block-cff3a575f4d04680a22be4c769c792fd">这次改造依旧借助 createReadStream 能力，只不过这次我们通过指定 <code class="notion-inline-code">start</code> 和 <code class="notion-inline-code">end</code> 参数来指定读取的范围，以实现「分片」的效果。唯一的缺点就是重复打开关闭文件，占用较多的 io 资源，也不知道操作系统是否会对频繁读取的文件进行优化。</div><div class="notion-blank notion-block-4498444e4fae4258bc5dbee405c8f823"> </div><div class="notion-text notion-block-a0901ecb6b274ba09ab1726bb341cee9">就当我庆幸自己如此聪明的时候，我发现改造后的分片MD5计算结果不符合预期，但是审查代码又无法发现问题，这导致我一度非常的困惑，怀疑是不是MD5计算的做法不正确，为此我在错误的道路上做了不少弯路，甚至会向他们的妈妈问好。</div><div class="notion-blank notion-block-ef859124e35b46e697a8d189de970a6d"> </div><div class="notion-text notion-block-646e8a4820c04d2db299075ac04d32f3">直到我突然翻阅到了这段内容：</div><blockquote class="notion-quote notion-block-13d302b057be4effa298ab7e52555dd0"><div>`options` can include `start` and `end` values to read a range of bytes from the file instead of the entire file. 
Both `start` and `end` are inclusive and start counting at 0, ...</div></blockquote><div class="notion-blank notion-block-097a0bd74f2d433996bd6c71a9715676"> </div><div class="notion-text notion-block-82ba52ccb9ea4dcfab61a4c0015c845f">「inclusive」不是「include」的变种吗？include, emm.., 包含？等一下，什么？包含？也就说说包括「end」指向的那个字节？WTF？我居然多算了一个字节，难怪MD5一直算不对…</div><div class="notion-blank notion-block-97c1625c634f48b487a497069340c1cd"> </div><div class="notion-text notion-block-67ee0749bd614e45961cbb1a2b59fe21">如晴天霹雳一般，我第一次对这个世界有了新的认知。为什么不能包含「end」字节呢？所以我之前咋想的呢？对啊，我咋没想到可以包含「end」字节呢？</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-cd606fb080454ae5900c8feef15255c6"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F4827ce48-fc12-40d6-af42-f7c2dfab4029%2F634115df-eb72-4380-b52e-b756ba0818c5%2FUntitled.png?table=block&amp;id=cd606fb0-8045-4ae5-900c-8feef15255c6&amp;t=cd606fb0-8045-4ae5-900c-8feef15255c6&amp;width=2024&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1c544b83ac884c5291a6dfa35e9f1ccf">这是哪个 GENIUS 设计的 API 啊，我必须给上一个双手双脚的赞同…</div><div class="notion-blank notion-block-9a8f7ed9f10e463d9c57313d80544c32"> </div><div class="notion-text notion-block-b035c55573fa45d2904658df0931a42f">所以正确的写法应该是这样的：</div><div class="notion-blank notion-block-033ed0c5a89b4112a1c92cd366e650eb"> </div><div class="notion-text notion-block-f58db3b4fa5f4ef5974d652769294df1">至此，重新跑一下代码，bingo，总于算对了… 我的心也累了…</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-b2cac92888d644d3b0df8f88e7804916" data-id="b2cac92888d644d3b0df8f88e7804916"><span><div id="b2cac92888d644d3b0df8f88e7804916" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b2cac92888d644d3b0df8f88e7804916" title="总结"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">总结</span></span></h2><div class="notion-text notion-block-74342be68ba24f188e46baf7874072bc">整体改造还是非常成功的，程序能够支持处理 2GB 以上的「大文件」了，只是中间出现的小插曲让我一度怀疑人生，之前用的好好的「经验」或者「约定俗成」的东西居然不管用了，这对我的打击不小，尤其是它出现在我每天睁眼闭眼都能用到的 Node.js 之中，实在被秀到了。</div><div class="notion-blank notion-block-68ce6ab18cd84ac2a75b7943a134b396"> </div><div class="notion-text notion-block-cb41fa94b5ca4d0888741aa6b6df7b6b">我现在依旧没有想明白「end」这点字节「inclusive」的意义何在呢？为了突出这个 API 是如此的与众不同吗？如果有想明白的也恳请大家的指教。</div><div class="notion-blank notion-block-a606d6ba31b24ccd874b5ac75b6b1531"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[固件定制 — 编译 openwrt]]></title>
            <link>https://dreamer2q.wang/article/compile-your-own-openwrt</link>
            <guid>https://dreamer2q.wang/article/compile-your-own-openwrt</guid>
            <pubDate>Fri, 10 Nov 2023 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-b7b967e12a894325a156d9f0ac4843e9"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1caebfed4e3943509badfacedfc0e4af" data-id="1caebfed4e3943509badfacedfc0e4af"><span><div id="1caebfed4e3943509badfacedfc0e4af" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1caebfed4e3943509badfacedfc0e4af" title="前言"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">前言</span></span></h2><div class="notion-text notion-block-4dd251fbdad44f86aa6ed036d9e2e300">为啥会有这个文章呢？这还得从我把路由器玩坏了说起。</div><div class="notion-text notion-block-b16cc74d87ba427cb0e41a3d21ba4ac9">为什么会把路由器玩坏掉呢？这还得从搭建本地开发环境说起。</div><div class="notion-text notion-block-15eb569188aa4858b1a226b0b29d4943">为什么要....这还得.....</div><div class="notion-text notion-block-fc67d8048aa346fea8591762878c15a0"><b>禁止套娃</b></div><div class="notion-text notion-block-263884d80be74e0093b2687bce726f0b">好吧，为了搭建我的本地开发环境，我尝试使用 ssh 隧道做远程映射，映射的端口只有 localhost 才能访问，这个不符合我的初衷。</div><div class="notion-text notion-block-ff669b7345d64e19a796985fc27fee44">我的本意是外网的 ip 可以直接访问到我的本地开发环境。</div><div class="notion-text notion-block-82b3a80ae9634ec1b5fa7b94d2c7292c">于是就又选择了<code class="notion-inline-code">frp</code>，这个真得好用，golang 开发，全平台支持。还不需要啥子依赖。但是，我的路由器固件不带<code class="notion-inline-code">frp</code>插件，意味着必须要进入命令行去配置，这就给我这种懒人带来很大的挑战了。为了，偷这个懒，我就想着，<code class="notion-inline-code">luci</code>可以安装插件，就直接安装一个<code class="notion-inline-code">frp</code>插件不好吗？说干就干，瞎几把搜索一通后</div><div class="notion-text notion-block-e59893166ecc44d7bfcb665ed9b29507">一通操作下来，心想，这就结束了吗？不，不然就没有这篇文章了。</div><div class="notion-blank notion-block-634c14abe9c04fb1931166cf8d2b2ad7"> </div><div class="notion-text notion-block-ac7c0b82461547c2b272b9286ea06e68">现实情况是，安装上去根本没有鸟用处。包括重启，删除<code class="notion-inline-code">luci-indexcache</code>等操作，根本没有用处。这让我很怀疑人生，然后就是又开始了瞎几把折腾。我怀疑有没有出现的原因是有些软件版本过低，于是就开始一波升级操作。就是这波操作把自己的路由器作死了。(直接无法开机了)不过还没死透，毕竟是刷了 opboot 的家伙，还能苟活一波。这里略去我傻逼刷错固件这一波折腾(不然就跑题了)路由器起死回生后，我看到别人都可以编译路由器固件，于是决定自己来尝试一波。（其实这个念头很早就有了，只是我非常清楚编译这个很耗时的）</div><div class="notion-blank notion-block-0f298af6a0834d2287bd93866cc30529"> </div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1cdbd98eec3445e7b873c27a5b0d0317" data-id="1cdbd98eec3445e7b873c27a5b0d0317"><span><div id="1cdbd98eec3445e7b873c27a5b0d0317" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1cdbd98eec3445e7b873c27a5b0d0317" title="编译固件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">编译固件</span></span></h3><ul class="notion-list notion-list-disc notion-block-20d07a191c364cdeab3816f3977943bd"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/coolsnowwolf/lede">https://github.com/coolsnowwolf/lede</a></li></ul><div class="notion-blank notion-block-e266cfed34ac44f78e34e21b55fc0f79"> </div><div class="notion-text notion-block-ca83e225e59743cba567415249a31b26">编译步骤：</div><ul class="notion-list notion-list-disc notion-block-aa4b9effa0854ce694ac1e71c9d8cace"><li>准备编译环境</li></ul><div class="notion-text notion-block-bf0ae70d2d0e4aeca58355106f6a5443">这个环境很是重要，好多环境可以避免踩很多坑 </div><div class="notion-text notion-block-3001e38750184fd1a70c9cc9e3a82aae">lean 是推荐 <code class="notion-inline-code">Ubuntu 18 LTS x64</code> 不过我用的环境是 <code class="notion-inline-code">wsl2 debian</code> </div><div class="notion-text notion-block-b5d1f52690574adb905094ce5cf27898">我的想法是，反正 <code class="notion-inline-code">ubuntu</code> 就是居于 <code class="notion-inline-code">debian</code> 的，用这个应该没有多大区别。</div><ul class="notion-list notion-list-disc notion-block-f8b7d4cbc240472a8deb86344b836340"><li>准备编译工具</li></ul><div class="notion-text notion-block-1726a6f8c66345fd83ab576f434b4a8c">由于要进行交叉编译，因此需要很多的编译工具（也就是开发环境，这个很重要的，不然干不了活）</div><div class="notion-text notion-block-b0daf03764964134a22eea2aa5eff4d4">可以感受到在<code class="notion-inline-code">linux</code>配置开发环境显然比<code class="notion-inline-code">win</code>舒服的</div><ul class="notion-list notion-list-disc notion-block-8fd8f48dd0114dac8f428a6d3b055bd1"><li>下载固件源码</li></ul><div class="notion-text notion-block-d1b7789750714028a11fc0c5a0b7b218">这里的速度用过都懂得，不用我讲。</div><div class="notion-row notion-block-2033e5e12de440478ef2d9a31fac36a2"><div class="notion-column notion-block-6b5c8568648945718d2e1c271cb3e2e7" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.375)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-73a5133269cb4e6082cdec764297393b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:240px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://cdn.nlark.com/yuque/0/2021/png/2596791/1613396364054-1abd6bd1-4dab-40cc-96bb-cf0cd167076f.png#averageHue=%23262626&amp;height=42&amp;id=SYF6L&amp;originHeight=42&amp;originWidth=110&amp;originalType=binary&amp;ratio=1&amp;rotation=0&amp;showTitle=false&amp;size=1099&amp;status=done&amp;style=none&amp;title=&amp;width=110?t=73a51332-69cb-4e60-82cd-ec764297393b" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div><div class="notion-column notion-block-d4e3116582134bd6874fd980e4d6d268" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.625)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-cf296d07ee3e4614ad869196e3dce88a"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://cdn.nlark.com/yuque/0/2021/png/2596791/1613396365791-b087b472-1143-4091-8a6e-363f54e37876.png#averageHue=%237c5f5e&amp;height=64&amp;id=PNHb1&amp;originHeight=64&amp;originWidth=259&amp;originalType=binary&amp;ratio=1&amp;rotation=0&amp;showTitle=false&amp;size=3043&amp;status=done&amp;style=none&amp;title=&amp;width=259?t=cf296d07-ee3e-4614-ad86-9196e3dce88a" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div></div><div class="notion-text notion-block-3b090fc1d2db45f486f921d05d5f8bca">编译过程中，会产生大量的中间文件，一度将我的 C 盘占满，不过系统依然无比流畅。如果是<code class="notion-inline-code">linux</code>满了，很多命令都无法使用了。</div><div class="notion-blank notion-block-657b65b57b2a47a4af0767e23cb33c30"> </div><ul class="notion-list notion-list-disc notion-block-9896f9b664814bfc9f95d7f3c038a63c"><li>更新库,配置编译选项</li></ul><div class="notion-text notion-block-7516cb28c6f048d88a4747b517519296">这里的网络环境很重要的，不然就等着排查奇奇怪怪的错误吧。</div><div class="notion-text notion-block-a13c21e4390d40748041c4e45906acf2">这里就是我认为的最重要的一环了，毕竟这里我们才有了选择权</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1697b445b8f843789d9970746d806a50"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://cdn.nlark.com/yuque/0/2021/jpeg/2596791/1613396417721-5398f059-0094-4e00-bccc-ed4620846b7e.jpeg#averageHue=%23a8a8a8&amp;height=521&amp;id=szfoI&amp;originHeight=521&amp;originWidth=500&amp;originalType=binary&amp;ratio=1&amp;rotation=0&amp;showTitle=false&amp;size=28680&amp;status=done&amp;style=none&amp;title=&amp;width=500?t=1697b445-b8f8-4378-9d99-70746d806a50" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-103eb6f1b5ca42e2926f3f029ecc7c2e">这里我们要完成最基本的选择<code class="notion-inline-code">目标系统</code>,选择我们的 cpu 架构</div><div class="notion-text notion-block-1a58f80466d44ed994d9101382db925f">然后就是要编译的<code class="notion-inline-code">目标镜像</code></div><div class="notion-text notion-block-9cfc6e890fdb4005aa7cbf28ebfc10b0">不过，一些常见的路由器以及有大佬帮我们配置好默认配置了。</div><div class="notion-text notion-block-d101668e436d48e3b6e68d5ea5ad512d">我们选上去就可以进行编译了。</div><div class="notion-text notion-block-9e29dd2404f44079bc42d85b4bc86385">真正需要选择的是给路由器编译的插件。</div><div class="notion-text notion-block-6e4fe833c9e24d67bb9bf866aca5fdcf"><code class="notion-inline-code">luci -&gt; applications</code>这里就可以选择我们需要的插件了。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-0c973bd57775471ebe9add393ff5d070"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://cdn.nlark.com/yuque/0/2021/jpeg/2596791/1613396463509-5bf1784c-c971-4e76-b8e3-1f60de0b9523.jpeg#averageHue=%23a0a0a0&amp;height=541&amp;id=lLKxB&amp;originHeight=541&amp;originWidth=678&amp;originalType=binary&amp;ratio=1&amp;rotation=0&amp;showTitle=false&amp;size=86119&amp;status=done&amp;style=none&amp;title=&amp;width=678?t=0c973bd5-7775-471e-be9a-dd393ff5d070" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-61a17cf17eff4c9e96d04fca3bf2733c">上面的插件如果有什么不清楚干什么的可以尽情的百度(你懂的)</div><div class="notion-text notion-block-068d403c988c4454a4cca382523be13f"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/coolsnowwolf/lede/issues/2415">链接</a></div><div class="notion-text notion-block-84d529febf1b4350aa9d8af4bfef39be">不过，我为了体验流程流程，我几乎把每个选项都浏览一下。&lt;br /&gt;然后就是瞎几把乱选一通。（给后面留了好多坑)</div><ul class="notion-list notion-list-disc notion-block-5268ce650a8f44698bfa3ccd55d25205"><li>开始编译</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-3c3dfb96b7e348af9a7ea60cb37470f2"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://cdn.nlark.com/yuque/0/2021/jpeg/2596791/1613396488006-5aa4272b-7cce-4fe7-9966-f643c9587ebe.jpeg#averageHue=%232b2b2b&amp;height=162&amp;id=WpnfT&amp;originHeight=162&amp;originWidth=568&amp;originalType=binary&amp;ratio=1&amp;rotation=0&amp;showTitle=false&amp;size=15106&amp;status=done&amp;style=none&amp;title=&amp;width=568?t=3c3dfb96-b7e3-48af-9a7e-a60cb37470f2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-102e9fc8085c42bfbae931667b7c3d33">到了这里相信，已经非常熟悉该干什么了。</div><div class="notion-text notion-block-692e84bce5304345a34fe764c8bc9dd6">当然是刷机啦(不过我没有，因为刷机需要从新配置路由器)</div><div class="notion-text notion-block-d9e21a3c580642848d0badfc3ed38104">这里的固件只有<code class="notion-inline-code">35M</code>的大小</div><div class="notion-blank notion-block-18934c77291d43428c7b6992c497b5a1"> </div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1c303c2d76114328b3af041ac92e568d" data-id="1c303c2d76114328b3af041ac92e568d"><span><div id="1c303c2d76114328b3af041ac92e568d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1c303c2d76114328b3af041ac92e568d" title="踩坑经历"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">踩坑经历</span></span></h3><ul class="notion-list notion-list-disc notion-block-3eb7db9b40fe45e4bfdb8fa73cff598d"><li><code class="notion-inline-code">undefined reference to makedev</code></li></ul><div class="notion-text notion-block-07c5577e5ff94d08b911b77793cf545a">这是我遇到的第一个错误，也是我印象最深的一个，第一次有点难。不知所措。&lt;br /&gt;当时，真的很想去提交一个<code class="notion-inline-code">issue</code>的，不过我觉得把，这个小问题大佬一定不屑于回答，而且也没有时效性。遂放弃</div><div class="notion-text notion-block-6bfdeaa6085f425e9fc7789494dc88e6">搜索了一圈后，发现需要添加头文件。</div><div class="notion-text notion-block-bec391ab3dd744a7a07fb1336a28c0ab">出错的文件是<code class="notion-inline-code">mountlist.c</code>,在这文件里面添加<code class="notion-inline-code"># include &lt;sys/sysmacros.h</code>即可</div><ul class="notion-list notion-list-disc notion-block-fb4965e80abe4f54bad73fe7218d3a23"><li>第二则是编译<code class="notion-inline-code">openssl</code>的时候出现一点问题，不过我忘记怎么解决的了。</li></ul><div class="notion-text notion-block-93851d31801448f5865c2a2b8748444f">具体的原因就是<code class="notion-inline-code">sendmail</code>用到的<code class="notion-inline-code">openssl</code>库，但是这个库它不兼容旧版本了。出错原因就是一个类型没有具体的定义（不完全类型），解决方法是直接<code class="notion-inline-code">include</code>对于的实现文件，但是有 dalao 指出这样会使得<code class="notion-inline-code">ABI</code>不兼容，影响以后的<code class="notion-inline-code">patch</code>，这还了得，我一看，直接放弃编译这个鬼东西。</div><ul class="notion-list notion-list-disc notion-block-d454c7c98cb94fc6b01a328646015263"><li>第三个是，编译<code class="notion-inline-code">v2ray</code>出现了一点问题。&lt;br /&gt;<code class="notion-inline-code">go: finding github.com/v2ray/v2ray-core v4.22.1+incompatible</code></li></ul><div class="notion-text notion-block-32a3d548a1b141ee83dc5947969a2bc1">大概原因就是，编译的时候直接去下载依赖，但是处于鬼畜的原因&lt;br /&gt;服务器返回不了正确的结果。变成了这样<code class="notion-inline-code">server response: not found: github.com/v2ray/v2ray-core@v4.22.1+incompatible: invalid version: +incompatible suffix not allowed: module contains a go.mod file, so semantic import versioning is required</code>然后没办法下载依赖，不知道编译什么东西，就报错了。</div><div class="notion-text notion-block-a728eaeaebaa43ea8e2f75913ab4f0b8">最后的解决方法在<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/coolsnowwolf/lede/issues/3061">这里</a>,换一个代理服务器。</div><ul class="notion-list notion-list-disc notion-block-b9a5b2e491914099a32e85eb50504733"><li>到了这里，编译总算是没有报错了。不过安装的时候报错！&lt;br /&gt;又是搜索引擎走一波，发现，在选择编译选项的时候有些东西选择重复了。把这些去掉就可以了。</li></ul><div class="notion-text notion-block-d947add53c9e4b2091a5c3b70750581c">到了这里，还是非常感谢<code class="notion-inline-code">lean大</code>以及他维护的仓库的。</div><div class="notion-blank notion-block-81bd7224c8494410b7843bbfd1315c24"> </div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-c5d50b00324d4cb0b0cacfd52c3fe257" data-id="c5d50b00324d4cb0b0cacfd52c3fe257"><span><div id="c5d50b00324d4cb0b0cacfd52c3fe257" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c5d50b00324d4cb0b0cacfd52c3fe257" title="结尾"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">结尾</span></span></h3><ul class="notion-list notion-list-disc notion-block-5b6d27441ba446d4bd288c6b2fe1f50b"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/coolsnowwolf/lede/issues/3937">是否应该放弃对 8M ROM + 64M RAM 的支持</a></li></ul><div class="notion-text notion-block-b8f245a12ea34f3b8111edef23a0792f">我对固件还支持这种级别的路由器感到惊讶</div><div class="notion-text notion-block-d1c98f17257a47009f2d22b6683aca39">虽然市面一定大量存在这样的路由器的。不过这有何妨，使用这样的路由器的显然不会去关心路由器使用什么固件。对于这些人来说，原厂的固件已经足够了，足够稳了。所以，这样的路由器大多数的是一直使用原厂固件知道淘汰。此外，现在的路由器价格也便宜了，配置也高了上来。这点可以看看小米路由器的配置，感谢联发科。</div><div class="notion-text notion-block-bb57c8233cbe4bf2b4740bbdf1aeda46">说实话我自己还有一个<code class="notion-inline-code">16M ROM + 64M RAM</code>配置的路由器，不过由于性能问题，使用的<code class="notion-inline-code">pandavan</code>固件，会经常挂，根本无法使用。直接放弃即可，去卖二手，都不够邮费的。而且看看<code class="notion-inline-code">8M ROM + 64M RAM</code>路由器咸鱼上面的价格就知道了。</div><div class="notion-text notion-block-2b2b1f3ee7684f398b149dc82797b909">那些说支持的，可能它家的固件是用汇编语言写的，性能高得一批。</div><div class="notion-blank notion-block-fd3b6524aa8a463dba27669a074f78a7"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2475c2511ac04c06968468489986b09a" data-id="2475c2511ac04c06968468489986b09a"><span><div id="2475c2511ac04c06968468489986b09a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2475c2511ac04c06968468489986b09a" title="后记"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">后记</span></span></h2><div class="notion-text notion-block-087f9bcdbf5a4c1f9682a38b91a723f0">从语雀搬迁到 Notion 博客，格式有不少问题，费了不少功夫调整格式。</div><div class="notion-text notion-block-6cc2c583122d4c82b79a15b42b37389c">现在来看之前写的内容，充满一股稚气，言语之中还是有些偏激；内容和结构也无法很好给读者有实际性的参考价值，仅充当一篇胡言乱语吧（过时的乱语）。</div><div class="notion-text notion-block-132ca1851a4549d4af15fa329cb39d61">文章得到了语雀的官方认证：「内容因含敏感信息已被系统屏蔽处理，其他人无法查看」…</div><div class="notion-blank notion-block-be6b04475aeb47029b664c96e1458c0b"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[给服务器添加交换内存(Swap)]]></title>
            <link>https://dreamer2q.wang/article/add-swap-space-on-debian</link>
            <guid>https://dreamer2q.wang/article/add-swap-space-on-debian</guid>
            <pubDate>Sat, 11 Nov 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[通过创建和启用交换文件，以及配置swappiness和vfs_cache_pressure参数来优化交换空间的使用。这些步骤可以提高服务器的稳定性和性能。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-3d219206d9b04ad6a0703623ec03eb91"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-a56538d57ad44daa923723120756a5d8" data-id="a56538d57ad44daa923723120756a5d8"><span><div id="a56538d57ad44daa923723120756a5d8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#a56538d57ad44daa923723120756a5d8" title="背景"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">背景</span></span></h2><div class="notion-text notion-block-743f812a78ab4dea98bbef22dd27fcf1">最近一段时间搜索服务老是挂掉，非常怀疑是腾讯云比较垃圾（猜测是超售过多），一到关键节点就掉链子，非常让人不省心。经过简单的排查发现，服务并也没有崩溃，就是接口一直会超时，猜测是 IO 相关的问题。其实服务的 QPS 也不高，估计连 1 都不到，由于是最近才出的问题，很可能是服务器质量下降。</div><div class="notion-blank notion-block-20611623c554498f8fd10251d9275376"> </div><div class="notion-text notion-block-032b69da5ac74e699263b70ceeca211e">因此，出于稳定性和省心的考虑，还是选择一个比较靠谱一点的服务器。找来找去，最后还是选择阿里云了，如下图所示。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-14ecca65c1b34064872c5e5b3ecc1faa"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:480px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F4827ce48-fc12-40d6-af42-f7c2dfab4029%2F4cc74711-423b-41f0-8e81-e9764e1985f5%2FUntitled.jpeg?table=block&amp;id=14ecca65-c1b3-4064-872c-5e5b3ecc1faa&amp;t=14ecca65-c1b3-4064-872c-5e5b3ecc1faa&amp;width=480&amp;cache=v2" alt="阿里云ESC活动价格U1实例" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption">阿里云ESC活动价格<b>U1实例</b></figcaption></div></figure><div class="notion-text notion-block-03958bdc9f5e453984dddca364343b43">配置是 4H8G，硬盘挂载了 100G 的 SSD云盘，只不过宽带只有可怜的 1M。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-93d5b4119d944030ae61089970e77862" data-id="93d5b4119d944030ae61089970e77862"><span><div id="93d5b4119d944030ae61089970e77862" class="notion-header-anchor"></div><a class="notion-hash-link" href="#93d5b4119d944030ae61089970e77862" title="开启 Swap"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">开启 Swap</span></span></h2><div class="notion-text notion-block-157becbb73d247a4a46da457d9bfe40c">查看 swap 配置，</div><div class="notion-text notion-block-79cd36919c4e4b20bbee5c25d7535c16">显示为空，说明没有配置。</div><div class="notion-blank notion-block-600a7bc695f641d2a3118b7542213c62"> </div><div class="notion-text notion-block-9ddd94c6016a42f1a3b7c253b784c974">在根目录下创建一个 4G 的交互空间，</div><div class="notion-blank notion-block-633da11240564a2582bafb241b802089"> </div><div class="notion-text notion-block-1915bf5d3fd041729d7c8f5873f28614">开启 swap 文件，</div><div class="notion-blank notion-block-94ada716e99443eeaaddbba4265f4ca0"> </div><div class="notion-text notion-block-36d829057d714f9d895cb5f6aa6446ab">启动 swap 文件，</div><div class="notion-blank notion-block-3d8fc70f3a8d4cecafc3ac7ea0315b68"> </div><div class="notion-text notion-block-ed5e7615e81745769a1bfee6554d4dfc">查看使用情况，</div><div class="notion-blank notion-block-8fc5b58881e34362ad07ec1b721d83dc"> </div><div class="notion-text notion-block-8207fa1dcb8e4912913beab14b955568">为了重启后生效，将其添加到 <code class="notion-inline-code">/etc/fstab</code> 文件中，</div><div class="notion-blank notion-block-b7941164860e43aab8c2d7d8dfdeb0e3"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-15f7fae9f0de497292a3217529ec538e" data-id="15f7fae9f0de497292a3217529ec538e"><span><div id="15f7fae9f0de497292a3217529ec538e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#15f7fae9f0de497292a3217529ec538e" title="配置 Swap"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">配置 Swap</span></span></h2><div class="notion-text notion-block-87573ca34de3464e8d27649177657ce5"><code class="notion-inline-code">swappiness</code> 参数决定了系统针对 swap 空间的使用频率，配置范围为 <code class="notion-inline-code">0-100</code> 百分比参数。</div><div class="notion-text notion-block-77bd462ebcf54a68907d7eea0eef72e4">这里默认的参数是 0，表示不需要使用，我们来给它改成 10。适当的使用 swap 空间，对内存管理是比较友好的。</div><div class="notion-blank notion-block-91aebec5c8154595acdae6810810c914"> </div><div class="notion-blank notion-block-763af2d989af4f19ae0ac7b44ad6fc2b"> </div><div class="notion-blank notion-block-199b4aaef1774985a680ec62dc46d1be"> </div><div class="notion-text notion-block-8d7bbaafccad4c0f9258b6bca3507b8b"><code class="notion-inline-code">vfs_cache_pressure</code> 参数是用来表示内核在回收的时候，对于 dentries 和 inodes 内存的回收倾向，默认值为 100，表示会根据 pagecache 和 swapcache 给出一个合适的百分比；降低该值，将导致内核倾向于更多的保留 dentries 和 inodes 的缓存内存；提高该值，将导致内核更为激进的回收掉缓存。</div><div class="notion-text notion-block-860afbe93f624417abf5bbaf9e99ff97">这里默认值是100，表示回收策略比较积极，我们设置为50，让其保守一些。</div><div class="notion-blank notion-block-65313c3e8f2544b2b2f92b720e43ee71"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-f555dc54a31f4febbd9b5d022c6935c7" data-id="f555dc54a31f4febbd9b5d022c6935c7"><span><div id="f555dc54a31f4febbd9b5d022c6935c7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#f555dc54a31f4febbd9b5d022c6935c7" title="总结"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">总结</span></span></h2><div class="notion-text notion-block-00e7cd0a5b23447eb943278a70e85fa1">通过创建和启用交换文件，以及配置<code class="notion-inline-code">swappiness</code>和<code class="notion-inline-code">vfs_cache_pressure</code>参数来优化交换空间的使用。这些步骤可以提高服务器的稳定性和性能。</div><div class="notion-text notion-block-5bb64608d0724f50843cf45316e71fe7">— 来自AI总结</div></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>