<?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 Tiffany Chen on Medium]]></title>
        <description><![CDATA[Stories by Tiffany Chen on Medium]]></description>
        <link>https://medium.com/@tiffanychen1118?source=rss-21880d8807bf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*LbsTNZicUUwUAGirn0tF8Q@2x.jpeg</url>
            <title>Stories by Tiffany Chen on Medium</title>
            <link>https://medium.com/@tiffanychen1118?source=rss-21880d8807bf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 22:02:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tiffanychen1118/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[[Graphics] The Graphical Interpretation of the Reflection Vector Calculation Formula]]></title>
            <link>https://medium.com/@tiffanychen1118/graphical-interpretation-of-the-reflection-vector-2d826236650d?source=rss-21880d8807bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d826236650d</guid>
            <category><![CDATA[vector]]></category>
            <category><![CDATA[graphics]]></category>
            <category><![CDATA[computer-graphics]]></category>
            <dc:creator><![CDATA[Tiffany Chen]]></dc:creator>
            <pubDate>Fri, 05 Jul 2024 01:06:13 GMT</pubDate>
            <atom:updated>2024-07-05T01:56:23.463Z</atom:updated>
            <content:encoded><![CDATA[<h4>In this article, we’ll explore the graphical interpretation of the reflection vector calculation formula r = d-2(d ∙ n) n. If you’re curious about the reasons behind this formula, I hope this article help!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oUqytMwZaE53bqKCMzOb8A.png" /><figcaption>The Graphical Interpretation of the Reflection Vector Calculation Formula</figcaption></figure><p>While working on the <a href="https://learnopengl.com/Lighting/Basic-Lighting">Phong Lighting Model</a> [1], I used the <a href="https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-reflect">reflect()</a>[2] API to compute the direction of the reflection vector. I wonder if there’s a way to calculate the vector without using the API. After a few searches, I came across this formula:</p><blockquote><em>r = d-2(d ∙ n) n</em></blockquote><p>While looking at this formula, I was kind of puzzled by this equation and couldn’t see how it creates the reflection vector. So, I took some time to think about it visually.</p><p>I found this amazing article, <a href="http://www.sunshine2k.de/articles/coding/vectorreflection/vectorreflection.html">Vector reflection at a surface</a> [3], with illustrations about vector reflection at a surface. I decided to write it in my own words. If you have similar questions, feel free to check it out. I hope this article is helpful!</p><pre><strong>💡 Contents:</strong><br>1. Reflection Vector<br>2. Graphical Interpretation<br>3. Conclusion</pre><h3>1. Reflection Vector</h3><p>The formula for reflecting a vector according to the surface normal is:</p><blockquote><em>r = d-2(d ∙ n) n</em></blockquote><p>In this formula, we assume that the vectors are all normalized. That is, they are all unit vectors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8gpWNNZbWO67iao-trcxEA.png" /></figure><h3>2. Graphical Interpretation</h3><p>Now, let’s take a look at how to form this formula.</p><ol><li>To better understand in the next steps, let’s use the notation d&#39; to represent the opposite direction of d. That is, d&#39; = -d .</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uMC8jiK3VyBCqrA96g1qDA.png" /></figure><p>2. Project d’ to n. That is, (d’ ∙ n) n in the following figure。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SgLbtUWcd0vNsq_qniJLDw.png" /></figure><p>3. The graphical interpretation of vector addition is the direction from the starting position to the ending position. Therefore, by adding the direction vector d and the projected vector (d’ ∙ n) n, we can obtain the purple vector d + (d’ ∙ n) n.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nStbeFHpcUWLADoc14hufg.png" /></figure><p>4. Scale the purple vector by 2. We could get 2(d + (d’ ∙ n) n) as shown in the following figure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OjZvdbtA06DHAZ1FJxITCA.png" /></figure><p>5. Lastly, by adding d’ and 2(d + (d’ ∙ n) n), we could get the reflection vector r = d’ + 2(d + (d’ ∙ n) n). After cleaning it up, we’ll get the vector reflection formula r = d - 2(d ∙ n) n.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RUT6zNNQxwzcolRGJ4QkLA.png" /></figure><h3>3. Conclusion</h3><p>In this article, we explore the graphical interpretation of the vector reflection formula r = d - 2(d ∙ n) n. While it&#39;s helpful to have existing APIs, <strong>understanding the logic and reasons behind the scenes can give us a better sense of 3D graphics math</strong>.</p><p>Sometimes, advanced algorithms are built on basic approaches. Thus, understanding the inner workings can bring clarity.</p><p>If you’re interested in implementing the Phong Lighting Model mentioned earlier, the source code is available on my <a href="https://github.com/tiffanychen1118/Phong-Lighting">Github</a>[4]. Feel free to check it out!</p><h3>Reference</h3><ol><li><a href="https://learnopengl.com/Lighting/Basic-Lighting">LearnOpenGL — Basic Lighting</a></li><li><a href="https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-reflect">reflect — Win32 apps</a></li><li><a href="http://www.sunshine2k.de/articles/coding/vectorreflection/vectorreflection.html#:~:text=Reflection%20in%20a%20nutshell%3A&amp;text=The%20formula%20w%20%3D%20v%20%2D%202,not%20a%20point%20in%20space">Vector reflection at a surface — Sunshine’s Homepage</a>.</li><li><a href="https://github.com/tiffanychen1118/Phong-Lighting">Phong-Lighting — Github</a></li></ol><p><em>－2024.07.04。</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d826236650d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Graphics] 光源反射向量圖形意義（Vector Reflection）]]></title>
            <link>https://medium.com/@tiffanychen1118/vector-reflection-cn-5101f8ff99dc?source=rss-21880d8807bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/5101f8ff99dc</guid>
            <category><![CDATA[光源反射]]></category>
            <category><![CDATA[軟體工程筆記]]></category>
            <category><![CDATA[反射向量]]></category>
            <category><![CDATA[電腦圖學]]></category>
            <dc:creator><![CDATA[Tiffany Chen]]></dc:creator>
            <pubDate>Thu, 04 Jul 2024 15:20:52 GMT</pubDate>
            <atom:updated>2024-07-05T01:11:55.182Z</atom:updated>
            <content:encoded><![CDATA[<h4>本篇將以圖形意義說明反射向量計算公式，若有興趣了解 r = d-2(d ∙ n) n 的物理意義的話，歡迎參考看看唷。</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oUqytMwZaE53bqKCMzOb8A.png" /><figcaption>計算光源反射向量（Vector Reflection）</figcaption></figure><p>最近在寫 <a href="https://learnopengl.com/Lighting/Basic-Lighting">Phong Lighting Model</a>[1] 時直接用了內建 API— <a href="https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-reflect">reflect()</a>[2]，來計算光源碰到平面的反射角。後來想說查一下如果沒有這個 API 的話，要怎麼計算反射向量。於是，查到了這個式子：</p><blockquote><em>r = d-2(d ∙ n) n</em></blockquote><p>看著這個公式，畫著向量在紙上，想不懂為什麼這樣可以算出反射向量。於是花了點時間想了一下反射向量公式的圖形意義，也查到了這篇很棒的示意圖 — <a href="http://www.sunshine2k.de/articles/coding/vectorreflection/vectorreflection.html">Vector reflection at a surface</a>[3]，在這裡筆記起來，若有相同疑問的話，歡迎參考看看唷。</p><pre><strong>💡 Contents:</strong><br>1. 反射向量計算公式<br>2. 物理意義<br>3. 總結</pre><h3>1. 反射向量計算公式</h3><p>反射向量計算公式為：</p><blockquote><em>r = d-2(d ∙ n) n</em></blockquote><p>在這邊假設向量都已正規化（normalized），即向量長度都為 1。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8gpWNNZbWO67iao-trcxEA.png" /><figcaption>反射向量計算公式：r = d-2(d ∙ n) n</figcaption></figure><h3>2. 物理意義</h3><p>接下來，用向量的方式來看看這個公式怎麼導出來的吧！</p><ol><li>為了方便後面理解，先畫出 d 的反方向 d’，即 d’ = -d。</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uMC8jiK3VyBCqrA96g1qDA.png" /></figure><p>2. 將 d’ 投影到 n，即圖中 (d’ ∙ n) n。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SgLbtUWcd0vNsq_qniJLDw.png" /></figure><p>3. 用向量加法，則可導出紫向量 d + (d’ ∙ n) n，因為向量加法在圖形上的意義是起點連向終點的向量。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nStbeFHpcUWLADoc14hufg.png" /></figure><p>4. 把這個向量拉長兩倍，就會延伸如下圖 2(d + (d’ ∙ n) n)。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OjZvdbtA06DHAZ1FJxITCA.png" /></figure><p>5. 最後一步了！同樣依向量加法的物理意義，可得反射向量 r = d’ + 2(d + (d’ ∙ n) n)。整理整理之後，就變成網路上查到的反射向量公式啦！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RUT6zNNQxwzcolRGJ4QkLA.png" /></figure><h3>3. 總結</h3><p>本篇中，我們以向量的圖形意義走過反射向量公式 r = d -2(d ∙ n) n 的由來。雖然現在很多 API 很方便，但了解背後原理的好處是，可以增加一些 sense。<strong>有時候比較進階的演算法是從基本的模型變形而來，有事沒事看看背後的原理能增加一些感覺</strong>。如果對先前提到的 Phong Lighting Model 的實作有興趣的話，原始碼放在 <a href="https://github.com/tiffanychen1118/Phong-Lighting">Github</a> [4]，歡迎參考看看唷。</p><h3>Reference</h3><ol><li><a href="https://learnopengl.com/Lighting/Basic-Lighting">LearnOpenGL — Basic Lighting</a></li><li><a href="https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-reflect">reflect — Win32 apps</a></li><li><a href="http://www.sunshine2k.de/articles/coding/vectorreflection/vectorreflection.html#:~:text=Reflection%20in%20a%20nutshell%3A&amp;text=The%20formula%20w%20%3D%20v%20%2D%202,not%20a%20point%20in%20space">Vector reflection at a surface — Sunshine’s Homepage</a>.)</li><li><a href="https://github.com/tiffanychen1118/Phong-Lighting">Phong-Lighting — Github</a></li></ol><p><em>－2024.07.04。</em></p><p>想敲碗什麼樣的內容，或資訊有誤/欲補充的話，歡迎在下方留言讓我知道，不好意思公開的話，也歡迎在Google 表單留言 : )</p><p>如果覺得文章有幫助的話，也歡迎點擊連結，<a href="https://www.buymeacoffee.com/tiffanychen"><strong>贊助我一杯咖啡</strong></a>唷☕</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdocs.google.com%2Fforms%2Fd%2Fe%2F1FAIpQLSdlNmjOCiM8_ZD_ky0WbP5MIwvPh4hFtoMn33arR0i3EnClUg%2Fviewform%3Fembedded%3Dtrue&amp;display_name=Google+Docs&amp;url=https%3A%2F%2Fdocs.google.com%2Fforms%2Fd%2Fe%2F1FAIpQLSdlNmjOCiM8_ZD_ky0WbP5MIwvPh4hFtoMn33arR0i3EnClUg%2Fviewform%3Fusp%3Dsend_form&amp;image=https%3A%2F%2Flh3.googleusercontent.com%2FImthiHnvFSvl_x288sJvJKMpK98Nx3BX-UTLeIPMjC3mlMB12_yOXc95DGCCpkzS4SWM7gr-SgM%3Dw1200-h630-p&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=google" width="760" height="675" frameborder="0" scrolling="no"><a href="https://medium.com/media/c84be3f46eefc8796165c7a5663dff36/href">https://medium.com/media/c84be3f46eefc8796165c7a5663dff36/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5101f8ff99dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[C++] 函式的結尾加上 const (const member function)]]></title>
            <link>https://medium.com/@tiffanychen1118/cplusplus-const-member-function-6926bdc53917?source=rss-21880d8807bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/6926bdc53917</guid>
            <category><![CDATA[軟體工程筆記]]></category>
            <category><![CDATA[const]]></category>
            <category><![CDATA[cplusplus]]></category>
            <dc:creator><![CDATA[Tiffany Chen]]></dc:creator>
            <pubDate>Thu, 16 May 2024 12:34:34 GMT</pubDate>
            <atom:updated>2024-05-16T12:40:24.489Z</atom:updated>
            <content:encoded><![CDATA[<h4>防呆好幫手 const，放在 class 成員函式的結尾代表什麼意思呢？</h4><blockquote>Q：在 class 中，函式的結尾加上 const 是什麼意思呢？</blockquote><blockquote>A：使這個函式不能改動成員變數，若改動了，在編譯階段會有 error，也就是防呆機制啦。</blockquote><p>C++ 中，const 有許多種用法，大體是不能改變，擺在不同地方的意義略有不同，是大型程式開發的好幫手。之前本來想大統整 const 的用法，後來發現沒有正在用的話沒什麼感覺。最近碰到在函式結尾加 const，查一下之後想說筆記起來。本篇分享 const 加在函式結尾的用法，那我們就來看看範例吧！</p><pre><strong>💡 Contents:</strong><br>1. 範例<br>2. 使用時機<br>3. 總結</pre><h3>1. 範例</h3><p>先上一個簡單的 class，有一個成員變數 m_var，一個結尾有 const 的成員函式 Print() 。</p><h4>● 在函式內讀取成員變數的值</h4><pre>#include &lt;iostream&gt;<br><br>class MyClass {<br>public:<br>    MyClass() {<br>        m_var = 0;<br>    };<br>    void Print() const {<br>        std::cout &lt;&lt; &quot;m_var = &quot; &lt;&lt; m_var &lt;&lt; std::endl;<br>    }<br>private:<br>    int m_var;<br>};<br>int main() {<br>    <br>    MyClass myClass;<br>    myClass.Print();    <br>    return 0;<br>}</pre><p>Output:</p><pre>m_var = 0</pre><p>讀取成員變數可以正常編譯正常執行。</p><h4>● 在函式內改動成員變數的值</h4><p>那如果動到了成員變數的值會如何呢？</p><pre>#include &lt;iostream&gt;<br><br>class MyClass {<br>public:<br>    MyClass() {<br>        m_var = 0;<br>    };<br>    void Print() const {<br>        m_var += 1;<br>        std::cout &lt;&lt; &quot;m_var = &quot; &lt;&lt; m_var &lt;&lt; std::endl;<br>    }<br>private:<br>    int m_var;<br>};<br>int main() {<br>    <br>    MyClass myClass;<br>    myClass.Print();    <br>    return 0;<br>}</pre><p>Output:</p><pre>ERROR!<br>/tmp/pJEIuYjXRP.cpp: In member function &#39;void MyClass::Print() const&#39;:<br>/tmp/pJEIuYjXRP.cpp:9:15: error: assignment of member &#39;MyClass::m_var&#39; in read-only object<br>    9 |         m_var += 1;<br>      |         ~~~~~~^~~~</pre><p><strong>如果改動到成員變數的值的話，在編譯階段會出現錯誤</strong>，告知在 read-only 的函式改動到成員變數的值啦。</p><h3>2. 使用時機</h3><blockquote>現在知道把 const 加在函式結尾的效果了，那麼，什麼情況會用到呢？</blockquote><p>const 很多時候加與不加不是「絕對」，不加，程式也不會爆掉，但<strong>加了，會讓以後更好維護</strong>，讓新看到的人更快理解這個函式的作用，是大型程式開發的好幫手。</p><h4>● Get() 類型函式</h4><p>在 class 中，為了保護成員變數，時常用 GetXXX() 來讀取成員變數的值，這種很適合加上 const，代表這個函式就只是讀取用的。當後人需要用這個函式改動成員變數的值的時候，因為看到了 const，會讓他多想一下這樣改好嗎？這樣有破壞原本的用途嗎？還是另外創別的函式呢？</p><h4>● Print() 類型函式</h4><p>如同這次的範例，因為只是要印出值，加上 const 後可以避免不小心改動到成員變數的值。</p><h4>● Bind()、Unbind() 類型函式</h4><p>在計算機圖學領域中，常常會看到 Bind() 跟 Unbind()，使某個 buffer 變成正在使用的，或是取消正在使用的 buffer，這種情況也滿適合的。</p><h3>3. 總結一下</h3><p>const 在函式結尾的意思是：</p><ul><li>使這個函式變成 read-only function，aka 不能改動成員變數的值</li><li>大型程式開發好幫手</li><li>防呆撇步 +1</li></ul><p>最後，分享一個好用的簡易線上編譯器－<a href="https://www.programiz.com/cpp-programming/online-compiler/">C++ Online Compiler</a>。C++ Online Compiler 是線上編輯、編譯 C++ 的網站，如果有小程式想快速試一下的話，推薦可以用這個線上編譯器唷。</p><h3>Reference</h3><ul><li><a href="https://learn.microsoft.com/en-us/cpp/cpp/const-cpp?view=msvc-170">const (C++)</a></li><li><a href="https://stackoverflow.com/questions/3141087/what-is-meant-with-const-at-end-of-function-declaration">What is meant with “const” at end of function declaration?</a></li></ul><p><em>－2024.05.16。</em></p><p>想敲碗什麼樣的內容，或資訊有誤/欲補充的話，歡迎在下方留言讓我知道，不好意思公開的話，也歡迎在Google 表單留言 : )</p><p>如果覺得文章有幫助的話，也歡迎點擊連結，<a href="https://www.buymeacoffee.com/tiffanychen"><strong>贊助我一杯咖啡</strong></a>唷☕</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdocs.google.com%2Fforms%2Fd%2Fe%2F1FAIpQLSdlNmjOCiM8_ZD_ky0WbP5MIwvPh4hFtoMn33arR0i3EnClUg%2Fviewform%3Fembedded%3Dtrue&amp;display_name=Google+Docs&amp;url=https%3A%2F%2Fdocs.google.com%2Fforms%2Fd%2Fe%2F1FAIpQLSdlNmjOCiM8_ZD_ky0WbP5MIwvPh4hFtoMn33arR0i3EnClUg%2Fviewform%3Fusp%3Dsend_form&amp;image=https%3A%2F%2Flh3.googleusercontent.com%2FImthiHnvFSvl_x288sJvJKMpK98Nx3BX-UTLeIPMjC3mlMB12_yOXc95DGCCpkzS4SWM7gr-SgM%3Dw1200-h630-p&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=google" width="760" height="675" frameborder="0" scrolling="no"><a href="https://medium.com/media/c84be3f46eefc8796165c7a5663dff36/href">https://medium.com/media/c84be3f46eefc8796165c7a5663dff36/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6926bdc53917" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[PowerPoint] 如何對齊目錄頁的點點點]]></title>
            <link>https://medium.com/@tiffanychen1118/powerpoint-dot-leader-tab-workaround-04d738a611d9?source=rss-21880d8807bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/04d738a611d9</guid>
            <category><![CDATA[powerpoint]]></category>
            <category><![CDATA[目錄]]></category>
            <category><![CDATA[目錄對齊]]></category>
            <dc:creator><![CDATA[Tiffany Chen]]></dc:creator>
            <pubDate>Thu, 07 Mar 2024 04:45:20 GMT</pubDate>
            <atom:updated>2024-04-17T17:15:09.068Z</atom:updated>
            <content:encoded><![CDATA[<h4>用 Tab 和底線樣式對齊頁次前的虛線</h4><p>製作 PowerPoint 目錄頁時，一時不知道該用什麼關鍵字搜尋如何對齊頁次前的點點點，找了一番後，終於搜尋到了！筆記起來，感覺以後還會再用到。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V6GJhMSvl942TEbS9uwElQ.jpeg" /><figcaption>對齊目次頁的點點點教學</figcaption></figure><h3>0. 測試環境</h3><ul><li>Windows 11</li><li>PowerPoint 2016</li></ul><h3>1. 困擾</h3><p>手動按點點點符號，到底時，總是有那麼一點沒對齊，強迫症發作，看得很困擾。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UjtxCXHka_M7eOYHZCTkEg.jpeg" /><figcaption>左圖：手動按句點，總是有一點沒對齊。右圖：使用 Tab + 更改底線樣式對齊頁次。</figcaption></figure><h3>2. 對齊步驟</h3><p>Microsoft 討論區提供的<a href="https://answers.microsoft.com/en-us/msoffice/forum/all/within-a-2011-powerpoint-table-is-there-a-way-to/32c07c83-82d7-4448-b9a7-a802d85b78c3">回答</a>[1]是 PowerPoint 沒有像 Word 一樣的<a href="https://support.microsoft.com/zh-tw/office/%E5%9C%A8%E5%AE%9A%E4%BD%8D%E9%BB%9E%E4%B9%8B%E9%96%93%E9%A1%AF%E7%A4%BA%E9%BB%9E%E6%88%96%E5%89%8D%E7%BD%AE%E5%AD%97%E5%85%83-c80b62d0-2244-4078-95bd-8c82f91440ba">在定位點之前更改前導符</a>[2]的功能，但可以參考提供的替代方案，以下用討論區介紹的替代方案對齊目錄頁點點點。</p><h4>● 步驟一：輸入目錄和頁次</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ofknRJNqn7IHix6qWe3vTA.jpeg" /></figure><h4>● 步驟二：在目錄和頁次間按 Tab</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_NJYhiuN69BWhZ8su1kiNA.jpeg" /></figure><h4>● 步驟三：反白選取 Tab 區→字型→底線樣式→選擇虛線</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CCCr-HFQZqDdLt90K1J8ig.jpeg" /></figure><h4>● 步驟四：依序改變其他行</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VvreTic9zPimAJ4pDfc2uQ.jpeg" /></figure><h4>● 完成！</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5UkULUNNJI9pkwskZbwbkg.jpeg" /></figure><p>如果有其他方法的話，歡迎與我分享唷！</p><h3>References</h3><p>[1] <a href="https://answers.microsoft.com/en-us/msoffice/forum/all/within-a-2011-powerpoint-table-is-there-a-way-to/32c07c83-82d7-4448-b9a7-a802d85b78c3">Within a 2011 Powerpoint Table, is there a way to add Tab Leaders when using tabs?</a></p><p>[2] <a href="https://support.microsoft.com/zh-tw/office/%E5%9C%A8%E5%AE%9A%E4%BD%8D%E9%BB%9E%E4%B9%8B%E9%96%93%E9%A1%AF%E7%A4%BA%E9%BB%9E%E6%88%96%E5%89%8D%E7%BD%AE%E5%AD%97%E5%85%83-c80b62d0-2244-4078-95bd-8c82f91440ba">在定位點之間顯示點或前置字元</a></p><p><em>－2024.03.06。</em></p><p>想敲碗什麼樣的內容，或資訊有誤/欲補充的話，歡迎在下方留言讓我知道，不好意思公開的話，也歡迎在Google 表單留言 : )</p><p>如果覺得文章有幫助的話，也歡迎點擊連結，<a href="https://www.buymeacoffee.com/tiffanychen"><strong>贊助我一杯咖啡</strong></a>唷☕</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdocs.google.com%2Fforms%2Fd%2Fe%2F1FAIpQLSdlNmjOCiM8_ZD_ky0WbP5MIwvPh4hFtoMn33arR0i3EnClUg%2Fviewform%3Fembedded%3Dtrue&amp;display_name=Google+Docs&amp;url=https%3A%2F%2Fdocs.google.com%2Fforms%2Fd%2Fe%2F1FAIpQLSdlNmjOCiM8_ZD_ky0WbP5MIwvPh4hFtoMn33arR0i3EnClUg%2Fviewform%3Fusp%3Dsend_form&amp;image=https%3A%2F%2Flh3.googleusercontent.com%2FImthiHnvFSvl_x288sJvJKMpK98Nx3BX-UTLeIPMjC3mlMB12_yOXc95DGCCpkzS4SWM7gr-SgM%3Dw1200-h630-p&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=google" width="760" height="675" frameborder="0" scrolling="no"><a href="https://medium.com/media/c84be3f46eefc8796165c7a5663dff36/href">https://medium.com/media/c84be3f46eefc8796165c7a5663dff36/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=04d738a611d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[美國工作] 以 Mentor 的角度，給暑期實習生的五個建議]]></title>
            <link>https://medium.com/@tiffanychen1118/us-summer-internships-f0d0bc07ef89?source=rss-21880d8807bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0d0bc07ef89</guid>
            <category><![CDATA[美國工作]]></category>
            <category><![CDATA[美國實習]]></category>
            <dc:creator><![CDATA[Tiffany Chen]]></dc:creator>
            <pubDate>Wed, 28 Feb 2024 13:31:45 GMT</pubDate>
            <atom:updated>2025-03-26T12:50:39.864Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>去年夏天，第一次當了暑期實習生的 Mentor ，產生了一些感觸和體悟。本篇分享以 Mentor 的角度觀察暑期實習生的幾個觀點，無論是正在找實習的你，或是對實習好奇的你，歡迎參考看看唷。</em></h4><blockquote>【嗨，我搬家了！本站文章陸續搬家中，閱讀全文請至 →</blockquote><blockquote><a href="https://tiffanysnotes.com/us-summer-internships/">[美國工作] 以 Mentor 的角度，給暑期實習生的五個建議</a>，</blockquote><blockquote>謝謝 : ) 】</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0d0bc07ef89" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[軟體工程] 二進位表達負數：1’s Complement 與 2’s Complement]]></title>
            <link>https://medium.com/@tiffanychen1118/negative-binary-numbers-9839d3760bc1?source=rss-21880d8807bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/9839d3760bc1</guid>
            <category><![CDATA[軟體工程筆記]]></category>
            <category><![CDATA[binary-number]]></category>
            <category><![CDATA[二進位]]></category>
            <dc:creator><![CDATA[Tiffany Chen]]></dc:creator>
            <pubDate>Tue, 15 Aug 2023 03:50:04 GMT</pubDate>
            <atom:updated>2023-08-15T03:52:17.114Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>在電腦的世界中，如何用二進位表達負數？一補數與二補數入門介紹。</em></h4><blockquote><em>「</em>如何用二進位表達負數？」</blockquote><p>最近被問到如何用二進位表達負數，腦中浮現了大學的數位電路設計課程，無奈的是短時間內依稀記得很多 1，什麼東西 0、1 交換，很遺憾地沒有完整回答出這個問題。對話結束後，這個問題還是時不時的浮在腦海裡，乾脆來複習一下<strong>用二進位表達負數的方法</strong>，那我們就開始吧。</p><pre><strong>💡 Contents:</strong><br>1. 如何用二進位表達負數？<br>2. Signed Magnitude<br>3. 1&#39;s Complement<br>4. 2&#39;s Complement<br>5. 總結</pre><h3>1. 如何用二進位表達負數？</h3><p>用二進位表達負數的方法有三種：</p><ol><li><strong>Signed Magnitude</strong> <br>用第一位表達正負數，0 為正，1 為負</li><li><strong>1’s Complement</strong> <br>一補數</li><li><strong>2’s Complement</strong> <br>二補數，為電腦的世界中，最普遍用來表達負數的方法</li></ol><p>這三個的差別在哪呢？接下來，用 -2 這個負數來試試看吧！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1849JDueh_EG0KrNWRop3A.jpeg" /><figcaption>用 Signed Magnitude、1’s Complement、2’s Complement 表達 4 bit 二進位數字統整。</figcaption></figure><h3>2. Signed Magnitude</h3><h4>2 和 -2 範例</h4><ul><li>十進位：2 <br>二進位：0010</li><li>十進位：-2 <br>二進位：1010</li></ul><h4>算法</h4><p>Signed Magnitude 為最直觀的表達方法 —<strong>用第一項表達正負號</strong>。第一項稱為 Signed Bit，0 代表正，1 代表負，後續位數全數相同。</p><h4>範圍</h4><p>4 bit 數字可表達的範圍為 -7 ~ +7。</p><h4>優點</h4><p>最直觀，對人類來說很好懂。</p><h4>缺點</h4><p>雖然對人類來說最好懂，但對機器而言，除了字面上的理解之外，還要考慮加減等運算時的複雜度，因此衍生出了接下來兩種對電腦比較友善的方法— 1’s Complement 和 2’s Complement。</p><h3>3. 1’s Complement</h3><h4>2 和 -2 範例</h4><ul><li>十進位：2 <br>二進位：0010</li><li>十進位：-2 <br>二進位：1101</li></ul><h4>算法</h4><p>正數的 0、1 全部交換。</p><h4>範圍</h4><p>4 bit 數字可表達的範圍同 Signed Magnitude，為 -7 ~ +7。</p><h4>優點－加法器友善</h4><p>用一補數表達負數之後，減法的運算<strong>「A - B」</strong>，可使用<strong>「 A + (-B)」</strong>算得，即用數字 A 加上數字 B 的一補數而來，再依進位（carry）和溢位（overflow）的狀況後處理，得最終結果。</p><h4>缺點－不唯一的「0」</h4><p>值得注意的是，若用 1’s Complement 表達負數，「0」會用兩個表達方法— 「0000」和「1111」，這兩者都是 0。+0 和 -0 代表的是同樣的數字，但在一補數的二進位表示法卻不相同，因此造成一些混淆，也帶出了下一個方法 — 2’s Complement。</p><h3>4. 2’s Complement</h3><h4>2 和 -2 範例</h4><ul><li>十進位：2 <br>二進位：0010</li><li>十進位：-2 <br>二進位：1110</li></ul><h4>算法</h4><p>1’s Complement 再加 1。</p><h4>範圍</h4><p>4 bit 數字可表達的範圍為 -8 ~ +7，多一個可表達的數字了。</p><h4>優點－唯一的「0」</h4><p>「0」的表示方法只有「0000」一種，不再有兩種表達方法了，達到避免混淆的效果。</p><p>因為 0 的表達方法沒有重複的關係，用 2’s Complement 來表達負數的話，多了一種排列組合可以拿來用，也就是 -8（1000），所以 2’s Complement 對比前兩個方法還有一個好處 —<strong>能表達的數字多了一個</strong>。</p><h3>5. 總結</h3><p>還記得大學這些基礎課程時學什麼都覺得好辛苦，在業界打滾幾年後漸漸有了一些「感覺」，也開始會主動回頭去看看一些以前學過但已忘記（或是根本沒理解過 😂）的內容。</p><p>本篇初步介紹如何用二進位表達負數 — Signed Magnitude、1’s Complement、和 2’s Complement。其中，因為數學計算的關係，2’s Complement 為現今電腦的世界中最主流的方法。</p><p>本篇提到 1’s Complement 和 2’s Complement 有利於電腦的計算，關於怎麼加，怎麼依 carry 和 overflow 後處理，就留給下一篇討論了，有興趣的讀者，歡迎先用關鍵字「Binary addition」搜尋看看，那我們就下次見啦！</p><h4>References</h4><ul><li><a href="https://www.tutorialspoint.com/negative-binary-numbers">Negative Binary Numbers</a></li><li><a href="https://ryanstutorials.net/binary-tutorial/binary-negative-numbers.php">Binary Negative Numbers!</a></li><li><a href="https://aben20807.blogspot.com/2017/10/1061013-binary-operations.html">106.10.13 二進位運算 (binary operations)</a></li></ul><p><em>－2023.08.14。</em></p><p>想敲碗什麼樣的內容，或資訊有誤/欲補充的話，歡迎在下方留言讓我知道，不好意思公開的話，也歡迎在Google 表單留言唷 : )</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdocs.google.com%2Fforms%2Fd%2Fe%2F1FAIpQLSdlNmjOCiM8_ZD_ky0WbP5MIwvPh4hFtoMn33arR0i3EnClUg%2Fviewform%3Fembedded%3Dtrue&amp;display_name=Google+Docs&amp;url=https%3A%2F%2Fdocs.google.com%2Fforms%2Fd%2Fe%2F1FAIpQLSdlNmjOCiM8_ZD_ky0WbP5MIwvPh4hFtoMn33arR0i3EnClUg%2Fviewform%3Fusp%3Dsend_form&amp;image=https%3A%2F%2Flh3.googleusercontent.com%2FImthiHnvFSvl_x288sJvJKMpK98Nx3BX-UTLeIPMjC3mlMB12_yOXc95DGCCpkzS4SWM7gr-SgM%3Dw1200-h630-p&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=google" width="760" height="675" frameborder="0" scrolling="no"><a href="https://medium.com/media/c84be3f46eefc8796165c7a5663dff36/href">https://medium.com/media/c84be3f46eefc8796165c7a5663dff36/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9839d3760bc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Windows] 支援分割畫面的終端機－Windows Terminal 介紹&快捷鍵整理]]></title>
            <link>https://medium.com/@tiffanychen1118/windows-terminal-b7ebd9588e1?source=rss-21880d8807bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7ebd9588e1</guid>
            <category><![CDATA[終端機]]></category>
            <category><![CDATA[terminal-windows]]></category>
            <category><![CDATA[軟體工程筆記]]></category>
            <category><![CDATA[windows]]></category>
            <dc:creator><![CDATA[Tiffany Chen]]></dc:creator>
            <pubDate>Sun, 26 Mar 2023 06:32:59 GMT</pubDate>
            <atom:updated>2023-04-01T17:48:50.290Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Windows 有類似 Ubuntu Terminator 的終端機嗎？命令提示字元或 PowerShell 有辦法分割畫面嗎？</blockquote><blockquote>試試看 Windows Terminal 吧！</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N4ffbP4QZNOebSwCGJ59cQ.png" /><figcaption>Windows 也可以花式分割終端機畫面了！（<a href="https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701?hl=en-us&amp;gl=us">Download Windows Terminal</a>）</figcaption></figure><p>因為分割終端機畫面的功能，讓我認識到了 Windows Terminal，使用過後立馬將它釘選到工具列，並開心到為它寫一篇介紹文，同時也整理些常用快捷鍵，方便日後查詢。<strong>如果常在 Windows 使用命令提示字元、PowerShell 等終端機的話，十分推薦可以試試看 Windows Terminal 唷！</strong></p><ul><li><em>官方下載連結：</em><a href="https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701"><em>Windows Terminal</em></a></li></ul><pre><strong>💡 Contents:</strong><br>1. Windows Terminal 介紹<br>2. 常用快捷鍵<br>3. 個人化設定<br>4. 使用心得<br>5. 總結</pre><h3>1. Windows Terminal 介紹</h3><h4>媲美 Ubuntu Terminator 的 Windows 終端機</h4><p><strong>Windows Terminal 是微軟於 2019 年推出的軟體，整合老中青各個時代的終端機 </strong>— 命令提示字元、PowerShell、Ubuntu，提供一個良好的使用者介面，任意在終端機之間切換，也有良好的個人化設定介面。</p><p>前幾年常使用 Ubuntu 系統時， Ubuntu Terminator 是我的主力終端機工具，<strong>切換到 Windows 後，最懷念的就是 Ubuntu Terminator 這個可分割畫面的終端機，在 Windows，難道沒有嗎？</strong>最近搜尋後，發現了這個微軟於 2019 年推出的原生終端機，完全就是我在尋尋覓覓的工具呀！立馬從命令提示字元投向 Windows Terminal 的懷抱。</p><h4>終端機分割畫面 / 分割窗格</h4><p><strong>分割窗格</strong>是讓我從命令提示字元轉向 Windows Terminal 的主要原因，如果時常在多個資料夾路徑做事，不換路徑的話，一個資料夾就會開一個命令提示字元視窗。現在有了分割畫面功能，不用再開好幾個應用程式啦。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zme_9846V5jODBiGI4YjuA.gif" /><figcaption>讓我入坑 Windows Terminal 的功能－花式分割畫面。</figcaption></figure><h3>2. 常用快捷鍵</h3><h4>窗格 (pane) 相關快捷鍵</h4><ul><li>alt + shift + +：垂直分割窗格（split down）</li><li>alt + shift + - ：水平分割窗格（split right）</li><li>ctrl + shift + w：關閉窗格</li><li>alt + ↑ / ↓ / ← / → ：移動窗格焦點 （Move focus ）</li><li>alt + shift + ↑ / ↓ / ← / → ：調整窗格大小</li></ul><h4>分頁 (tab) 相關</h4><ul><li>ctrl + tab ：往右切換一個分頁</li><li>ctrl + shift + tab ：往左切換一個分頁</li><li>ctrl + alt + 1 / 2 / 3 / 4 / …：切換至第 1 / 2 / 3 / 4 / … 個分頁</li><li>ctrl + shift + t ：新增分頁</li></ul><h4>字型相關</h4><ul><li>ctrl + + ：字體放大</li><li>ctrl + - ：字體縮小</li></ul><h4>PowerShell 相關</h4><ul><li>ctrl + r：用關鍵字搜尋歷史紀錄</li></ul><h4>命令提示字元相關</h4><ul><li>F7 ：開啟歷史紀錄</li></ul><p>更多快捷鍵可至<strong>「設定」→「動作」</strong>查詢或新增唷。</p><h3>3. 個人化設定</h3><p>Windows Terminal 賦予高度個人化的程度相當令人驚艷，可至<strong>「設定」→「預設值」→「外觀」</strong>設置，而且在這裡調整的預設值就真的是預設值，不用再去其他地方額外設定。</p><p>能個人化設定的項目相當多元，也可以更改 JSON 檔設置。<strong>程式相關應用程式我最在乎的是深色主題、字體、字型大小</strong>，身為一個 Consolas 粉，能改字體通常第一時間就改成 Consolas。看到 Windows Terminal 支援個人化設定後十分開心，在琳瑯滿目的設定頁中，最後有更改的其實也就這三項，這邊分享一下設置：</p><ul><li>色彩配置：One Half Dark</li><li>字體：Consolas</li><li>字型大小：12</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CAOI920SshVTHszP685twA.png" /><figcaption>Windows Terminal 支援許多個人化設定，可以輕易客製化成自己習慣的模樣。</figcaption></figure><h3>4. 使用心得</h3><h4>優點－可分割畫面</h4><p><strong>支援分割畫面</strong>是讓我搜尋到 Windows Terminal 的最大原因，對於這項功能非常非常的感動，雖然還是有一些進步空間，但因為這項功能，試用幾分鐘後立即將它訂選至工具列。</p><h4>優點－整合 Windows 作業系統各個終端機</h4><p>Windows 歷經了幾十年，前前後後也出了幾版終端機。過去 PowerShell、命令提示字元個別是獨立的應用程式，也是獨立視窗。<strong>Windows Terminal 整合多項終端機類應用程式，不同分頁可以開啟不同終端機</strong>，也可選擇預設開啟之終端機，在整合自家功能方面做得滿不錯的。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DrLsjxxpobYIHCGWKFNjSQ.png" /><figcaption>整合 Windows 各項終端機機的 Windows Terminal。</figcaption></figure><p>優點說完，再來想提提缺點，幾個月用下來，覺得最大的缺點在於<strong>「沒那麼直觀」</strong>。可能被其他應用程式養成了一些直覺行為，在 Windows Terminal 卻無法實現，需要上網查一下。</p><h4>缺點－不支援滑鼠拖曳調整窗格大小</h4><p>能分割多個窗格很開心，但<strong>想要調整窗格大小時，卻發現無法用滑鼠拖曳調整</strong>，需要另外上網查詢如何調整（alt + shift + ↑ / ↓ / ← / → ），如果能夠用滑鼠拖曳的話將更加使用者友善。</p><h4>缺點－不直觀的快捷鍵</h4><p>可能被其他應用程式訓練了一些直覺快捷鍵，剛接觸 Windows Terminal 的時候覺得<strong>快捷鍵沒那麼直觀，要看一下設定才知道快捷鍵是什麼</strong>，雖然可以自己改，但滿納悶 VS Code 明明也是自家系統，為什麼會選擇用不同的預設快捷鍵。例如， Chrome、VS Code 關閉分頁都是 ctrl + w，Windows Terminal 卻是 ctrl + shift + w。</p><h4>缺點－不支援螢幕解析度縮放</h4><p>使用 3C 產品上，我習慣放大字體，電腦也放大了 110%，然而 Windows Terminal 部分區域沒有跟著調整，例如設定頁面、和上排分頁列表，有一點模糊，像是沒對焦那樣，沒辦法久看，還好終端機主要工作區域解析度是有跟著調整的，不然我應該會直接退坑。</p><h3>5. 總結</h3><p>雖然提了一些 Windows Terminal 的缺點，但是瑕不掩瑜，而且才推出第四年，希望之後會越來越人性化，<strong>整體而言能分割畫面讓我很感動，開心到馬上將他釘選至工具列</strong>，並為它發一篇文介紹，期待日後能看到 Windows Terminal 持續進步啦！</p><p><em>－2023.03.25。</em></p><p>想敲碗什麼樣的內容，或資訊有誤/欲補充的話，歡迎在下方留言讓我知道，不好意思公開的話，也歡迎在Google 表單留言唷 : )</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdocs.google.com%2Fforms%2Fd%2Fe%2F1FAIpQLSdlNmjOCiM8_ZD_ky0WbP5MIwvPh4hFtoMn33arR0i3EnClUg%2Fviewform%3Fembedded%3Dtrue&amp;display_name=Google+Docs&amp;url=https%3A%2F%2Fdocs.google.com%2Fforms%2Fd%2Fe%2F1FAIpQLSdlNmjOCiM8_ZD_ky0WbP5MIwvPh4hFtoMn33arR0i3EnClUg%2Fviewform%3Fusp%3Dsend_form&amp;image=https%3A%2F%2Flh3.googleusercontent.com%2FImthiHnvFSvl_x288sJvJKMpK98Nx3BX-UTLeIPMjC3mlMB12_yOXc95DGCCpkzS4SWM7gr-SgM%3Dw1200-h630-p&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=google" width="760" height="675" frameborder="0" scrolling="no"><a href="https://medium.com/media/c84be3f46eefc8796165c7a5663dff36/href">https://medium.com/media/c84be3f46eefc8796165c7a5663dff36/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7ebd9588e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[VS Code] 提升工作效率的 Visual Studio Code 移動快捷鍵整理]]></title>
            <link>https://medium.com/@tiffanychen1118/vs-code-navigation-tips-17c2c349af3b?source=rss-21880d8807bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/17c2c349af3b</guid>
            <category><![CDATA[軟體工程筆記]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[visual-studio-code]]></category>
            <category><![CDATA[vscode-keyboard-shortcuts]]></category>
            <dc:creator><![CDATA[Tiffany Chen]]></dc:creator>
            <pubDate>Mon, 20 Feb 2023 06:13:48 GMT</pubDate>
            <atom:updated>2023-02-22T05:32:10.776Z</atom:updated>
            <content:encoded><![CDATA[<h4>Visual Studio Code 是我近年來的主力編輯器，本篇分享幾個提升工作效率，一用就回不去的常用快捷鍵。</h4><blockquote><em>能夠按一次就不會按兩次，眼珠能只轉 5 度就不會轉 10 度。</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H7dOxri2JvAs67SBj-78hA.png" /><figcaption>提升工作效率的 Visual Studio Code 移動快捷鍵整理（<a href="https://commons.wikimedia.org/wiki/File:Visual_Studio_Code_1.35_icon.svg">VS Code logo</a>, <a href="https://icons8.com/icon/12280/keyboard">Keyboard</a> icon by <a href="https://icons8.com/">Icons8</a>）</figcaption></figure><pre><strong>💡 Contents:</strong><br>1. Ubuntu 與 Windows 皆支援的 VS Code 編輯器<br>2. 快捷鍵整理<br>3. 移動快捷鍵實際效果<br>4. 總結</pre><h3>1. Ubuntu 與 Windows 皆支援的 VS Code 編輯器</h3><p>這幾年無論是在 Ubuntu 或 Windows 上開發，Visual Studio Code 都是我的主力編輯器。Visual Studio Code 常常縮寫成 VS Code，有許多好用的開源套件開放下載，是 2015 年釋出後，使用人數飛快增加的編輯器。Ubuntu 版跟 Windows 版的預設快捷鍵略有不同，趁著最近常在 Windows 環境開發，順手整理 Windows 版的快捷鍵。</p><h3>2. 快捷鍵整理</h3><h4>移動快捷鍵</h4><ul><li>Ctrl + ← / → ：以字為單位移動游標</li><li>Ctrl + ↑ / ↓ ：游標不動，滾動螢幕（類似滑鼠滾輪效果）</li><li>Ctrl + Shift + Alt：直排同時選取多行</li><li>Ctrl + g ：跳轉至第 n 行</li><li>Alt + ← / → ：跳至上 / 下一個游標停留處</li></ul><h4>其他好用快捷鍵</h4><ul><li>Shift + Delete：刪除一行</li><li>Ctrl + p ：開啟資料夾底下的指定檔案</li></ul><p>上述是我在工作中最常使用的移動快捷鍵，更多移動相關快捷鍵可以參考<a href="https://www.sitepoint.com/visual-studio-code-keyboard-shortcuts/">這篇文章</a>[1]。</p><p>實際效果如何呢？看看以下 gif 動畫吧！</p><h3>3. 移動快捷鍵實際效果</h3><ul><li><strong>Ctrl + </strong><strong>← / </strong><strong>→ ：以字為單位移動游標</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dTRp02rUchnhldKBgqpbzw.gif" /></figure><ul><li><strong>Ctrl + </strong><strong>↑ / </strong><strong>↓ ：游標不動，滾動螢幕（類似滑鼠滾輪效果）</strong><br>在只想往下看一點點，但不想更改游標位置時很好用。</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BM9kDXv6W4D8NgGTsO_P8Q.gif" /></figure><ul><li><strong>Ctrl + </strong><strong>Shift + </strong><strong>Alt：直排同時選取多行</strong><br>跟 Ctrl + ← / → 可以形成組合技，同時更改多行時很好用。加上 Shift 可形成選取多行文字的組合技。</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0ui8-_U4zpazHXcaqBUWtg.gif" /></figure><ul><li><strong>Ctrl + </strong><strong>g ：跳轉至第 n 行</strong><br>當別人 review code 給予的 feedback 是註明第幾行可以怎麼樣更改時，除了用滑鼠滾輪滾滾滾，用Ctrl + g 直接跳轉至該行更快速。</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*310JPYjC_Tno8fDbi5KClA.gif" /></figure><ul><li><strong>Alt + </strong><strong>← / </strong><strong>→ ：跳至上 / 下一個游標停留處</strong><br>在含有 Class 結構的大型程式碼中，F12 Go To Definition 是很常使用的快捷鍵，能夠跳轉至定義該函數、變數名稱的位置。有時候一追就追了數層，這時如果想要跳轉回來多層，或頻繁的跳轉回來又回去的話，Alt + ← / → 是個很好用的快捷鍵。</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xa3RfRxjQ3m_OultxS6enA.gif" /></figure><h3>4. 總結</h3><p>本篇分享了五個 Visual Studio Code 好用的移動快捷鍵，習慣後，發現不只是 VS Code，部分也適用於 Notepad++ 和 Word。</p><h4>省心力</h4><p>在整理這些快捷鍵的過程，其實心裡也不禁想－「好像省時間也只是省個幾秒嘛！」然而實際習慣後，<strong>除了省個幾秒，我覺得最大的優點是同時也省了心力</strong> －不用找一下滑鼠游標在哪裡、不用眼睛仔細盯著現在游標移動到第幾個字元、不用盯著滑鼠滾輪滾到哪裡。這些快捷鍵看似普通，卻發現使用習慣後，再也回不去原本的游標移動方法，真的超級推薦體驗看看。</p><h4>進公司上班期間習得的軟知識</h4><p>回頭想想，這些小撇步是進公司上班期間，在不知不覺中學起來的。晃過去同事桌上討論程式碼時，看看同事神奇的小技巧，問一下「欸欸這怎麼用的阿～～」，是很自然而然發生的事。雖然現在在家上班好像是個趨勢，但不得不承認在公司上班時，容易在不經意中學到一些軟知識。</p><h4>快速熟悉快捷鍵的小技巧</h4><p>最後，分享一個快速熟悉快捷鍵的小技巧－<strong>寫程式時，盡可能地不用滑鼠吧</strong>！打出這些字的同時也在想自己到底是有多懶，連右手離開鍵盤，移動到握住滑鼠都覺得懶，但，十分推薦試試這些快捷鍵唷，<strong>把專注力留在更重要的事情上吧！</strong></p><h3>Reference</h3><ol><li><a href="https://www.sitepoint.com/visual-studio-code-keyboard-shortcuts/">42 Visual Studio Code Shortcuts for Boosting Your Productivity</a></li></ol><p><em>－2023.02.19。</em></p><h3>附錄：其他 IDE 的移動快捷鍵</h3><h4>Visual Studio 2022</h4><ul><li>Ctrl + - ：跳至上一個游標停留處（navigate back）</li><li>Ctrl + Shift + - ：跳至下一個游標停留處（navigate forward）</li><li>Alt + Shift：直排同時選取多行</li></ul><p>想敲碗什麼樣的內容，或資訊有誤/欲補充的話，歡迎在下方留言讓我知道，不好意思公開的話，也歡迎在Google 表單留言唷 : )</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdocs.google.com%2Fforms%2Fd%2Fe%2F1FAIpQLSdlNmjOCiM8_ZD_ky0WbP5MIwvPh4hFtoMn33arR0i3EnClUg%2Fviewform%3Fembedded%3Dtrue&amp;display_name=Google+Docs&amp;url=https%3A%2F%2Fdocs.google.com%2Fforms%2Fd%2Fe%2F1FAIpQLSdlNmjOCiM8_ZD_ky0WbP5MIwvPh4hFtoMn33arR0i3EnClUg%2Fviewform%3Fusp%3Dsend_form&amp;image=https%3A%2F%2Flh3.googleusercontent.com%2FImthiHnvFSvl_x288sJvJKMpK98Nx3BX-UTLeIPMjC3mlMB12_yOXc95DGCCpkzS4SWM7gr-SgM%3Dw1200-h630-p&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=google" width="760" height="675" frameborder="0" scrolling="no"><a href="https://medium.com/media/c84be3f46eefc8796165c7a5663dff36/href">https://medium.com/media/c84be3f46eefc8796165c7a5663dff36/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17c2c349af3b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[C] What Does Double Exclamation Mark (”!!”) Mean in C Language?]]></title>
            <link>https://towardsdev.com/c-what-does-double-exclamation-mark-mean-in-c-language-c66586fb2e18?source=rss-21880d8807bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/c66586fb2e18</guid>
            <category><![CDATA[double-exclamation-mark]]></category>
            <category><![CDATA[c]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[c-programming]]></category>
            <dc:creator><![CDATA[Tiffany Chen]]></dc:creator>
            <pubDate>Fri, 10 Feb 2023 05:53:59 GMT</pubDate>
            <atom:updated>2023-02-10T16:19:00.195Z</atom:updated>
            <content:encoded><![CDATA[<h4>Turn the Value to 1 or 0</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t_QPBktgJjMfYBQoq5hTKA.png" /><figcaption>What Does Double Exclamation Mark (”!!”) Mean in C Language? (<a href="https://commons.wikimedia.org/wiki/File:C_Programming_Language.svg">Img</a>)</figcaption></figure><h3>What?</h3><blockquote>!! is used commonly if you want to convert any non-zero value to 1 while being certain that 0 remains a 0.[1]</blockquote><p>The unary operator ! (NOT) turns any value to zero if it is non-zero, and turns to one if it is zero. Similar to !!. Using this unary opertor twice turns the value to one if it is non-zero, and remains zero if it is zero.</p><p>Sounds complicated? Let’s see how it works with the following examples.</p><pre>#include &lt;stdio.h&gt;<br><br>int main()<br>{<br>    printf(&quot;!0        -&gt; %d,   !!0        -&gt; %d         // integer zero\n&quot;, !0, !!0);<br>    printf(&quot;!1        -&gt; %d,   !!1        -&gt; %d         // integer one\n&quot;, !1, !!1);<br>    printf(&quot;!2        -&gt; %d,   !!2        -&gt; %d         // positive integer\n&quot;, !2, !!2);<br>    printf(&quot;!-1       -&gt; %d,   !!-1       -&gt; %d         // negative integer\n&quot;, !-1, !!-1);<br>    printf(&quot;!0.5      -&gt; %d,   !!0.5      -&gt; %d         // floating point number\n&quot;, !0.5, !!0.5);<br>    printf(&quot;!&#39;A&#39;      -&gt; %d,   !!&#39;A&#39;      -&gt; %d         // char\n&quot;, !&#39;A&#39;, !!&#39;A&#39;);<br>    <br>    char arry[10] = {0};<br>    char *null_ptr = NULL;<br>    <br>    printf(&quot;!arry     -&gt; %d,   !!arry     -&gt; %d         // array\n&quot;, !arry, !!arry);<br>    printf(&quot;!null_ptr -&gt; %d,   !!null_ptr -&gt; %d         // null pointer\n&quot;, !null_ptr, !!null_ptr);<br>    <br>    return 0;<br>}</pre><p>The output would be:</p><pre>!0        -&gt; 1,   !!0        -&gt; 0         // integer zero<br>!1        -&gt; 0,   !!1        -&gt; 1         // integer one<br>!2        -&gt; 0,   !!2        -&gt; 1         // positive integer<br>!-1       -&gt; 0,   !!-1       -&gt; 1         // negative integer<br>!0.5      -&gt; 0,   !!0.5      -&gt; 1         // floating point number<br>!&#39;A&#39;      -&gt; 0,   !!&#39;A&#39;      -&gt; 1         // char<br>!arry     -&gt; 0,   !!arry     -&gt; 1         // array<br>!null_ptr -&gt; 1,   !!null_ptr -&gt; 0         // null pointer</pre><p>Woohoo! Here it is. The operator ! and !! turn all types of variable to the integer type with value 0 or 1. You could also test it online with <a href="https://www.onlinegdb.com/online_c_compiler"><em>Online C Compiler — online editor</em></a>.</p><h3>Why?</h3><p>Now, we know how double exclamation mark (”!!”) works in C. But why? Why do we need that? <br>Sometimes, the compiler would give warnings or errors if we’re using if statement for true or false with non-boolean value or non-integer value. Or, if you’d like to return 1 or 0 with type integer because of the function declaration, besides casting the return value with (int), you could also use !! to turn the type into integer.</p><p>Generally, it’s a tip that would make compiler happy, especially in the embedded world.</p><p>Happy coding!</p><h3>Reference</h3><ol><li><a href="https://stackoverflow.com/questions/14751973/what-is-in-c">What is “!!” in C? [duplicate] — Stack Overflow</a></li><li><a href="http://stupefydeveloper.blogspot.com/2009/09/c-double-exclamation.html">c: double exclamation — stupefy developer</a></li><li><a href="https://cboard.cprogramming.com/c-programming/133581-what-double-exclamation-mark-c-language.html">What is !! (double exclamation mark) in C language? — C Board</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c66586fb2e18" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/c-what-does-double-exclamation-mark-mean-in-c-language-c66586fb2e18">[C] What Does Double Exclamation Mark (”!!”) Mean in C Language?</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[閱讀] 《也許你該找人聊聊》－看看心理師也去求助心理師的故事吧]]></title>
            <link>https://medium.com/@tiffanychen1118/maybe-you-should-talk-to-someone-fee2b918ce1e?source=rss-21880d8807bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/fee2b918ce1e</guid>
            <category><![CDATA[也許你該找人聊聊]]></category>
            <category><![CDATA[閱讀]]></category>
            <category><![CDATA[閱讀筆記]]></category>
            <dc:creator><![CDATA[Tiffany Chen]]></dc:creator>
            <pubDate>Fri, 06 Jan 2023 05:02:52 GMT</pubDate>
            <atom:updated>2023-01-06T05:02:52.289Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AhMDx4leQuVboCoxLQ-86A.jpeg" /><figcaption><a href="http://moo.im/a/eopADG">《也許你該找人聊聊》：一個諮商心理師與她的心理師，以及我們的生活</a></figcaption></figure><p>在思緒紛擾的時期讀到了這本書，雖然還是要靠自己釐清，但好像，更有動力去處理這些交纏在一起的情緒了。</p><p>如果這是一本心理師教你如何排解情緒的勵志書，那我可能不會拿起來看。但這是一本心理師驚覺「啊！我需要幫忙！」，也去求助心理師的書。</p><h3>1. 「啊！我需要幫忙！」</h3><p>心理師也是人，也會遇到交往十年被甩、生活很阿雜但還是要戴起專業面具面對病人，否則別人只會覺得你不專業的情況。在本書中，讀者會看到從透過看診間隔短短的五分鐘內大力排解情緒，到發覺自己需要求助心理醫師，接著剖析表面問題至根本問題的過程。</p><h3>2. 裝睡的人叫不醒，心理師帶病人自己叫醒自己</h3><p>心理師不是神，不是偵探，更不會雇用偵訊社，查出病人沒有在診間透漏的故事。作者用第一人稱視角，透過一些發問，讓病人漸漸自己講出好的、壞的、不願面對的、但發現自己必須面對的故事。讀者也會看到心理師去找他的心理師，被一些恰到好處的提問，漸漸面對自己裝死假裝沒看到的過去、現在、未來。</p><h3>3. 以輕鬆的心情閱讀吧，或許，你也會被療癒到</h3><p>跟著心理師以心理師的角色、病人的角色走一回，原本腦中紛亂的思緒依舊紛亂，但好像獲得了一些能量，得到療育，也比較願意去處理這些交纏在一起的情緒了。</p><p>誠摯推薦給思緒很「阿雜」、想放鬆、看看別人怎麼排解的人。看著個性迥異的病人們緊張地、囂張地、淡定地進入診間求助，到從診間畢業離開的故事，或許，你也會被療癒到。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*9SRt3I5DAqWNKFyEGR1qww.png" /></figure><h3>Link</h3><ul><li>Readmoo 讀墨：<a href="http://moo.im/a/eopADG">《也許你該找人聊聊》：一個諮商心理師與她的心理師，以及我們的生活</a></li><li>博客來：<a href="https://www.books.com.tw/products/0010853179?sloc=main">《也許你該找人聊聊》：一個諮商心理師與她的心理師，以及我們的生活</a></li></ul><p><em>友善提醒：透過以上讀墨連結購買本書的話，我將得到一點點回饋金，難得有台灣在地團隊製作繁體電子書閱讀器，有興趣的話可以多支持一下喔！</em></p><p><em>－2021.01。</em></p><p><em>翻著草稿區的文章，以前總覺得心得太短了於是就這樣放置了好久。時隔兩年了，還是很想推薦這本書，希望你也能被療癒到。</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fee2b918ce1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>