<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Programming | SDT 攻城獅區</title>
	<atom:link href="https://sdt.hameba.tw/category/%E7%A8%8B%E5%BC%8F/feed/" rel="self" type="application/rss+xml" />
	<link>https://sdt.hameba.tw</link>
	<description>由Steven, Der, Ted 三位高級打字員所組成，是三位工程師(攻城獅)所維護的技術分享平台，或許偶爾會分享一些日常，有任何問題或是錯誤的部分，歡迎留言告訴我們！</description>
	<lastBuildDate>Fri, 05 Aug 2022 16:45:13 +0800</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.3</generator>

<image>
	<url>https://sdt.hameba.tw/wp-content/uploads/2020/02/hameba_favicon-150x150.png</url>
	<title>Programming | SDT 攻城獅區</title>
	<link>https://sdt.hameba.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>安裝Python以及安裝編輯器VSCode</title>
		<link>https://sdt.hameba.tw/663/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25e5%25ae%2589%25e8%25a3%259dpython%25e4%25bb%25a5%25e5%258f%258a%25e5%25ae%2589%25e8%25a3%259d%25e7%25b7%25a8%25e8%25bc%25af%25e5%2599%25a8vscode</link>
				<comments>https://sdt.hameba.tw/663/#respond</comments>
				<pubDate>Thu, 04 Aug 2022 16:57:12 +0000</pubDate>
		<dc:creator><![CDATA[Li Der]]></dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[VSCode]]></category>

		<guid isPermaLink="false">https://sdt.hameba.tw/?p=663</guid>
				<description><![CDATA[<p>Python是一種直譯語言，需要執行平台(runtime)。 Python官網可以直接下載Python3然後安 &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/663/" class="more-link">閱讀全文<span class="screen-reader-text">〈安裝Python以及安裝編輯器VSCode〉</span></a></p>
The post <a href="https://sdt.hameba.tw/663/">安裝Python以及安裝編輯器VSCode</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>Python是一種直譯語言，需要執行平台(runtime)。</p>
<p><a href="https://www.python.org/downloads/" target="_blank" rel="noopener noreferrer">Python官網</a>可以直接下載Python3然後安裝。<em>(範例為Python 3.10.6)</em></p>
<p><span id="more-663"></span></p>
<p><span style="color: #ff0000"><strong>＊Python2已經不會再出新版本，已在2020/01/01停止官方支援</strong></span></p>
<p><img class="size-medium wp-image-666" src="https://sdt.hameba.tw/wp-content/uploads/2022/08/DownloadPython-300x199.png" alt="DownloadPython" width="300" height="199" srcset="https://sdt.hameba.tw/wp-content/uploads/2022/08/DownloadPython-300x199.png?v=1659630158 300w, https://sdt.hameba.tw/wp-content/uploads/2022/08/DownloadPython-1024x680.png?v=1659630158 1024w, https://sdt.hameba.tw/wp-content/uploads/2022/08/DownloadPython-768x510.png?v=1659630158 768w, https://sdt.hameba.tw/wp-content/uploads/2022/08/DownloadPython-1536x1020.png?v=1659630158 1536w, https://sdt.hameba.tw/wp-content/uploads/2022/08/DownloadPython-2048x1360.png?v=1659630158 2048w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p>俗話說得好「工欲善其事，必先利其器」，接下來～</p>
<p>我們需要一個拿來寫程式的文字編輯器，讓我們來<a href="https://code.visualstudio.com/Download" target="_blank" rel="noopener noreferrer">下載VSCode</a>安裝。</p>
<p><img class="alignnone size-medium wp-image-667" src="https://sdt.hameba.tw/wp-content/uploads/2022/08/DownloadVSCode-300x177.png" alt="DownloadVSCode" width="300" height="177" srcset="https://sdt.hameba.tw/wp-content/uploads/2022/08/DownloadVSCode-300x177.png?v=1659630571 300w, https://sdt.hameba.tw/wp-content/uploads/2022/08/DownloadVSCode-1024x603.png?v=1659630571 1024w, https://sdt.hameba.tw/wp-content/uploads/2022/08/DownloadVSCode-768x452.png?v=1659630571 768w, https://sdt.hameba.tw/wp-content/uploads/2022/08/DownloadVSCode-1536x904.png?v=1659630571 1536w, https://sdt.hameba.tw/wp-content/uploads/2022/08/DownloadVSCode-2048x1205.png?v=1659630571 2048w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p>安裝好VSCode後，讓我們把它打開來並且安裝延伸模組。</p>
<p>點選『延伸模組』並輸入python，會看到「Python」讓我們安裝它。</p>
<p><img class="alignnone size-medium wp-image-668" src="https://sdt.hameba.tw/wp-content/uploads/2022/08/VSCodePythonExtension-300x271.png" alt="VSCodePythonExtension" width="300" height="271" srcset="https://sdt.hameba.tw/wp-content/uploads/2022/08/VSCodePythonExtension-300x271.png?v=1659631911 300w, https://sdt.hameba.tw/wp-content/uploads/2022/08/VSCodePythonExtension-1024x924.png?v=1659631911 1024w, https://sdt.hameba.tw/wp-content/uploads/2022/08/VSCodePythonExtension-768x693.png?v=1659631911 768w, https://sdt.hameba.tw/wp-content/uploads/2022/08/VSCodePythonExtension-1536x1385.png?v=1659631911 1536w, https://sdt.hameba.tw/wp-content/uploads/2022/08/VSCodePythonExtension.png?v=1659631911 1662w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p>這樣子我們都準備好，可以開始寫Python程式了！</p>
<blockquote><p>Python檔案的副檔名 .py</p></blockquote>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>參考資料：</p>
<p><a href="https://www.youtube.com/watch?v=CXZYvNRIAKM&amp;list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&amp;index=3" target="_blank" rel="noopener noreferrer">Getting Started | Python for Beginners [3 of 44]</a></p>
<p><a href="https://www.youtube.com/watch?v=EU8eayHWoZg&amp;list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&amp;index=4" target="_blank" rel="noopener noreferrer">Configuring Visual Studio Code | Python for Beginners [4 of 44]</a></p>
<p><a href="https://www.python.org/downloads/" target="_blank" rel="noopener noreferrer">Download Python</a></p>
<p><a href="https://code.visualstudio.com/Download" target="_blank" rel="noopener noreferrer">Download Visual Studio Code</a></p>The post <a href="https://sdt.hameba.tw/663/">安裝Python以及安裝編輯器VSCode</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/663/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Steven 網頁工程師心得分享</title>
		<link>https://sdt.hameba.tw/645/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=steven-%25e7%25b6%25b2%25e9%25a0%2581%25e5%25b7%25a5%25e7%25a8%258b%25e5%25b8%25ab%25e5%25bf%2583%25e5%25be%2597%25e5%2588%2586%25e4%25ba%25ab</link>
				<comments>https://sdt.hameba.tw/645/#respond</comments>
				<pubDate>Wed, 16 Dec 2020 10:09:28 +0000</pubDate>
		<dc:creator><![CDATA[Hsu Steven]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Angular]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[DB2]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[react]]></category>
		<category><![CDATA[RedisDB]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Vue]]></category>

		<guid isPermaLink="false">https://sdt.hameba.tw/?p=645</guid>
				<description><![CDATA[<p>網頁工程師 網頁可以區分為前端及後端還有資料庫各個工程師 (其學習不是要把所有語言指令背下來，是好比今天有個功 &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/645/" class="more-link">閱讀全文<span class="screen-reader-text">〈Steven 網頁工程師心得分享〉</span></a></p>
The post <a href="https://sdt.hameba.tw/645/">Steven 網頁工程師心得分享</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>網頁工程師<br />
網頁可以區分為前端及後端還有資料庫各個工程師<br />
(其學習不是要把所有語言指令背下來，是好比今天有個功能需要完成，你”大概”知道在google搜尋什麼相關指令或是方法，解決問題就好)</p>
<p><span id="more-645"></span></p>
<p>前端有兩種<br />
1. 單純的網頁設計師，大約就是使用illustrator 跟 photoshop 設計網頁樣式<br />
2. 需要會程式邏輯的網頁設計工程師，類似當一般使用者按下按鈕促發一些功能或設計一些資料樣式的處理，跟後端溝通，需要會的語言-&gt;新手建議 HTML5, CSS3, jquery, js , 中高水準學習為Angular, React, Vue</p>
<p>後端語言為以下多種類型<br />
1. C# 微軟派系，為C#工程師，程式部署在iis上面，通常運行Microsoft SQL Server<br />
2. php 開源派系，為php工程師，程式部署在apache or tomcat上面，通常運行在Linux環境上面，中大型企業使用Redhat , 小型公司運行在Ubuntu<br />
3. java Oracle 派系 為java工程師，程式部署在tomcat or jBoss上面，通常運行在Linux環境上面，中大型企業使用Redhat , 小型公司運行在Ubuntu<br />
4. Node.js 開源派系，為node.js工程師，程式部署在pm2上面，通常運行在Linux環境上面，通常運行在Linux環境上面，屬Ubuntu市佔率為多數。<br />
5. python 開源派系 為python工程師，程式部署在系統啟動時的指令上面，通常運行在Linux環境上面，通常運行在Linux環境上面。<br />
6. Ruby on Rails 沒玩過，不清楚了 &gt;.&lt;</p>
<p>資料庫工程師<br />
1. noSQL =&gt; MongoDB, RedisDB (新型大數據以轉型使用MongoDB)<br />
2. SQL =&gt; SQL Server, MySQL, MariaDB, DB2 (SQL為目前市場大多數應用派系)</p>
<p>以上內容參考參考，很多keyword，可以先嘗試了解 前端工程師, 後端工程師, 資料庫工程師，這三種類型，選擇想前往的道路，</p>
<p>以下個人經驗<br />
前端 =&gt; 看得到畫面，可以第一接觸到使用者的體驗，成就感較高，也會被外面長官器重<br />
後端 =&gt; 第一次處理的邏輯，會不熟悉，沒感覺自己在做什麼，目標空洞，但有一兩次經驗後，後面得心印手，大概就只有這樣的把戲了！<br />
資料庫端 =&gt; 除非進到 FB, google, yahoo, 等非常前面科技的龍頭水準，才會有SQL優化條件，不然普遍把SQL 摸熟，不外乎CRUD的指令 CREATE, SELECT, UPDATE, DELETE, 比對條件 WHERE，然後就是養老了！！</p>
<p>以上是目前本人所看到產業大方向的情況，小弟一些愚昧的見解，沒有要跟任何派系的高手爭論。</p>The post <a href="https://sdt.hameba.tw/645/">Steven 網頁工程師心得分享</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/645/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>JAVA讀取及寫入TXT檔案</title>
		<link>https://sdt.hameba.tw/641/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=java%25e8%25ae%2580%25e5%258f%2596%25e5%258f%258a%25e5%25af%25ab%25e5%2585%25a5txt%25e6%25aa%2594%25e6%25a1%2588</link>
				<comments>https://sdt.hameba.tw/641/#respond</comments>
				<pubDate>Thu, 16 Jul 2020 16:24:22 +0000</pubDate>
		<dc:creator><![CDATA[Li Der]]></dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">https://sdt.hameba.tw/?p=641</guid>
				<description><![CDATA[<p>練習用JAVA讀取及寫入TXT檔案，一併順手記錄下來。 會使用到BufferedReader跟FileRead &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/641/" class="more-link">閱讀全文<span class="screen-reader-text">〈JAVA讀取及寫入TXT檔案〉</span></a></p>
The post <a href="https://sdt.hameba.tw/641/">JAVA讀取及寫入TXT檔案</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>練習用JAVA讀取及寫入TXT檔案，一併順手記錄下來。</p>
<p>會使用到<span style="font-size: 1rem">BufferedReader跟</span><span style="font-size: 1rem">FileReader還有</span><span style="font-size: 1rem">FileWriter</span></p>
<p><span id="more-641"></span></p>
<p>先用一支程式來建立TXT檔，再來把這TXT檔案的內容寫到另一個新的文字檔</p><pre class="crayon-plain-tag">import java.io.FileWriter;

public class Write {
    public static void main(String[] args) {
        try {
            // Constructs a FileWriter object given a file name.
            FileWriter fw = new FileWriter("one.txt");
            fw.write("This is one!");
            fw.flush();
            fw.close();
        } catch (Exception e) {
            System.out.println("Something Error");
        }

    }
}</pre><p>編譯跟執行一下</p><pre class="crayon-plain-tag">javac Write.java
java -cp . Write</pre><p>就可以在目錄底下看到「one.txt」這個檔案</p>
<p>接下來就到我們的主題了，我們要把這檔案讀出來然後寫入到另一個檔案</p><pre class="crayon-plain-tag">import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;

public class ReadAndWrite {
    public static void main(String[] args) {
        try {
            // Creates a new FileReader, given the name of the file to read from.
            FileReader fr = new FileReader("one.txt");
            // Creates a buffering character-input stream that uses a default-sized input buffer.
            BufferedReader br = new BufferedReader(fr);
            String content = "";
            while (br.ready()) {
                content = br.readLine();
                System.out.println("Ready... read txt");
                System.out.println("-------------");
                System.out.println(content);
                System.out.println("-------------");
            }

            // Constructs a FileWriter object given a file name.
            FileWriter fw = new FileWriter("target.txt");
            fw.write(content);

            fw.flush();
            System.out.println("Write Complete!");
            // After used close.
            fr.close();
            fw.close();
        } catch (Exception e) {
            System.out.println("Something Error");
        }

    }
}</pre><p>編譯執行了之後，就會出現「target.txt」的檔案</p><pre class="crayon-plain-tag">javac ReadAndWrite.java 
java -cp . ReadAndWrite</pre><p>完成！</p>
<p>&nbsp;</p>
<p>之後有機會再分享讀取及寫入多行的方式。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>The post <a href="https://sdt.hameba.tw/641/">JAVA讀取及寫入TXT檔案</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/641/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Webpack 打包移除warning及console.log的方式</title>
		<link>https://sdt.hameba.tw/635/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=webpack-%25e6%2589%2593%25e5%258c%2585%25e7%25a7%25bb%25e9%2599%25a4warning%25e5%258f%258aconsole-log%25e7%259a%2584%25e6%2596%25b9%25e5%25bc%258f</link>
				<comments>https://sdt.hameba.tw/635/#respond</comments>
				<pubDate>Thu, 05 Mar 2020 01:40:26 +0000</pubDate>
		<dc:creator><![CDATA[Hsu Steven]]></dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[uglifyjs-webpack-plugin]]></category>
		<category><![CDATA[WebPack]]></category>
		<category><![CDATA[webpack.optimize.UglifyJsPlugin]]></category>

		<guid isPermaLink="false">https://sdt.hameba.tw/?p=635</guid>
				<description><![CDATA[<p>Webpack打包成Product時需要自動把Warning跟log給移除。 可以在plugin加入參數即可， &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/635/" class="more-link">閱讀全文<span class="screen-reader-text">〈Webpack 打包移除warning及console.log的方式〉</span></a></p>
The post <a href="https://sdt.hameba.tw/635/">Webpack 打包移除warning及console.log的方式</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>Webpack打包成Product時需要自動把Warning跟log給移除。</p>
<p>可以在plugin加入參數即可，v4跟v2版本有很大的差異。<span id="more-635"></span></p>
<p>在此提供兩種版本的方式。</p>
<p>Webpack v4</p><pre class="crayon-plain-tag">// 需引入uglifyjs-webpack-plugin,這邊與v2就不一樣
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
plugins: [
    new UglifyJsPlugin({
        sourceMap: true,
        uglifyOptions: {
            ie8: false,
            ecma: 8,
            parse: {},
            mangle: true,
            output: {
                comments: false,
                beautify: false
            },
            compress: true,
            warnings: false
            }
    })
]</pre><p>Webpack v2</p><pre class="crayon-plain-tag">// v2 版本直接使用webpack.optimize即可
plugins: [
    new webpack.optimize.UglifyJsPlugin({
        sourceMap: true,
        compress: {
            warnings: false, // remove 警告
            drop_console: true // 移除console.log
        }
    })
]</pre><p>&nbsp;</p>
<p>Reference</p>
<p><a href="https://blog.csdn.net/xiaoguang44/article/details/89555376" target="_blank" rel="noopener noreferrer">https://blog.csdn.net/xiaoguang44/article/details/89555376</a></p>
<p><a href="https://blog.csdn.net/xiasohuai/article/details/88527483" target="_blank" rel="noopener noreferrer">https://blog.csdn.net/xiasohuai/article/details/88527483</a></p>
<p><a href="https://segmentfault.com/a/1190000015032321" target="_blank" rel="noopener noreferrer">https://segmentfault.com/a/1190000015032321</a></p>The post <a href="https://sdt.hameba.tw/635/">Webpack 打包移除warning及console.log的方式</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/635/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>python 取得終端機指令</title>
		<link>https://sdt.hameba.tw/630/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=python-%25e5%258f%2596%25e5%25be%2597%25e7%25b5%2582%25e7%25ab%25af%25e6%25a9%259f%25e6%258c%2587%25e4%25bb%25a4</link>
				<comments>https://sdt.hameba.tw/630/#respond</comments>
				<pubDate>Sat, 29 Feb 2020 15:42:47 +0000</pubDate>
		<dc:creator><![CDATA[Ted]]></dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">https://sdt.hameba.tw/?p=630</guid>
				<description><![CDATA[<p>有時後在執行一些功能時，會習慣從終端機直接帶一些參數，好取得特定的資料，那python 程式碼要如何取得終端機 &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/630/" class="more-link">閱讀全文<span class="screen-reader-text">〈python 取得終端機指令〉</span></a></p>
The post <a href="https://sdt.hameba.tw/630/">python 取得終端機指令</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>有時後在執行一些功能時，會習慣從終端機直接帶一些參數，好取得特定的資料，那python 程式碼要如何取得終端機的指令？</p>
<p><span id="more-630"></span></p>
<p>很簡單，只要使用 python 標準函式庫 sys 模組裡的 <code>argv</code> 變數就可以了。</p><pre class="crayon-plain-tag"># 範例程式碼
# 只要在終端機輸入：<span class="pre">python</span> <span class="pre">demo.py</span> <span class="pre">one</span> two<span class="pre">
</span>
&gt;&gt;&gt; import sys
&gt;&gt;&gt; print(sys.argv)
['demo.py', 'one', 'two']</pre><p>如果要更為複雜的使用終端機輸入的指令的話，可以使用  sys 模組裡的 <a class="reference internal" title="argparse: Command-line option and argument parsing library." href="https://docs.python.org/zh-tw/3/library/argparse.html#module-argparse"><code class="xref py py-mod docutils literal notranslate"><span class="pre">argparse</span></code></a> 變數。</p>
<p>參考文件</p>
<p><a href="https://docs.python.org/zh-tw/3/tutorial/stdlib.html">https://docs.python.org/zh-tw/3/tutorial/stdlib.html</a></p>The post <a href="https://sdt.hameba.tw/630/">python 取得終端機指令</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/630/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Python初學者教學影片</title>
		<link>https://sdt.hameba.tw/606/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=python%25e5%2588%259d%25e5%25ad%25b8%25e8%2580%2585%25e6%2595%2599%25e5%25ad%25b8%25e5%25bd%25b1%25e7%2589%2587</link>
				<comments>https://sdt.hameba.tw/606/#respond</comments>
				<pubDate>Fri, 28 Feb 2020 16:29:46 +0000</pubDate>
		<dc:creator><![CDATA[Li Der]]></dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">https://sdt.hameba.tw/?p=606</guid>
				<description><![CDATA[<p>＃＃ 2022/08/05 更新  (持續更新中)＃＃ 學習任何一種新的語言時， 最大的障礙可能就是不知道從哪 &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/606/" class="more-link">閱讀全文<span class="screen-reader-text">〈Python初學者教學影片〉</span></a></p>
The post <a href="https://sdt.hameba.tw/606/">Python初學者教學影片</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>＃＃ <strong>2022/08/05 更新  (持續更新中)</strong>＃＃</p>
<p>學習任何一種新的語言時，</p>
<p>最大的障礙可能就是不知道從哪裡開始。</p>
<p><span id="more-606"></span></p>
<p>微軟有推出Python程式語言的教學影片。</p>
<p>總共有44支影片，長度最長的也只有12分鐘。</p>
<p><iframe title="Python for Beginners" width="525" height="295" src="https://www.youtube.com/embed/videoseries?list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p>
<p><del>有機會再分享影片中各個章節！</del></p>
<p>分享各個章節的重點部分：</p>
<p><strong>第1章節 &#8211; 講師介紹 (Susan Ibach &amp; Christopher Harrison)</strong></p>
<p><strong>第2章節 &#8211; 什麼是Python? 為什麼選Python? Python可以做什麼?</strong></p><pre class="crayon-plain-tag">彈性高、靈活、可讀性高的程式語言，不需要記太多語法、字元、符號。

機器學習模型、AI專案、網頁應用程式、自動化腳本和工具。(幾乎都能做)

更棒的是，有很多套件可以下載，再加入自己的邏輯即可完成想要的程式</pre><p><strong>第3, 4章節 &#8211; 開始安裝Python以及安裝編輯器VSCode</strong></p>
<p><a href="https://sdt.hameba.tw/663/#more-663" target="_blank" rel="noopener noreferrer">安裝Python以及安裝編輯器VSCode | SDT 攻城獅區</a></p>
<p><strong>第5至16章節 &#8211; 簡單實做，如何輸出、寫註解、字串、數字、日期</strong></p>
<p>(趕工中，敬請期待..)</p>
<p>&nbsp;</p>The post <a href="https://sdt.hameba.tw/606/">Python初學者教學影片</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/606/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Java syntax error on token enum 解決</title>
		<link>https://sdt.hameba.tw/598/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=java-syntax-error-on-token-enum-%25e8%25a7%25a3%25e6%25b1%25ba</link>
				<comments>https://sdt.hameba.tw/598/#respond</comments>
				<pubDate>Fri, 28 Feb 2020 14:25:49 +0000</pubDate>
		<dc:creator><![CDATA[Li Der]]></dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[enum]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">https://sdt.hameba.tw/?p=598</guid>
				<description><![CDATA[<p>在維護舊的專案，沒想到一編譯後就出現錯誤訊息了。 把訊息看清楚了之後，原來是該專案有個變數叫做 enum， 而 &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/598/" class="more-link">閱讀全文<span class="screen-reader-text">〈Java syntax error on token enum 解決〉</span></a></p>
The post <a href="https://sdt.hameba.tw/598/">Java syntax error on token enum 解決</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>在維護舊的專案，沒想到一編譯後就出現錯誤訊息了。</p>
<p>把訊息看清楚了之後，原來是該專案有個變數叫做 <span style="color: #ff0000">enum<span style="color: #000000">，</span></span></p>
<p><span id="more-598"></span></p>
<p>而這個變數在 Java 1.5 之後已經是保留字了，</p>
<p>所以會看到大概的錯誤訊息如下：</p>
<blockquote><p><strong>syntax error on token enum identifier expected &#8230;</strong></p></blockquote>
<p>解決的方式有兩個，一個是修改變數名稱，另一個是調整Compiler的版本。</p>
<p>preference -&gt; Java -&gt; Compiler -&gt; Compiler compliance level 改為 <span style="color: #ff0000"><strong>1.4</strong></span></p>
<p><img class="alignnone wp-image-599 size-large" src="https://sdt.hameba.tw/wp-content/uploads/2020/02/compilerTo1.4-1024x533.png" alt="" width="840" height="437" srcset="https://sdt.hameba.tw/wp-content/uploads/2020/02/compilerTo1.4-1024x533.png?v=1582899387 1024w, https://sdt.hameba.tw/wp-content/uploads/2020/02/compilerTo1.4-300x156.png?v=1582899387 300w, https://sdt.hameba.tw/wp-content/uploads/2020/02/compilerTo1.4-768x400.png?v=1582899387 768w, https://sdt.hameba.tw/wp-content/uploads/2020/02/compilerTo1.4-1200x624.png?v=1582899387 1200w, https://sdt.hameba.tw/wp-content/uploads/2020/02/compilerTo1.4.png?v=1582899387 1311w" sizes="(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px" /></p>
<p>如果是維護舊專案，還是建議用第二種方式。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>The post <a href="https://sdt.hameba.tw/598/">Java syntax error on token enum 解決</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/598/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>CSS 視窗捲動效果</title>
		<link>https://sdt.hameba.tw/596/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=css-%25e8%25a6%2596%25e7%25aa%2597%25e6%258d%25b2%25e5%258b%2595%25e6%2595%2588%25e6%259e%259c</link>
				<comments>https://sdt.hameba.tw/596/#respond</comments>
				<pubDate>Fri, 28 Feb 2020 13:35:10 +0000</pubDate>
		<dc:creator><![CDATA[Ted]]></dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[scroll-behavior]]></category>

		<guid isPermaLink="false">https://sdt.hameba.tw/?p=596</guid>
				<description><![CDATA[<p>在做網頁的時，我們為了要讓某些連結點了之後移動到適當的位置，我們會透過 HTML anchor link 定義 &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/596/" class="more-link">閱讀全文<span class="screen-reader-text">〈CSS 視窗捲動效果〉</span></a></p>
The post <a href="https://sdt.hameba.tw/596/">CSS 視窗捲動效果</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>在做網頁的時，我們為了要讓某些連結點了之後移動到適當的位置，我們會透過 HTML anchor link 定義此連結，達到上述的功能。</p>
<p><span id="more-596"></span></p>
<p>不過這個功能的體驗，感覺就是閃一下，就跳到要顯示的位置上，感覺並不怎麼好，所以這時候就可以使用 CSS 屬性 <code>scroll-behavior</code> 來達到平滑移動的效果啦。</p><pre class="crayon-plain-tag">// scroll-behavior

html {
    scroll-behavior: smooth
}</pre><p>不過此 scroll-behavior CSS 屬性好像並不支援 safari 瀏覽器，所以如果也想要支援 safari 瀏覽器的朋友們，可能就要換另外一種方法了。</p>
<p>參考連結：<a href="https://developer.mozilla.org/zh-CN/docs/Web/CSS/scroll-behavior">https://developer.mozilla.org/zh-CN/docs/Web/CSS/scroll-behavior</a></p>
<div id="gtx-trans">
<div class="gtx-trans-icon"></div>
</div>The post <a href="https://sdt.hameba.tw/596/">CSS 視窗捲動效果</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/596/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>JAVA取得本機實際IP位置</title>
		<link>https://sdt.hameba.tw/559/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=java%25e5%258f%2596%25e5%25be%2597%25e6%259c%25ac%25e6%25a9%259f%25e5%25af%25a6%25e9%259a%259bip%25e4%25bd%258d%25e7%25bd%25ae</link>
				<comments>https://sdt.hameba.tw/559/#respond</comments>
				<pubDate>Thu, 27 Feb 2020 16:28:15 +0000</pubDate>
		<dc:creator><![CDATA[Hsu Steven]]></dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Spring-boot]]></category>

		<guid isPermaLink="false">https://sdt.hameba.tw/?p=559</guid>
				<description><![CDATA[<p>先明確了解一些規則： 127.xxx.xxx.xxx 屬於&#8221;loopback&#8221; 地址， &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/559/" class="more-link">閱讀全文<span class="screen-reader-text">〈JAVA取得本機實際IP位置〉</span></a></p>
The post <a href="https://sdt.hameba.tw/559/">JAVA取得本機實際IP位置</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>先明確了解一些規則：</p>
<p>127.xxx.xxx.xxx 屬於&#8221;loopback&#8221; 地址，即只能你自己的本機可見，就是本機地址，比較常見的有127.0.0.1；</p>
<p><span id="more-559"></span><br />
192.168.xxx.xxx 屬於private 私有地址(site local address)，屬於本地組織內部訪問，只能在本地局域網可見。</p>
<p>同樣10.xxx.xxx.xxx、從172.16.xxx.xxx 到 172.31.xxx.xxx都是私有地址，也是屬於組織內部訪問；</p>
<p>169.254.xxx.xxx 屬於連接本地地址（link local IP），在單獨網段可用<br />
從224.xxx.xxx.xxx 到 239.xxx.xxx.xxx 屬於組播地址<br />
比較特殊的255.255.255.255 屬於廣播地址<br />
除此之外的地址就是點對點的可用的公開IPv4地址</p>
<p>本機實際IP位置的正確方式，可以參考以下，測試得到路由所配發的ip</p><pre class="crayon-plain-tag">package ipTest;

import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.Enumeration;

public class Test {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        InetAddress ip;
        try {
            // 正确的IP拿法
            System.out.println("get LocalHost LAN Address : " + getLocalHostLANAddress().getHostAddress());


        } catch (UnknownHostException e) {

            e.printStackTrace();

        }
    }

    // 正确的IP拿法，即优先拿site-local地址
    private static InetAddress getLocalHostLANAddress() throws UnknownHostException {
        try {
            InetAddress candidateAddress = null;
            // 遍历所有的网络接口
            for (Enumeration ifaces = NetworkInterface.getNetworkInterfaces(); ifaces.hasMoreElements();) {
                NetworkInterface iface = (NetworkInterface) ifaces.nextElement();
                // 在所有的接口下再遍历IP
                for (Enumeration inetAddrs = iface.getInetAddresses(); inetAddrs.hasMoreElements();) {
                    InetAddress inetAddr = (InetAddress) inetAddrs.nextElement();
                    if (!inetAddr.isLoopbackAddress()) {// 排除loopback类型地址
                        if (inetAddr.isSiteLocalAddress()) {
                            // 如果是site-local地址，就是它了
                            return inetAddr;
                        } else if (candidateAddress == null) {
                            // site-local类型的地址未被发现，先记录候选地址
                            candidateAddress = inetAddr;
                        }
                    }
                }
            }
            if (candidateAddress != null) {
                return candidateAddress;
            }
            // 如果没有发现 non-loopback地址.只能用最次选的方案
            InetAddress jdkSuppliedAddress = InetAddress.getLocalHost();
            if (jdkSuppliedAddress == null) {
                throw new UnknownHostException("The JDK InetAddress.getLocalHost() method unexpectedly returned null.");
            }
            return jdkSuppliedAddress;
        } catch (Exception e) {
            UnknownHostException unknownHostException = new UnknownHostException(
                    "Failed to determine LAN address: " + e);
            unknownHostException.initCause(e);
            throw unknownHostException;
        }
    }


}</pre><p>&nbsp;</p>
<p>Reference</p>
<p><a href="https://www.cnblogs.com/starcrm/p/7071227.html" target="_blank" rel="noopener noreferrer">https://www.cnblogs.com/starcrm/p/7071227.html</a></p>The post <a href="https://sdt.hameba.tw/559/">JAVA取得本機實際IP位置</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/559/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>NPM 檢查過期套件模組</title>
		<link>https://sdt.hameba.tw/542/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=npm-%25e6%25aa%25a2%25e6%259f%25a5%25e9%2581%258e%25e6%259c%259f%25e5%25a5%2597%25e4%25bb%25b6%25e6%25a8%25a1%25e7%25b5%2584</link>
				<comments>https://sdt.hameba.tw/542/#respond</comments>
				<pubDate>Sun, 23 Feb 2020 13:32:11 +0000</pubDate>
		<dc:creator><![CDATA[Ted]]></dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[npm]]></category>

		<guid isPermaLink="false">https://sdt.hameba.tw/?p=542</guid>
				<description><![CDATA[<p>對於前端開發者來說，相信 NPM (Node Package Manager) 大家一定都不陌生，它是一個線上 &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/542/" class="more-link">閱讀全文<span class="screen-reader-text">〈NPM 檢查過期套件模組〉</span></a></p>
The post <a href="https://sdt.hameba.tw/542/">NPM 檢查過期套件模組</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>對於前端開發者來說，相信 NPM (Node Package Manager) 大家一定都不陌生，它是一個線上 JavaScript 套件庫，使用者可以根據自己的需求，下載套件來使用。</p>
<p><span id="more-542"></span></p>
<p>線上的套件，會因為各種因素，而有新版本的更新，要如何知道自己現在用的套件有沒有過期？是否有更新的版本，這時候就可以用以下指令來確認啦。</p><pre class="crayon-plain-tag">// 檢查專案中，使用的 NPM 套件是否過期
npm outdated</pre><p>他會列出當前你這專案中使用的套件中，有沒有新版本的更新，如果有會列出你當前這個套件的的版本號 (Current)、滿足 package.json 中指定的 semver 範圍的軟件包的最高版本(Wanted)、此套件最新的版本號 ( Latest )，及這個專個套件的所在的專案範圍 (Location)，如果沒有，就不會列出。</p>
<p>參考文章 <a href="https://docs.npmjs.com/cli-commands/outdated.html">https://docs.npmjs.com/cli-commands/outdated.html</a></p>
<div id="gtx-trans">
<div class="gtx-trans-icon"></div>
</div>The post <a href="https://sdt.hameba.tw/542/">NPM 檢查過期套件模組</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/542/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
	</channel>
</rss>
