1 Star 0 Fork 0

Codream/blog

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
search.xml 125.79 KB
一键复制 编辑 原始数据 按行查看 历史
乌腰王 提交于 2024-01-11 17:21 . +
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670
<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title>Live</title>
<url>/Live/f33d8391.html</url>
<content><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo new <span class="string">&quot;My New Post&quot;</span></span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-1"><a href="#Run-server-1" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-1"><a href="#Generate-static-files-1" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-1"><a href="#Deploy-to-remote-sites-1" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-2"><a href="#Run-server-2" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-2"><a href="#Generate-static-files-2" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-2"><a href="#Deploy-to-remote-sites-2" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-3"><a href="#Run-server-3" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-3"><a href="#Generate-static-files-3" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-3"><a href="#Deploy-to-remote-sites-3" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-4"><a href="#Run-server-4" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-4"><a href="#Generate-static-files-4" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-4"><a href="#Deploy-to-remote-sites-4" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-5"><a href="#Run-server-5" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-5"><a href="#Generate-static-files-5" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-5"><a href="#Deploy-to-remote-sites-5" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-6"><a href="#Run-server-6" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-6"><a href="#Generate-static-files-6" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-6"><a href="#Deploy-to-remote-sites-6" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
]]></content>
<categories>
<category>Live</category>
</categories>
</entry>
<entry>
<title>C&amp;C++</title>
<url>/Software/C-C/f43812d6.html</url>
<content><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-1"><a href="#Deploy-to-remote-sites-1" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-1"><a href="#Run-server-1" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-1"><a href="#Generate-static-files-1" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-2"><a href="#Deploy-to-remote-sites-2" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-2"><a href="#Run-server-2" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-2"><a href="#Generate-static-files-2" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-3"><a href="#Deploy-to-remote-sites-3" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
]]></content>
<categories>
<category>Software</category>
<category>C&amp;C++</category>
</categories>
</entry>
<entry>
<title>Flutter</title>
<url>/Software/Flutter/e5974716.html</url>
<content><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo new <span class="string">&quot;My New Post&quot;</span></span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-1"><a href="#Run-server-1" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-1"><a href="#Generate-static-files-1" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-1"><a href="#Deploy-to-remote-sites-1" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-2"><a href="#Run-server-2" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-2"><a href="#Generate-static-files-2" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-2"><a href="#Deploy-to-remote-sites-2" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-3"><a href="#Run-server-3" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-3"><a href="#Generate-static-files-3" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-3"><a href="#Deploy-to-remote-sites-3" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-4"><a href="#Run-server-4" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-4"><a href="#Generate-static-files-4" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-4"><a href="#Deploy-to-remote-sites-4" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-5"><a href="#Run-server-5" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-5"><a href="#Generate-static-files-5" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-5"><a href="#Deploy-to-remote-sites-5" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-6"><a href="#Run-server-6" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-6"><a href="#Generate-static-files-6" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-6"><a href="#Deploy-to-remote-sites-6" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
]]></content>
<categories>
<category>Software</category>
<category>Flutter</category>
</categories>
</entry>
<entry>
<title>SVG switch tag</title>
<url>/Software/HTML-CSS/c43ef17d.html</url>
<content><![CDATA[<h1 id="SVG-switch-tag"><a href="#SVG-switch-tag" class="headerlink" title="SVG switch tag"></a>SVG switch tag</h1><figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">svg</span> <span class="attr">xmlns</span>=<span class="string">&quot;http://www.w3.org/2000/svg&quot;</span> <span class="attr">width</span>=<span class="string">&quot;100%&quot;</span> <span class="attr">viewBox</span>=<span class="string">&quot;0 -20 100 50&quot;</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">switch</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">text</span> <span class="attr">systemLanguage</span>=<span class="string">&quot;ar&quot;</span>&gt;</span>مرحبا<span class="tag">&lt;/<span class="name">text</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">text</span> <span class="attr">systemLanguage</span>=<span class="string">&quot;zh-cn&quot;</span>&gt;</span>你好!<span class="tag">&lt;/<span class="name">text</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">text</span> <span class="attr">systemLanguage</span>=<span class="string">&quot;zh-tw&quot;</span>&gt;</span>您好!<span class="tag">&lt;/<span class="name">text</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">text</span> <span class="attr">systemLanguage</span>=<span class="string">&quot;de,nl&quot;</span>&gt;</span>Hallo!<span class="tag">&lt;/<span class="name">text</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">text</span> <span class="attr">systemLanguage</span>=<span class="string">&quot;en&quot;</span>&gt;</span>Hello!<span class="tag">&lt;/<span class="name">text</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">text</span> <span class="attr">systemLanguage</span>=<span class="string">&quot;en-us&quot;</span>&gt;</span>Howdy!<span class="tag">&lt;/<span class="name">text</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">text</span> <span class="attr">systemLanguage</span>=<span class="string">&quot;en-gb&quot;</span>&gt;</span>Wotcha!<span class="tag">&lt;/<span class="name">text</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">text</span> <span class="attr">systemLanguage</span>=<span class="string">&quot;en-au&quot;</span>&gt;</span>G&#x27;day!<span class="tag">&lt;/<span class="name">text</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">text</span> <span class="attr">systemLanguage</span>=<span class="string">&quot;es&quot;</span>&gt;</span>Hola!<span class="tag">&lt;/<span class="name">text</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">text</span> <span class="attr">systemLanguage</span>=<span class="string">&quot;fr&quot;</span>&gt;</span>Bonjour!<span class="tag">&lt;/<span class="name">text</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">text</span> <span class="attr">systemLanguage</span>=<span class="string">&quot;ja&quot;</span>&gt;</span>こんにちは<span class="tag">&lt;/<span class="name">text</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">text</span>&gt;</span><span class="tag">&lt;/<span class="name">text</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">switch</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">svg</span>&gt;</span></span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>Software</category>
<category>HTML&amp;CSS</category>
</categories>
</entry>
<entry>
<title>Java</title>
<url>/Software/Java/df2849ec.html</url>
<content><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo new <span class="string">&quot;My New Post&quot;</span></span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-1"><a href="#Run-server-1" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-1"><a href="#Generate-static-files-1" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-1"><a href="#Deploy-to-remote-sites-1" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-2"><a href="#Run-server-2" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-2"><a href="#Generate-static-files-2" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-2"><a href="#Deploy-to-remote-sites-2" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-3"><a href="#Run-server-3" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-3"><a href="#Generate-static-files-3" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-3"><a href="#Deploy-to-remote-sites-3" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-4"><a href="#Run-server-4" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-4"><a href="#Generate-static-files-4" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-4"><a href="#Deploy-to-remote-sites-4" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-5"><a href="#Run-server-5" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-5"><a href="#Generate-static-files-5" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-5"><a href="#Deploy-to-remote-sites-5" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-6"><a href="#Run-server-6" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-6"><a href="#Generate-static-files-6" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-6"><a href="#Deploy-to-remote-sites-6" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
]]></content>
<categories>
<category>Software</category>
<category>Java</category>
</categories>
</entry>
<entry>
<title>JavaScript</title>
<url>/Software/JavaScript/cc1b9611.html</url>
<content><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
]]></content>
<categories>
<category>Software</category>
<category>JavaScript</category>
</categories>
</entry>
<entry>
<title>Spring MVC 重定向跳转空白</title>
<url>/Software/Java/Spring-boot/4c76964e.html</url>
<content><![CDATA[<h1 id="Spring-MVC-重定向跳转空白"><a href="#Spring-MVC-重定向跳转空白" class="headerlink" title="Spring MVC 重定向跳转空白"></a>Spring MVC 重定向跳转空白</h1><figure class="highlight java"><table><tr><td class="code"><pre><span class="line"><span class="keyword">public</span> ModelAndView <span class="title function_">del</span><span class="params">(<span class="meta">@PathVariable</span> Long id)</span> &#123;</span><br><span class="line"> <span class="type">ModelAndView</span> <span class="variable">modelAndView</span> <span class="operator">=</span> <span class="keyword">new</span> <span class="title class_">ModelAndView</span>(<span class="string">&quot;redirect:/t/index?sort=sort&quot;</span>);</span><br><span class="line"> modelAndView.setStatus(HttpStatus.MOVED_PERMANENTLY);</span><br><span class="line"> <span class="keyword">if</span> (id == <span class="number">0L</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> modelAndView;</span><br><span class="line"> &#125;</span><br><span class="line"> templateRepository.deleteById(id);</span><br><span class="line"> <span class="keyword">return</span> modelAndView;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>注意返回码:301,返回200就空白</p>
]]></content>
<categories>
<category>Software</category>
<category>Java</category>
<category>Spring boot</category>
</categories>
</entry>
<entry>
<title>Spring boot static 静态文件不能访问</title>
<url>/Software/Java/Spring-boot/8f126aab.html</url>
<content><![CDATA[<h1 id="static-静态文件不能访问"><a href="#static-静态文件不能访问" class="headerlink" title="static 静态文件不能访问"></a>static 静态文件不能访问</h1><h2 id="Spring-boot-static-静态文件不能访问原因记录"><a href="#Spring-boot-static-静态文件不能访问原因记录" class="headerlink" title="Spring boot static 静态文件不能访问原因记录"></a>Spring boot static 静态文件不能访问原因记录</h2><p>1、Spring boot 2.7+ 配置文件 继承 extends WebMvcConfigurationSupport 后不能访问</p>
<p>When developing a Spring Boot application, it’s important to be able to serve static content such as images, HTML, CSS, and JavaScript files. However, sometimes these static files may not be accessible even if they are placed in the correct directory.</p>
<p>One common reason for this issue is that Spring Boot serves static content from the <code>/static</code> or <code>/public</code> directory by default. If the static files are located in a different directory, they may not be accessible.</p>
<p>To solve this issue, you can configure the location of the static files by adding the following code to your <code>application.properties</code> file:</p>
<figure class="highlight yaml"><table><tr><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line"> <span class="attr">mvc:</span></span><br><span class="line"> <span class="attr">static-path-pattern:</span> <span class="string">&quot;/static/**&quot;</span></span><br><span class="line"> <span class="attr">web:</span></span><br><span class="line"> <span class="attr">resources:</span></span><br><span class="line"> <span class="attr">static-locations:</span> <span class="string">classpath:/static/,</span> <span class="string">classpath:/public/,</span> <span class="string">file:/home/static/</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>This code tells Spring Boot to look for static files in the <code>/static</code> directory within the classpath.</p>
<p>Another reason why static files may not be accessible is if they are not included in the build process. Make sure that the static files are included in the <code>src/main/resources/static</code> directory and that they are added to the build process.</p>
<p>In conclusion, if you’re having trouble accessing static files in your Spring Boot application, make sure that they are located in the correct directory and that they are included in the build process. Additionally, you can configure the location of the static files in the <code>application.properties</code> file to ensure that they are accessible.</p>
<p>在Spring cloud 环境下 要访问单个服务的静态资源需要 在静态资源路径加路径标识 如: resources&#x2F;static&#x2F;cms&#x2F;assets&#x2F;***</p>
]]></content>
<categories>
<category>Software</category>
<category>Java</category>
<category>Spring boot</category>
</categories>
</entry>
<entry>
<title>Game</title>
<url>/Game/83199eb2.html</url>
<content><![CDATA[<h1 id="Tetris"><a href="#Tetris" class="headerlink" title="Tetris"></a>Tetris</h1><p><a href="https://hexo.io/">The history of Tetris randomizers</a></p>
<p><a href="https://simon.lc/">Simon Laroche - Developer</a></p>
<p><a href="https://github.com/simonlc/tetr.js">simonlc&#x2F;tetr.js</a></p>
]]></content>
<categories>
<category>Game</category>
</categories>
</entry>
<entry>
<title>Life game</title>
<url>/Game/Life/62fa798f.html</url>
<content><![CDATA[<h1 id="Life-game"><a href="#Life-game" class="headerlink" title="Life game"></a>Life game</h1><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="comment">// Conway&#x27;s Game of Life for HTML5 Canvas</span></span><br><span class="line"><span class="comment">// By Simon Laroche</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> <span class="variable constant_">FPS</span> = <span class="number">5</span>;</span><br><span class="line"><span class="keyword">var</span> paused = <span class="literal">true</span>;</span><br><span class="line"><span class="keyword">var</span> gameStarted = <span class="literal">false</span>;</span><br><span class="line"><span class="keyword">var</span> gLoop;</span><br><span class="line"><span class="keyword">var</span> generations = <span class="number">0</span>;</span><br><span class="line"><span class="keyword">var</span> population = <span class="number">0</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> lifeForms = [</span><br><span class="line"> [</span><br><span class="line"> [<span class="number">28</span>, <span class="number">28</span>],</span><br><span class="line"> [<span class="number">29</span>, <span class="number">28</span>],</span><br><span class="line"> [<span class="number">30</span>, <span class="number">28</span>],</span><br><span class="line"> [<span class="number">28</span>, <span class="number">29</span>],</span><br><span class="line"> [<span class="number">28</span>, <span class="number">30</span>],</span><br><span class="line"> [<span class="number">30</span>, <span class="number">29</span>],</span><br><span class="line"> [<span class="number">30</span>, <span class="number">30</span>]</span><br><span class="line"> ], <span class="comment">//Arch</span></span><br><span class="line"> [</span><br><span class="line"> [<span class="number">29</span>, <span class="number">28</span>],</span><br><span class="line"> [<span class="number">30</span>, <span class="number">29</span>],</span><br><span class="line"> [<span class="number">30</span>, <span class="number">30</span>],</span><br><span class="line"> [<span class="number">29</span>, <span class="number">30</span>],</span><br><span class="line"> [<span class="number">28</span>, <span class="number">30</span>]</span><br><span class="line"> ], <span class="comment">//Glider</span></span><br><span class="line"> [</span><br><span class="line"> [<span class="number">29</span>, <span class="number">28</span>],</span><br><span class="line"> [<span class="number">30</span>, <span class="number">28</span>],</span><br><span class="line"> [<span class="number">28</span>, <span class="number">29</span>],</span><br><span class="line"> [<span class="number">29</span>, <span class="number">29</span>],</span><br><span class="line"> [<span class="number">29</span>, <span class="number">30</span>]</span><br><span class="line"> ], <span class="comment">//R-pentomino</span></span><br><span class="line"> [</span><br><span class="line"> [<span class="number">32</span>, <span class="number">27</span>],</span><br><span class="line"> [<span class="number">26</span>, <span class="number">28</span>],</span><br><span class="line"> [<span class="number">27</span>, <span class="number">28</span>],</span><br><span class="line"> [<span class="number">27</span>, <span class="number">29</span>],</span><br><span class="line"> [<span class="number">31</span>, <span class="number">29</span>],</span><br><span class="line"> [<span class="number">32</span>, <span class="number">29</span>],</span><br><span class="line"> [<span class="number">33</span>, <span class="number">29</span>]</span><br><span class="line"> ] <span class="comment">//Diehard</span></span><br><span class="line">];</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> start = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;start&#x27;</span>);</span><br><span class="line"><span class="keyword">var</span> reset = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;reset&#x27;</span>);</span><br><span class="line"><span class="keyword">var</span> random = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;random&#x27;</span>);</span><br><span class="line"><span class="keyword">var</span> stats = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;s&#x27;</span>);</span><br><span class="line"><span class="keyword">var</span> wrapper = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;w&#x27;</span>);</span><br><span class="line"><span class="keyword">var</span> canvas = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;c&#x27;</span>);</span><br><span class="line"><span class="keyword">var</span> ctx = canvas.<span class="title function_">getContext</span>(<span class="string">&#x27;2d&#x27;</span>);</span><br><span class="line"></span><br><span class="line">canvas.<span class="property">width</span> = <span class="number">600</span>;</span><br><span class="line">canvas.<span class="property">height</span> = <span class="number">600</span>;</span><br><span class="line">wrapper.<span class="property">style</span>.<span class="property">width</span> = canvas.<span class="property">width</span> + <span class="string">&#x27;px&#x27;</span>;</span><br><span class="line">stats.<span class="property">style</span>.<span class="property">width</span> = canvas.<span class="property">width</span> - <span class="number">20</span> + <span class="string">&#x27;px&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">newGrid</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="keyword">var</span> cells = <span class="keyword">new</span> <span class="title class_">Array</span>(canvas.<span class="property">width</span> / <span class="number">10</span>);</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; canvas.<span class="property">width</span> / <span class="number">10</span>; i++) &#123;</span><br><span class="line"> cells[i] = <span class="keyword">new</span> <span class="title class_">Array</span>(canvas.<span class="property">height</span> / <span class="number">10</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> cells;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//fix</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">neighbours</span>(<span class="params">x, y</span>) &#123;</span><br><span class="line"> <span class="keyword">var</span> count = <span class="number">0</span>;</span><br><span class="line"> <span class="keyword">var</span> width = canvas.<span class="property">width</span> / <span class="number">10</span>;</span><br><span class="line"> <span class="keyword">var</span> height = canvas.<span class="property">height</span> / <span class="number">10</span>;</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> i = -<span class="number">1</span>; i &lt;= <span class="number">1</span>; i++) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> j = -<span class="number">1</span>; j &lt;= <span class="number">1</span>; j++) &#123;</span><br><span class="line"> <span class="comment">// skip checking the same cell.</span></span><br><span class="line"> <span class="keyword">if</span> (i == <span class="number">0</span> &amp;&amp; j == <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="keyword">continue</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="comment">// get the xy of a neighbor with grid wrap around.</span></span><br><span class="line"> <span class="keyword">var</span> nx = x + i;</span><br><span class="line"> <span class="keyword">if</span> (nx &lt; <span class="number">0</span>) &#123;</span><br><span class="line"> nx += width;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (nx &gt;= width) &#123;</span><br><span class="line"> nx -= width;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">var</span> ny = y + j;</span><br><span class="line"> <span class="keyword">if</span> (ny &lt; <span class="number">0</span>) &#123;</span><br><span class="line"> ny += height;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (ny &gt;= height) &#123;</span><br><span class="line"> ny -= height;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// Check if neighbor is alive.</span></span><br><span class="line"> <span class="keyword">if</span> (cells[nx][ny]) &#123;</span><br><span class="line"> count++;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// function neighbours(x, y) &#123;</span></span><br><span class="line"><span class="comment">// var count = 0;</span></span><br><span class="line"><span class="comment">// // TODO Test for out of bounds properly.</span></span><br><span class="line"><span class="comment">// if (x &gt; 0 &amp;&amp; y &gt; 0 &amp;&amp; x &lt; canvas.width / 10 - 1 &amp;&amp; y &lt; canvas.width / 10 - 1) &#123;</span></span><br><span class="line"><span class="comment">// if (cells[x - 1][y - 1]) &#123;</span></span><br><span class="line"><span class="comment">// count++;</span></span><br><span class="line"><span class="comment">// &#125;</span></span><br><span class="line"><span class="comment">// if (cells[x - 1][y + 1]) &#123;</span></span><br><span class="line"><span class="comment">// count++;</span></span><br><span class="line"><span class="comment">// &#125;</span></span><br><span class="line"><span class="comment">// if (cells[x + 1][y + 1]) &#123;</span></span><br><span class="line"><span class="comment">// count++;</span></span><br><span class="line"><span class="comment">// &#125;</span></span><br><span class="line"><span class="comment">// if (cells[x + 1][y - 1]) &#123;</span></span><br><span class="line"><span class="comment">// count++;</span></span><br><span class="line"><span class="comment">// &#125;</span></span><br><span class="line"><span class="comment">// if (cells[x][y + 1]) &#123;</span></span><br><span class="line"><span class="comment">// count++;</span></span><br><span class="line"><span class="comment">// &#125;</span></span><br><span class="line"><span class="comment">// if (cells[x][y - 1]) &#123;</span></span><br><span class="line"><span class="comment">// count++;</span></span><br><span class="line"><span class="comment">// &#125;</span></span><br><span class="line"><span class="comment">// if (cells[x - 1][y]) &#123;</span></span><br><span class="line"><span class="comment">// count++;</span></span><br><span class="line"><span class="comment">// &#125;</span></span><br><span class="line"><span class="comment">// if (cells[x + 1][y]) &#123;</span></span><br><span class="line"><span class="comment">// count++;</span></span><br><span class="line"><span class="comment">// &#125;</span></span><br><span class="line"><span class="comment">// &#125;</span></span><br><span class="line"><span class="comment">// return count;</span></span><br><span class="line"><span class="comment">// &#125;</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">clear</span>(<span class="params"></span>) &#123;</span><br><span class="line"> ctx.<span class="property">fillStyle</span> = <span class="string">&#x27;#eee&#x27;</span>;</span><br><span class="line"> ctx.<span class="title function_">beginPath</span>();</span><br><span class="line"> ctx.<span class="title function_">rect</span>(<span class="number">0</span>, <span class="number">0</span>, canvas.<span class="property">width</span>, canvas.<span class="property">height</span>);</span><br><span class="line"> ctx.<span class="title function_">closePath</span>();</span><br><span class="line"> ctx.<span class="title function_">fill</span>();</span><br><span class="line"></span><br><span class="line"> <span class="keyword">function</span> <span class="title function_">grid</span>(<span class="params">increment, color</span>) &#123;</span><br><span class="line"> ctx.<span class="property">fillStyle</span> = color;</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; canvas.<span class="property">width</span> + <span class="number">1</span>; i += increment) &#123;</span><br><span class="line"> ctx.<span class="title function_">fillRect</span>(i - <span class="number">1</span>, <span class="number">0</span>, <span class="number">2</span>, canvas.<span class="property">height</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; canvas.<span class="property">height</span> + <span class="number">1</span>; i += increment) &#123;</span><br><span class="line"> ctx.<span class="title function_">fillRect</span>(<span class="number">0</span>, i - <span class="number">1</span>, canvas.<span class="property">width</span>, <span class="number">2</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="title function_">grid</span>(<span class="number">10</span>, <span class="string">&#x27;#ddd&#x27;</span>);</span><br><span class="line"> <span class="title function_">grid</span>(<span class="number">100</span>, <span class="string">&#x27;#ccc&#x27;</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">draw</span>(<span class="params"></span>) &#123;</span><br><span class="line"> ctx.<span class="property">fillStyle</span> = <span class="string">&#x27;#585858&#x27;</span>;</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; cells.<span class="property">length</span>; i++) &#123;</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> j = <span class="number">0</span>; j &lt; cells[i].<span class="property">length</span>; j++) &#123;</span><br><span class="line"> <span class="keyword">if</span> (cells[i][j]) &#123;</span><br><span class="line"> <span class="comment">//ctx.fillRect(i * 10 + 1, j * 10 + 1, 8, 8); // square cells</span></span><br><span class="line"> ctx.<span class="title function_">beginPath</span>();</span><br><span class="line"> ctx.<span class="title function_">arc</span>(i * <span class="number">10</span> + <span class="number">5</span>, j * <span class="number">10</span> + <span class="number">5</span>, <span class="number">4</span>, <span class="number">0</span>, <span class="title class_">Math</span>.<span class="property">PI</span> * <span class="number">2</span>, <span class="literal">true</span>);</span><br><span class="line"> ctx.<span class="title function_">fill</span>();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">update</span>(<span class="params"></span>) &#123;</span><br><span class="line"> population = <span class="number">0</span>;</span><br><span class="line"> cellsCopy = <span class="keyword">new</span> <span class="title class_">Array</span>();</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> x = <span class="number">0</span>; x &lt; cells.<span class="property">length</span>; x++) &#123;</span><br><span class="line"> cellsCopy.<span class="title function_">push</span>(cells[x].<span class="title function_">slice</span>());</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> y = <span class="number">0</span>; y &lt; cells[x].<span class="property">length</span>; y++) &#123;</span><br><span class="line"> <span class="keyword">if</span> (<span class="title function_">neighbours</span>(x, y) &lt; <span class="number">2</span> || <span class="title function_">neighbours</span>(x, y) &gt; <span class="number">3</span>) &#123;</span><br><span class="line"> cellsCopy[x][y] = <span class="literal">false</span>;</span><br><span class="line"> &#125; <span class="keyword">else</span> <span class="keyword">if</span> (<span class="title function_">neighbours</span>(x, y) == <span class="number">3</span>) &#123;</span><br><span class="line"> cellsCopy[x][y] = <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (cellsCopy[x][y]) &#123;</span><br><span class="line"> population++;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> cells = cellsCopy;</span><br><span class="line"> generations++</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">play</span>(<span class="params"></span>) &#123;</span><br><span class="line"> gameStarted = <span class="literal">true</span>;</span><br><span class="line"> <span class="keyword">if</span> (paused) &#123;</span><br><span class="line"> gLoop = <span class="built_in">setInterval</span>(gameLoop, <span class="number">1000</span> / <span class="variable constant_">FPS</span>);</span><br><span class="line"> paused = <span class="literal">false</span>;</span><br><span class="line"> start.<span class="property">innerHTML</span> = <span class="string">&#x27;Pause&#x27;</span>;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="built_in">clearInterval</span>(gLoop);</span><br><span class="line"> paused = <span class="literal">true</span>;</span><br><span class="line"> start.<span class="property">innerHTML</span> = <span class="string">&#x27;Play&#x27;</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">resetGame</span>(<span class="params"></span>) &#123;</span><br><span class="line"> paused = <span class="literal">false</span>;</span><br><span class="line"> <span class="title function_">play</span>();</span><br><span class="line"> cells = <span class="title function_">newGrid</span>();</span><br><span class="line"> generations = <span class="number">0</span>;</span><br><span class="line"> population = <span class="number">0</span>;</span><br><span class="line"> <span class="title function_">refresh</span>();</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">getLife</span>(<span class="params">index</span>) &#123;</span><br><span class="line"> <span class="keyword">var</span> life = lifeForms[index] || lifeForms[~~(<span class="title class_">Math</span>.<span class="title function_">random</span>() * lifeForms.<span class="property">length</span>)];</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> x = <span class="number">0</span>; x &lt; life.<span class="property">length</span>; x++) &#123;</span><br><span class="line"> cells[life[x][<span class="number">0</span>]][life[x][<span class="number">1</span>]] = <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">canvas.<span class="title function_">addEventListener</span>(<span class="string">&#x27;click&#x27;</span>, <span class="keyword">function</span>(<span class="params">e</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (paused) &#123;</span><br><span class="line"> <span class="keyword">var</span> mx = ~~((e.<span class="property">pageX</span> - canvas.<span class="property">offsetLeft</span>) / <span class="number">10</span>);</span><br><span class="line"> <span class="keyword">var</span> my = ~~((e.<span class="property">pageY</span> - canvas.<span class="property">offsetTop</span>) / <span class="number">10</span>);</span><br><span class="line"> <span class="keyword">if</span> (cells[mx][my]) &#123;</span><br><span class="line"> cells[mx][my] = <span class="literal">false</span>;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> cells[mx][my] = <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="title function_">refresh</span>();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;, <span class="literal">false</span>);</span><br><span class="line"></span><br><span class="line">start.<span class="title function_">addEventListener</span>(<span class="string">&#x27;click&#x27;</span>, play, <span class="literal">false</span>);</span><br><span class="line"></span><br><span class="line">random.<span class="title function_">addEventListener</span>(<span class="string">&#x27;click&#x27;</span>, <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="title function_">resetGame</span>();</span><br><span class="line"> <span class="title function_">getLife</span>();</span><br><span class="line"> <span class="title function_">refresh</span>();</span><br><span class="line">&#125;, <span class="literal">false</span>);</span><br><span class="line"></span><br><span class="line">reset.<span class="title function_">addEventListener</span>(<span class="string">&#x27;click&#x27;</span>, resetGame, <span class="literal">false</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">refresh</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="title function_">clear</span>();</span><br><span class="line"> <span class="title function_">draw</span>();</span><br><span class="line"> stats.<span class="property">innerHTML</span> = <span class="string">&#x27;Generations: &#x27;</span> + generations +</span><br><span class="line"> <span class="string">&#x27; Population: &#x27;</span> + population;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">gameLoop</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="title function_">refresh</span>();</span><br><span class="line"> <span class="title function_">update</span>();</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">cells = <span class="title function_">newGrid</span>();</span><br><span class="line"><span class="title function_">getLife</span>(<span class="number">0</span>);</span><br><span class="line"><span class="title function_">refresh</span>();</span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>Game</category>
<category>Life</category>
</categories>
</entry>
<entry>
<title>Tetris</title>
<url>/Game/Tetris/b91468e2.html</url>
<content><![CDATA[<img data-src="/Game/Tetris/b91468e2/tetris-randomizers.jpg" class="">
<h1 id="The-history-of-Tetris-randomizers"><a href="#The-history-of-Tetris-randomizers" class="headerlink" title="The history of Tetris randomizers"></a>The history of Tetris randomizers</h1><p><a href="https://simon.lc/the-history-of-tetris-randomizers">The history of Tetris randomizers</a></p>
<span id="more"></span>
<p>Nov 26, 2018</p>
<ul>
<li><a href="https://simon.lc/tags/programming">Programming</a></li>
<li><a href="https://simon.lc/tags/tetris">Tetris</a></li>
</ul>
<p>In 1985, Alexey Pajitnov and Vadim Gerasimov released Tetris to the public. This fun and highly addictive game challenged players to fit pieces together that were dealt in a <em>random</em> order.</p>
<p>Since then, over 150 licensed versions of Tetris games have been released. Varying in game modes, rules, and implementations, they all play slightly—or very—differently.</p>
<p>In Tetris, a randomizer is a function which returns a randomly chosen piece. Over the years, the rules of how pieces are chosen has evolved, affecting gameplay and actual randomness.</p>
<p>Several of them have been reversed engineered and documented. I’ve curated a list of ones that I believed to be important and show how the state of Tetris has changed over the years.</p>
<h2 id="Tetris-c-1985"><a href="#Tetris-c-1985" class="headerlink" title="Tetris (c. 1985)"></a><em>Tetris</em> (c. 1985)</h2><p>The first and original version of Tetris released had an unbiased randomizer. No opinion to which piece should come next, just pick one and give it to the player.</p>
<p>With an unbiased randomizer, there are situations where the player receives a sequence of the same piece (called floods) or a sequence omitting a certain piece (called a drought). We’ll see how the designers of Tetris games tried to solve these problems in a little bit.</p>
<p>While an unbiased randomizer offers the greatest pure puzzle challenge to players, it is unstable, and can actually <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.55.8562&rep=rep1&type=pdf">result in an unbeatable sequence (PDF)</a>. This however can not happen in a real game, as computers don’t use true random number generators. Pseudo random number generators try to mimic real randomness, but don’t have the properties required to deal out 70, 000 Z-pieces in a row.</p>
<h3 id="Truly-Pseudo-Random"><a href="#Truly-Pseudo-Random" class="headerlink" title="Truly Pseudo Random"></a>Truly Pseudo Random</h3><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">function</span>* <span class="title function_">random</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="keyword">const</span> pieces = [<span class="string">&#x27;I&#x27;</span>, <span class="string">&#x27;J&#x27;</span>, <span class="string">&#x27;L&#x27;</span>, <span class="string">&#x27;O&#x27;</span>, <span class="string">&#x27;S&#x27;</span>, <span class="string">&#x27;T&#x27;</span>, <span class="string">&#x27;Z&#x27;</span>];</span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="keyword">yield</span> pieces[<span class="title class_">Math</span>.<span class="title function_">floor</span>(<span class="title class_">Math</span>.<span class="title function_">random</span>() * pieces.<span class="property">length</span>)];</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>Puzzle factor: 4&#x2F;5Flood Prevention: 0&#x2F;5Drought Prevention: 0&#x2F;5</p>
<h2 id="Tetris-Nintendo-1989"><a href="#Tetris-Nintendo-1989" class="headerlink" title="Tetris, Nintendo (1989)"></a><em>Tetris</em>, Nintendo (1989)</h2><p>Four years later, the immensely popular <a href="https://en.wikipedia.org/wiki/Nintendo_Entertainment_System">NES</a> version of Tetris was released.</p>
<p>To cut down on piece floods (repeating pieces) a history check was added to the randomizer. This simple check would, </p>
<ol>
<li>choose a piece,</li>
<li>check if the piece was the same as the last,</li>
<li>If it was it would chose a new piece, but only once,</li>
<li>and whatever was the result, was the piece dealt.</li>
</ol>
<p>While the chance of getting the same piece twice in a row was reduced, nothing was stopping the game from dealing out alternating pieces. Another common occurrence in this version is a piece drought of over 30 pieces. While every type of tetromino can have a drought, the I-piece is important for scoring in this game, and a big drought can mean the difference between a score max-out or not.</p>
<h3 id="1-Piece-history-with-1-roll"><a href="#1-Piece-history-with-1-roll" class="headerlink" title="1 Piece history with 1 roll"></a>1 Piece history with 1 roll</h3><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">function</span>* <span class="title function_">historyRandomizer</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="keyword">const</span> pieces = [<span class="string">&#x27;I&#x27;</span>, <span class="string">&#x27;J&#x27;</span>, <span class="string">&#x27;L&#x27;</span>, <span class="string">&#x27;O&#x27;</span>, <span class="string">&#x27;S&#x27;</span>, <span class="string">&#x27;T&#x27;</span>, <span class="string">&#x27;Z&#x27;</span>];</span><br><span class="line"> <span class="keyword">let</span> history;</span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> * <span class="comment">// First &quot;roll&quot;* piece = pieces[Math.floor(Math.random() * pieces.length)]; *// Roll is checked against the history*if (piece !== history) &#123; piece = pieces[Math.floor(Math.random() * pieces.length)]; &#125; history = piece; yield piece; &#125;</span></span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>Puzzle factor: 5&#x2F;5Flood Prevention: 2&#x2F;5Drought Prevention: 0&#x2F;5</p>
<h2 id="Tetris-The-Grand-Master-1998"><a href="#Tetris-The-Grand-Master-1998" class="headerlink" title="Tetris: The Grand Master (1998)"></a><em>Tetris: The Grand Master</em> (1998)</h2><p>While <em>NES Tetris</em> improved on pure unbiased randomization, droughts were still common. <em>Tetris: The Grand Master</em>, or <em>TGM</em>, essentially used the same system but with a larger history and more rolls to try and alleviate this.</p>
<p>By increasing these values, not only were floods even less common, but it also helped with droughts. Four pieces in the history meant that you had higher chances of getting a piece that hasn’t been dealt for a while. Despite this, there was still no strict rule preventing droughts, they can still happen, just much less frequently than in <em>NES Tetris</em>.</p>
<h3 id="4-Piece-history-with-4-rolls"><a href="#4-Piece-history-with-4-rolls" class="headerlink" title="4 Piece history with 4 rolls"></a>4 Piece history with 4 rolls</h3><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">function</span>* <span class="title function_">historyRandomizer</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="keyword">const</span> pieces = [<span class="string">&#x27;I&#x27;</span>, <span class="string">&#x27;J&#x27;</span>, <span class="string">&#x27;L&#x27;</span>, <span class="string">&#x27;O&#x27;</span>, <span class="string">&#x27;S&#x27;</span>, <span class="string">&#x27;T&#x27;</span>, <span class="string">&#x27;Z&#x27;</span>];* <span class="comment">// First piece special conditions*let piece = [&#x27;I&#x27;, &#x27;J&#x27;, &#x27;L&#x27;, &#x27;T&#x27;][Math.floor(Math.random() * 4)]; yield piece; let history = [&#x27;S&#x27;, &#x27;Z&#x27;, &#x27;S&#x27;, piece]; while (true) &#123; for (let roll = 0; roll &lt; 4; ++roll) &#123; piece = pieces[Math.floor(Math.random() * 7)]; if (history.includes(piece) === false) break; &#125; history.shift(); history.push(piece); yield piece; &#125;</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>Puzzle factor: 4&#x2F;5Flood Prevention: 4&#x2F;5Drought Prevention: 2&#x2F;5</p>
<h2 id="Tetris-Worlds-and-Onwards-2001"><a href="#Tetris-Worlds-and-Onwards-2001" class="headerlink" title="Tetris Worlds and Onwards (2001)"></a><em>Tetris Worlds</em> and Onwards (2001)</h2><img data-src="/Game/Tetris/b91468e2/tetris-bag.jpg" class="" title="tetris-bag">
<p><em>Tetris Worlds</em> introduced the Random Generator to the masses. Now the official randomizer, most official titles made after this date use it.</p>
<p>History based randomizers helped eliminate floods (or at least diminish them), but could not stop droughts. Given the right circumstances, a deadly piece sequence is still possible.</p>
<p>The Random Generator solves these problems by using a new system called bags. In a bag system, a list of pieces are put into a bag, and piece by piece are randomly picked out until it’s empty. Once the bag is empty, the pieces go back in and the process is repeated. The Random Generator has a 7-bag… or a bag filled with one of each of the 7 tetrominoes. Other types of bags are possible, such as a 14-bag, which includes two of each tetromino.</p>
<p>Having no history from bag to bag allows floods of 2 and snake sequences of 4 (ZSZS,  ZSSZ, etc.) to happen at the seams of each bag. So in some ways it’s a step backwards from the traditional <em>NES Tetris</em>.</p>
<p>The 7-bag has a consistent piece output, making it more predictable. It’s easy to know where in a bag you are, and when a piece you need might come. Because of how predictable this random generator is, it’s actually possible to <a href="https://harddrop.com/wiki/Playing_forever">play forever</a>. Overall it’s a silly system that makes you wonder how it ever became the official randomizer.</p>
<h3 id="The-7-bag"><a href="#The-7-bag" class="headerlink" title="The 7-bag"></a>The 7-bag</h3><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">function</span>* <span class="title function_">randomGenerator</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="keyword">let</span> bag = [];</span><br><span class="line"> <span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (bag.<span class="property">length</span> === <span class="number">0</span>) &#123;</span><br><span class="line"> bag = [<span class="string">&#x27;I&#x27;</span>, <span class="string">&#x27;J&#x27;</span>, <span class="string">&#x27;L&#x27;</span>, <span class="string">&#x27;O&#x27;</span>, <span class="string">&#x27;S&#x27;</span>, <span class="string">&#x27;T&#x27;</span>, <span class="string">&#x27;Z&#x27;</span>];</span><br><span class="line"> bag = <span class="title function_">shuffle</span>(bag);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">yield</span> bag.<span class="title function_">pop</span>();</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>Puzzle factor: 3&#x2F;5Flood Prevention: 3&#x2F;5Drought Prevention: 4&#x2F;5</p>
<h2 id="Tetris-The-Grand-Master-3-Terror-Instinct-2005"><a href="#Tetris-The-Grand-Master-3-Terror-Instinct-2005" class="headerlink" title="Tetris: The Grand Master 3 - Terror-Instinct (2005)"></a><em>Tetris: The Grand Master 3 - Terror-Instinct</em> (2005)</h2><p>TGM3 really advances the idea of random generation. It’s a unique system that doesn’t appear in any other release.</p>
<p>Instead of a bag or history, TGM3 uses a pool of pieces. Starting with 5 of each tetromino, for a total of 35 pieces. When a piece is dealt, instead of removing it from the pool, it is replaced with the most droughted piece. Eventually the pool will fill up more and more with this piece until picked. This solves the issues with bag systems, as well as history systems; the best of both worlds.</p>
<h3 id="35-Pool-with-6-rolls"><a href="#35-Pool-with-6-rolls" class="headerlink" title="35 Pool with 6 rolls"></a>35 Pool with 6 rolls</h3><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">function</span>* <span class="title function_">tgm3Randomizer</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="keyword">let</span> pieces = [<span class="string">&#x27;I&#x27;</span>, <span class="string">&#x27;J&#x27;</span>, <span class="string">&#x27;L&#x27;</span>, <span class="string">&#x27;O&#x27;</span>, <span class="string">&#x27;S&#x27;</span>, <span class="string">&#x27;T&#x27;</span>, <span class="string">&#x27;Z&#x27;</span>];</span><br><span class="line"> <span class="keyword">let</span> order = [];* <span class="comment">// Create 35 pool.*let pool = pieces.concat(pieces, pieces, pieces, pieces); *// First piece special conditions*const firstPiece = [&#x27;I&#x27;, &#x27;J&#x27;, &#x27;L&#x27;, &#x27;T&#x27;][Math.floor(Math.random() * 4)]; yield firstPiece; let history = [&#x27;S&#x27;, &#x27;Z&#x27;, &#x27;S&#x27;, firstPiece]; while (true) &#123; let roll; let i; let piece; *// Roll For piece*for (roll = 0; roll &lt; 6; ++roll) &#123; i = Math.floor(Math.random() * 35); piece = pool[i]; if (history.includes(piece) === false || roll === 5) &#123; break; &#125; if (order.length) pool[i] = order[0]; &#125; *// Update piece order*if (order.includes(piece)) &#123; order.splice(order.indexOf(piece), 1); &#125; order.push(piece); pool[i] = order[0]; *// Update history* history.shift(); history[3] = piece; yield piece; &#125;</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>Puzzle factor: 4&#x2F;5Flood Prevention: 4&#x2F;5Drought Prevention: 4&#x2F;5</p>
<h2 id="Onwards"><a href="#Onwards" class="headerlink" title="Onwards"></a>Onwards</h2><p>It’s hard to pin point it, but TGM3’s randomizer does feel more predictable, and less challenging. The clumsy 7-bag is unnatural feeling, but allows for many building strategies to be consistently viable. An unfriendly randomizer like in NES Tetris can ruin your game, or more likely, your mood to play.</p>
<p>Can we better these systems by making them more random feeling, and putting hard limits on droughts and floods? Or do these hard limits just make the game more predictable?</p>
]]></content>
<categories>
<category>Game</category>
<category>Tetris</category>
</categories>
</entry>
<entry>
<title>AI</title>
<url>/AI/a7bb958f.html</url>
<content><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo new <span class="string">&quot;My New Post&quot;</span></span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
]]></content>
<categories>
<category>AI</category>
</categories>
</entry>
<entry>
<title>Doc</title>
<url>/Doc/be0cbb84.html</url>
<content><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-1"><a href="#Generate-static-files-1" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-1"><a href="#Deploy-to-remote-sites-1" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-1"><a href="#Run-server-1" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-2"><a href="#Generate-static-files-2" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-2"><a href="#Deploy-to-remote-sites-2" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-2"><a href="#Run-server-2" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-3"><a href="#Generate-static-files-3" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-3"><a href="#Deploy-to-remote-sites-3" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-3"><a href="#Run-server-3" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-4"><a href="#Generate-static-files-4" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-4"><a href="#Deploy-to-remote-sites-4" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-4"><a href="#Run-server-4" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-5"><a href="#Generate-static-files-5" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-5"><a href="#Deploy-to-remote-sites-5" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
]]></content>
<categories>
<category>Doc</category>
</categories>
</entry>
<entry>
<title>hexo中如何支持公式 mathjax</title>
<url>/Doc/Hexo/6aa77778.html</url>
<content><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2>]]></content>
<categories>
<category>Doc</category>
<category>Hexo</category>
</categories>
</entry>
<entry>
<title>Snake</title>
<url>/Game/Snake/90ac449a.html</url>
<content><![CDATA[<img data-src="/Game/Snake/90ac449a/snake.jpg" class="">
<h1 id="Snake"><a href="#Snake" class="headerlink" title="Snake"></a>Snake</h1><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">var</span> <span class="variable constant_">FPS</span> = <span class="number">10</span>;</span><br><span class="line"><span class="keyword">var</span> gLoop;</span><br><span class="line"><span class="keyword">var</span> lastX;</span><br><span class="line"><span class="keyword">var</span> lastY;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> canvas = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;c&#x27;</span>);</span><br><span class="line"><span class="keyword">var</span> ctx = canvas.<span class="title function_">getContext</span>(<span class="string">&#x27;2d&#x27;</span>);</span><br><span class="line"><span class="keyword">var</span> info = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;i&#x27;</span>);</span><br><span class="line"><span class="keyword">var</span> wrapper = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;w&#x27;</span>);</span><br><span class="line"><span class="keyword">var</span> classic = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;classic&#x27;</span>);</span><br><span class="line"></span><br><span class="line">canvas.<span class="property">width</span> = <span class="number">500</span>;</span><br><span class="line">canvas.<span class="property">height</span> = <span class="number">300</span>;</span><br><span class="line">classic.<span class="title function_">addEventListener</span>(<span class="string">&#x27;click&#x27;</span>, init, <span class="literal">false</span>);</span><br><span class="line">wrapper.<span class="property">style</span>.<span class="property">width</span> = canvas.<span class="property">width</span> + <span class="string">&#x27;px&#x27;</span>;</span><br><span class="line">info.<span class="property">style</span>.<span class="property">width</span> = canvas.<span class="property">width</span> + <span class="string">&#x27;px&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="variable language_">document</span>.<span class="property">onkeydown</span> = <span class="keyword">function</span>(<span class="params">e</span>) &#123;</span><br><span class="line"> snake.<span class="title function_">keyDown</span>(e);</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">getRandomInt</span>(<span class="params">min, max</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span> ~~(<span class="title class_">Math</span>.<span class="title function_">random</span>() * (max - min + <span class="number">1</span>)) + min;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">drawBox</span>(<span class="params">x, y, color</span>) &#123;</span><br><span class="line"> ctx.<span class="property">fillStyle</span> = color;</span><br><span class="line"> ctx.<span class="title function_">fillRect</span>(x + <span class="number">1</span>, y + <span class="number">1</span>, <span class="number">8</span>, <span class="number">8</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">clear</span>(<span class="params"></span>) &#123;</span><br><span class="line"> ctx.<span class="property">fillStyle</span> = <span class="string">&#x27;#eee&#x27;</span>;</span><br><span class="line"> ctx.<span class="title function_">beginPath</span>();</span><br><span class="line"> ctx.<span class="title function_">rect</span>(<span class="number">0</span>, <span class="number">0</span>, canvas.<span class="property">width</span>, canvas.<span class="property">height</span>);</span><br><span class="line"> ctx.<span class="title function_">closePath</span>();</span><br><span class="line"> ctx.<span class="title function_">fill</span>();</span><br><span class="line"></span><br><span class="line"> <span class="keyword">function</span> <span class="title function_">grid</span>(<span class="params">increment, color</span>) &#123;</span><br><span class="line"> ctx.<span class="property">fillStyle</span> = color;</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; canvas.<span class="property">width</span> + <span class="number">1</span>; i += increment) &#123;</span><br><span class="line"> ctx.<span class="title function_">fillRect</span>(i - <span class="number">1</span>, <span class="number">0</span>, <span class="number">2</span>, canvas.<span class="property">height</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; canvas.<span class="property">height</span> + <span class="number">1</span>; i += increment) &#123;</span><br><span class="line"> ctx.<span class="title function_">fillRect</span>(<span class="number">0</span>, i - <span class="number">1</span>, canvas.<span class="property">width</span>, <span class="number">2</span>);</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="title function_">grid</span>(<span class="number">10</span>, <span class="string">&#x27;#ddd&#x27;</span>);</span><br><span class="line"> <span class="title function_">grid</span>(<span class="number">100</span>, <span class="string">&#x27;#ccc&#x27;</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> food = <span class="keyword">new</span> <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">x</span> = <span class="number">10</span> * <span class="title function_">getRandomInt</span>(<span class="number">0</span>, (canvas.<span class="property">width</span> - <span class="number">10</span>) / <span class="number">10</span>);</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">y</span> = <span class="number">10</span> * <span class="title function_">getRandomInt</span>(<span class="number">0</span>, (canvas.<span class="property">height</span> - <span class="number">10</span>) / <span class="number">10</span>);</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">color</span> = <span class="string">&#x27;#87af00&#x27;</span>;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">draw</span> = <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="title function_">drawBox</span>(<span class="variable language_">this</span>.<span class="property">x</span>, <span class="variable language_">this</span>.<span class="property">y</span>, <span class="variable language_">this</span>.<span class="property">color</span>);</span><br><span class="line"> &#125;;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">eaten</span> = <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">x</span> = <span class="number">10</span> * <span class="title function_">getRandomInt</span>(<span class="number">0</span>, (canvas.<span class="property">width</span> - <span class="number">10</span>) / <span class="number">10</span>);</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">y</span> = <span class="number">10</span> * <span class="title function_">getRandomInt</span>(<span class="number">0</span>, (canvas.<span class="property">height</span> - <span class="number">10</span>) / <span class="number">10</span>);</span><br><span class="line"> &#125;;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> snake = <span class="keyword">new</span> <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">x</span> = canvas.<span class="property">width</span> / <span class="number">2</span>;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">y</span> = canvas.<span class="property">height</span> / <span class="number">2</span>;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">direction</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">color</span> = <span class="string">&#x27;#268bd2&#x27;</span>;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">tail</span> = [];</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">dead</span> = <span class="literal">true</span>;</span><br><span class="line"></span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">eat</span> = <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line"> food.<span class="title function_">eaten</span>();</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">tail</span>.<span class="title function_">unshift</span>([<span class="variable language_">this</span>.<span class="property">x</span>, <span class="variable language_">this</span>.<span class="property">y</span>]);</span><br><span class="line"> &#125;;</span><br><span class="line"></span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">keyDown</span> = <span class="keyword">function</span>(<span class="params">e</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">dead</span>) &#123;</span><br><span class="line"> <span class="keyword">return</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">switch</span> (e.<span class="property">keyCode</span>) &#123;</span><br><span class="line"> <span class="keyword">case</span> <span class="number">38</span>: <span class="comment">// Up</span></span><br><span class="line"> e.<span class="title function_">preventDefault</span>();</span><br><span class="line"> <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">direction</span> != <span class="string">&#x27;down&#x27;</span>) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">direction</span> = <span class="string">&#x27;up&#x27;</span></span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">break</span></span><br><span class="line"> <span class="keyword">case</span> <span class="number">40</span>: <span class="comment">// Down</span></span><br><span class="line"> e.<span class="title function_">preventDefault</span>();</span><br><span class="line"> <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">direction</span> != <span class="string">&#x27;up&#x27;</span>) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">direction</span> = <span class="string">&#x27;down&#x27;</span></span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">break</span></span><br><span class="line"> <span class="keyword">case</span> <span class="number">37</span>: <span class="comment">// Left</span></span><br><span class="line"> e.<span class="title function_">preventDefault</span>();</span><br><span class="line"> <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">direction</span> != <span class="string">&#x27;right&#x27;</span>) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">direction</span> = <span class="string">&#x27;left&#x27;</span></span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">break</span></span><br><span class="line"> <span class="keyword">case</span> <span class="number">39</span>: <span class="comment">// Right</span></span><br><span class="line"> e.<span class="title function_">preventDefault</span>();</span><br><span class="line"> <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">direction</span> != <span class="string">&#x27;left&#x27;</span>) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">direction</span> = <span class="string">&#x27;right&#x27;</span></span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">break</span></span><br><span class="line"> &#125;</span><br><span class="line"> &#125;;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">update</span> = <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (!<span class="variable language_">this</span>.<span class="property">dead</span>) &#123;</span><br><span class="line"> <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">direction</span> == <span class="string">&#x27;up&#x27;</span>) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">y</span> -= <span class="number">10</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">direction</span> == <span class="string">&#x27;down&#x27;</span>) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">y</span> += <span class="number">10</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">direction</span> == <span class="string">&#x27;left&#x27;</span>) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">x</span> -= <span class="number">10</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">direction</span> == <span class="string">&#x27;right&#x27;</span>) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">x</span> += <span class="number">10</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">direction</span> = <span class="string">&#x27;&#x27;</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="comment">// Colision detection</span></span><br><span class="line"> <span class="keyword">if</span> ((<span class="variable language_">this</span>.<span class="property">x</span> == food.<span class="property">x</span>) &amp;&amp; (<span class="variable language_">this</span>.<span class="property">y</span> == food.<span class="property">y</span>)) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="title function_">eat</span>();</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">1</span>; i &lt; <span class="variable language_">this</span>.<span class="property">tail</span>.<span class="property">length</span>; i++) &#123;</span><br><span class="line"> <span class="keyword">if</span> ((<span class="variable language_">this</span>.<span class="property">x</span> == <span class="variable language_">this</span>.<span class="property">tail</span>[i][<span class="number">0</span>]) &amp;&amp; (<span class="variable language_">this</span>.<span class="property">y</span> == <span class="variable language_">this</span>.<span class="property">tail</span>[i][<span class="number">1</span>])) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">dead</span> = <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">if</span> (<span class="variable language_">this</span>.<span class="property">x</span> &gt; canvas.<span class="property">width</span> - <span class="number">10</span> ||</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">y</span> &gt; canvas.<span class="property">height</span> - <span class="number">10</span> ||</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">x</span> &lt; <span class="number">0</span> ||</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">y</span> &lt; <span class="number">0</span>) &#123;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">dead</span> = <span class="literal">true</span>;</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> &#125;;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">draw</span> = <span class="keyword">function</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="title function_">drawBox</span>(<span class="variable language_">this</span>.<span class="property">x</span>, <span class="variable language_">this</span>.<span class="property">y</span>, <span class="variable language_">this</span>.<span class="property">color</span>);</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; <span class="variable language_">this</span>.<span class="property">tail</span>.<span class="property">length</span>; i++) &#123;</span><br><span class="line"> <span class="title function_">drawBox</span>(<span class="variable language_">this</span>.<span class="property">tail</span>[i][<span class="number">0</span>], <span class="variable language_">this</span>.<span class="property">tail</span>[i][<span class="number">1</span>], <span class="variable language_">this</span>.<span class="property">color</span>);</span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> (!<span class="variable language_">this</span>.<span class="property">dead</span>) &#123;</span><br><span class="line"> lastX = <span class="variable language_">this</span>.<span class="property">x</span>;</span><br><span class="line"> lastY = <span class="variable language_">this</span>.<span class="property">y</span>;</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">tail</span>.<span class="title function_">unshift</span>([lastX, lastY]);</span><br><span class="line"> <span class="variable language_">this</span>.<span class="property">tail</span>.<span class="title function_">pop</span>();</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">gameLoop</span>(<span class="params"></span>) &#123;</span><br><span class="line"> <span class="comment">// Update</span></span><br><span class="line"> snake.<span class="title function_">update</span>();</span><br><span class="line"></span><br><span class="line"> <span class="comment">// Draw</span></span><br><span class="line"> <span class="title function_">clear</span>();</span><br><span class="line"> food.<span class="title function_">draw</span>();</span><br><span class="line"> snake.<span class="title function_">draw</span>();</span><br><span class="line"></span><br><span class="line"> <span class="comment">// Loop</span></span><br><span class="line"> gLoop = <span class="built_in">setTimeout</span>(gameLoop, <span class="number">1000</span> / <span class="variable constant_">FPS</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">init</span>(<span class="params"></span>) &#123;</span><br><span class="line"> info.<span class="property">style</span>.<span class="property">display</span> = <span class="string">&#x27;none&#x27;</span>;</span><br><span class="line"> snake.<span class="property">dead</span> = <span class="literal">false</span>;</span><br><span class="line"> <span class="title function_">gameLoop</span>();</span><br><span class="line">&#125;</span><br><span class="line"><span class="title function_">clear</span>();</span><br></pre></td></tr></table></figure>
]]></content>
<categories>
<category>Game</category>
<category>Snake</category>
</categories>
<tags>
<tag>Snake</tag>
</tags>
</entry>
<entry>
<title>Python</title>
<url>/Software/Python/a378bd8e.html</url>
<content><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo new <span class="string">&quot;My New Post&quot;</span></span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-1"><a href="#Run-server-1" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-1"><a href="#Generate-static-files-1" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-1"><a href="#Deploy-to-remote-sites-1" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-2"><a href="#Run-server-2" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-2"><a href="#Generate-static-files-2" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-2"><a href="#Deploy-to-remote-sites-2" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-3"><a href="#Run-server-3" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-3"><a href="#Generate-static-files-3" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-3"><a href="#Deploy-to-remote-sites-3" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-4"><a href="#Run-server-4" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-4"><a href="#Generate-static-files-4" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-4"><a href="#Deploy-to-remote-sites-4" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-5"><a href="#Run-server-5" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-5"><a href="#Generate-static-files-5" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-5"><a href="#Deploy-to-remote-sites-5" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server-6"><a href="#Run-server-6" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files-6"><a href="#Generate-static-files-6" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites-6"><a href="#Deploy-to-remote-sites-6" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
]]></content>
<categories>
<category>Software</category>
<category>Python</category>
</categories>
<tags>
<tag>python</tag>
</tags>
</entry>
<entry>
<title>Algorithm</title>
<url>/Software/Algorithm/17f44e1a.html</url>
<content><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo new <span class="string">&quot;My New Post&quot;</span></span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
]]></content>
<categories>
<category>Software</category>
<category>Algorithm</category>
</categories>
<tags>
<tag>Algorithm</tag>
</tags>
</entry>
<entry>
<title>Android</title>
<url>/Software/Android/5d018fb1.html</url>
<content><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo new <span class="string">&quot;My New Post&quot;</span></span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
]]></content>
<categories>
<category>Software</category>
<category>Android</category>
</categories>
<tags>
<tag>Android</tag>
</tags>
</entry>
<entry>
<title>SQL</title>
<url>/Software/DataBase/SQL/4d712855.html</url>
<content><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo new <span class="string">&quot;My New Post&quot;</span></span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
]]></content>
<categories>
<category>Software</category>
<category>DataBase</category>
<category>SQL</category>
</categories>
<tags>
<tag>Android</tag>
</tags>
</entry>
</search>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/codream/blog.git
git@gitee.com:codream/blog.git
codream
blog
blog
master

搜索帮助