<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="text">Xianqiao's Site</title>
  <id>https://note.xianqiao.wang/feed.xml</id>
  <updated>2024-01-15T00:04:05.711000Z</updated>
  <link href="https://note.xianqiao.wang/" />
  <link href="https://note.xianqiao.wang/feed.xml" rel="self" />
  <generator>Werkzeug</generator>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">TapUI</title>
    <id>https://note.xianqiao.wang/post/tapui</id>
    <updated>2023-12-25T12:14:51.980000Z</updated>
    <published>2023-12-22T05:07:15Z</published>
    <link href="https://note.xianqiao.wang/post/tapui" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="gem" />
    <content type="html">&lt;div&gt;定位：移动端 UI 库&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;原生 UI：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://developer.apple.com/documentation/uikit&quot;&gt;https://developer.apple.com/documentation/uikit&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://developer.android.com/reference/android/widget/package-summary&quot;&gt;https://developer.android.com/reference/android/widget/package-summary&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;已有：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://framework7.io/&quot;&gt;https://framework7.io&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://konstaui.com/&quot;&gt;https://konstaui.com/&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://ionicframework.com/&quot;&gt;https://ionicframework.com&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://onsen.io/theme-roller/&quot;&gt;https://onsen.io/theme-roller/&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;组件：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;action-sheet&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;accordion(dy-collapse)&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;alert(dy-modal?)&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">Vercel &amp;amp; Next.js</title>
    <id>https://note.xianqiao.wang/post/vercel-next-js</id>
    <updated>2023-12-04T04:14:07.498000Z</updated>
    <published>2023-11-26T03:47:04Z</published>
    <link href="https://note.xianqiao.wang/post/vercel-next-js" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="web" />
    <content type="html">&lt;div&gt;Vercel 使用 other 前端框架时需要自己配置缓存策略&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;https://v0.dev/&quot;&gt;v0&lt;/a&gt; 是 AI 生产代码&lt;/div&gt;
&lt;div&gt;静态资源 &lt;a href=&quot;https://vercel.com/docs/edge-network/overview&quot;&gt;Vercel Edge Network&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;SSR &lt;a href=&quot;https://vercel.com/docs/serverless-functions/introduction?utm_source=next-site&amp;utm_medium=learnpages&amp;utm_campaign=no-campaign&quot;&gt;Serverless Functions&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Next.js&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;仅客户端渲染使用 `dynamic`(React.lazy) // 不使用动态导入如何实现？&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;SSG 使用 &lt;a href=&quot;https://nextjs.org/docs/basic-features/data-fetching#getstaticprops-static-generation&quot;&gt;getStaticProps&lt;/a&gt;，只运行在构建时&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;SSR 使用 &lt;a href=&quot;https://nextjs.org/docs/basic-features/data-fetching#getserversideprops-server-side-rendering&quot;&gt;getServerSideProps&lt;/a&gt;，运行在每次请求&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;动态路由 &lt;a href=&quot;https://nextjs.org/docs/basic-features/data-fetching#getstaticpaths-static-generation&quot;&gt;getStaticPaths&lt;/a&gt;，只运行在构建时&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;客户端获取数据 &lt;a href=&quot;https://swr.vercel.app/&quot; style=&quot;font-weight: bold;&quot;&gt;SWR&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;[…id].js 匹配所有路由，片段以数组形式&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://nextjs.org/docs/basic-features/data-fetching#fallback-true&quot;&gt;fallback&lt;/a&gt; 路由&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://nextjs.org/docs/api-routes/introduction&quot;&gt;API Routes&lt;/a&gt; 无服务器 API&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://nextjs.org/docs/advanced-features/preview-mode&quot;&gt;Preview Mode&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;特点&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;前端代码后端运行&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;预渲染的页面只包含最少代码&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;水合（React 特性）&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">水印</title>
    <id>https://note.xianqiao.wang/post/shui-yin</id>
    <updated>2023-11-16T10:30:36.716000Z</updated>
    <published>2023-11-16T10:23:25Z</published>
    <link href="https://note.xianqiao.wang/post/shui-yin" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="security" />
    <content type="html">&lt;div&gt;用于追踪和定位&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;图像水印：&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;低对比度水印&lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;li&gt;显式水印（更多的是威慑作用）&lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;li&gt;特殊编码，例如水波纹&lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;li&gt;频域噪声水印（如何实现？）&lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;文字水印：&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;文字替换&lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;li&gt;插入零宽空格&lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;/ul&gt;</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">独立房屋设计</title>
    <id>https://note.xianqiao.wang/post/du-li-fang-wu-she-ji</id>
    <updated>2023-11-10T08:40:50.450000Z</updated>
    <published>2023-11-10T08:37:17Z</published>
    <link href="https://note.xianqiao.wang/post/du-li-fang-wu-she-ji" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="idea" />
    <content type="html">&lt;div&gt;筑梦-构筑梦想房屋&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;核心功能&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;地基设计&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;户型设计&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;界面类似 Adobe Illustrator&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">台词中最长成语接龙</title>
    <id>https://note.xianqiao.wang/post/tai-ci-zhong-zui-chang-cheng-yu-jie-long</id>
    <updated>2023-11-11T18:16:21.878000Z</updated>
    <published>2023-11-10T08:34:44Z</published>
    <link href="https://note.xianqiao.wang/post/tai-ci-zhong-zui-chang-cheng-yu-jie-long" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="algorithm" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://github.com/mantou132/javascript-learn/blob/master/chengyu.js&quot;&gt;https://github.com/mantou132/javascript-learn/blob/master/chengyu.js&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;background-color: initial;&quot;&gt;例子：&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;0-45-0-12-0-23-0-24-0=&gt; 12-24-45&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;算法：&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;div&gt;遍历成语词典使用正则找出所有成语以及成语所在位置&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;遍历所有成语，并分别向前、向后找所有成语链（需要记录链上成语防止重复查找）&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;找出最长链&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">AutoHotKey</title>
    <id>https://note.xianqiao.wang/post/autohotkey</id>
    <updated>2023-09-19T20:57:53.790000Z</updated>
    <published>2023-09-19T20:47:35Z</published>
    <link href="https://note.xianqiao.wang/post/autohotkey" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="game" />
    <content type="html">&lt;div&gt;让其工作在大多数游戏中：&lt;a shape=&quot;rect&quot; href=&quot;https://www.autohotkey.com/boards/viewtopic.php?f=7&amp;t=11084&quot;&gt;https://www.autohotkey.com/boards/viewtopic.php?f=7&amp;t=11084&lt;/a&gt;&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;admin 运行&lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;li&gt;将游戏设置成窗口或无边框，避免&lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;li&gt;延长按键时间&lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;li&gt;编译成通用名称的 exe 文件&lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;li&gt;用第二个用户运行脚本&lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;li&gt;使用虚拟机或远程操作运行游戏&lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;/ul&gt;</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">Prioritized Task Scheduling API</title>
    <id>https://note.xianqiao.wang/post/prioritized-task-scheduling-api</id>
    <updated>2023-09-13T21:38:39.378000Z</updated>
    <published>2023-09-13T20:41:04Z</published>
    <link href="https://note.xianqiao.wang/post/prioritized-task-scheduling-api" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="webapi" />
    <content type="html">&lt;div&gt;&lt;a shape=&quot;rect&quot; href=&quot;https://medium.com/airbnb-engineering/building-a-faster-web-experience-with-the-posttask-scheduler-276b83454e91&quot; target=&quot;_blank&quot;&gt;https://medium.com/airbnb-engineering/building-a-faster-web-experience-with-the-posttask-scheduler-276b83454e91&lt;/a&gt;&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;&lt;a shape=&quot;rect&quot; href=&quot;https://web.dev/optimize-long-tasks/&quot; target=&quot;_blank&quot;&gt;https://web.dev/optimize-long-tasks/&lt;/a&gt;&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;目的：方便取消、调整任务优先级&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;异步，安排在宏任务中&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;user-blocking 和 user-visible 类似，只是后者排在前者后面&lt;/div&gt;
&lt;div&gt;background 类似 requestIdleCallback() ，最低优先级&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;scheduler.yield()  让任务连续执行，不被第三方代码插入任务&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">时空旅行</title>
    <id>https://note.xianqiao.wang/post/shi-kong-lu-xing</id>
    <updated>2023-08-06T03:32:45.613000Z</updated>
    <published>2023-08-06T03:23:40Z</published>
    <link href="https://note.xianqiao.wang/post/shi-kong-lu-xing" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="game" />
    <category term="idea" />
    <category term="ml" />
    <content type="html">&lt;div&gt;用一段话描述想去的场景，然后游戏带你来到这个场景，开始你想做的任何事情，比如找路人对话、欣赏风景。&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;简单一些的 Web 版：生成静态场景（MJ 能生成吗？还是从真实照片中选择），找人对话（语音 AI 可以指定角色吗？）。&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">Denius</title>
    <id>https://note.xianqiao.wang/post/denius</id>
    <updated>2023-05-08T07:10:10.133000Z</updated>
    <published>2023-05-06T04:48:12Z</published>
    <link href="https://note.xianqiao.wang/post/denius" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="idea" />
    <category term="ml" />
    <content type="html">&lt;div&gt;调研：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://cn.eagle.cool/blog/post/must-have-ai-tool-for-designer-2023&quot;&gt;https://cn.eagle.cool/blog/post/must-have-ai-tool-for-designer-2023&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://www.fotor.com&quot;&gt;https://www.fotor.com&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://openart.ai/&quot;&gt;https://openart.ai/&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://www.craiyon.com/&quot;&gt;https://www.craiyon.com&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;一个基于 AI 的创意设计套件 // 基本上是对 Midjourney 的扩展&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;推广：社交平台机器人&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;Twitter&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Reddit&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;// @ 机器人传送命令可以做图&lt;/div&gt;
&lt;div&gt;// 使用三次后需要进行绑定才可继续使用&lt;/div&gt;
&lt;div&gt;// 账号的免费额度用完后需要充值&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;产品设计要点：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;用户体验 Web 优先&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;优化输入&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;让用户快速学会使用 Prompt，进行创作&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;集成 GPT、Whisper&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;从其他设备中经过同步后导入&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;输出准备&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;裁剪、压缩、转换&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;兼顾后续工作&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;作为原料继续创作：Canva、Illustrator、Photoshop&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;作为成品出售或者发布&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;作为资产导出&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;创意设计&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;艺术设计&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;LOGO 设计&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;转矢量&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;加背景&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;适配各种平台&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;平面广告设计&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;缩放&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;局部修改&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;Sprite 生成&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;实用工具&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;使用文本来编辑图片&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;转矢量图&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;缩放&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;涂鸦&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a rev=&quot;en_rl_none&quot; href=&quot;https://www.remove.bg/tools-api&quot;&gt;背景移除&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">AIFine</title>
    <id>https://note.xianqiao.wang/post/aifine</id>
    <updated>2023-05-07T03:41:56.204000Z</updated>
    <published>2023-05-04T19:44:07Z</published>
    <link href="https://note.xianqiao.wang/post/aifine" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="idea" />
    <category term="ml" />
    <content type="html">&lt;div&gt;打造自己的 AI 工作台。&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;strike&gt;所有 AI 工具都在这里，对话机器人、作图、图片翻新上色、制作音频视频、游戏资产、翻译、文章勘误修饰总结......，一个账号、一个 App 解决你的问题。&lt;/strike&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;潜在问题：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;AI 工具是否存在 API，不存在 API 的可能需要无头浏览器操作、沙箱嵌入？&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;AI 工具并发量，如果AI 工具对 IP、账号有限制，则需要多服务器、多账号&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;前端：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;主界面&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;添加 AI 工具&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;筛选 AI 工具&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;AI 介绍，计费规则&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;充值（简单的先充值到余额，按使用自动扣除；）&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;支付宝&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;微信&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;提现&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;登录/注册&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;未登录用户可免费使用，针对 IP 限制次数&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;使用历史，起计费监督作用，用户可查询自己如何使用&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;API：OAuth 认证，不使用 AIFine 也能具备所有 AI 工具的能力，比如命令行工具中&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;后端：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;账户系统&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;余额&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;商户端账户，微信、支付宝&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;各种 AI 工具的访问 API&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;管理平台：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;用量统计，预算&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;结算系统&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;监控平台：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;各个服务的健康状态，延时、资源占用、当前使用频率&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;定价：平价，原 AI 服务什么价格就收什么价格，未来添加自己的（开源 AI、自己训练的专用领域 AI） AI 工具&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;平台：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;主要：Web&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;次要：桌面端 App&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;最后：移动端 App、Widget 显示用量作为快捷入口&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;小程序由于入口太深、可能过不了审核先不用管&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">AI 工具</title>
    <id>https://note.xianqiao.wang/post/ai-gong-ju</id>
    <updated>2023-12-01T07:24:41.028000Z</updated>
    <published>2023-04-17T13:53:09Z</published>
    <link href="https://note.xianqiao.wang/post/ai-gong-ju" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="web" />
    <category term="ml" />
    <content type="html">&lt;div&gt;运行模型：&lt;a href=&quot;https://replicate.com/&quot; rev=&quot;en_rl_none&quot;&gt;https://replicate.com/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;Prompt：&lt;a href=&quot;https://prompthero.com/&quot; rev=&quot;en_rl_none&quot;&gt;https://prompthero.com/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;https://github.com/just-talks/tech-talks/discussions/42&quot; rev=&quot;en_rl_none&quot;&gt;https://github.com/just-talks/tech-talks/discussions/42&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;这些都是基于 ChatGPT？&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;💡  写作：Copy.ai&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;👮 虚拟说话头像：Synthesis.io&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;👩‍⚖️ AI 律师：&lt;a href=&quot;http://donotpay.com/&quot; rev=&quot;en_rl_none&quot;&gt;DoNotPay.com&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;💬 自动化社交媒体发文：Repurpose.io&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;📃 写论文： Jasper Ai&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;🖋 记会议笔记：Fireflies、Otter&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;🎤 文本语音：Descript&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;⌨️ 改写文章：Quillbot&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;🦸🏿‍♂️ Chatbot：Kuki.ai&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;✉️ 写营销邮件：Addy Ai&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;读论文：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(0, 0, 0, 0.03); color: rgb(15, 20, 25); font-family: TwitterChirp, -apple-system, system-ui, &quot;Segoe UI&quot;, Roboto, Helvetica, Arial, sans-serif; font-variant-caps: normal; font-variant-ligatures: normal;&quot;&gt;Coral AI&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;span style=&quot;color: rgb(15, 20, 25); font-family: TwitterChirp;&quot;&gt;PopAI&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;语言转文本：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;Whisper（收费 API、开源模型）&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;文字转语音：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;Microsoft 的 AI （API）&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;对话：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;ChatGPT（API）&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;文字转图片：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;MidJourney（&lt;a href=&quot;https://tokenizedhq.com/midjourney-api/&quot; rev=&quot;en_rl_none&quot;&gt;暂无 API&lt;/a&gt;，&lt;a href=&quot;https://www.imagineapi.dev/&quot; rev=&quot;en_rl_none&quot;&gt;非官方&lt;/a&gt;）&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;DALL-E&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;OpenJourney&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Pollinations&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Stable Diffusion（开源模型）&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Scribble Diffusion（需要简单手绘）&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Adobe Firefly&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Iconifyai&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;文字转音频：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;Mubert&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;文字转视频：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;Runway&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;图片转视频：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;Kaiber&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Boolv（生成产品宣传视频）&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;图片转高清：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;real-esrgan&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;图片转像素画：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://pixel-me.tokyo/&quot; rev=&quot;en_rl_none&quot;&gt;https://pixel-me.tokyo&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;图片转矢量：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;VectorizerAI&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;照片翻新：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;a style=&quot;font-size: 15px; color: rgb(29, 155, 240); font-family: TwitterChirp, -apple-system, system-ui, &quot;Segoe UI&quot;, Roboto, Helvetica, Arial, sans-serif;&quot; href=&quot;https://t.co/CXDJr0YcpM&quot;&gt;Restorephotos&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;文字转 PPT：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;Tome&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Copilot&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;文字转代码：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;CopilotX&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;视频转口音：heygen&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;中国法律助手：&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;a style=&quot;font-size: 15px; color: rgb(29, 155, 240); font-family: TwitterChirp, -apple-system, system-ui, &quot;Segoe UI&quot;, Roboto, Helvetica, Arial, sans-serif;&quot; href=&quot;https://t.co/oN21BxU00S&quot;&gt;law-cn-ai.vercel.app&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;https://openprompt.co/&quot; rev=&quot;en_rl_none&quot;&gt;https://openprompt.co/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;https://chat.forefront.ai/&quot; rev=&quot;en_rl_none&quot;&gt;https://chat.forefront.ai/&lt;/a&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">Bevy</title>
    <id>https://note.xianqiao.wang/post/bevy</id>
    <updated>2023-05-07T03:35:14.626000Z</updated>
    <published>2023-03-16T06:16:39Z</published>
    <link href="https://note.xianqiao.wang/post/bevy" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="rust" />
    <category term="game" />
    <content type="html">&lt;div&gt;bevy 的 add_system 函数作为参数 // impl IntoSystemAppConfig&lt;M&gt;&lt;/div&gt;
&lt;div&gt;system 支持各种方法 // impl_system_collection 宏&lt;/div&gt;
&lt;div&gt;system 的参数支持自由组合 // impl_system_function 宏&lt;/div&gt;
&lt;div&gt;system 的 Query 参数支持自由组合 // impl_anytuple_fetch 宏&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;app.run() 会替换 app 为 空（原因未知），不执行 run 就可以一直用 update 手动调度更新&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Reflect 组件让 world 能被序列化成 scene，&lt;a href=&quot;https://github.com/bevyengine/bevy/blob/main/examples/scene/scene.rs&quot;&gt;例子&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Bevy 例子：&lt;a href=&quot;https://dev.to/sbelzile/rust-platformer-part-1-bevy-and-ecs-2pci&quot;&gt;https://dev.to/sbelzile/rust-platformer-part-1-bevy-and-ecs-2pci&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;非官方书 &lt;a href=&quot;https://bevy-cheatbook.github.io/&quot;&gt;https://bevy-cheatbook.github.io&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;ECS 是扁平数据结构，但可以逻辑分层 &lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/hierarchy/struct.Parent.html&quot;&gt;Parent&lt;/a&gt; and &lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/hierarchy/struct.Children.html&quot;&gt;Children&lt;/a&gt;，移除实体时需要双向删除&lt;/div&gt;
&lt;div&gt;Bevy 的默认清理策略是每帧清除事件，但使用双缓冲，以便前一帧更新的事件保持可用&lt;/div&gt;
&lt;div&gt;Bundle 是创建实体的一种便利，不能直接查询&lt;/div&gt;
&lt;div&gt;全局访问的数据适合创建成资源，只在 ECS 模式中访问时创建成组件&lt;/div&gt;
&lt;div&gt;系统参数类型：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/ecs/system/struct.Res.html&quot;&gt;Res&lt;/a&gt;/&lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/ecs/system/struct.ResMut.html&quot;&gt;ResMut&lt;/a&gt; 访问资源，可使用 Option&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/ecs/system/struct.Query.html&quot;&gt;Query&lt;/a&gt; 访问实体，可使用 Option、Or&lt;(…)&gt;，&lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/ecs/query/struct.With.html&quot;&gt;With&lt;/a&gt;/&lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/ecs/query/struct.Without.html&quot;&gt;Without&lt;/a&gt;，不需要访问数据时放在第二个参数中&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/ecs/query/struct.Added.html&quot;&gt;Added&lt;T&gt;&lt;/a&gt; &lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/ecs/query/struct.Changed.html&quot;&gt;Changed&lt;T&gt;&lt;/a&gt; 过滤变化，ChangeTrackers 主动检测，由 &lt;a href=&quot;https://doc.rust-lang.org/stable/std/ops/trait.DerefMut.html&quot;&gt;DerefMut&lt;/a&gt; 实现&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;特殊的移除检测：&lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/ecs/system/struct.RemovedComponents.html&quot;&gt;RemovedComponents&lt;T&gt;&lt;/a&gt; ，Option&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/ecs/system/struct.Commands.html&quot;&gt;Commands&lt;/a&gt; 管理资源和实体、组件，&lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/ecs/event/struct.EventWriter.html&quot;&gt;EventWriter&lt;/a&gt;/&lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/ecs/event/struct.EventReader.html&quot;&gt;EventReader&lt;/a&gt; 发送和接收事件&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/ecs/system/struct.Local.html&quot;&gt;Local&lt;T&gt;&lt;/a&gt; 绑定到系统的资源，必须实现 &lt;a href=&quot;https://doc.rust-lang.org/stable/std/default/trait.Default.html&quot;&gt;Default&lt;/a&gt; 或者 &lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/ecs/world/trait.FromWorld.html&quot;&gt;FromWorld&lt;/a&gt; 用于自动初始化&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/ecs/system/struct.ParamSet.html&quot;&gt;ParamSet&lt;/a&gt; 查询多个&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;系统能并发运行，.after/.before 指定系统运行顺序&lt;/div&gt;
&lt;div&gt;app.add_state 状态能指定系统，系统中能以&lt;span style=&quot;font-weight: bold;&quot;&gt;资源&lt;/span&gt; &lt;a href=&quot;https://docs.rs/bevy/0.9.1/bevy/ecs/schedule/struct.State.html&quot;&gt;State&lt;T&gt;&lt;/a&gt; 访问，切换 state 后需要 input.rest，能指定为系统运行条件&lt;/div&gt;
&lt;div&gt;【&lt;a href=&quot;https://bevyengine.org/learn/migration-guides/0.9-0.10/&quot;&gt;0.10 没有了&lt;/a&gt;， 用 &lt;a href=&quot;https://bevy-cheatbook.github.io/programming/system-sets.html&quot;&gt;SystemSet&lt;/a&gt; 替代】 Stage 是硬同步点，同一个 Stage 上的系统并发运行完才会进入下一个 Stage，内置 Stage：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;PreStartup, Startup, PostStartup&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;First, PreUpdate, Update, PostUpdate, Last&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Extract, Prepare, Queue, PhaseSort, Render, Cleanup&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;FixedTimestep::step(1.0) 指定固定刷新周期&lt;/div&gt;
&lt;div&gt;play() 播放音频&lt;/div&gt;
&lt;div&gt;interaction 组件判断按钮状态&lt;/div&gt;
&lt;div&gt;动画？&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">秒杀系统</title>
    <id>https://note.xianqiao.wang/post/miao-sha-xi-tong</id>
    <updated>2023-05-07T03:35:28.613000Z</updated>
    <published>2023-02-18T09:30:42Z</published>
    <link href="https://note.xianqiao.wang/post/miao-sha-xi-tong" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="webserver" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://xie.infoq.cn/article/e0e97967cd2d421f23e4494b7&quot;&gt;https://xie.infoq.cn/article/e0e97967cd2d421f23e4494b7&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;特点：限时、限量、限价；活动预热；持续时间短；&lt;/div&gt;
&lt;div&gt;技术特点：瞬时并发量非常高；读多写少；流程简单；&lt;/div&gt;
&lt;div&gt;阶段：预热阶段；秒杀阶段；结算阶段；&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;提升性能方案：&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;div&gt;异步解耦，将整体流程进行拆解，核心流程通过队列方式进行控制&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;限流防刷，控制网站整体流量，提高请求的门槛，避免系统资源耗尽&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;资源控制，将整体流程中的资源调度进行控制，扬长避短&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;img src=&quot;https://cdn-images.postach.io/300e62d3-c3ba-45f5-a14e-8abaf49d8e67/d62b76ad-89a6-4a87-abd7-0e5277f2a211/435538c4-6ef0-4c65-b46f-1ab0e80963d3.jpg&quot; /&gt;&lt;/div&gt;
&lt;div&gt;Redis 分片缓存库存数据&lt;/div&gt;
&lt;div&gt;使用 OpenResty 查询&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">ChatGPT</title>
    <id>https://note.xianqiao.wang/post/chatgpt</id>
    <updated>2023-10-06T03:16:17.568000Z</updated>
    <published>2023-02-13T05:58:36Z</published>
    <link href="https://note.xianqiao.wang/post/chatgpt" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="ml" />
    <content type="html">&lt;div&gt;快速开始一个自己的类 ChatGPT 服务：&lt;a href=&quot;https://hacks.mozilla.org/2023/07/so-you-want-to-build-your-own-open-source-chatbot/&quot;&gt;https://hacks.mozilla.org/2023/07/so-you-want-to-build-your-own-open-source-chatbot/&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;http://huggingface.co/&quot;&gt;Hugging Face&lt;/a&gt; 运行的模型需要 GPU 加速，&lt;a href=&quot;https://github.com/ggerganov/llama.cpp&quot; style=&quot;font-style: italic;&quot;&gt;llama.cpp&lt;/a&gt; 使用 CPU&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://ai.meta.com/llama/&quot;&gt;LLaMA 2&lt;/a&gt; 模型开源且商业可用，上下文窗口 4096 个 token，大约 3000 个单词&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;使用嵌入（&lt;a href=&quot;https://huggingface.co/sentence-transformers/all-mpnet-base-v2&quot; style=&quot;font-style: italic;&quot;&gt;all-mpnet-base-v2&lt;/a&gt;）和矢量搜索（&lt;a href=&quot;https://github.com/facebookresearch/faiss&quot;&gt;FAISS&lt;/a&gt;）来扩展（&lt;a href=&quot;https://python.langchain.com/docs/get_started/introduction.html&quot;&gt;LangChain&lt;/a&gt;）聊天机器人的知识&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;prompt：&lt;a href=&quot;https://volnet.hashnode.dev/gpt-prompt-dev-deeplearningai&quot;&gt;https://volnet.hashnode.dev/gpt-prompt-dev-deeplearningai&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;https://www.infoq.cn/article/sqGLAIdIKP1jv2YKMd3C&quot;&gt;4.0&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;插件系统 // 能用自然语言编写插件？&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;在沙盒中运行的代码解释器&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;开源检索插件&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;使用 GPT-3 模型 // 当前闭源，通过 OpenAI 的 API 调用&lt;/div&gt;
&lt;div&gt;使用 2021 年前互联网上所有数据训练出来的&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;应用：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;儿童教育&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;生活助手：常识、分析 Idea&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;代码助理：实现思路和示例&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;文案助理：纠错、润色文章，提炼文章要点&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;产品 FQA：根据文档回答客户问题&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;危险：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;虚假信息横行&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;人和人更加疏远、虚假&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Meta 提出一个更先进的语言模型 Toolformer，能够训练自己来调用 API、做数值操作或其他操作，最终实现自动定酒店等操作&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">Web3 后端开发</title>
    <id>https://note.xianqiao.wang/post/web3-hou-duan-kai-fa</id>
    <updated>2023-05-07T03:35:30.579000Z</updated>
    <published>2023-02-12T06:07:44Z</published>
    <link href="https://note.xianqiao.wang/post/web3-hou-duan-kai-fa" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="web" />
    <content type="html">&lt;div&gt;去中心化需要很多硬件资源，在区块链上存东西是要付钱的，所以现在只存核心数据到区块链上&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;以太坊交易的状态保存在交易凭证（TransactionReceipt）中，而且即使交易被12次确认也不意味着交易在业务层面的成功，这只代表交易已经被矿工打包并在以太坊虚拟机上执行&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;合约：运行在以太坊的应用，既然是应用那么就包含编码、编译、部署、执行等方面，智能合约的出现使得人人都可以拥有自己的代币（Token Coin）&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;区块是交易的载体，而交易则记载了账户间的信息互动。智能合约则是运行在以太坊虚拟机（EVM）上的应用&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;通过智能合约和区块链进行交互&lt;/div&gt;
&lt;div&gt;web3.js 通过RPC调用与本地节点通信&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;工具：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;Truffle: 提供了一个使用以太坊虚拟机编译和测试智能合约的开发环境，用作项目中的构建依赖项&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Remix IDE: 编写和使用智能合约的完美环境，我们可以使用它直接从浏览器创建、修改和执行智能合约。它更像是一个编辑器&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;MetaMask: 一个 Chrome 扩展程序，可让您从浏览器连接到以太坊区块链网络&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Ganache: 提供了一个本地区块链环境来测试您的智能合约&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">Vite Plugin Font Chunk</title>
    <id>https://note.xianqiao.wang/post/vite-plugin-font-chunk</id>
    <updated>2023-10-30T11:39:08.352000Z</updated>
    <published>2022-10-03T07:30:29Z</published>
    <link href="https://note.xianqiao.wang/post/vite-plugin-font-chunk" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="css" />
    <category term="frontend" />
    <content type="html">&lt;div&gt;优化中文字体加载性能：分块懒加载&lt;/div&gt;
&lt;div&gt;类似标准：&lt;a href=&quot;https://www.w3.org/TR/IFT/&quot; style=&quot;font-size: 15px; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgba(var(--sk_highlight,18,100,163),1); font-family: Slack-Lato, Slack-Fractions, appleLogo, sans-serif; font-variant-caps: normal; font-variant-ligatures: common-ligatures; font-variant-numeric: normal;&quot;&gt;https://www.w3.org/TR/IFT/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Rust CLI：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;将源字体按 unicode-range 切割成多块&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;跨平台&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Python: &lt;a href=&quot;https://github.com/fonttools/fonttools&quot;&gt;https://github.com/fonttools/fonttools&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;Rust: &lt;a href=&quot;https://github.com/simoncozens/rust-font-tools&quot;&gt;https://github.com/simoncozens/rust-font-tools&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Plugin：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;生成 CSS 并插入 html&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">Win10 任务栏不能正常工作</title>
    <id>https://note.xianqiao.wang/post/win10-ren-wu-lan-bu-neng-zheng-chang-gong-zuo</id>
    <updated>2023-05-07T03:35:32.896000Z</updated>
    <published>2022-09-28T06:32:26Z</published>
    <link href="https://note.xianqiao.wang/post/win10-ren-wu-lan-bu-neng-zheng-chang-gong-zuo" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="windows" />
    <content type="html">&lt;div&gt;不能搜索，不能右键访问 App，不能打开 Action Center&lt;/div&gt;
&lt;div&gt;&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;&lt;a shape=&quot;rect&quot; href=&quot;https://answers.microsoft.com/en-us/windows/forum/all/taskbar-action-centre-and-start-menu-not-working/6e8305d8-b671-4c79-a7d0-81f885dd0686&quot; target=&quot;_blank&quot;&gt;https://answers.microsoft.com/en-us/windows/forum/all/taskbar-action-centre-and-start-menu-not-working/6e8305d8-b671-4c79-a7d0-81f885dd0686&lt;/a&gt;&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;// win+r -&gt; ctrl + shift + enter 以管理员打开 cmd&lt;/div&gt;&lt;ol&gt;&lt;li&gt;DISM.exe /Online /Cleanup-image /Restorehealth&lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;li&gt;sfc /scannow&lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;// win+x 以管理员打开 powsershell&lt;/div&gt;&lt;ol&gt;&lt;li&gt;Get-AppxPackage Microsoft.Windows.ShellExperienceHost | foreach {Add-AppxPackage -register &quot;$($_.InstallLocation)\appxmanifest.xml&quot; -DisableDevelopmentMode} &lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;li&gt;Get-AppXPackage | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register &quot;$($_.InstallLocation)\AppXManifest.xml&quot;} &lt;br clear=&quot;none&quot;/&gt;&lt;/li&gt;&lt;li&gt;重启&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;// win+r 打开 control&lt;/div&gt;
&lt;div&gt;Troubleshooting Windows Store Apps&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;&lt;br clear=&quot;none&quot;/&gt;&lt;/div&gt;
&lt;div&gt;Microsoft Store 更新 Apps&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">CheatEngine 基础教程</title>
    <id>https://note.xianqiao.wang/post/cheatengine-ji-chu-jiao-cheng</id>
    <updated>2023-05-07T03:35:38.115000Z</updated>
    <published>2022-09-15T11:04:07Z</published>
    <link href="https://note.xianqiao.wang/post/cheatengine-ji-chu-jiao-cheng" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="windows" />
    <category term="hardware" />
    <content type="html">&lt;div&gt;系统有读取其他进程内存的 API，比如 &lt;a href=&quot;https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-readprocessmemory&quot; style=&quot;color: rgba(var(--sk_highlight_hover,11,76,140),1); font-family: Slack-Lato, Slack-Fractions, appleLogo, sans-serif; font-size: 15px; font-variant-ligatures: common-ligatures; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: underline;&quot;&gt;ReadProcessMemory&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;https://www.bilibili.com/read/cv12546549/&quot;&gt;https://www.bilibili.com/read/cv12546549/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;地址空间配置随机化（ASLR）: 用模块名+偏移量的形式记录地址&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;esp 一直表示栈内存顶部地址的指针，也就是栈顶数据的内存地址&lt;/div&gt;
&lt;div&gt;eip 这个寄存器很特殊，它存储了当前执行的代码的位置&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">gdb 调试原理</title>
    <id>https://note.xianqiao.wang/post/gdb-diao-shi-yuan-li</id>
    <updated>2023-05-07T03:35:35.115000Z</updated>
    <published>2022-09-15T10:15:51Z</published>
    <link href="https://note.xianqiao.wang/post/gdb-diao-shi-yuan-li" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="linux" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://zhuanlan.zhihu.com/p/336922639&quot;&gt;https://zhuanlan.zhihu.com/p/336922639&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;gdb 常用指令：run, next, step, quit, break n, delete n, enable n, disable n, clear, where, bt, set args, show args, watch&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;gcc -g 加入调试信息&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;方式一：以子进程使用 ptrace 系统函数启动被调试程序&lt;/div&gt;
&lt;div&gt;&lt;img src=&quot;https://cdn-images.postach.io/300e62d3-c3ba-45f5-a14e-8abaf49d8e67/26b3ee35-9192-4765-bb5e-6f581f8a1e86/bd8be16d-2225-4504-9b86-d6f1ef7ca02b.jpg&quot;  width=&quot;1620&quot;/&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;方式二：gdb 使用 ptrace 函数将被调试程序收养为子进程&lt;/div&gt;
&lt;div&gt;&lt;img src=&quot;https://cdn-images.postach.io/300e62d3-c3ba-45f5-a14e-8abaf49d8e67/26b3ee35-9192-4765-bb5e-6f581f8a1e86/98749327-7664-46c9-b93d-a69253b30efd.jpg&quot;  width=&quot;1632&quot;/&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;被调试程序的所有信号都被父进程 gdb 来接管，并且父进程 gdb 可查看、修改子进程的内部信息，包括：堆栈、寄存器等&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;断点调试：替换为 INT3 指令让程序中断，汇编代码中 PC 指针(一个内部指针，指向即将执行的那行代码)执行到 INT3 指令时，于是操作系统就发送一个 SIGTRAP 信号给被调试程序，gdb 会首先接收到这 SIGTRAP个信号，把 INT3 替换为断点链表中原来的代码，把 PC 指针回退一步，也即是设置为指向原行。&lt;/div&gt;
&lt;div&gt;&lt;img src=&quot;https://cdn-images.postach.io/300e62d3-c3ba-45f5-a14e-8abaf49d8e67/26b3ee35-9192-4765-bb5e-6f581f8a1e86/64eb74d5-7cb6-410e-a77c-6eb243a9d32a.jpg&quot;  width=&quot;1432&quot;/&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">数字操作的溢出行为</title>
    <id>https://note.xianqiao.wang/post/shu-zi-cao-zuo-de-yi-chu-xing-wei</id>
    <updated>2023-05-07T03:35:37.998000Z</updated>
    <published>2022-08-26T22:17:46Z</published>
    <link href="https://note.xianqiao.wang/post/shu-zi-cao-zuo-de-yi-chu-xing-wei" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="rust" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/num/struct.Saturating.html&quot;&gt;https://doc.rust-lang.org/std/num/struct.Saturating.html&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;当涉及整数的算术操作超过最大值或最小值时，结果设置为最大值或最小值。 这被称为&quot;饱和&quot;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;https://doc.rust-lang.org/std/num/struct.Wrapping.html&quot;&gt;https://doc.rust-lang.org/std/num/struct.Wrapping.html&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;当溢出或超过最大值或最小值的任何数量被缠绕到相反的极端。 这被称为&quot;包装&quot;。&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;https://docs.rs/checked/latest/checked/&quot;&gt;https://docs.rs/checked/latest/checked/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;超过最大值或最小值保留 None 结果，这称为 Checked&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">WebRTC NACK 和 PLI</title>
    <id>https://note.xianqiao.wang/post/webrtc-nack-he-pli</id>
    <updated>2023-05-07T03:35:41.516000Z</updated>
    <published>2022-08-25T15:24:35Z</published>
    <link href="https://note.xianqiao.wang/post/webrtc-nack-he-pli" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="webrtc" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://its301.com/article/qq_41681715/109821871&quot;&gt;https://its301.com/article/qq_41681715/109821871&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(51, 51, 51); font-family: &quot;open sans&quot;, sans-serif; font-size: 14px; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;&quot;&gt;TCP 协议栈都要等对端的 ACK 确认，才能确定是否进行报文重传或者发送下一包数据&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(51, 51, 51); font-family: &quot;open sans&quot;, sans-serif; font-size: 14px; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;&quot;&gt;RTCP 当确认没有收到包是会像发起者发送 NACK 报文，让对方重发&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(51, 51, 51); font-family: &quot;open sans&quot;, sans-serif; font-size: 14px; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;&quot;&gt;// 所以 webrtc-rs 需要读取数据包，才能经过默认拦截器，才能自动发送 NACK&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(51, 51, 51); font-family: &quot;open sans&quot;, sans-serif; font-size: 14px; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(51, 51, 51); font-family: &quot;open sans&quot;;&quot;&gt;在网络环境不是太好的情况下，比如网络拥塞比较严重，丢包率可能比较高，简单实用 NACK 申请重传的机制，这样就会有大量的 RTCP NACK 报文，发送端收到相应的报文，又会发送大量指定的 RTP 报文，反而会增加网络的拥塞程度，可能导致更高的丢包率，导致接收端解码失败，导致花屏等马赛克现象。&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 51); font-family: &quot;open sans&quot;;&quot;&gt;这时采用申请I帧的方式可能会解决马赛克等现象，申请的I帧方式主要PLI（Picture Loss Indication）和FIR（Full Intra Request）两种方式。&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 51); font-family: &quot;open sans&quot;;&quot;&gt;由于I帧是关键帧，是图像内编码，图像比较大，占用较多的带宽，接收端在申请I帧时，不要刷I帧刷的太频繁（一般不小于5s），为了避免这种现象，有些厂家对接收端刷I帧刷的比较频繁，忽略掉部分FIR报文，即不响应部分I帧申请&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(51, 51, 51); font-family: &quot;open sans&quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">QOI 格式</title>
    <id>https://note.xianqiao.wang/post/qoi-ge-shi</id>
    <updated>2023-05-07T03:35:41.518000Z</updated>
    <published>2022-08-12T12:31:27Z</published>
    <link href="https://note.xianqiao.wang/post/qoi-ge-shi" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="mm" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://qoiformat.org/qoi-specification.pdf&quot;&gt;https://qoiformat.org/qoi-specification.pdf&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;真彩图片无损压缩&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;帧：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;&lt;span style=&quot;top: 183.944px; font-size: 10.625px; font-family: monospace; transform: scaleX(0.999498);&quot;&gt;QOI_OP_INDEX // 新颜色会存到索引中的索引值&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;span style=&quot;top: 392.194px; font-size: 10.625px; font-family: monospace; transform: scaleX(0.999498);&quot;&gt;QOI_OP_DIFF // &lt;/span&gt;&lt;span style=&quot;top: 719.444px; font-size: 10.625px; font-family: monospace; transform: scaleX(0.999498);&quot;&gt;和前一个像素差&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;span style=&quot;top: 719.444px; font-size: 10.625px; font-family: monospace; transform: scaleX(0.999498);&quot;&gt;QOI_OP_LUMA // 和前一个像素差&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;span style=&quot;top: 1150.82px; font-size: 10.625px; font-family: monospace; transform: scaleX(0.999498);&quot;&gt;QOI_OP_RUN // 连续相同像素数&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;span style=&quot;top: 927.694px; font-size: 10.625px; font-family: monospace; transform: scaleX(0.999498);&quot;&gt;QOI_OP_RGB // 差异大、无索引的新颜色&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;span style=&quot;top: 1150.82px; font-size: 10.625px; font-family: monospace; transform: scaleX(0.999498);&quot;&gt;QOI_OP_RGBA // &lt;/span&gt;&lt;span style=&quot;top: 927.694px; font-size: 10.625px; font-family: monospace; transform: scaleX(0.999498);&quot;&gt;差异大、无索引的&lt;/span&gt;&lt;span style=&quot;top: 1150.82px; font-size: 10.625px; font-family: monospace; transform: scaleX(0.999498);&quot;&gt;新颜色&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">多人视频通讯架构Mesh/MCU/SFU</title>
    <id>https://note.xianqiao.wang/post/duo-ren-shi-pin-tong-xun-jia-gou-mesh-mcu-sfu</id>
    <updated>2023-05-07T03:35:40.914000Z</updated>
    <published>2022-08-11T15:48:55Z</published>
    <link href="https://note.xianqiao.wang/post/duo-ren-shi-pin-tong-xun-jia-gou-mesh-mcu-sfu" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="webrtc" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://blog.p2hp.com/archives/8329&quot;&gt;https://blog.p2hp.com/archives/8329&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;// 需打开防火墙 UDP 端口&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;只有使用 WebRTC 才能传输音/视频流 // &lt;a href=&quot;https://w3c.github.io/mediacapture-transform/&quot;&gt;insertable mediastream&lt;/a&gt; 可以从帧制作视频流&lt;/div&gt;
&lt;div&gt;MediaRecord + WebSocket 不行&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;img src=&quot;https://cdn-images.postach.io/300e62d3-c3ba-45f5-a14e-8abaf49d8e67/510ee0f9-d35c-4316-8c00-8d81deeb1235/8df04920-de54-412a-98d1-62798abd079e.png&quot; /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">SKU 筛选问题</title>
    <id>https://note.xianqiao.wang/post/sku-shai-xuan-wen-ti</id>
    <updated>2023-05-07T03:35:45.281000Z</updated>
    <published>2022-08-07T09:41:47Z</published>
    <link href="https://note.xianqiao.wang/post/sku-shai-xuan-wen-ti" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="algorithm" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://juejin.cn/post/6844904196349640718&quot;&gt;https://juejin.cn/post/6844904196349640718&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;多个商品根据参数和规格进行筛选&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;解法：&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;div&gt;根据每个可供选择商品 SKU 画出无向图（两两节点互相连）&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;同一个参数下的不同规格互相连（选了红色时允许选其他颜色）&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;映射到邻接矩阵（所有可能值的二维矩阵，每个节点连接的节点写入矩阵）&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;筛选（选中一个值时，其他可选项能在矩阵中看出来）&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;img src=&quot;https://cdn-images.postach.io/300e62d3-c3ba-45f5-a14e-8abaf49d8e67/b6f80ba4-2c27-487e-9bcb-60f502f6307a/61b7075b-cb80-4578-9be3-25628b7cd609.webp&quot; /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;img src=&quot;https://cdn-images.postach.io/300e62d3-c3ba-45f5-a14e-8abaf49d8e67/b6f80ba4-2c27-487e-9bcb-60f502f6307a/9fbdbc13-f65d-4ded-a1df-fd5a1b4e4986.webp&quot; /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">Rust 性能分析</title>
    <id>https://note.xianqiao.wang/post/rust-xing-neng-fen-xi</id>
    <updated>2023-05-07T03:35:45.233000Z</updated>
    <published>2022-08-04T19:55:18Z</published>
    <link href="https://note.xianqiao.wang/post/rust-xing-neng-fen-xi" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="rust" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://juejin.cn/post/7045159135343542280&quot;&gt;https://juejin.cn/post/7045159135343542280&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;On-CPU 的性能分析为了找出占用CPU时间多的任务或者函数，进而找出程序的性能瓶颈&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;linux 下使用 pref 命令&lt;/div&gt;
&lt;div&gt;macOS 下&lt;a href=&quot;https://chinadtrace.org/use-dtrace-flamegraph-profile-rust/&quot;&gt;使用 dtrace&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;FlameGraph 可视化调用栈&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Rust编译器默认加入了 DWARF 调试信息&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Off-CPU 性能分析是为了分析进程花在等待上的时间，等待包括被I/O请求阻塞，等待锁，等待timer，等等&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;https://github.com/AtheMathmo/cpuprofiler&quot;&gt;https://github.com/AtheMathmo/cpuprofiler&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">Bloom Filter</title>
    <id>https://note.xianqiao.wang/post/bloom-filter</id>
    <updated>2023-05-07T06:04:57.693000Z</updated>
    <published>2022-08-04T13:35:54Z</published>
    <link href="https://note.xianqiao.wang/post/bloom-filter" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="algorithm" />
    <content type="html">&lt;div&gt;静态全文搜索：&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;搜索内容集成到搜索引擎中&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;原始方法：&lt;a href=&quot;http://en.wikipedia.org/wiki/Inverted_index&quot;&gt;inverted index&lt;/a&gt;，缺点体量大&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;&lt;a href=&quot;https://www.stavros.io/posts/bloom-filter-search-engine/&quot;&gt;https://www.stavros.io/posts/bloom-filter-search-engine/&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Bloom_filter&quot;&gt;https://en.wikipedia.org/wiki/Bloom_filter&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;&lt;a href=&quot;https://github.com/tinysearch/tinysearch&quot;&gt;https://github.com/tinysearch/tinysearch&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;&lt;a href=&quot;https://arxiv.org/abs/1912.08258&quot; style=&quot;text-decoration: underline;&quot;&gt;https://arxiv.org/abs/1912.08258&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;布隆过滤器的原理是，当一个元素被加入集合时，通过 K 个散列函数将这个元素映射成一个位数组中的 K 个点，把它们置为 1。检索时，我们只要看看这些点是不是都是 1 就（大约）知道集合中有没有它了：如果这些点有任何一个 0，则被检元素&lt;span style=&quot;font-weight: bold;&quot;&gt;一定不在&lt;/span&gt;；如果都是 1，则被检元素很可能在。&lt;/div&gt;
&lt;div&gt;// 每篇文章有个位数组，每个单词通过散列函数映射到数组中的几个点并标记成 1，搜索时只需要在散列计算判断那几个点是否为 1 即可。&lt;/div&gt;&lt;div style=&quot;margin-top: 1em; margin-bottom: 1em;&quot;&gt;&lt;span style=&quot;-en-paragraph:true;&quot;&gt;布隆过滤器的典型应用有：
&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;数据库防止穿库。 Google Bigtable，HBase 和 Cassandra 以及 Postgresql 使用 BloomFilter来减少不存在的行或列的磁盘查找。避免代价高昂的磁盘查找会大大提高数据库查询操作的性能。&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;业务场景中判断用户是否阅读过某视频或文章，比如抖音或头条，当然会导致一定的误判，但不会让用户看到重复的内容。&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;缓存宕机、缓存击穿场景，一般判断用户是否在缓存中，如果在则直接返回结果，不在则查询db，如果来一波冷数据，会导致缓存大量击穿，造成雪崩效应，这时候可以用布隆过滤器当缓存的索引，只有在布隆过滤器中，才去查询缓存，如果没查询到，则穿透到 db。如果不在布隆器中，则直接返回。&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Web 拦截器，如果相同请求则拦截，防止重复被攻击。用户第一次请求，将请求参数放入布隆过滤器中，当第二次请求时，先判断请求参数是否被布隆过滤器命中。可以提高缓存命中率。Squid 网页代理缓存服务器在 cache digests 中就使用了布隆过滤器。Google Chrome浏览器使用了布隆过滤器加速安全浏览服务&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Venti 文档存储系统也采用布隆过滤器来检测先前存储的数据。&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;SPIN 模型检测器也使用布隆过滤器在大规模验证问题时跟踪可达状态空间。&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">柯里化函数类型</title>
    <id>https://note.xianqiao.wang/post/ke-li-hua-han-shu-lei-xing</id>
    <updated>2023-12-07T06:48:47.105000Z</updated>
    <published>2022-08-03T11:09:05Z</published>
    <link href="https://note.xianqiao.wang/post/ke-li-hua-han-shu-lei-xing" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="typescript" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://medium.com/codex/currying-in-typescript-ca5226c85b85&quot;&gt;https://medium.com/codex/currying-in-typescript-ca5226c85b85&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;&lt;div&gt;// 函数范型，部分开始参数&lt;/div&gt;
&lt;div&gt;function curry&amp;lt;FN extends (...args: any[]) =&amp;gt; any, STARTING_ARGS extends PartialParameters&amp;lt;FN&amp;gt;&amp;gt;(&lt;/div&gt;
&lt;div&gt;  targetFn: FN,&lt;/div&gt;
&lt;div&gt;  ...existingArgs: STARTING_ARGS&lt;/div&gt;
&lt;div&gt;): CurriedFunction&amp;lt;STARTING_ARGS, FN&amp;gt; {&lt;/div&gt;
&lt;div&gt;  return function (...args) {&lt;/div&gt;
&lt;div&gt;    const totalArgs = [...existingArgs, ...args];&lt;/div&gt;
&lt;div&gt;    if (totalArgs.length &amp;gt;= targetFn.length) {&lt;/div&gt;
&lt;div&gt;      return targetFn(...totalArgs);&lt;/div&gt;
&lt;div&gt;    }&lt;/div&gt;
&lt;div&gt;    return curry(targetFn, ...(totalArgs as PartialParameters&amp;lt;FN&amp;gt;));&lt;/div&gt;
&lt;div&gt;  };&lt;/div&gt;
&lt;div&gt;}&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;// 柯里化后的返回值，参数（NEW_ARGS）是剩余参数的一部分，如果参数不够则需要迭代&lt;/div&gt;
&lt;div&gt;type CurriedFunction&amp;lt;PROVIDED extends any[], FN extends (...args: any[]) =&amp;gt; any&amp;gt; = &amp;lt;&lt;/div&gt;
&lt;div&gt;  NEW_ARGS extends PartialTuple&amp;lt;RemainingParameters&amp;lt;PROVIDED, Parameters&amp;lt;FN&amp;gt;&amp;gt;&amp;gt;,&lt;/div&gt;
&lt;div&gt;&amp;gt;(&lt;/div&gt;
&lt;div&gt;  ...args: NEW_ARGS&lt;/div&gt;
&lt;div&gt;) =&amp;gt; CurriedFunctionOrReturnValue&amp;lt;[...PROVIDED, ...NEW_ARGS], FN&amp;gt;;&lt;/div&gt;
&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;div&gt;// 没有剩余参数时返回函数返回值，否则返回多了已有参数的柯里化函数&lt;/div&gt;&lt;/div&gt;&lt;div&gt;type CurriedFunctionOrReturnValue&lt;PROVIDED extends any[], FN extends (...args: any[]) =&gt; any&gt; = RemainingParameters&lt;&lt;/div&gt;
&lt;div&gt;  PROVIDED,&lt;/div&gt;
&lt;div&gt;  Parameters&lt;FN&gt;&lt;/div&gt;
&lt;div&gt;&gt; extends [any, ...any[]]&lt;/div&gt;
&lt;div&gt;  ? CurriedFunction&lt;PROVIDED, FN&gt;&lt;/div&gt;
&lt;div&gt;  : ReturnType&lt;FN&gt;;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;// 转换为可选元组&lt;/div&gt;&lt;/div&gt;&lt;div&gt;type PartialTuple&lt;TUPLE extends any[], EXTRACTED extends any[] = []&gt; =&lt;/div&gt;
&lt;div&gt;  // If the tuple provided has at least one required value&lt;/div&gt;
&lt;div&gt;  TUPLE extends [infer NEXT_PARAM, ...infer REMAINING]&lt;/div&gt;
&lt;div&gt;    ? // recurse back in to this type with one less item&lt;/div&gt;
&lt;div&gt;      // in the original tuple, and the latest extracted value&lt;/div&gt;
&lt;div&gt;      // added to the extracted list as optional&lt;/div&gt;
&lt;div&gt;      PartialTuple&lt;REMAINING, [...EXTRACTED, NEXT_PARAM?]&gt;&lt;/div&gt;
&lt;div&gt;    : // else if there are no more values,&lt;/div&gt;
&lt;div&gt;      // return an empty tuple so that too is a valid option&lt;/div&gt;
&lt;div&gt;      [...EXTRACTED, ...TUPLE];&lt;/div&gt;
&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;// 获取部分参数（可选）&lt;/div&gt;&lt;/div&gt;&lt;div&gt;type PartialParameters&lt;FN extends (...args: any[]) =&gt; any&gt; = PartialTuple&lt;Parameters&lt;FN&gt;&gt;;&lt;/div&gt;
&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;// 获取剩余参数，提供的参数类型必须符合期望参数类型&lt;/div&gt;
&lt;div&gt;type RemainingParameters&lt;PROVIDED extends any[], EXPECTED extends any[]&gt; =&lt;/div&gt;
&lt;div&gt;  // if the expected array has any required items…&lt;/div&gt;
&lt;div&gt;  EXPECTED extends [infer E1, ...infer EX]&lt;/div&gt;
&lt;div&gt;    ? // if the provided array has at least one required item&lt;/div&gt;
&lt;div&gt;      PROVIDED extends [infer P1, ...infer PX]&lt;/div&gt;
&lt;div&gt;      ? // if the type is correct, recurse with one item less&lt;/div&gt;
&lt;div&gt;        //in each array type&lt;/div&gt;
&lt;div&gt;        P1 extends E1&lt;/div&gt;
&lt;div&gt;        ? RemainingParameters&lt;PX, EX&gt;&lt;/div&gt;
&lt;div&gt;        : // else return this as invalid&lt;/div&gt;
&lt;div&gt;          never&lt;/div&gt;
&lt;div&gt;      : // else the remaining args is unchanged&lt;/div&gt;
&lt;div&gt;        EXPECTED&lt;/div&gt;
&lt;div&gt;    : // else there are no more arguments&lt;/div&gt;
&lt;div&gt;      [];&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">素数伴侣</title>
    <id>https://note.xianqiao.wang/post/su-shu-ban-lu</id>
    <updated>2023-05-07T03:35:56.407000Z</updated>
    <published>2022-07-19T07:02:40Z</published>
    <link href="https://note.xianqiao.wang/post/su-shu-ban-lu" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="algorithm" />
    <content type="html">&lt;div&gt;若两个正整数的和为素数，则这两个正整数称之为&quot;素数伴侣&quot;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;判断素数：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;不是偶数且不能被5整除且不能被小于它的平方根（因为大于平方根的数的另一个乘数必须小于它，小于平方根的数已经被测试过了）的所有奇数整除&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;正则非贪婪匹配再判断是否整除 !/^.?$|^(..+?)\1+$/.test(Array(num+1).join('1'))&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;匈牙利算法：&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;div&gt;将输入的&lt;span style=&quot;font-weight: bold;&quot;&gt;奇数偶数分两组&lt;/span&gt;，建立二分图，两两相组合能得到素数的就赋 1；&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;再建立全局的连接表 modd 和 meven，记录该奇数（偶数）连接的偶数（奇数）；&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;然后遍历每个奇数，每个奇数在寻找合适的偶数时，建立一个 visit 记录在该轮查找中已经搜过的偶数，匈牙利的原则就是&quot;先到先得，能让就让，不能让就拜拜&quot;，所以在确定合适偶数对象时，如果该偶数没有被配对过，直接绑定，若它被配对了，&lt;span style=&quot;font-weight: bold;&quot;&gt;那就让配对它的那个奇数再去找其他的偶数进行配对&lt;/span&gt;，以此类推进行递归，若到了某个位置发现找到了，则这条新的配对方案建立，&lt;span style=&quot;font-weight: bold;&quot;&gt;比之前的配对个数多了 1&lt;/span&gt;，若没找到，则保持原先的方案。&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">工业互联网产品</title>
    <id>https://note.xianqiao.wang/post/gong-ye-hu-lian-wang-chan-pin</id>
    <updated>2023-05-07T03:35:56.708000Z</updated>
    <published>2022-07-16T06:19:41Z</published>
    <link href="https://note.xianqiao.wang/post/gong-ye-hu-lian-wang-chan-pin" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="web" />
    <content type="html">&lt;div&gt;行业厂商：&lt;a href=&quot;https://www.honeywell.com.cn&quot;&gt;https://www.honeywell.com.cn&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;ERP：企业资源规划&lt;/div&gt;
&lt;div&gt;MES：制造执行系统&lt;/div&gt;
&lt;div&gt;WMS：库存管理系统&lt;/div&gt;
&lt;div&gt;PLM：产品生命周期管理&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">工程师软技能</title>
    <id>https://note.xianqiao.wang/post/gong-cheng-shi-ruan-ji-neng</id>
    <updated>2023-05-07T03:36:00.471000Z</updated>
    <published>2022-07-02T06:21:56Z</published>
    <link href="https://note.xianqiao.wang/post/gong-cheng-shi-ruan-ji-neng" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="code" />
    <content type="html">&lt;div&gt;批判性思考并提出合理的论点，&lt;span style=&quot;color: #494949;&quot;&gt;如果我们没有充分考虑原因和后果，这可能会带来风险&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(73, 73, 73);&quot;&gt;熟练掌握&quot;可转移&quot;技能，&lt;/span&gt;&lt;span style=&quot;color: #494949;&quot;&gt;包括：语言、框架、堆栈、数据结构（数组、对象、模块、哈希）、算法（搜索、排序）、架构（设计模式、状态管理）甚至性能优化（例如缓存、延迟加载等）&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(73, 73, 73);&quot;&gt;专注于用户，其余的将随之而来&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(73, 73, 73);&quot;&gt;打造技能的深度与广度，T 型&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(73, 73, 73);&quot;&gt;通用代码与特定代码，避免未来重构&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(73, 73, 73);&quot;&gt;在维护项目中学习&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(73, 73, 73);&quot;&gt;设计文档的重要性，不仅仅要需求类的文档，也可以有代码实现的设计文档&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(73, 73, 73);&quot;&gt;拒绝的力量，&lt;/span&gt;&lt;span style=&quot;color: #494949;&quot;&gt;过度承诺是一种责任&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #494949;&quot;&gt;坚持优先处理技术债务&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(73, 73, 73);&quot;&gt;工作与生活的平衡，&lt;/span&gt;&lt;span style=&quot;color: #494949;&quot;&gt;专注于深度工作&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(73, 73, 73);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(73, 73, 73);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(73, 73, 73);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(73, 73, 73);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: rgb(73, 73, 73);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">localStorage</title>
    <id>https://note.xianqiao.wang/post/localstorage</id>
    <updated>2023-05-07T03:35:53.289000Z</updated>
    <published>2022-06-26T17:42:05Z</published>
    <link href="https://note.xianqiao.wang/post/localstorage" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="webapi" />
    <content type="html">&lt;div&gt;localStorage 由于是同步的，浏览器为了保证性能，所以是异步持久化的，在两个标签页不同步，同步有百来毫米延迟。&lt;/div&gt;
&lt;div&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">NESBox 平台</title>
    <id>https://note.xianqiao.wang/post/nesbox-ping-tai</id>
    <updated>2023-12-22T05:11:11.089000Z</updated>
    <published>2022-05-01T21:09:38Z</published>
    <link href="https://note.xianqiao.wang/post/nesbox-ping-tai" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="game" />
    <category term="idea" />
    <content type="html">&lt;div&gt;类似产品：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;游聚&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://www.webrcade.com/&quot;&gt;https://www.webrcade.com/&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://www.wo1wan.com/&quot;&gt;https://www.wo1wan.com/&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://game.seenav.cn/&quot;&gt;https://game.seenav.cn&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://www.yikm.net/&quot;&gt;https://www.yikm.net/&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;http://www.8bbit.com/&quot;&gt;http://www.8bbit.com/&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://github.com/libretro/RetroArch/blob/master/libretro-common/include/libretro.h&quot;&gt;Libretro&lt;/a&gt;，有多人游戏方案 &lt;a href=&quot;https://docs.libretro.com/development/retroarch/netplay/&quot;&gt;Netplay&lt;/a&gt;（同步输入）&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://itch.io/&quot;&gt;https://itch.io&lt;/a&gt; // 独立游戏发布平台&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;UI 参考 Steam、App Store、LOL&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;类似 Unity 的游戏引擎&lt;/div&gt;
&lt;div&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;
&lt;div&gt;攻能：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;Dashboard&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;挑选游戏开始（实际是开私人房间）&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;游戏详情&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;设置&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;昵称&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;自定义按键&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;画质增强&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;多人游戏&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;公共房间，可以选择进入&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;上下机&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;span style=&quot;text-decoration: line-through;&quot;&gt;换房主&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;换游戏&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;房间聊天&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;文字聊天&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;语音聊天&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;用户系统（当前 WebSocket 的使用方式导致不满足云原生应用要求，接 MQ 可解决）&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;自己喜欢的游戏&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;游戏评论&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;游戏存档，可继续游戏&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;好友系统&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;聊天&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;邀请&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;
&lt;div&gt;TV 版功能：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;Library&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Recents&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Rooms&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Room&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;上下文菜单&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;连接/断开语音&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;邀请好友&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;保存截图&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;设置&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;语言&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;数据库：&lt;a shape=&quot;rect&quot; href=&quot;https://app.sqldbm.com/PostgreSQL/Edit/p214596/&quot; target=&quot;_blank&quot;&gt;https://app.sqldbm.com/PostgreSQL/Edit/p214596/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;img src=&quot;https://cdn-images.postach.io/300e62d3-c3ba-45f5-a14e-8abaf49d8e67/04f5e711-c258-48ec-81ce-3fb80bfe523e/3531c750-fb91-442a-b9ea-824b176788c3.png&quot; /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;技术栈：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;后端&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;diesel-pg&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://graphql-rust.github.io/juniper/master/advanced/index.html&quot;&gt;juniper&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;actix-web&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;websocket 消息订阅&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;webrtc 语音通话&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;Web&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;gemjs&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;span style=&quot;text-decoration: line-through;&quot;&gt;nes_rust_wasm&lt;/span&gt; tetanes&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;Mobile：Flutter&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Desktop：Tauri&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;遇到的问题：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;根据游戏 ROM hash 进行状态储存，使用 Caches API，截图、日期存在 URL 参数中，避免使用复杂的 indexedDB，缓存 Wasm.memory 或者 Rust 对象二进制序列化&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;传输 Canvas 流会压缩导致颜色失真，使用 qoi 压缩传输帧。曾尝试过 WebCodec 媒体流，它有音画不同步的问题。&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;视频延时大，根据 Ping 值使用降帧方案，并禁用 WebRTC 的顺序传输，修剪帧传输&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;语音系统，使用服务器 WebRTC 转发&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;添加金手指功能，游戏组件庞大，拆分组件&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Tauri 的问题：MacOS localstorage、加载白屏&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;消除噪音（不需要改变播放速度），远端音画同步&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;统一渲染滤镜到前端（WebGL）&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;支持自制 js 游戏，沙盒保证安全（暴露 OffscreenCanvas，AudioContext 和 WebGPU）&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;字体渲染&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;音频输出&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;动画&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;资源压缩&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;半像素渲染&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;2d 碰撞？&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;支持自制 wasm 游戏（同步、资源无限制）&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;安全性 // 有些意外导入，例如 Function 构造器&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;使用 bevy_ecs&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;input resource&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;schedule&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;save state(&lt;a href=&quot;https://github.com/bevyengine/bevy/blob/main/examples/scene/scene.rs#L116&quot;&gt;bevy example&lt;/a&gt;, 依赖 bevy_render, bevy_assets) // wasm memory&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;render plugin&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;层级，变换&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;文本&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;贴图&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;audio plugin&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;渲染顺序 // 当前用的 z 轴比较&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;五子棋 AI // 博弈树极大极小值 alpha-beta 剪枝搜索&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;2d 碰撞？&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;支持街机(&lt;a href=&quot;https://www.retrostic.com/&quot;&gt;ROMs 下载&lt;/a&gt;)，Emscripten 编译 C++ 模拟器&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Libretro 的 &lt;a href=&quot;https://wasm4.org/&quot;&gt;wasm4&lt;/a&gt;：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;无胶水代码 // 如何渲染到屏幕？&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;类似 NES 平台，资源有限制&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;支持  &lt;a href=&quot;https://www.youtube.com/watch?v=0NLe4IpdS1w&quot;&gt;rollback netcode&lt;/a&gt; // 预测，内存回滚&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;8bit font: &lt;a href=&quot;https://load.retroemulator.com/fonts/8bit.woff2&quot;&gt;https://load.retroemulator.com/fonts/8bit.woff2&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;https://zhuanlan.zhihu.com/p/34144965&quot;&gt;NES 图像&lt;/a&gt;：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;背景&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;8x8 为 tile，16x16 为 block&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;一个 tile 从 chr 中索引到，chr 最多存 256 个 tile，用命名表来索引 // 总共 960 字节的索引&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;一个背景 4 个调色板，1 个调色板 4 个颜色，包括一个共享颜色，16 字节 // 所以最多 10 个颜色&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;一个 block 最多 1 个调色板，属性表用来表示 block 使用的调色板 // 64 字节的调色板索引&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;2 个命名表形成滚动效果&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;Sprite&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;也是一个 Tile 8x8，一般是多个 Sprite 组成一个角色&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;也有自己的 CHR 页，一套 4 个调色板&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;一个 Sprite 需要 Y 坐标、Tile 索引、属性（调色板、翻转、和背景相对深度）、X 坐标 4 个字节&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;总共 256 字节空间记录所有 Sprite 的位置和状态 // 所以最多 64 个 Sprite，多于 64 时只会保存最新存在内存中的，所以会闪烁&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;MacOS 禁用&lt;a href=&quot;https://www.reddit.com/r/macgaming/comments/qi1i6h/playstation_dualsense_controller_home_button/&quot;&gt;手柄按钮打开 launchpad&lt;/a&gt;：&lt;/div&gt;&lt;pre&gt;&lt;div&gt;defaults write com.apple.GameController bluetoothPrefsMenuLongPressAction -integer 0&lt;/div&gt;
&lt;div&gt;defaults write com.apple.GameController bluetoothPrefsShareLongPressSystemGestureMode -integer -1&lt;/div&gt;&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">Rust 临时声明周期扩展</title>
    <id>https://note.xianqiao.wang/post/rust-lin-shi-sheng-ming-zhou-qi-kuo-zhan</id>
    <updated>2023-05-07T03:35:52.916000Z</updated>
    <published>2022-04-26T06:56:43Z</published>
    <link href="https://note.xianqiao.wang/post/rust-lin-shi-sheng-ming-zhou-qi-kuo-zhan" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="rust" />
    <content type="html">&lt;div&gt;&lt;a shape=&quot;rect&quot; href=&quot;https://doc.rust-lang.org/reference/destructors.html#temporary-lifetime-extension&quot;&gt;https://doc.rust-lang.org/reference/destructors.html#temporary-lifetime-extension&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;pre&gt;&lt;div&gt;fn main() {&lt;/div&gt;
&lt;div&gt;  let foo = &amp;String::new();&lt;/div&gt;
&lt;div&gt;  foo;&lt;/div&gt;
&lt;div&gt;  // compile error&lt;/div&gt;
&lt;div&gt;  let bar = String::new().as_bytes();&lt;/div&gt;
&lt;div&gt;  bar;&lt;/div&gt;
&lt;div&gt;}&lt;/div&gt;&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;zhihu:&lt;/div&gt;
&lt;div&gt;能编译通过的例子中有两个value，一个是String，一个是&amp;String，后者是个 ordinary pointer，后者被赋值给了一个变量，前者没有赋值给任何变量，因为前者一直被后者指向，所以在后者的生存期内前者一直存活，所以前者在当前语句结束后、在当前语句块结束前一直存活。再看不能编译通过的例子，也有两个value，一个是String，一个是&amp;[u8]。后者是个two-word pointer，指向前者管理的堆内存地址而不是指向前者本身。所以前者既没有被赋给一个变量（绑定一个alias）也没有被其他指针指向，所以rust认为它的生存期该结束了，决定销毁这个value，同时决定free掉这个value所管理的堆数组，这样以来第二个value 就变成 dangling pointer了。所以编译无法通过。下面返回&amp;'static [u8]这个就更好理解了，因为那个那个数组字面量的内容和长度已经在编译时刻就确定了，指定了’static，编译完成的时候这个数组是放在静态数据区的，而不是运行时刻在栈上构造的。返回一个指向静态数据区的指针当然没问题。&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">Node 程序员对 Rust 的疑问</title>
    <id>https://note.xianqiao.wang/post/node-cheng-xu-yuan-dui-rust-de-yi-wen</id>
    <updated>2023-05-07T03:35:16.873000Z</updated>
    <published>2022-04-22T04:03:15Z</published>
    <link href="https://note.xianqiao.wang/post/node-cheng-xu-yuan-dui-rust-de-yi-wen" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="rust" />
    <content type="html">&lt;div&gt;dyn Foo 和 impl Foo 的区别是代码量和运行速度？&lt;/div&gt;
&lt;div&gt;let x: &amp;dyn Foo = &amp;Impl;&lt;/div&gt;
&lt;div&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;
&lt;div&gt;用于引用的转化操作？&lt;/div&gt;
&lt;div&gt;let v: &amp;mut i32 = Box::new(0).as_mut();&lt;/div&gt;
&lt;div&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;
&lt;div&gt;下面的冒号相当于 ts 的 extends？&lt;/div&gt;
&lt;div&gt;struct Bar&lt;T: ?Sized&gt;(T);&lt;/div&gt;
&lt;div&gt;trait FromStr: Sized {}&lt;/div&gt;
&lt;div&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">Unity</title>
    <id>https://note.xianqiao.wang/post/unity</id>
    <updated>2023-05-07T03:36:10.482000Z</updated>
    <published>2022-03-20T04:37:45Z</published>
    <link href="https://note.xianqiao.wang/post/unity" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="game" />
    <content type="html">&lt;div&gt;火锅下楼梯：&lt;/div&gt;
&lt;div style=&quot;--en-richlink:true; --en-href:https://www.youtube.com/watch?v=nPW6tKeapsM; --en-viewerProps:&quot;{\&quot;videoId\&quot;:\&quot;nPW6tKeapsM\&quot;}&quot;;&quot;&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=nPW6tKeapsM&quot; rev=&quot;en_rl_small&quot;&gt;https://www.youtube.com/watch?v=nPW6tKeapsM&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Entity &amp; Component：&lt;/div&gt;
&lt;div&gt;Camera&lt;/div&gt;
&lt;div&gt;Player&lt;/div&gt;
&lt;div style=&quot;padding-left:40px;&quot;&gt;update:&lt;/div&gt;
&lt;div style=&quot;padding-left:80px;&quot;&gt;Time.deltaTime&lt;/div&gt;
&lt;div style=&quot;padding-left:80px;&quot;&gt;Time.timeScale&lt;/div&gt;
&lt;div style=&quot;padding-left:80px;&quot;&gt;KeyCode&lt;/div&gt;
&lt;div style=&quot;padding-left:40px;&quot;&gt;SpriteRenderer // 渲染图片&lt;/div&gt;
&lt;div style=&quot;padding-left:40px;&quot;&gt;BoxCollider2D // 碰撞体&lt;/div&gt;
&lt;div style=&quot;padding-left:80px;&quot;&gt;OnCollisionEnter2D&lt;/div&gt;
&lt;div style=&quot;padding-left:120px;&quot;&gt;normal // 法线&lt;/div&gt;
&lt;div style=&quot;padding-left:120px;&quot;&gt;other // 碰撞目标&lt;/div&gt;
&lt;div style=&quot;padding-left:40px;&quot;&gt;RigidBody2D // 自由落体&lt;/div&gt;
&lt;div style=&quot;padding-left:40px;&quot;&gt;Animator&lt;/div&gt;
&lt;div style=&quot;padding-left:80px;&quot;&gt;Parameters:&lt;/div&gt;
&lt;div style=&quot;padding-left:120px;&quot;&gt;Boolean&lt;/div&gt;
&lt;div style=&quot;padding-left:120px;&quot;&gt;Trigger // 触发动画&lt;/div&gt;
&lt;div style=&quot;padding-left:80px;&quot;&gt;Controller: PlayerController&lt;/div&gt;
&lt;div style=&quot;padding-left:120px;&quot;&gt;BaseLayer: idle &lt;-&gt; run // 按条件执行转换&lt;/div&gt;
&lt;div style=&quot;padding-left:120px;&quot;&gt;PlayerHurt: SpriteRenderer color change // 执行 3 次后自动退出&lt;/div&gt;
&lt;div style=&quot;padding-left:40px;&quot;&gt;Audio&lt;/div&gt;
&lt;div&gt;FloorManager&lt;/div&gt;
&lt;div style=&quot;padding-left:40px;&quot;&gt;Prefab: Nails // 样板&lt;/div&gt;
&lt;div style=&quot;padding-left:80px;&quot;&gt;tag&lt;/div&gt;
&lt;div&gt;Canvas // 具有类似 DOM 的事件系统&lt;/div&gt;
&lt;div style=&quot;padding-left:40px;&quot;&gt;Text&lt;/div&gt;
&lt;div style=&quot;padding-left:40px;&quot;&gt;Image: HpBar&lt;/div&gt;
&lt;div style=&quot;padding-left:80px;&quot;&gt;Hp&lt;/div&gt;
&lt;div style=&quot;padding-left:120px;&quot;&gt;active&lt;/div&gt;
&lt;div style=&quot;padding-left:40px;&quot;&gt;ReplayButton&lt;/div&gt;
&lt;div style=&quot;padding-left:80px;&quot;&gt;onClick&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;System：&lt;/div&gt;
&lt;div style=&quot;padding-left:40px;&quot;&gt;Scene&lt;/div&gt;
&lt;div style=&quot;padding-left:40px;&quot;&gt;Init&lt;/div&gt;
&lt;div style=&quot;padding-left:40px;&quot;&gt;Loop&lt;/div&gt;
&lt;div style=&quot;padding-left:40px;&quot;&gt;Time&lt;/div&gt;
&lt;div style=&quot;padding-left:40px;&quot;&gt;Assets&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">点是否在多边行中</title>
    <id>https://note.xianqiao.wang/post/dian-shi-fou-zai-duo-bian-xing-zhong</id>
    <updated>2023-05-07T03:36:10.771000Z</updated>
    <published>2022-03-13T07:09:29Z</published>
    <link href="https://note.xianqiao.wang/post/dian-shi-fou-zai-duo-bian-xing-zhong" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="algorithm" />
    <content type="html">&lt;div&gt;在&lt;a title=&quot;拓扑学&quot; href=&quot;https://zh.wikipedia.org/wiki/%E6%8B%93%E6%89%91%E5%AD%A6&quot; rev=&quot;en_rl_none&quot;&gt;拓扑学&lt;/a&gt;中，&lt;b&gt;若尔当曲线&lt;/b&gt;（英語：&lt;b&gt;Jordan curve&lt;/b&gt;）是平面上的非自交&lt;a title=&quot;环路 (拓扑学)&quot; href=&quot;https://zh.wikipedia.org/wiki/%E7%8E%AF%E8%B7%AF_(%E6%8B%93%E6%89%91%E5%AD%A6)&quot; rev=&quot;en_rl_none&quot;&gt;环路&lt;/a&gt;（又称为简单闭曲线，英語：simple closed curve）。&lt;b&gt;若尔当曲线定理&lt;/b&gt;（英語：&lt;b&gt;Jordan curve theorem&lt;/b&gt;）说明每一条若尔当曲线都把平面分成一个&quot;内部&quot;区域和一个&quot;外部&quot;区域，且任何从一个区域到另一个区域的&lt;a title=&quot;道路 (拓扑学)&quot; href=&quot;https://zh.wikipedia.org/wiki/%E9%81%93%E8%B7%AF_(%E6%8B%93%E6%89%91%E5%AD%A6)&quot; rev=&quot;en_rl_none&quot;&gt;道路&lt;/a&gt;都必然在某处与环路相交。&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;面积和判别法：判断目标点与多边形的每条边组成的三角形面积和是否等于该多边形，相等则在多边形内部。&lt;/div&gt;
&lt;div&gt;夹角和判别法：判断目标点与所有边的夹角和是否为360度，为360度则在多边形内部。&lt;/div&gt;
&lt;div&gt;引射线法：从目标点出发引一条射线（例如水平射线），看这条射线和多边形&lt;b&gt;所有边的交点数目&lt;/b&gt;。如果有奇数个交点，则说明在内部，如果有偶数个交点，则说明在外部。&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;取半开半闭区间，即将顶点算入线中，但是每条线只计算其一边的顶点（若为闭区间，则会重复计算顶点）&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;https://github.com/substack/point-in-polygon&quot; rev=&quot;en_rl_none&quot;&gt;https://github.com/substack/point-in-polygon&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html&quot;&gt;https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">2D 碰撞检测</title>
    <id>https://note.xianqiao.wang/post/2d-peng-zhuang-jian-ce</id>
    <updated>2023-05-07T03:35:55.707000Z</updated>
    <published>2022-03-13T07:09:03Z</published>
    <link href="https://note.xianqiao.wang/post/2d-peng-zhuang-jian-ce" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="algorithm" />
    <category term="game" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://jelly.jd.com/article/6006b1045b6c6a01506c87dc&quot; rev=&quot;en_rl_none&quot;&gt;https://jelly.jd.com/article/6006b1045b6c6a01506c87dc&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Broad phase 能为你提供有可能碰撞的实体列表。这可通过一些特殊的数据结构实现，它们能为你提供这些信息：实体存在哪里和哪些实体在其周围。这些数据结构可以是：&lt;a href=&quot;https://davidhsu666.com/archives/quadtree_in_2d/&quot;&gt;&lt;b&gt;四叉树&lt;/b&gt;&lt;/a&gt;（Quad Trees）、R树（R-Trees）或空间哈希映射（Spatial Hashmap）等&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Narrow Phase：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;外接图形判别法&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;轴对称包围盒（Axis-Aligned Bounding Box），即无旋转矩形：判断任意两个（无旋转）矩形的任意一边是否无间距，从而判断是否碰撞&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;圆形碰撞：通过判断任意两个圆形的圆心距离是否小于两圆半径之和，若小于则为碰撞&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;圆形与矩形（无旋转）：通过找出矩形上离圆心最近的点，然后通过判断该点与圆心的距离是否小于圆的半径，若小于则为碰撞&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;圆形与旋转矩形（以矩形中心点为旋转轴）：将画布（即 Canvas）反向旋转即转换为上述问题。&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;光线投射法：通过检测两个物体的速度矢量是否存在交点，且该交点满足一定条件，适合运动速度快的物体 // &lt;a href=&quot;https://www.bilibili.com/video/av4452233/&quot;&gt;例子&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;分离轴定理：通过判断任意两个 凸多边形在任意角度（其实&lt;span style=&quot;font-weight: bold;&quot;&gt;投影轴的数量与多边形的边数相等即可&lt;/span&gt;）下的投影是否均存在重叠，来判断是否发生碰撞。若在某一角度光源下，两物体的投影存在间隙，则为不碰撞，否则为发生碰撞 // 不适用于凹多边形&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;其他&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;地图格子划分&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;像素检测 // 先通过运算得到两者&lt;span style=&quot;font-weight: bold;&quot;&gt;相交区域&lt;/span&gt;，然后只对该区域内的像素进行检测&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;通过将两个物体在 offscreen canvas 中判断同一位置（坐标）下是否同时存在非透明的像素&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;利用 canvas 的 globalCompositeOperation = 'destination-in' 属性。该属性会让两者的重叠部分会被保留，其余区域都变成透明。因此，若存在非透明像素，则为碰撞&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">乘、除、求余运算</title>
    <id>https://note.xianqiao.wang/post/cheng-chu-qiu-yu-yun-suan</id>
    <updated>2023-05-07T03:35:55.012000Z</updated>
    <published>2022-03-13T06:46:09Z</published>
    <link href="https://note.xianqiao.wang/post/cheng-chu-qiu-yu-yun-suan" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="algorithm" />
    <content type="html">&lt;div&gt;常数乘法：如果乘数是 2 的幂，那么乘法可以看出是按位左移&lt;/div&gt;
&lt;div&gt;x*14 =&gt; (x&lt;&lt;4)-(x&lt;&lt;1)&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;2 的幂除法右移，但不能推广到任意常数&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;并行除法器电路：&lt;/div&gt;
&lt;div&gt;&lt;img src=&quot;https://cdn-images.postach.io/300e62d3-c3ba-45f5-a14e-8abaf49d8e67/fe095a35-fdac-1826-7cd1-a9907a57e3ea/4c223042-39b7-3c67-4853-a7f0c707962e.jpg&quot;  style=&quot;--en-naturalWidth:819; --en-naturalHeight:549;&quot; width=&quot;819px&quot;/&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;xor: 异或&lt;/div&gt;
&lt;div&gt;fadd: 乘积累加运算&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;https://leetcode-cn.com/problems/divide-two-integers/solution/liang-shu-xiang-chu-by-leetcode-solution-5hic/&quot;&gt;https://leetcode-cn.com/problems/divide-two-integers/solution/liang-shu-xiang-chu-by-leetcode-solution-5hic/&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;固定步长（除数）&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;指数递增步长&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">云原生</title>
    <id>https://note.xianqiao.wang/post/yun-yuan-sheng</id>
    <updated>2023-05-07T03:36:14.403000Z</updated>
    <published>2022-03-04T02:27:48Z</published>
    <link href="https://note.xianqiao.wang/post/yun-yuan-sheng" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="web" />
    <category term="webserver" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://jimmysong.io/&quot;&gt;https://jimmysong.io/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;云原生本身甚至不能称为是一种架构，它首先是一种基础设施，运行在其上的应用称作云原生应用，只有符合云原生设计哲学的应用架构才叫云原生应用架构&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;云原生技术有利于各组织在&lt;b&gt;公有云、私有云和混合云&lt;/b&gt;等新型动态环境中，&lt;b&gt;构建和运行可弹性扩展的应用&lt;/b&gt;。云原生的代表技术包括容器、服务网格、微服务、不可变基础设施和声明式 API。这些技术能够构建容错性好、易于管理和便于观察的松耦合系统。结合可靠的自动化手段，云原生技术使工程师能够轻松地对系统作出频繁和可预测的重大变更。&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;云原生系统的设计理念如下:&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;面向分布式设计（Distribution）：容器、微服务、API 驱动的开发；&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;面向配置设计（Configuration）：一个镜像，多个环境配置；&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;面向韧性设计（Resistancy）：故障容忍和自愈；&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;面向弹性设计（Elasticity）：弹性扩展和对环境变化（负载）做出响应；&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;面向交付设计（Delivery）：自动拉起，缩短交付时间；&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;面向性能设计（Performance）：响应式，并发和资源高效利用；&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;面向自动化设计（Automation）：自动化的 DevOps；&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;面向诊断性设计（Diagnosability）：集群级别的日志、metric 和追踪；&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;面向安全性设计（Security）：安全端点、API Gateway、端到端加密；&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;云原生应用程序特征：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;微服务&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;健康报告&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;遥测数据&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;弹性&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;声明式的，而不是命令式的&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">坦克大战</title>
    <id>https://note.xianqiao.wang/post/tan-ke-da-zhan</id>
    <updated>2023-05-07T03:36:09.611000Z</updated>
    <published>2022-03-01T09:28:43Z</published>
    <link href="https://note.xianqiao.wang/post/tan-ke-da-zhan" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="game" />
    <category term="frontend" />
    <content type="html">&lt;div&gt;2D FC 坦克大战重制版 // 放在个人 &quot;xBox&quot; 中&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;画面尺寸 4:3&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;WebRTC 联机&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;URL 带房间名共享&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;自动创建房间名&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;挑战：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;碰撞检测（每帧检测？）&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;图片（使用代码绘制？）&lt;/div&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;玩家坦克（L1，L2，L3）&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;敌方坦克（L1，L2，L3）&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;主堡&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;草&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;水&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;冰&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;砖&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;铁&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div&gt;音效（bfxr）&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">学习 Cypress</title>
    <id>https://note.xianqiao.wang/post/xue-xi-cypress</id>
    <updated>2023-05-07T03:36:15.486000Z</updated>
    <published>2022-02-18T09:35:07Z</published>
    <link href="https://note.xianqiao.wang/post/xue-xi-cypress" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="test" />
    <category term="frontend" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://docs.cypress.io/guides/references/best-practices&quot;&gt;https://docs.cypress.io/guides/references/best-practices&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;测试的执行上下文时 Cypress Web 测试节目，测试目标在测试上下文的某一个 iframe 中&lt;/div&gt;
&lt;div&gt;捆绑了 jquery 并暴露出 jquery 的 API&lt;/div&gt;
&lt;div&gt;使用重试和超时策略包装 DOM 查询，then 获取结果（一些条件测试也要放到 then）&lt;/div&gt;
&lt;div&gt;cy 的各种操作其实是添加任务，然后顺序执行，所以不要写 async/await&lt;/div&gt;
&lt;div&gt;Cypress.$ 同步查询&lt;/div&gt;
&lt;div&gt;contains('tr', TEST_NAME)&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;查询 dom 只能简单的穿 shadow，如一个类名、tag name，使用 get().find().find() 获取 shadow dom&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">@layer</title>
    <id>https://note.xianqiao.wang/post/layer</id>
    <updated>2023-05-07T03:36:18.402000Z</updated>
    <published>2022-02-12T14:34:37Z</published>
    <link href="https://note.xianqiao.wang/post/layer" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="css" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://ishadeed.com/article/cascade-layers/&quot;&gt;https://ishadeed.com/article/cascade-layers/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;CSS 级联：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;Origin and Importance&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Inline Styles&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Layer&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Specificity&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Order of appearance&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;样式规则优先级：&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;Important Browser Styles&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Important User Styles&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Important Developer Declarations&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Normal Developer Styles&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Normal User Styles&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Normal Browser Styles&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;layer 覆盖会忽略内部选择器权重&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;将第三方 css 分配给 layer: @import url(flickity.css) layer(vendors);&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">极端很容易，平衡很难</title>
    <id>https://note.xianqiao.wang/post/ji-duan-hen-rong-yi-ping-heng-hen-nan</id>
    <updated>2023-05-07T03:36:16.070000Z</updated>
    <published>2022-02-10T08:52:45Z</published>
    <link href="https://note.xianqiao.wang/post/ji-duan-hen-rong-yi-ping-heng-hen-nan" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="life" />
    <content type="html">&lt;div&gt;春节期间玩大乱斗，随到一把青钢影，在一遍一遍送死的时候这位哲学大师突然说了这句台词，顿时让我陷入了沉思，之前简单的处理一些事情的时候方法是不是太极端了呢，是的，太极端了。&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">提供 ESM 加载的服务</title>
    <id>https://note.xianqiao.wang/post/ti-gong-esm-jia-zai-de-fu-wu</id>
    <updated>2024-01-15T00:04:05.711000Z</updated>
    <published>2022-02-10T03:05:10Z</published>
    <link href="https://note.xianqiao.wang/post/ti-gong-esm-jia-zai-de-fu-wu" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="javascript" />
    <category term="frontend" />
    <content type="html">&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;/div&gt;
&lt;div&gt;https://jspm.dev 按源文件加载依赖模块（依赖多的话会比较慢，依加载瀑布比较明显），但必须正确的 package.json 导出，加载自定义元素只能用这个，不然依赖的模块不能复用有可能导致重复定义。另外，这个服务的&lt;span style=&quot;font-weight: bold;&quot;&gt;延时好像比较大&lt;/span&gt;，刚发布的版本可能只有部分功能可用，生产环境必须带版本号，不更新了&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://esm.sh/&quot;&gt;https://esm.sh&lt;/a&gt; 各个依赖打包构建，也会转换 CJS，但似乎&lt;a href=&quot;https://github.com/esm-dev/esm.sh/issues/777&quot;&gt;哪里有问题&lt;/a&gt; // deps 指定依赖，external 指定外部依赖，exports 支持 Tree Shaking，&lt;span style=&quot;font-weight: bold;&quot;&gt;bundle&lt;/span&gt; 构建成单个文件，&lt;span style=&quot;font-weight: bold;&quot;&gt;?no-bundle 禁用打包，&lt;/span&gt;deno 兼容, ?raw 禁止编译（raw.esm.sh）&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;a href=&quot;https://www.skypack.dev/&quot;&gt;https://cdn.skypack.dev&lt;/a&gt; 深度依赖不构建了，比如 duoyun-ui 的元素不构建 lit-html，不更新了&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;await import('https://cdn.skypack.dev/ts-morph') 会错误，但 esm.sh 是正常的；&lt;/div&gt;
&lt;div&gt;await import('https://cdn.skypack.dev/duoyun-ui/elements/keyboard-access') 会在 &lt;span style=&quot;text-decoration: line-through;&quot;&gt;esm.sh 和&lt;/span&gt; skypack 都失败。&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">社会规则与人性的冲突</title>
    <id>https://note.xianqiao.wang/post/she-hui-gui-ze-yu-ren-xing-de-chong-tu</id>
    <updated>2023-05-07T03:36:17.777000Z</updated>
    <published>2022-02-02T09:14:13Z</published>
    <link href="https://note.xianqiao.wang/post/she-hui-gui-ze-yu-ren-xing-de-chong-tu" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="life" />
    <content type="html">&lt;div&gt;在社会体系中，有许多规则，众多法律法规和道德约束，其中的一些规则在学校中就有所学习，又有一些会在电视、网络等媒体中宣传。&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;而人性则是生来便具备的，不需要学习，人性是利己的，它只有一条规则——让自己活下去，其他的则都可以不在乎。&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;一些社会规则和人性是有冲突的，比如&quot;说话算数&quot;，人在某个时刻说出的话可以是出于人性，而兑现自己的承诺是违背人性的，只有道德高尚的人才能做&quot;算数&quot;。&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;所以，人们在做事情时不能全依赖社会规则。&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">IM 系统设计</title>
    <id>https://note.xianqiao.wang/post/im-xi-tong-she-ji</id>
    <updated>2023-05-07T03:36:19.015000Z</updated>
    <published>2022-01-10T11:07:25Z</published>
    <link href="https://note.xianqiao.wang/post/im-xi-tong-she-ji" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="webserver" />
    <category term="frontend" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://www.cnblogs.com/yexiaochai/p/15782253.html&quot;&gt;https://www.cnblogs.com/yexiaochai/p/15782253.html&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;多媒体消息&lt;/div&gt;
&lt;div&gt;长链接、心跳&lt;/div&gt;
&lt;div&gt;集群负载均衡 // 避免重连&lt;/div&gt;
&lt;div&gt;消息时序&amp;一致性：分片，群 id，分布式递增消息 id&lt;/div&gt;
&lt;div&gt;消息丢失问题、已读：回执、批量回执&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">Self-Profiling API</title>
    <id>https://note.xianqiao.wang/post/self-profiling-api</id>
    <updated>2023-05-07T03:36:21.533000Z</updated>
    <published>2022-01-10T09:48:36Z</published>
    <link href="https://note.xianqiao.wang/post/self-profiling-api" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="javascript" />
    <content type="html">&lt;div&gt;&lt;a href=&quot;https://calendar.perfplanet.com/2021/js-self-profiling-api-in-practice/&quot;&gt;https://calendar.perfplanet.com/2021/js-self-profiling-api-in-practice/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;性能分析有两种方法：&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color:rgb(0, 0, 0);&quot;&gt;Instrumented&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color:rgb(0, 0, 0);&quot;&gt; (or &quot;structured&quot; or &quot;tracing&quot;) Profilers, in which an application is invasively instrumented (modified) to add hooks at &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color:rgb(0, 0, 0);&quot;&gt;every function entry and exit&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color:rgb(0, 0, 0);&quot;&gt;, so the exact time spent in each function is known&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color:rgb(0, 0, 0);&quot;&gt;Sampled&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color:rgb(0, 0, 0);&quot;&gt; Profilers, which &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color:rgb(0, 0, 0);&quot;&gt;temporarily pause execution&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color:rgb(0, 0, 0);&quot;&gt; of the application at a fixed frequency to note (&quot;sample&quot;) what is running on the &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color:rgb(0, 0, 0);&quot;&gt;call stack&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color:rgb(0, 0, 0);&quot;&gt; at that time&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style=&quot;color:rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;--en-markholder:true;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;Self-Profiling API 使用采样分析，虽然&lt;b&gt;不准确&lt;/b&gt;，但是开销小&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">UI 库开发检查项</title>
    <id>https://note.xianqiao.wang/post/ui-ku-kai-fa-jian-cha-xiang</id>
    <updated>2023-05-07T03:36:20.121000Z</updated>
    <published>2022-01-07T02:25:44Z</published>
    <link href="https://note.xianqiao.wang/post/ui-ku-kai-fa-jian-cha-xiang" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="frontend" />
    <content type="html">&lt;div&gt;行为定义&lt;/div&gt;
&lt;div&gt;可选项&lt;/div&gt;
&lt;div&gt;样式自定义&lt;/div&gt;
&lt;div&gt;注释/装饰器&lt;/div&gt;
&lt;div&gt;相对尺寸&lt;/div&gt;
&lt;div&gt;规范颜色&lt;/div&gt;
&lt;div&gt;对比度&lt;/div&gt;
&lt;div&gt;书写方向&lt;/div&gt;
&lt;div&gt;可访问性&lt;/div&gt;
&lt;div&gt;键盘访问&lt;/div&gt;
&lt;div&gt;国际化支持&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">拿手菜</title>
    <id>https://note.xianqiao.wang/post/na-shou-cai</id>
    <updated>2023-05-07T03:35:43.328000Z</updated>
    <published>2022-01-06T00:13:47Z</published>
    <link href="https://note.xianqiao.wang/post/na-shou-cai" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="life" />
    <content type="html">&lt;div&gt;青椒炒肉&lt;/div&gt;
&lt;div&gt;青椒胡萝卜&lt;/div&gt;
&lt;div&gt;小米椒花菜&lt;/div&gt;
&lt;div&gt;小米椒土豆&lt;/div&gt;
&lt;div&gt;黄瓜火腿&lt;/div&gt;
&lt;div&gt;清炒白菜苔&lt;/div&gt;
&lt;div&gt;四季豆炒肉&lt;/div&gt;
&lt;div&gt;青椒炒蛋&lt;/div&gt;
&lt;div&gt;韭菜炒蛋&lt;/div&gt;
&lt;div&gt;剁椒肉丝汤&lt;/div&gt;
&lt;div&gt;丝瓜汤&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;煎饼&lt;/div&gt;
&lt;div&gt;捞面&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
  <entry xml:base="https://note.xianqiao.wang/feed.xml">
    <title type="text">太平天国</title>
    <id>https://note.xianqiao.wang/post/tai-ping-tian-guo</id>
    <updated>2023-05-07T03:36:23.690000Z</updated>
    <published>2021-12-31T02:41:17Z</published>
    <link href="https://note.xianqiao.wang/post/tai-ping-tian-guo" />
    <author>
      <name>Xianqiao Wang</name>
    </author>
    <category term="game" />
    <category term="idea" />
    <content type="html">&lt;div&gt;童年的多人游戏做成电子版&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;通过猜拳/掷骰子的方式决定玩家单次回合的胜负，胜者可以提示自己的防御力（城墙）/攻击力（炮筒和子弹）&lt;/div&gt;
&lt;div&gt;攻破城墙之后可以选择摧毁炮筒/子弹还是基地，基地被推完才算出局&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;入侵风险：被攻击方可以申请结盟一起抵御入侵者，盟军会被消弱攻击力&lt;/div&gt;
&lt;div&gt;入侵限制：田字里面的4个字写（笔画）完了才可以攻击他人&lt;/div&gt;
&lt;div&gt;入侵奖励：获取出局玩家的剩余炮筒和子弹&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;邀请方式：二维码扫描进房间 // 游戏保存：一个房间只进行一局游戏，开始下局游戏时进行跳转？&lt;/div&gt;
&lt;div&gt;玩家人数：2-56789？&lt;/div&gt;
&lt;div&gt;开发平台：Web&lt;/div&gt;
&lt;div&gt;视觉风格：Q 版 3D&lt;/div&gt;
&lt;div&gt;离线机器人：无脑堆防御&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content>
  </entry>
</feed>
