<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Maxwell on Medium]]></title>
        <description><![CDATA[Stories by Maxwell on Medium]]></description>
        <link>https://medium.com/@maxwell1996?source=rss-b50ddf743ea8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FTV6GdqWLjdBM2D0_sbhpQ.png</url>
            <title>Stories by Maxwell on Medium</title>
            <link>https://medium.com/@maxwell1996?source=rss-b50ddf743ea8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 11:09:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@maxwell1996/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to install Keil C51 on MacOS with Apple Silicon C]]></title>
            <link>https://medium.com/@maxwell1996/how-to-install-keil-c51-on-macos-with-apple-silicon-c-c6b524fa1c99?source=rss-b50ddf743ea8------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6b524fa1c99</guid>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[apple-silicon]]></category>
            <category><![CDATA[keil]]></category>
            <dc:creator><![CDATA[Maxwell]]></dc:creator>
            <pubDate>Mon, 05 May 2025 06:04:11 GMT</pubDate>
            <atom:updated>2025-05-05T06:05:51.272Z</atom:updated>
            <content:encoded><![CDATA[<h3>Install Keil C51 on MacOS with Apple Silicon Chip</h3><h3>Step 1: Install wine-stable via homebrew package manager.</h3><p><a href="https://gitlab.winehq.org/wine/wine/-/wikis/MacOS">Note</a>: Only supports macOS Catalina (10.15.4) or later, wine also works on Apple Silicon systems via Rosetta2.</p><pre>/bin/bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&quot;</pre><pre>brew install --cask wine-stable</pre><h3>Step 2: Download Keil C51 (C51V961.EXE) via the official website.</h3><p>Note: You can choose MDK-ARM, C251, C166 as you need.</p><h3>Step3: Install Keil C51. Right click the C51V961.EXE file and open it with <strong>Wine Stable</strong>.</h3><p>Note: After installation, there will be two files <strong>Keil uVision5.desktop </strong>and <strong>Keil uVision5.LNK </strong>on your Desktop.</p><h3>Step4: Create a file (e.g. <strong>Keil_C51.command</strong>) to quickly open <strong>Keil uVision5</strong>.</h3><pre>#!/bin/bash<br>wine ~/.wine/drive_c/Keil_v5/UV4/UV4.exe</pre><pre>chmod +x Keil_C51.command</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6b524fa1c99" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Floyd判圈算法(Floyd’s Cycle Finding Algorithm)]]></title>
            <link>https://medium.com/@maxwell1996/floyd%E5%88%A4%E5%9C%88%E7%AE%97%E6%B3%95-floyds-cycle-finding-algorithm-761d371ad556?source=rss-b50ddf743ea8------2</link>
            <guid isPermaLink="false">https://medium.com/p/761d371ad556</guid>
            <category><![CDATA[floyd-cycle-detection]]></category>
            <category><![CDATA[linked-list-cycle]]></category>
            <category><![CDATA[leetcode]]></category>
            <dc:creator><![CDATA[Maxwell]]></dc:creator>
            <pubDate>Mon, 29 Jul 2024 00:06:16 GMT</pubDate>
            <atom:updated>2024-07-29T00:06:16.249Z</atom:updated>
            <content:encoded><![CDATA[<p>看了網路上很多文字和影片說明，都在找環入口時講不清楚，因此寫篇文章記錄一下自己的理解方式。</p><h3>第一部分：找到環中相遇點</h3><p>思路：若是存在環，則快慢指針一起從頭節點出發必會相遇。</p><p>假設：頭節點距離環入口為 x，由環入口至相遇點的距離為 y，由相遇點走到環入口的距離為 z 。快指針移動速度為慢指針的 2 倍，即慢指針走 1 步，快指針走 2 步。</p><p>已知：</p><ul><li>環週長為 y + z</li><li>若慢指針走 x + y 步到相遇點，此時快指針從頭節點所走的距離由上述假設可得出為 2x + 2y</li></ul><p>過程：</p><ul><li>若慢指針走 x + y 步到相遇點，快指針由頭節點走到相遇點的距離應為 x + y + n(y+z)，其中 n 為整數。</li><li>從已知條件可知 2x + 2y = x + y + n(y+z)</li><li>整理後得出 (1) 式 x = (n-1)(y+z) + z</li></ul><p>結論：</p><ul><li>由 (1) 式推得 z ≡ x (mod y+z) ，意即在環中某位置出發，無論速度如何，走 x 距離所到位置與走 z 距離所到位置相同。</li></ul><h3>第二部分：同步走到環入口</h3><p>假設：此時若將快指針速度下降為與慢指針相同，即慢指針走 1 步，快指針走 1 步。</p><p>過程：</p><ul><li>慢指針放回頭節點，並且走 x 距離到環入口。</li><li>快指針保持在相遇點，因速度與慢指針相同，也走 x 距離，此時使用第一部分的結論，最終位置同等於快指針行往前走 z 距離，即到達環入口。</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=761d371ad556" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Macbook如何在iTerm2終端機中透過Touch ID授權sudo指令(How to enable Touch ID for sudo in iTerm2 on Macbook)]]></title>
            <link>https://medium.com/@maxwell1996/macbook%E5%A6%82%E4%BD%95%E5%9C%A8iterm2%E7%B5%82%E7%AB%AF%E6%A9%9F%E4%B8%AD%E9%80%8F%E9%81%8Etouch-id%E6%8E%88%E6%AC%8Asudo%E6%8C%87%E4%BB%A4-how-to-enable-touch-id-for-sudo-in-iterm2-on-macbook-10d645ad51a8?source=rss-b50ddf743ea8------2</link>
            <guid isPermaLink="false">https://medium.com/p/10d645ad51a8</guid>
            <dc:creator><![CDATA[Maxwell]]></dc:creator>
            <pubDate>Mon, 09 Jan 2023 00:55:59 GMT</pubDate>
            <atom:updated>2023-01-09T00:55:59.447Z</atom:updated>
            <content:encoded><![CDATA[<p>第一步：開啟iTerm2，將滑鼠移到iTerm2螢幕上方，點Help搜尋Preferences，接著點Advanced，在下方搜索欄中輸入sudo，找到Allow sessions to survive logging out and back in選項，更改為no</p><p>第二步：使用sudo權限編輯 /etc/pam.d/sudo 檔案</p><pre>sudo vim /etc/pam.d/sudo</pre><p>第三步：首先按 i 切換為 insert 模式，接著寫入auth sufficient pam_tid.so到 # sudo: auth account password session 下的第一行；再按 Esc 後輸入 :wq! 強制寫入(write)並退出(quit)</p><p>第四步：重新開啟 iTerm2 後，用sudo purge 清理系統內存的指令進行測試，可能還會要你手動輸入一次密碼，輸入完後再重複第四步就完成了</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10d645ad51a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>