<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Guosen's Blog]]></title><description><![CDATA[Thoughts, stories and ideas.]]></description><link>https://notes.lumx.top/</link><image><url>https://notes.lumx.top/favicon.png</url><title>Guosen&apos;s Blog</title><link>https://notes.lumx.top/</link></image><generator>Ghost 4.48</generator><lastBuildDate>Sun, 01 Mar 2026 22:13:23 GMT</lastBuildDate><atom:link href="https://notes.lumx.top/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Debug C++ CMake project in VS Code]]></title><description><![CDATA[<p>CMakeLists.txt</p><pre><code class="language-cmake">cmake_minimum_required(VERSION 3.10)
project(hello)
set(CMAKE_CXX_FLAGS &quot;${CMAKE_CXX_FLAGS} -Wall -g&quot;)
# set(CMAKE_BUILD_TYPE DEBUG)
add_executable(hello main.cpp)</code></pre><p>launch.json</p><pre><code class="language-json">{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information,</code></pre>]]></description><link>https://notes.lumx.top/debug-c-cmake-project-in-vs-code/</link><guid isPermaLink="false">640d87f7e8b81a0001fbc356</guid><dc:creator><![CDATA[Guosen]]></dc:creator><pubDate>Sun, 12 Mar 2023 08:11:44 GMT</pubDate><content:encoded><![CDATA[<p>CMakeLists.txt</p><pre><code class="language-cmake">cmake_minimum_required(VERSION 3.10)
project(hello)
set(CMAKE_CXX_FLAGS &quot;${CMAKE_CXX_FLAGS} -Wall -g&quot;)
# set(CMAKE_BUILD_TYPE DEBUG)
add_executable(hello main.cpp)</code></pre><p>launch.json</p><pre><code class="language-json">{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  &quot;version&quot;: &quot;0.2.0&quot;,
  &quot;configurations&quot;: [
    {
      &quot;name&quot;: &quot;Debug&quot;,
      &quot;type&quot;: &quot;cppdbg&quot;,
      &quot;request&quot;: &quot;launch&quot;,
      &quot;program&quot;: &quot;${workspaceRoot}/build/hello&quot;,
      &quot;args&quot;: [],
      &quot;stopAtEntry&quot;: false,
      &quot;cwd&quot;: &quot;${workspaceRoot}&quot;,
      &quot;environment&quot;: [],
      &quot;externalConsole&quot;: false,
      &quot;MIMode&quot;: &quot;gdb&quot;,
      &quot;miDebuggerPath&quot;: &quot;/usr/bin/gdb&quot;,
      &quot;setupCommands&quot;: [
        {
          &quot;description&quot;: &quot;Enable pretty-printing for gdb&quot;,
          &quot;text&quot;: &quot;-enable-pretty-printing&quot;,
          &quot;ignoreFailures&quot;: true
        },
        {
          &quot;description&quot;: &quot;Set Disassembly Flavor to Intel&quot;,
          &quot;text&quot;: &quot;-gdb-set disassembly-flavor intel&quot;,
          &quot;ignoreFailures&quot;: true
        }
      ],
      &quot;preLaunchTask&quot;: &quot;build&quot;
    }
  ]
}</code></pre><p>tasks.json</p><pre><code class="language-json">{
  // See https://go.microsoft.com/fwlink/?LinkId=733558
  // for the documentation about the tasks.json format
  &quot;version&quot;: &quot;2.0.0&quot;,
  &quot;options&quot;: {
    &quot;cwd&quot;: &quot;${workspaceRoot}/build&quot;
  },
  &quot;tasks&quot;: [
    {
      &quot;label&quot;: &quot;cmake&quot;,
      &quot;type&quot;: &quot;shell&quot;,
      &quot;command&quot;: &quot;cmake ..&quot;
    },
    {
      &quot;label&quot;: &quot;make&quot;,
      &quot;type&quot;: &quot;shell&quot;,
      &quot;command&quot;: &quot;make -j$(grep -c ^processor /proc/cpuinfo)&quot;
    },
    {
      &quot;label&quot;: &quot;build&quot;,
      &quot;dependsOrder&quot;: &quot;sequence&quot;,
      &quot;dependsOn&quot;: [
        &quot;cmake&quot;,
        &quot;make&quot;
      ]
    }
  ]
}</code></pre>]]></content:encoded></item><item><title><![CDATA[uuidgen in lowercase on Mac OS X]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p><code>uuidgen</code> is a command line tool to generate UUIDs.</p>
<p>On Linux this command returns a lowercase string of a UUID.<br>
But on Mac OS X it returning an uppercase string of a UUID.</p>
<h4 id="sohowtochangethis">So how to change this?</h4>
<p>I have created a simple alias as following:</p>
<pre><code class="language-bash">uuidgen=&apos;uuidgen | tr</code></pre>]]></description><link>https://notes.lumx.top/uuidgen-in-lowercase-on-macos/</link><guid isPermaLink="false">5fcbb5ff7697f00001bc8a28</guid><dc:creator><![CDATA[Guosen]]></dc:creator><pubDate>Sat, 05 Dec 2020 16:35:58 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p><code>uuidgen</code> is a command line tool to generate UUIDs.</p>
<p>On Linux this command returns a lowercase string of a UUID.<br>
But on Mac OS X it returning an uppercase string of a UUID.</p>
<h4 id="sohowtochangethis">So how to change this?</h4>
<p>I have created a simple alias as following:</p>
<pre><code class="language-bash">uuidgen=&apos;uuidgen | tr &quot;[:upper:]&quot; &quot;[:lower:]&quot;&apos;
</code></pre>
<p>Now executing uuidgen will output the following:</p>
<pre><code class="language-bash">0ba34ef2-438a-4635-8f8b-86edec6aefdf
</code></pre>
<p>Simple :)</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Pull for another Git branch without switching]]></title><description><![CDATA[<!--kg-card-begin: markdown--><pre><code class="language-bash">git fetch origin master:master
</code></pre>
<!--kg-card-end: markdown-->]]></description><link>https://notes.lumx.top/pull-for-another-git-branch-without-switching/</link><guid isPermaLink="false">5f1fb8afaecbb300017477a1</guid><dc:creator><![CDATA[Guosen]]></dc:creator><pubDate>Tue, 28 Jul 2020 05:34:41 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><pre><code class="language-bash">git fetch origin master:master
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Searching for Commands in the History]]></title><description><![CDATA[<figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://stackoverflow.com/questions/791765/unable-to-forward-search-bash-history-similarly-as-with-ctrl-r/791800#791800"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Unable to forward search Bash history similarly as with CTRL-r</div><div class="kg-bookmark-description">I am trying to search my bash history similarly as with CTRL-r, but to forward direction. It has been a pain for me, when I just hit once too often CTRL-r, to find the previous command again. How...</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a" alt><span class="kg-bookmark-author">Stack Overflow</span></div></div></a></figure>]]></description><link>https://notes.lumx.top/untitled/</link><guid isPermaLink="false">5f043407af20700001f33320</guid><dc:creator><![CDATA[Guosen]]></dc:creator><pubDate>Tue, 07 Jul 2020 08:37:05 GMT</pubDate><content:encoded><![CDATA[<figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://stackoverflow.com/questions/791765/unable-to-forward-search-bash-history-similarly-as-with-ctrl-r/791800#791800"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Unable to forward search Bash history similarly as with CTRL-r</div><div class="kg-bookmark-description">I am trying to search my bash history similarly as with CTRL-r, but to forward direction. It has been a pain for me, when I just hit once too often CTRL-r, to find the previous command again. How...</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a" alt><span class="kg-bookmark-author">Stack Overflow</span><span class="kg-bookmark-publisher">L&#xE9;o L&#xE9;opold Hertz &#xC900;&#xC601;</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon@2.png?v=73d79a89bded" alt></div></a></figure><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="http://www.gnu.org/software/bash/manual/html_node/Searching.html"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Searching (Bash Reference Manual)</div><div class="kg-bookmark-description">Searching (Bash Reference Manual)</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="http://www.gnu.org/favicon.ico" alt></div></div></a></figure>]]></content:encoded></item><item><title><![CDATA[iPhone部分App无法使用WiFi，但可以使用蜂窝数据的究极解决方案]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>&#x5DF2;&#x7ECF;&#x88AB;&#x8FD9;&#x4E2A;&#x95EE;&#x9898;&#x56F0;&#x6270;&#x5F88;&#x4E45;&#x4E86;&#xFF0C;&#x5C11;&#x5E9F;&#x8BDD;&#xFF0C;&#x5148;&#x8BF4;&#x89E3;&#x51B3;&#x529E;&#x6CD5;&#xFF1A;</p>
<ol>
<li>&#x3010;&#x624B;&#x673A;&#x4E0A;&#x3011;&#x6253;&#x5F00;Watch App&#x5C06;&#x4E0D;&#x80FD;&#x4E0A;&#x7F51;&#x7684;App&#x5BF9;&#x5E94;&#x7684;Apple Watch&#x7248;&#x672C;&#x5B89;&#x88C5;&#x5230;</li></ol>]]></description><link>https://notes.lumx.top/some-app-cannot-use-wifi-on-iphone/</link><guid isPermaLink="false">5e832ef2225e7c000136dd3a</guid><category><![CDATA[life]]></category><dc:creator><![CDATA[Guosen]]></dc:creator><pubDate>Tue, 31 Mar 2020 11:57:24 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>&#x5DF2;&#x7ECF;&#x88AB;&#x8FD9;&#x4E2A;&#x95EE;&#x9898;&#x56F0;&#x6270;&#x5F88;&#x4E45;&#x4E86;&#xFF0C;&#x5C11;&#x5E9F;&#x8BDD;&#xFF0C;&#x5148;&#x8BF4;&#x89E3;&#x51B3;&#x529E;&#x6CD5;&#xFF1A;</p>
<ol>
<li>&#x3010;&#x624B;&#x673A;&#x4E0A;&#x3011;&#x6253;&#x5F00;Watch App&#x5C06;&#x4E0D;&#x80FD;&#x4E0A;&#x7F51;&#x7684;App&#x5BF9;&#x5E94;&#x7684;Apple Watch&#x7248;&#x672C;&#x5B89;&#x88C5;&#x5230;&#x624B;&#x8868;&#xFF08;&#x5982;&#x679C;&#x5DF2;&#x7ECF;&#x5B89;&#x88C5;&#xFF0C;&#x8BF7;&#x5FFD;&#x7565;&#x6B64;&#x6B65;&#x9AA4;&#xFF09;&#x3002;</li>
<li>&#x3010;&#x624B;&#x8868;&#x4E0A;&#x3011;&#x5982;&#x679C;&#x8BE5;App&#x4E0D;&#x662F;&#x5F53;&#x524D;&#x624B;&#x673A;iCloud&#x7ED1;&#x5B9A;&#x7684;Apple ID&#x4E0B;&#x8F7D;&#x7684;&#xFF0C;&#x624B;&#x8868;&#x4E0A;&#x4F1A;&#x5F39;&#x51FA;&#x63D0;&#x793A;&#xFF0C;&#x9700;&#x8981;&#x8FDB;&#x884C;&#x5BC6;&#x7801;&#x9A8C;&#x8BC1;&#x3002;&#x5982;&#x679C;&#x6B64;Apple ID&#x5F00;&#x542F;&#x4E86;&#x53CC;&#x91CD;&#x9A8C;&#x8BC1;&#xFF0C;&#x8BF7;&#x4F7F;&#x7528;&#x5176;&#x4ED6;&#x82F9;&#x679C;&#x8BBE;&#x5907;&#x6216;&#x624B;&#x673A;&#x77ED;&#x4FE1;&#x6765;&#x63A5;&#x6536;&#x9A8C;&#x8BC1;&#x7801;&#x8FDB;&#x884C;&#x9A8C;&#x8BC1;&#x3002;</li>
<li>&#x3010;&#x624B;&#x673A;&#x4E0A;&#x3011;Watch App - Cellular&#xFF0C;&#x5C06;&#x5BF9;&#x5E94;&#x7684;App&#x6743;&#x9650;&#x7531;Off&#x6539;&#x4E3A;Wi-Fi&#xFF0C;&#x5982;&#x4E0B;&#x56FE;&#x3002;&#x5982;&#x679C;&#x8BE5;&#x5217;&#x8868;&#x4E2D;&#x6CA1;&#x6709;&#x65B0;&#x5B89;&#x88C5;&#x7684;App&#xFF0C;&#x8BF7;&#x8010;&#x5FC3;&#x591A;&#x7B49;&#x4E00;&#x4F1A;&#x513F;&#xFF0C;&#x6216;&#x8005;&#x5C1D;&#x8BD5;&#x91CD;&#x542F;&#x624B;&#x8868;&#x3002;<br>
<img src="https://notes.lumx.top/content/images/2020/03/145410ehu3tibjqr4j2q07.jpg" width="85%"></li>
</ol>
<p>&#x95EE;&#x9898;&#x5206;&#x6790;&#xFF1A;<br>
&#x8BE5;&#x95EE;&#x9898;&#x591A;&#x53D1;&#x4E8E;&#x975E;&#x56FD;&#x884C;iPhone&#x642D;&#x914D;&#x56FD;&#x884C;Apple Watch&#x7684;&#x4F7F;&#x7528;&#x573A;&#x666F;&#xFF0C;&#x6839;&#x672C;&#x539F;&#x56E0;&#x662F;&#xFF1A;</p>
<blockquote>
<p>&#x5728;App&#x5C42;&#x9762;&#x7684;&#x7F51;&#x7EDC;&#x7B56;&#x7565;&#x8FD9;&#x4E2A;&#x95EE;&#x9898;&#x4E0A;&#xFF0C;iPhone&#x4F1A;&#x548C;Apple Watch&#x4FDD;&#x6301;&#x4E00;&#x81F4;&#xFF0C;&#x67D0;&#x4E9B;&#x60C5;&#x51B5;&#x4E0B;Apple Watch&#x4F1A;&#x7981;&#x7528;App&#x7684;Wi-Fi&#x6743;&#x9650;&#xFF08;&#x5177;&#x4F53;&#x539F;&#x56E0;&#x4E0D;&#x8BE6;&#xFF09;&#x3002;<br>
&#x800C;&#x975E;&#x56FD;&#x884C;iPhone&#x53C8;&#x65E0;&#x6CD5;&#x9488;&#x5BF9;App&#x8FDB;&#x884C;Wi-Fi&#x6743;&#x9650;&#x63A7;&#x5236;&#xFF0C;&#x53EA;&#x80FD;&#x63A7;&#x5236;&#x6D41;&#x91CF;&#x6743;&#x9650;&#xFF0C;&#x6240;&#x4EE5;&#x6211;&#x4EEC;&#x8981;&#x901A;&#x8FC7;Apple Watch&#x95F4;&#x63A5;&#x6253;&#x5F00;App&#x7684;Wi-Fi&#x6743;&#x9650;&#x3002;</p>
</blockquote>
<p>&#x4E3E;&#x4F8B;&#x6765;&#x8BB2;&#xFF1A;&#x5728;Apple Watch&#x4E0A;&#x7981;&#x7528;&#x7F51;&#x6613;&#x4E91;&#x97F3;&#x4E50;&#x7684;Wi-Fi&#x6743;&#x9650;&#xFF0C;&#x90A3;&#x4E48;iPhone&#x4E0A;&#x7684;&#x7F51;&#x6613;&#x4E91;&#x97F3;&#x4E50;&#x4E5F;&#x5C31;&#x6CA1;&#x6709;Wi-Fi&#x6743;&#x9650;&#x4E86;&#x3002;&#x800C;&#x975E;&#x56FD;&#x884C;iPhone&#x53EA;&#x80FD;&#x63A7;&#x5236;App&#x7684;Cellular Data&#x5F00;&#x5173;&#xFF0C;&#x65E0;&#x6CD5;&#x76F4;&#x63A5;&#x5BF9;App&#x589E;&#x52A0;Wi-Fi&#x6743;&#x9650;&#x3002;<br>
&#x56FD;&#x884C;&#x548C;&#x975E;&#x56FD;&#x884C;&#x7684;App&#x6743;&#x9650;&#x63A7;&#x5236;&#x754C;&#x9762;&#x5BF9;&#x6BD4;&#x5982;&#x4E0B;&#xFF0C;&#x53EF;&#x89C1;&#x975E;&#x56FD;&#x884C;iPhone&#x53EA;&#x80FD;&#x63A7;&#x5236;App&#x7684;&#x6D41;&#x91CF;&#x6743;&#x9650;&#xFF0C;&#x800C;&#x56FD;&#x884C;iPhone&#x53EF;&#x4EE5;&#x5BF9;App&#x7684;Wi-Fi&#x6743;&#x9650;&#x8FDB;&#x884C;&#x63A7;&#x5236;&#x3002;<br>
<img src="https://notes.lumx.top/content/images/2020/03/153840flnnlxopugrktlay.jpg" width="85%"><br>
&#x524D;&#x9762;&#x6307;&#x51FA;&#x4E86;&#x95EE;&#x9898;&#x539F;&#x56E0;&#xFF0C;&#x90A3;&#x4E48;&#x89E3;&#x51B3;&#x529E;&#x6CD5;&#x4E5F;&#x5C31;&#x4E0D;&#x8A00;&#x800C;&#x55BB;&#x4E86;&#x3002;</p>
<ol>
<li>&#x3010;&#x624B;&#x673A;&#x4E0A;&#x3011;&#x628A;App&#x5BF9;&#x5E94;&#x7684;&#x624B;&#x8868;&#x7248;&#x672C;&#x88C5;&#x5230;&#x624B;&#x8868;&#x4E0A;&#xFF0C;&#x5982;&#x679C;&#x662F;&#x5176;&#x4ED6;Apple ID&#x4E0B;&#x8F7D;&#x7684;&#xFF0C;&#x8BF7;&#x6839;&#x636E;&#x63D0;&#x793A;&#x5B8C;&#x6210;&#x9A8C;&#x8BC1;&#x64CD;&#x4F5C;&#x3002;</li>
<li>&#x3010;&#x624B;&#x673A;&#x4E0A;&#x3011;&#x5728;Watch App&#x4E2D;&#x5C06;&#x5BF9;&#x5E94;&#x7684;&#x7A0B;&#x5E8F;Wi-Fi&#x6743;&#x9650;&#x6253;&#x5F00;&#x3002;<br>
&#x53C2;&#x8003;&#xFF1A;</li>
<li>&#x3010;&#x82F9;&#x679C;&#x5BA2;&#x670D;&#x3011;&#x6CA1;&#x6709;&#x9488;&#x5BF9;&#x6027;&#x7684;&#x89E3;&#x51B3;&#x65B9;&#x6848;&#xFF0C;&#x53EB;&#x4F60;&#x6062;&#x590D;&#x624B;&#x673A;&#x7CFB;&#x7EDF;&#x3002;</li>
<li>&#x3010;&#x767E;&#x5EA6;&#x8D34;&#x5427;/&#x77E5;&#x4E4E;&#x3011;&#x6307;&#x51FA;&#x4E86;&#x95EE;&#x9898;&#x7531;Apple Watch&#x5F15;&#x8D77;&#xFF0C;&#x6CA1;&#x8BF4;&#x660E;&#x5177;&#x4F53;&#x539F;&#x56E0;&#xFF0C;&#x6CA1;&#x6709;&#x5177;&#x4F53;&#x64CD;&#x4F5C;&#x6307;&#x5BFC;</li>
<li>&#x3010;&#x5A01;&#x950B;&#x3011;&#x6709;&#x4E00;&#x7BC7;&#x6587;&#x7AE0;&#x8BB2;&#x8FD9;&#x4E2A;&#x95EE;&#x9898;&#xFF0C;&#x524D;&#x9762;&#x4E00;&#x5806;&#x5E9F;&#x8BDD;&#x8BA9;&#x4EBA;&#x5934;&#x76AE;&#x53D1;&#x9EBB;&#xFF0C;&#x6700;&#x540E;&#x8BA9;&#x4F60;&#x5378;&#x8F7D;&#x5176;&#x4ED6;Apple ID&#x4E0B;&#x8F7D;&#x7684;&#x6240;&#x6709;App&#xFF0C;&#x6839;&#x672C;&#x6CA1;&#x51FA;&#x95EE;&#x9898;&#x6839;&#x6E90;&#x3002;</li>
</ol>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Chrome shortcuts]]></title><description><![CDATA[<!--kg-card-begin: markdown--><table>
<thead>
<tr>
<th style="text-align:center">&#x529F;&#x80FD;</th>
<th style="text-align:center">macOS</th>
<th style="text-align:center">Windows</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">&#x65B0;&#x5EFA;&#x5176;&#x4ED6;&#x7528;&#x6237;&#x7A97;&#x53E3;</td>
<td style="text-align:center">&#x2318;&#x21E7;M</td>
<td style="text-align:center">Ctrl Shift M</td>
</tr>
</tbody>
</table>
<!--kg-card-end: markdown-->]]></description><link>https://notes.lumx.top/chrome-shortcuts/</link><guid isPermaLink="false">5e5cc841af0f7c000100267b</guid><dc:creator><![CDATA[Guosen]]></dc:creator><pubDate>Mon, 02 Mar 2020 08:55:19 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><table>
<thead>
<tr>
<th style="text-align:center">&#x529F;&#x80FD;</th>
<th style="text-align:center">macOS</th>
<th style="text-align:center">Windows</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">&#x65B0;&#x5EFA;&#x5176;&#x4ED6;&#x7528;&#x6237;&#x7A97;&#x53E3;</td>
<td style="text-align:center">&#x2318;&#x21E7;M</td>
<td style="text-align:center">Ctrl Shift M</td>
</tr>
</tbody>
</table>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Information about UX]]></title><description><![CDATA[<!--kg-card-begin: markdown--><h2 id="relatedtechnology">Related Technology</h2>
<h3 id="1guilibrary">1. GUI Library</h3>
<p>C++ - QT<br>
Java - Swing<br>
Python - Tkinter</p>
<h3 id="2mobile">2. Mobile</h3>
<p>Andriod - Java/Kotlin<br>
iOS - Objective-C/Swift<br>
Hybrid - React Native</p>
<h3 id="3crossplatform">3. Cross Platform</h3>
<p>Google - Flutter<br>
Microsoft - .Net Core</p>
<h3 id="4web">4. Web</h3>
<p>HTML + CSS + JavaScript</p>
<h2 id="developmentofweb">Development of Web</h2>
<h3 id="1purehtmltagsdivinputbuttontable">1. Pure HTML -</h3>]]></description><link>https://notes.lumx.top/information-about-ux/</link><guid isPermaLink="false">5def250883f3600001c07779</guid><dc:creator><![CDATA[Guosen]]></dc:creator><pubDate>Tue, 10 Dec 2019 05:49:17 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><h2 id="relatedtechnology">Related Technology</h2>
<h3 id="1guilibrary">1. GUI Library</h3>
<p>C++ - QT<br>
Java - Swing<br>
Python - Tkinter</p>
<h3 id="2mobile">2. Mobile</h3>
<p>Andriod - Java/Kotlin<br>
iOS - Objective-C/Swift<br>
Hybrid - React Native</p>
<h3 id="3crossplatform">3. Cross Platform</h3>
<p>Google - Flutter<br>
Microsoft - .Net Core</p>
<h3 id="4web">4. Web</h3>
<p>HTML + CSS + JavaScript</p>
<h2 id="developmentofweb">Development of Web</h2>
<h3 id="1purehtmltagsdivinputbuttontable">1. Pure HTML - tags (div, input, button, table...)</h3>
<h3 id="2htmlcssjavascript">2. HTML + CSS + JavaScript</h3>
<h3 id="3jsframeworkuilibrary">3. JS Framework &amp; UI Library</h3>
<p>JQuery, Bootstrap</p>
<h3 id="4frontendframework">4. Frontend framework</h3>
<p>React, Vue, Angular</p>
<h2 id="recommendedroadmap">Recommended Roadmap</h2>
<h3 id="1baseknowledgeofwebdevelopment">1. Base knowledge of Web Development</h3>
<p>HTML, Div, CSS, JavaScript</p>
<h3 id="2vue">2. Vue</h3>
<p>Vue, Element</p>
<h2 id="backend">Backend</h2>
<h3 id="1java">1. Java</h3>
<ul>
<li>Spring Boot</li>
</ul>
<h3 id="2python">2. Python</h3>
<ul>
<li>Flask</li>
<li>Django</li>
</ul>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[设置npm/yarn国内镜像源]]></title><description><![CDATA[<!--kg-card-begin: markdown--><pre><code class="language-bash">npm config set registry https://registry.npm.taobao.org --global
yarn config set registry https://registry.npm.taobao.org --global
</code></pre>
<p>&#x67E5;&#x770B;</p>
<pre><code class="language-bash">npm config get registry
yarn config get registry
</code></pre>
<!--kg-card-end: markdown-->]]></description><link>https://notes.lumx.top/config-npm-yarn-to-taobao-mirror/</link><guid isPermaLink="false">5dc54c288ecfcd0001e03cfe</guid><dc:creator><![CDATA[Guosen]]></dc:creator><pubDate>Fri, 08 Nov 2019 11:07:24 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><pre><code class="language-bash">npm config set registry https://registry.npm.taobao.org --global
yarn config set registry https://registry.npm.taobao.org --global
</code></pre>
<p>&#x67E5;&#x770B;</p>
<pre><code class="language-bash">npm config get registry
yarn config get registry
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Uninstalling MacTeX]]></title><description><![CDATA[<p><a href="http://www.tug.org/mactex/uninstalling.html">http://www.tug.org/mactex/uninstalling.html</a></p><!--kg-card-begin: markdown--><p>Delete the following folders:</p>
<pre><code class="language-bash">/usr/local/texlive
/Applications/TeX
/Library/TeX/
</code></pre>
<!--kg-card-end: markdown-->]]></description><link>https://notes.lumx.top/uninstall-mactex/</link><guid isPermaLink="false">5dc437908ecfcd0001e03ceb</guid><dc:creator><![CDATA[Guosen]]></dc:creator><pubDate>Thu, 07 Nov 2019 15:27:44 GMT</pubDate><content:encoded><![CDATA[<p><a href="http://www.tug.org/mactex/uninstalling.html">http://www.tug.org/mactex/uninstalling.html</a></p><!--kg-card-begin: markdown--><p>Delete the following folders:</p>
<pre><code class="language-bash">/usr/local/texlive
/Applications/TeX
/Library/TeX/
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Jupyter开机启动]]></title><description><![CDATA[<!--kg-card-begin: markdown--><pre><code class="language-bash">sudo vim /etc/systemd/system/jupyter.service
</code></pre>
<pre><code class="language-bash">[Unit]
Description=Jupyter lab

[Service]
User=wgs
Type=forking
WorkingDirectory=/your/wrok/directory
ExecStart=/usr/bin/tmux new -d -s jupyter
ExecStartPost=/usr/bin/tmux send-keys -t jupyter &quot;cd /your/wrok/directory &amp;&amp; jupyter lab&quot; Enter

[Install]
WantedBy=multi-user.target</code></pre>]]></description><link>https://notes.lumx.top/jupyter-startup/</link><guid isPermaLink="false">5db90a7276fab80001eb8f42</guid><dc:creator><![CDATA[Guosen]]></dc:creator><pubDate>Wed, 30 Oct 2019 04:01:30 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><pre><code class="language-bash">sudo vim /etc/systemd/system/jupyter.service
</code></pre>
<pre><code class="language-bash">[Unit]
Description=Jupyter lab

[Service]
User=wgs
Type=forking
WorkingDirectory=/your/wrok/directory
ExecStart=/usr/bin/tmux new -d -s jupyter
ExecStartPost=/usr/bin/tmux send-keys -t jupyter &quot;cd /your/wrok/directory &amp;&amp; jupyter lab&quot; Enter

[Install]
WantedBy=multi-user.target
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Git将修改追加到最近一次commit]]></title><description><![CDATA[<p>git add .<br>git commit --amend --no-edit</p>]]></description><link>https://notes.lumx.top/git-amend/</link><guid isPermaLink="false">5db6d39c76fab80001eb8f39</guid><dc:creator><![CDATA[Guosen]]></dc:creator><pubDate>Mon, 28 Oct 2019 11:40:53 GMT</pubDate><content:encoded><![CDATA[<p>git add .<br>git commit --amend --no-edit</p>]]></content:encoded></item><item><title><![CDATA[翻转二叉树]]></title><description><![CDATA[<!--kg-card-begin: markdown--><pre><code class="language-cpp">/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *     TreeNode *left;
 *     TreeNode *right;
 *     TreeNode(int x) : val(x), left(NULL), right(NULL) {}
 * };
 */
class Solution {
private:
    void invert(TreeNode *node) {
        if (!node)
            return;
        stack&lt;TreeNode*&gt; stk;
        stk.push(node);
        while(!stk.empty()) {
            TreeNode *tmp = stk.top();
            stk.pop(</code></pre>]]></description><link>https://notes.lumx.top/fan-zhuan-er-cha-shu/</link><guid isPermaLink="false">5d7b830e5eedd20001bfb639</guid><dc:creator><![CDATA[Guosen]]></dc:creator><pubDate>Fri, 13 Sep 2019 11:57:56 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><pre><code class="language-cpp">/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *     TreeNode *left;
 *     TreeNode *right;
 *     TreeNode(int x) : val(x), left(NULL), right(NULL) {}
 * };
 */
class Solution {
private:
    void invert(TreeNode *node) {
        if (!node)
            return;
        stack&lt;TreeNode*&gt; stk;
        stk.push(node);
        while(!stk.empty()) {
            TreeNode *tmp = stk.top();
            stk.pop();
            swap(tmp-&gt;left, tmp-&gt;right);
            if(tmp-&gt;right)
                stk.push(tmp-&gt;right);
            if(tmp-&gt;left)
                stk.push(tmp-&gt;left);
        }
    }

    void invert_recursive(TreeNode *node) {
        if (!node)
            return;
        swap(node-&gt;left, node-&gt;right);
        invert_recursive(node-&gt;left);
        invert_recursive(node-&gt;right);
    }
public:
    TreeNode* invertTree(TreeNode* root) {
        invert(root);
        // invert_recursive(root);
        return root;
    }
};
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[反转链表]]></title><description><![CDATA[<!--kg-card-begin: markdown--><h2 id="c">C++</h2>
<pre><code class="language-cpp">#include &lt;iostream&gt;

using namespace std;

class Node {
public:
    int value;
    Node *next;

    Node(int value) {
        this-&gt;value = value;
        this-&gt;next = nullptr;
    }
};

Node *reverse(Node *head) {
    Node *prev = nullptr, *next;
    while (head) {
        next = head-&gt;next;
        head-&gt;next = prev;
        prev = head;
        head = next;
    }
    return prev;</code></pre>]]></description><link>https://notes.lumx.top/reverse-linked-list/</link><guid isPermaLink="false">5d7b50045eedd20001bfb625</guid><dc:creator><![CDATA[Guosen]]></dc:creator><pubDate>Fri, 13 Sep 2019 08:15:42 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><h2 id="c">C++</h2>
<pre><code class="language-cpp">#include &lt;iostream&gt;

using namespace std;

class Node {
public:
    int value;
    Node *next;

    Node(int value) {
        this-&gt;value = value;
        this-&gt;next = nullptr;
    }
};

Node *reverse(Node *head) {
    Node *prev = nullptr, *next;
    while (head) {
        next = head-&gt;next;
        head-&gt;next = prev;
        prev = head;
        head = next;
    }
    return prev;
}

Node *reverse_recursive(Node *head) {
    if (!head || !head-&gt;next)
        return head;
    Node *ret = reverse_recursive(head-&gt;next);
    head-&gt;next-&gt;next = head;
    head-&gt;next = nullptr;
    return ret;
}

int main() {
    Node *head = new Node(1);
    head-&gt;next = new Node(2);
    head-&gt;next-&gt;next = new Node(3);

    head = reverse(head);

    while (head) {
        cout &lt;&lt; head-&gt;value &lt;&lt; endl;
        head = head-&gt;next;
    }

    return 0;
}
</code></pre>
<h2 id="python">Python</h2>
<pre><code class="language-python"># Definition for singly-linked list.
# class ListNode:
#     def __init__(self, x):
#         self.val = x
#         self.next = None

class Solution:
    def reverseList(self, head: ListNode) -&gt; ListNode:
        prev = None
        while head:
            head.next, prev, head = prev, head, head.next
        return prev
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[清除Windows安全中心保护历史记录]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p><code>C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service\DetectionHistory</code> &#x6E05;&#x7A7A;&#x5373;&#x53EF;</p>
<!--kg-card-end: markdown-->]]></description><link>https://notes.lumx.top/qing-chu-windowsan-quan-zhong-xin-bao-hu-li-shi-ji-lu/</link><guid isPermaLink="false">5cd6c4b6a16bbf00011bbb26</guid><dc:creator><![CDATA[Guosen]]></dc:creator><pubDate>Sat, 11 May 2019 12:49:19 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p><code>C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service\DetectionHistory</code> &#x6E05;&#x7A7A;&#x5373;&#x53EF;</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Manacher求最长回文子串]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Manacher&#x9A6C;&#x62C9;&#x8F66;&#x7B97;&#x6CD5;&#x662F;&#x89E3;&#x51B3;&#x56DE;&#x6587;&#x5B50;&#x4E32;&#x957F;&#x5EA6;&#x7684;&#x7B97;&#x6CD5;&#xFF0C;&#x53EF;&#x4EE5;&#x662F;&#x65F6;&#x95F4;&#x590D;&#x6742;&#x5EA6;&#x4E3A;O(n)&#xFF0C;&#x56DE;&#x6587;&#x5B57;&#x7B26;&#x4E32;&#x5C31;&#x662F;&#x6B63;&#x7740;&#x8BFB;&#xFF0C;&#x53CD;&#x7740;&#x8BFB;&#x90FD;&#x4E00;&#x6837;&#x7684;&#x5B57;</p>]]></description><link>https://notes.lumx.top/manacherqiu-zui-chang-hui-wen-zi-chuan/</link><guid isPermaLink="false">5cc950d60c6665000171f995</guid><dc:creator><![CDATA[Guosen]]></dc:creator><pubDate>Wed, 01 May 2019 08:03:49 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Manacher&#x9A6C;&#x62C9;&#x8F66;&#x7B97;&#x6CD5;&#x662F;&#x89E3;&#x51B3;&#x56DE;&#x6587;&#x5B50;&#x4E32;&#x957F;&#x5EA6;&#x7684;&#x7B97;&#x6CD5;&#xFF0C;&#x53EF;&#x4EE5;&#x662F;&#x65F6;&#x95F4;&#x590D;&#x6742;&#x5EA6;&#x4E3A;O(n)&#xFF0C;&#x56DE;&#x6587;&#x5B57;&#x7B26;&#x4E32;&#x5C31;&#x662F;&#x6B63;&#x7740;&#x8BFB;&#xFF0C;&#x53CD;&#x7740;&#x8BFB;&#x90FD;&#x4E00;&#x6837;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;aba&#xFF0C;abba&#x3002;<br>
&#x7531;&#x4E8E;&#x56DE;&#x6587;&#x4E32;&#x7684;&#x957F;&#x5EA6;&#x53EF;&#x5947;&#x53EF;&#x5076;&#xFF0C; &#x4E3A;&#x907F;&#x514D;&#x5947;&#x5076;&#x5224;&#x65AD;&#xFF0C;Manacher&#x7684;&#x7B2C;&#x4E00;&#x6B65;&#x9884;&#x5904;&#x7406;&#x4E3A;&#x5728;&#x5B57;&#x7B26;&#x4E32;&#x7684;&#x9996;&#x5C3E;&#x548C;&#x6BCF;&#x4E2A;&#x5B57;&#x7B26;&#x7684;&#x95F4;&#x9699;&#x4E2D;&#x90FD;&#x63D2;&#x5165;#&#xFF0C;&#x5982;#a#b#a#&#xFF0C;#a#b#b#a#&#xFF0C;&#x8FD9;&#x6837;&#x8F6C;&#x6362;&#x540E;&#x7684;&#x5B57;&#x7B26;&#x4E32;t&#x6052;&#x4E3A;&#x5947;&#x6570;&#xFF0C;&#x63A5;&#x4E0B;&#x91CC;&#x52A0;&#x5165;&#x4E00;&#x4E2A;&#x8F85;&#x52A9;&#x6570;&#x7EC4;p&#xFF0C;&#x5176;&#x4E2D;p[i]&#x8868;&#x793A;&#x4EE5;t[i]&#x5B57;&#x7B26;&#x4E3A;&#x4E2D;&#x5FC3;&#x7684;&#x56DE;&#x6587;&#x5B50;&#x4E32;&#x7684;&#x534A;&#x5F84;&#xFF0C;&#x82E5;p[i]=1&#xFF0C;&#x90A3;&#x8BE5;&#x56DE;&#x6587;&#x5B50;&#x4E32;&#x5C31;&#x662F;t[i]&#x672C;&#x8EAB;&#x3002;</p>
<pre><code># 1 # 2 # 2 # 1 # 2 # 2 #
1 2 1 2 5 2 1 6 1 2 3 2 1
</code></pre>
<p>&#x7531;&#x4E8E;&#x7B2C;&#x4E00;&#x4E2A;&#x548C;&#x6700;&#x540E;&#x4E00;&#x4E2A;&#x5B57;&#x7B26;&#x90FD;&#x662F;#&#x53F7;&#xFF0C;&#x5E76;&#x4E14;&#x4E5F;&#x9700;&#x8981;&#x641C;&#x7D22;&#x56DE;&#x6587;&#xFF0C;&#x4E3A;&#x4E86;&#x9632;&#x6B62;&#x8D8A;&#x754C;&#xFF0C;&#x8FD8;&#x9700;&#x8981;&#x5728;&#x9996;&#x5C3E;&#x52A0;&#x4E0A;&#x975E;#&#x53F7;&#x5B57;&#x7B26;&#xFF0C;&#x5B9E;&#x9645;&#x64CD;&#x4F5C;&#x65F6;&#xFF0C;&#x6211;&#x4EEC;&#x53EA;&#x9700;&#x8981;&#x7ED9;&#x5F00;&#x5934;&#x52A0;&#x4E0A;&#x975E;#&#x53F7;&#x5B57;&#x7B26;&#xFF0C;&#x7ED3;&#x5C3E;&#x4E0D;&#x7528;&#x52A0;&#x7684;&#x539F;&#x56E0;&#x662F;&#x5B57;&#x7B26;&#x4E32;&#x7684;&#x7ED3;&#x5C3E;&#x6807;&#x8BC6;&#x4E3A;\0&#xFF0C;&#x7B49;&#x4E8E;&#x9ED8;&#x8BA4;&#x52A0;&#x8FC7;&#x4E86;&#xFF0C;&#x4ECE;&#x4E0A;&#x9762;&#x53EF;&#x4EE5;&#x770B;&#x51FA;p[i]-1&#x6B63;&#x597D;&#x4E3A;&#x5143;&#x5B57;&#x7B26;&#x4E32;&#x5728;i&#x5904;&#x7684;&#x56DE;&#x6587;&#x5B50;&#x4E32;&#x7684;&#x957F;&#x5EA6;&#xFF0C;&#x4E0B;&#x9762;&#x53EA;&#x8981;&#x6C42;&#x51FA;p&#x6570;&#x7EC4;&#x4E2D;&#x7684;&#x6700;&#x5927;&#x503C;&#x5C31;&#x884C;&#xFF0C;&#x65B0;&#x589E;&#x4E24;&#x4E2A;&#x8F85;&#x52A9;&#x53D8;&#x91CF;mx&#x548C;id&#xFF0C;&#x5176;&#x4E2D;id&#x4E3A;&#x6700;&#x5927;&#x56DE;&#x6587;&#x5B50;&#x4E32;&#x7684;&#x4E2D;&#x5FC3;&#x7684;&#x4F4D;&#x7F6E;&#xFF0C;mx&#x662F;&#x56DE;&#x6587;&#x4E32;&#x80FD;&#x5EF6;&#x4F38;&#x5230;&#x7684;&#x6700;&#x53F3;&#x7AEF;&#x7684;&#x4F4D;&#x7F6E;&#xFF0C;&#x8FD9;&#x4E2A;&#x7B97;&#x6CD5;&#x7684;&#x6700;&#x6838;&#x5FC3;&#x7684;&#x4E00;&#x884C;&#xFF1A;</p>
<pre><code class="language-cpp">p[i] = mx&gt;i ? min(p[2*id-1],mx-i) : 1;
</code></pre>
<p>&#x5982;&#x56FE;j&#x662F;i&#x5173;&#x4E8E;id&#x7684;&#x5BF9;&#x79F0;&#x70B9;&#xFF1A;<br>
<img src="https://notes.lumx.top/content/images/2019/05/manacher.png" alt="manacher" loading="lazy"><br>
&#x5F53;mx&gt;i&#x65F6;&#x5019;p[i]=min(p[2*id-i],mx-i)=min(p[j],mx-i)&#xFF0C;&#x4E3A;&#x4EC0;&#x4E48;&#x5462;?</p>
<p>&#x6B64;&#x65F6;&#x8FD8;&#x9700;&#x8981;&#x5206;&#x5F00;&#x8BA8;&#x8BBA;&#xFF1A;<br>
&#x5F53;mx-i&gt;p[j]&#x5982;&#x4E0A;&#x56FE;&#xFF0C;&#x7EA2;&#x8272;&#x8DDD;&#x79BB;&#x5927;&#x4E8E;&#x9EC4;&#x8272;&#x8DDD;&#x79BB;&#x3002;&#x4EE5;j&#x4E3A;&#x4E2D;&#x5FC3;&#x7684;&#x56DE;&#x6587;&#x5B50;&#x4E32;&#x5305;&#x542B;&#x5728;id&#x4E3A;&#x4E2D;&#x5FC3;&#x7684;&#x56DE;&#x6587;&#x5B50;&#x4E32;&#x4E2D;&#x3002;i&#x548C;j&#x5BF9;&#x79F0;&#xFF0C;&#x6240;&#x4EE5;i&#x4E3A;&#x4E2D;&#x5FC3;&#x7684;&#x56DE;&#x6587;&#x5B50;&#x4E32;&#x4E5F;&#x5728;id&#x4E3A;&#x4E2D;&#x5FC3;&#x7684;&#x56DE;&#x6587;&#x5B50;&#x4E32;&#x4E2D;&#xFF0C;&#x6240;&#x4EE5;&#x6709;p[i]=p[j]&#x3002;</p>
<p>&#x5F53;mx-i&gt;p[j]&#x65F6;&#x5019;&#xFF0C;j&#x4E3A;&#x4E2D;&#x5FC3;&#x7684;&#x56DE;&#x6587;&#x5B50;&#x4E32;&#x4E0D;&#x4E00;&#x5B9A;&#x5168;&#x90E8;&#x5305;&#x542B;&#x5728;id&#x4E3A;&#x4E2D;&#x5FC3;&#x7684;&#x56DE;&#x6587;&#x5B50;&#x4E32;&#x4E2D;&#xFF0C;&#x57FA;&#x4E8E;&#x5BF9;&#x79F0;&#x6027;&#x53EF;&#x77E5;i&#x4E3A;&#x4E2D;&#x5FC3;&#x7684;&#x56DE;&#x6587;&#x5B50;&#x4E32;&#x6700;&#x53F3;&#x7AEF;&#x53EF;&#x80FD;&#x8D85;&#x51FA;mx&#x5904;&#xFF0C;&#x5C31;&#x662F;p[i]&gt;=mx-i&#xFF0C;&#x5982;&#x4E0B;&#x56FE;&#xFF0C;&#x7EFF;&#x8272;&#x7684;&#x90E8;&#x5206;&#x662F;&#x76F8;&#x540C;&#x7684;&#x3002;&#x81F3;&#x4E8E;p[i]&#x5177;&#x4F53;&#x80FD;&#x5728;mx&#x53F3;&#x8FB9;&#x5EF6;&#x4F38;&#x5230;&#x591A;&#x8FDC;&#xFF0C;&#x5C31;&#x53EA;&#x80FD;&#x5FAA;&#x73AF;&#x5411;&#x53F3;&#x8FB9;&#x6269;&#x5C55;&#x8FB9;&#x6BD4;&#x8F83;&#xFF0C;&#x76F4;&#x81F3;&#x4E0D;&#x4E3A;&#x5B50;&#x56DE;&#x6587;&#x4E32;&#x3002;<br>
<img src="https://notes.lumx.top/content/images/2019/05/manacher2.png" alt="manacher2" loading="lazy"></p>
<p>&#x5BF9;&#x4E8E;mx&lt;=i&#x7684;&#x60C5;&#x51B5;&#xFF0C;i&#x5728;mx&#x7684;&#x53F3;&#x8FB9;&#x672A;&#x77E5;&#x533A;&#x57DF;&#x3002;&#x65E0;&#x6CD5;&#x5BF9;p[i]&#x505A;&#x66F4;&#x591A;&#x7684;&#x5047;&#x8BBE;&#xFF0C;&#x53EA;&#x80FD;p[i]=1,&#x7136;&#x540E;&#x53BB;&#x865A;&#x5E7B;&#x5411;&#x53F3;&#x6BD4;&#x8F83;&#x6269;&#x5C55;&#x3002;</p>
<p>&#x53C2;&#x8003;&#x4EE3;&#x7801;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre><code class="language-cpp">string manacher(const string &amp;s) {
    string t = &quot;$#&quot;;
    for (char i : s) {
        t += i;
        t += &quot;#&quot;;
    }
    int len = t.size();
    vector&lt;int&gt; p(len);
    int mx = 0, id = 0, max_radius = 0, center = 0;
    for (int i = 1; i &lt; len; i++) {
        p[i] = mx &gt; i ? min(p[2 * id - i], mx - i) : 1;
        // &#x5411;&#x53F3;&#x5339;&#x914D;&#x81F3;&#x4E0D;&#x662F;&#x5B50;&#x56DE;&#x6587;&#x4E32;
        while (t[i + p[i]] == t[i - p[i]])
            ++p[i];
        // &#x66F4;&#x65B0; mx,id
        if (mx &lt; i + p[i]) {
            mx = i + p[i];
            id = i;
        }
        // &#x8BB0;&#x5F55;&#x5168;&#x5C40;&#x6700;&#x4F18;&#x89E3;
        if (max_radius &lt; p[i]) {
            max_radius = p[i];
            center = i;
        }
    }
    return s.substr((center - max_radius) / 2, max_radius - 1);
}
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>