<?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 Jack Tsai on Medium]]></title>
        <description><![CDATA[Stories by Jack Tsai on Medium]]></description>
        <link>https://medium.com/@jacktsai045?source=rss-e5b858992d8d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FWLcvDNZsLRDV6-GA7O0Eg.jpeg</url>
            <title>Stories by Jack Tsai on Medium</title>
            <link>https://medium.com/@jacktsai045?source=rss-e5b858992d8d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 19:37:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jacktsai045/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[Communication between Arduino and JS]]></title>
            <link>https://jacktsai045.medium.com/communication-between-arduino-and-js-a80d3d1451b9?source=rss-e5b858992d8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a80d3d1451b9</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[serial-port]]></category>
            <dc:creator><![CDATA[Jack Tsai]]></dc:creator>
            <pubDate>Mon, 30 Oct 2023 14:25:05 GMT</pubDate>
            <atom:updated>2023-10-30T14:28:16.437Z</atom:updated>
            <content:encoded><![CDATA[<h3>Terminal</h3><ol><li>npm init -y</li><li>npm install serialport</li></ol><h3>index.js</h3><pre>const { SerialPort } = require(&#39;serialport&#39;)<br><br>// Create a port<br>const port = new SerialPort({<br>    path: &#39;COM4&#39;,<br>    baudRate: 9600,<br>});<br><br>port.on(&#39;data&#39;, function (data) {<br>    console.log(&#39;Data received: &#39; + data);<br>});</pre><h3>serialport.ino</h3><pre>void setup() {<br>  Serial.begin(9600);<br>}<br><br>void loop() {<br>  Serial.print(1);<br>  delay(1000); // Wait for 1 second<br>}</pre><ol><li>點擊「驗證」</li><li>點擊「上傳」</li><li>千萬不要點擊「序列埠監控窗」</li></ol><h3>Terminal</h3><ol><li>node index.js</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a80d3d1451b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Use Case: Prettier — Code formatter]]></title>
            <link>https://jacktsai045.medium.com/use-case-prettier-code-formatter-83e4d1c1491a?source=rss-e5b858992d8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/83e4d1c1491a</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[formatter]]></category>
            <category><![CDATA[prettier]]></category>
            <category><![CDATA[vscode]]></category>
            <dc:creator><![CDATA[Jack Tsai]]></dc:creator>
            <pubDate>Tue, 24 Oct 2023 08:33:21 GMT</pubDate>
            <atom:updated>2023-10-31T04:50:05.740Z</atom:updated>
            <content:encoded><![CDATA[<h3>Prettier — Code formatter</h3><h3>在 Marketplace 中搜尋延伸模組</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*bZhIe6oBnEBmPMUNjY0CGQ.jpeg" /></figure><p><a href="https://prettier.io/">Prettier · Opinionated Code Formatter · Prettier</a></p><h3>檔案 → 喜好設定 → 設定</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*ndtLEfrBmS_jzCzMNfvYmw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zv7qqzSwr9QgbFzi7O23cg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CKoKJw_T-T-wSdaRoUk9yg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83e4d1c1491a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Communication between Arduino and Unity]]></title>
            <link>https://jacktsai045.medium.com/communication-between-arduino-and-unity-8ee3d2d6ecab?source=rss-e5b858992d8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ee3d2d6ecab</guid>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[photoresistor]]></category>
            <category><![CDATA[c]]></category>
            <dc:creator><![CDATA[Jack Tsai]]></dc:creator>
            <pubDate>Thu, 05 Oct 2023 12:54:03 GMT</pubDate>
            <atom:updated>2023-10-24T08:03:31.385Z</atom:updated>
            <content:encoded><![CDATA[<ul><li>Measure speed with two photoresistors (Schematics)</li></ul><p>Connect everything as shown in this picture. It is very important that the two photoresistors are 10cm apart from each other. Otherwise you will get wrong speed measurements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pU4ctR5qdl28Y97_ErSKyg.png" /></figure><ul><li>Measure speed with two photoresistors (Code)</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/90098b2fa6ce41f61ac41aaaadb93476/href">https://medium.com/media/90098b2fa6ce41f61ac41aaaadb93476/href</a></iframe><ul><li>拜讀的文章如下</li></ul><ul><li><a href="https://medium.com/@yifeiyin/communication-between-arduino-and-unity-9fdcccc2be3f">Communication between Arduino and Unity</a></li><li><a href="https://projecthub.arduino.cc/galoebn/measure-speed-with-two-photoresistors-28a7b2">Measure speed with two photoresistors</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ee3d2d6ecab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[什麼是 CDN 與 DNS]]></title>
            <link>https://jacktsai045.medium.com/%E4%BB%80%E9%BA%BC%E6%98%AF-cdn-%E8%88%87-dns-bf9d05e621b1?source=rss-e5b858992d8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf9d05e621b1</guid>
            <category><![CDATA[free]]></category>
            <category><![CDATA[cdn]]></category>
            <category><![CDATA[ssl]]></category>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[cloudflare]]></category>
            <dc:creator><![CDATA[Jack Tsai]]></dc:creator>
            <pubDate>Thu, 05 Oct 2023 12:16:43 GMT</pubDate>
            <atom:updated>2023-10-05T12:16:43.934Z</atom:updated>
            <content:encoded><![CDATA[<ul><li>什麼是 CDN</li></ul><p>內容傳遞網路 (CDN) 是分散於地理位置的伺服器群組，可快取靠近使用者的內容。 CDN 允許快速傳輸加載互聯網內容所需的資產，包括 HTML 頁面，JavaScript 文件，樣式表，圖像和視頻。 CDN 服務的受歡迎程度持續增長，如今，大多數網絡流量都是通過 CDN 提供服務的，包括來自 Facebook，Netflix 和亞馬遜等主要網站的流量。</p><ul><li>什麼是 DNS</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*4vb-NMUuYTzYBYUFSuSKLw.png" /></figure><ul><li>拜讀的文章如下</li></ul><p><a href="https://docfunc.com/posts/92/%E4%BD%BF%E7%94%A8-cloudflare-%E5%B9%AB%E4%BD%A0%E7%9A%84%E7%B6%B2%E7%AB%99%E6%8E%9B%E4%B8%8A-ssl-%E6%86%91%E8%AD%89%E8%88%87-cdn-post">使用 Cloudflare 幫你的網站掛上 SSL 憑證與 CDN</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf9d05e621b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[利用 viewDidLoad 客製 App 畫面]]></title>
            <link>https://jacktsai045.medium.com/%E5%88%A9%E7%94%A8-viewdidload-%E5%AE%A2%E8%A3%BD-app-%E7%95%AB%E9%9D%A2-5db2240665c2?source=rss-e5b858992d8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5db2240665c2</guid>
            <category><![CDATA[cagradientlayer]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[viewdidload]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Jack Tsai]]></dc:creator>
            <pubDate>Thu, 09 Feb 2023 05:24:12 GMT</pubDate>
            <atom:updated>2023-02-09T05:24:12.750Z</atom:updated>
            <content:encoded><![CDATA[<h4>利用 CAGradientLayer 製作漸層背景</h4><h4>程式碼</h4><pre>import UIKit<br><br>class ViewController: UIViewController {<br>    @IBOutlet var bgView: UIView!<br>    func setupGradientBackground() -&gt; Void {<br>        let gradientLayer = CAGradientLayer()<br>        // 讓漸層的大小等於 controller view 的大小<br>        gradientLayer.frame = bgView.bounds<br>        gradientLayer.colors = [<br>            CGColor(srgbRed: 1, green: 0, blue: 0, alpha: 1),<br>            CGColor(srgbRed: 0, green: 0, blue: 1, alpha: 1)<br>        ]<br>        // 將漸層的 layer 加在最底層<br>        bgView.layer.insertSublayer(gradientLayer, at: 0)<br>        // 要特別注意的，如果使用 addSublayer 加入漸層，它將變成在最上層，覆蓋我們辛苦在 storyboard 設計的畫面<br>        // view.layer.addSublayer(gradientLayer)<br>    }<br>    override func viewDidLoad() {<br>        super.viewDidLoad()<br>        // Do any additional setup after loading the view.<br>        setupGradientBackground()<br>    }<br>}</pre><h4>Result</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/237/1*0u3GYCEROAg08fq_tU_oJQ.png" /></figure><h4>參考資料</h4><ul><li><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84-swift-ios-app-%E9%96%8B%E7%99%BC%E5%95%8F%E9%A1%8C%E8%A7%A3%E7%AD%94%E9%9B%86/%E5%88%A9%E7%94%A8-uiview-%E7%9A%84-mask-%E8%A3%BD%E4%BD%9C%E6%BC%B8%E5%B1%A4%E7%9A%84%E5%9C%96%E7%89%87%E5%92%8C%E6%96%87%E5%AD%97-2130cd4f3f53">利用 UIView 的 mask 為圖片文字染上美麗的漸層</a></li><li><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84%E8%A9%A6%E7%85%89-%E5%8B%87%E8%80%85%E7%9A%84-100-%E9%81%93-swift-ios-app-%E8%AC%8E%E9%A1%8C/%E5%88%A9%E7%94%A8-controller-%E7%9A%84-viewdidload-%E8%A3%BD%E4%BD%9C%E5%90%B8%E7%9D%9B-app-%E7%95%AB%E9%9D%A2-8e4d02d86177">#91 自訂 controller 類別和利用 viewDidLoad 客製 App 畫面</a></li><li><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84-swift-ios-app-%E9%96%8B%E7%99%BC%E5%95%8F%E9%A1%8C%E8%A7%A3%E7%AD%94%E9%9B%86/%E5%88%A9%E7%94%A8-cagradientlayer-%E8%A3%BD%E4%BD%9C%E6%BC%B8%E5%B1%A4%E8%83%8C%E6%99%AF-a10c7cfd7f75">利用 CAGradientLayer 製作漸層背景</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5db2240665c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[運用 UIBezierPath 繪製可愛圖案]]></title>
            <link>https://jacktsai045.medium.com/%E9%81%8B%E7%94%A8-uibezierpath-%E7%B9%AA%E8%A3%BD%E5%8F%AF%E6%84%9B%E5%9C%96%E6%A1%88-389ee0409de6?source=rss-e5b858992d8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/389ee0409de6</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[uibezierpath]]></category>
            <category><![CDATA[uikit]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Jack Tsai]]></dc:creator>
            <pubDate>Thu, 09 Feb 2023 04:43:20 GMT</pubDate>
            <atom:updated>2023-02-09T04:43:20.659Z</atom:updated>
            <content:encoded><![CDATA[<h4>雪人、米奇以及可愛動物等</h4><h4>🌲</h4><pre>import UIKit<br><br>let rect = CGRect(x: 0, y: 0, width: 1000, height: 1000)<br>let bgView = UIView(frame: rect)<br>bgView.backgroundColor = UIColor(red: 255/255, green: 255/255, blue: 255/255, alpha: 1)<br><br>let path = UIBezierPath()<br>path.move(to: CGPoint(x: 306, y: 20))<br>path.addLine(to: CGPoint(x: 18, y: 664))<br>path.addLine(to: CGPoint(x: 250, y: 664))<br>path.addLine(to: CGPoint(x: 250, y: 778))<br>path.addLine(to: CGPoint(x: 360, y: 778))<br>path.addLine(to: CGPoint(x: 360, y: 664))<br>path.addLine(to: CGPoint(x: 594, y: 664))<br>path.addLine(to: CGPoint(x: 306, y: 20))<br><br>let shapeLayer = CAShapeLayer()<br>shapeLayer.path = path.cgPath<br>let treeView = UIView(frame: CGRect(x: 0, y: 0, width: 800, height: 800))<br>treeView.backgroundColor = .green<br>treeView.layer.mask = shapeLayer<br>bgView.addSubview(treeView)<br>bgView</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*dq2Cyl58Hick_0QyrjxRcw.png" /><figcaption>Result</figcaption></figure><h4>參考資料</h4><ul><li><a href="https://yangcha.github.io/iview/iview.html">將圖片上傳到查詢座標顏色的網站 iview</a></li></ul><ul><li><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84%E8%A9%A6%E7%85%89-%E5%8B%87%E8%80%85%E7%9A%84-100-%E9%81%93-swift-ios-app-%E8%AC%8E%E9%A1%8C/%E9%81%8B%E7%94%A8-uibezierpath-%E7%B9%AA%E8%A3%BD%E5%8F%AF%E6%84%9B%E5%9C%96%E6%A1%88-%E6%AF%94%E6%96%B9%E9%9B%AA%E4%BA%BA-%E7%B1%B3%E5%A5%87-%E5%8F%AF%E6%84%9B%E5%8B%95%E7%89%A9-12d3a5ef1d6c">#52 運用 UIBezierPath 模仿繪製可愛圖案，比方 Swift &amp; Hello Kitty</a></li><li><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84%E8%A9%A6%E7%85%89-%E5%8B%87%E8%80%85%E7%9A%84-100-%E9%81%93-swift-ios-app-%E8%AC%8E%E9%A1%8C/86-%E5%88%A9%E7%94%A8-swiftui-%E7%9A%84-path-%E7%B9%AA%E5%9C%96-8de990bc7eaf">#86 利用 SwiftUI 的 Path &amp; Shape 繪圖</a></li><li><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84-swift-ios-app-%E9%96%8B%E7%99%BC%E5%95%8F%E9%A1%8C%E8%A7%A3%E7%AD%94%E9%9B%86/%E4%BD%BF%E7%94%A8-swiftui-%E9%A0%90%E8%A6%BD-uibezierpath-%E7%9A%84%E7%B9%AA%E5%9C%96%E7%B5%90%E6%9E%9C-5d5b8e679287">使用 SwiftUI 預覽 UIBezierPath 的繪圖結果</a></li><li><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84-swift-ios-app-%E9%96%8B%E7%99%BC%E5%95%8F%E9%A1%8C%E8%A7%A3%E7%AD%94%E9%9B%86/%E6%90%AD%E9%85%8D%E7%B6%B2%E7%AB%99%E6%9F%A5%E8%A9%A2%E5%9C%96%E7%89%87%E7%9A%84%E5%BA%A7%E6%A8%99%E7%95%AB%E5%9C%96-f257743264a5">搭配網站查詢圖片的座標畫圖</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=389ee0409de6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[利用 iOS SDK 各式型別生成東西]]></title>
            <link>https://jacktsai045.medium.com/%E5%88%A9%E7%94%A8-ios-sdk-%E5%90%84%E5%BC%8F%E5%9E%8B%E5%88%A5%E7%94%9F%E6%88%90%E6%9D%B1%E8%A5%BF-9c9e428bb60?source=rss-e5b858992d8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c9e428bb60</guid>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[sdk]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Jack Tsai]]></dc:creator>
            <pubDate>Tue, 07 Feb 2023 16:49:21 GMT</pubDate>
            <atom:updated>2023-02-07T16:49:21.537Z</atom:updated>
            <content:encoded><![CDATA[<h4>設定它的屬性和呼叫方法</h4><h4>關鍵技術</h4><ul><li>地圖：MapKit, MKMapView, and MKCoordinateRegion</li><li>播音樂：AVFoundation, URL, and AVPlayer</li><li>播影片：AVKit &amp; AVPlayerViewController</li><li>網頁：SafariServices &amp; SFSafariViewController</li><li>時間：Foundation, Date,DateFormatter,Calenda,DateComponents, and Void</li><li>App 講話：AVFAudio, AVSpeechSynthesizer, AVSpeechUtterance, and AVSpeechSynthesisVoice</li><li>playground：PlaygroundSupport, PlaygroundPage, liveView, and type property</li></ul><h4>用 AVPlayer 播音樂</h4><pre>import AVFoundation<br><br>// URL 代表某個資源的位置，比方網頁的網址或者 App 裡檔案的路徑<br>let url = URL(string: &quot;https://audio-ssl.itunes.apple.com/apple-assets-us-std-000001/AudioPreview118/v4/69/0e/98/690e98db-440d-cb0c-2bff-91b00a05bdda/mzaf_1674062311671795807.plus.aac.p.m4a&quot;)<br><br>let player = AVPlayer(url: url!)<br><br>player.play()</pre><h4>用 AVPlayerViewController 播影片</h4><pre>import AVKit<br>import PlaygroundSupport<br><br>let url = URL(string: &quot;https://video-ssl.itunes.apple.com/apple-assets-us-std-000001/Video128/v4/ac/7c/62/ac7c6274-60ea-5b7c-4c99-f08d78bfe574/mzvf_484000410198456586.640x352.h264lc.U.p.m4v&quot;)<br><br>let player = AVPlayer(url: url!)<br><br>let controller = AVPlayerViewController()<br>controller.player = player<br>PlaygroundPage.current.liveView = controller<br><br>player.play()</pre><h4>利用 SFSafariViewController 顯示網頁</h4><pre>import PlaygroundSupport<br>import SafariServices<br><br>let url = URL(string: &quot;https://medium.com/&quot;)<br>let controller = SFSafariViewController(url: url!)<br><br>PlaygroundPage.current.liveView = controller</pre><h4>顯示地圖</h4><pre>import PlaygroundSupport<br>import MapKit<br><br>// 利用 MKMapView 顯示地圖，設定顯示的內容範圍<br>let mapView = MKMapView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))<br>mapView.region = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: 25.012409, longitude: 121.541340), latitudinalMeters: 3000, longitudinalMeters: 3000)<br><br>let ntuAnnotation = MKPointAnnotation()<br>ntuAnnotation.title = &quot;NTU&quot;<br>ntuAnnotation.coordinate = CLLocationCoordinate2D(latitude: 25.018116, longitude: 121.538293)<br>ntuAnnotation.subtitle = &quot;台灣大學&quot;<br><br>mapView.addAnnotation(ntuAnnotation)<br><br>// 衛星空照圖<br>//mapView.mapType = .satellite<br><br>// 衛星空照結合地圖<br>//mapView.mapType = .hybrid<br><br>// satelliteFlyover 樣式<br>//mapView.mapType = .satelliteFlyover<br><br>PlaygroundPage.current.liveView = mapView</pre><h4>列印時間</h4><pre>import Foundation<br><br>var time = Date()<br>print(time)<br><br>time.addTimeInterval(91)<br>print(time)</pre><h4>將時間變成特定格式的字串</h4><pre>import Foundation<br><br>let now = Date()<br>let dataFormatter = DateFormatter()<br>dataFormatter.dateFormat = &quot;yyyy年MM月dd日&quot;<br><br>let dateString = dataFormatter.string(from: now)<br>print(dateString)</pre><h4>取得今天幾月幾號的數字</h4><pre>import Foundation<br><br>let today = Date()<br>print(today)<br>let dateComponents = Calendar.current.dateComponents(in: TimeZone.current, from: today)<br>let month = dateComponents.month<br>if let month {<br>    print(month)<br>}<br>let day = dateComponents.day<br>if let day {<br>    print(day)<br>}</pre><h4>使用 AVSpeechSynthesizer 講話</h4><pre>import AVFAudio<br><br>let utterance = AVSpeechUtterance(string: &quot;就是開不了口，讓她知道。我一定會呵護著妳，也逗妳笑。&quot;)<br>utterance.voice = AVSpeechSynthesisVoice(language: &quot;zh-TW&quot;)<br>utterance.rate = 0.5<br>utterance.pitchMultiplier = 0.5<br>let synthezier = AVSpeechSynthesizer()<br>synthezier.speak(utterance)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c9e428bb60" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[使用圖片、文字、表情符號、邊框以及圓角製作漂亮卡片]]></title>
            <link>https://jacktsai045.medium.com/%E4%BD%BF%E7%94%A8%E5%9C%96%E7%89%87-%E6%96%87%E5%AD%97-%E8%A1%A8%E6%83%85%E7%AC%A6%E8%99%9F-%E9%82%8A%E6%A1%86%E4%BB%A5%E5%8F%8A%E5%9C%93%E8%A7%92%E8%A3%BD%E4%BD%9C%E6%BC%82%E4%BA%AE%E5%8D%A1%E7%89%87-f73d570800c1?source=rss-e5b858992d8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f73d570800c1</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Jack Tsai]]></dc:creator>
            <pubDate>Tue, 07 Feb 2023 15:46:56 GMT</pubDate>
            <atom:updated>2023-02-07T15:46:56.253Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*9tONytG1t26y3GILWO4Bkw.png" /><figcaption>圖片置於 Resources 資料夾下</figcaption></figure><pre>import UIKit<br><br>// 顯示圖片的 UIImageView<br>let rainingImage = UIImage(named: &quot;20230207.jpg&quot;)<br>let rainingImageView = UIImageView(image: rainingImage)<br><br>// 大小位置 frame<br>rainingImageView.frame = CGRect(x: 0, y: 0, width: 1200, height: 1200)<br><br>// 若是 frame 的寬高比例和圖片原本的比例不合，將造成圖片變形<br>//rainingImageView.frame = CGRect(x: 0, y: 0, width: 12, height: 1200)<br><br>// 維持比例但上下或左右留白<br>rainingImageView.contentMode = .scaleAspectFit<br><br>// 維持比例並填滿 frame 的框框，超出的部分被切掉<br>rainingImageView.contentMode = .scaleAspectFill<br><br>// 透明度 alpha 範圍 0-1<br>//rainingImageView.alpha = 0.5<br><br>// 控制邊框寬度、邊框顏色以及圓角的 CALayer<br><br>// 邊框寬度 borderWidth<br>// rainingImageView.layer.borderWidth = 10<br><br>// 邊框顏色 borderColor<br>// rainingImageView.layer.borderColor = CGColor(red: 1, green: 0, blue: 0, alpha: 1)<br><br>// 圓角 cornerRadius<br>// rainingImageView.layer.cornerRadius = 50<br>// rainingImageView.clipsToBounds = true<br><br>// 加入 Emoji<br>let starLabel = UILabel(frame: CGRect(x: 60, y: 60, width: 30, height: 30))<br>starLabel.text = &quot;⭐️&quot;<br>starLabel.font = UIFont.systemFont(ofSize: 25)<br>starLabel.transform = CGAffineTransform(rotationAngle: .pi / 180 * 45)<br>rainingImageView.addSubview(starLabel)</pre><pre>import UIKit<br><br>// 顯示文字的 UILabel<br>let msgLabel = UILabel(frame: CGRect(x: 0, y: 0, width: 300, height: 150))<br>// 文字 text<br>msgLabel.text = &quot;我們一起學貓叫&quot;<br>// 文字顏色 textColor<br>msgLabel.textColor = UIColor(red: 1, green: 128/255, blue: 0, alpha: 1)<br>// 文字大小 font<br>msgLabel.font = UIFont.systemFont(ofSize: 25)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f73d570800c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[定義 Function]]></title>
            <link>https://jacktsai045.medium.com/%E5%AE%9A%E7%BE%A9-function-982ecf7004fd?source=rss-e5b858992d8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/982ecf7004fd</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Jack Tsai]]></dc:creator>
            <pubDate>Tue, 07 Feb 2023 14:54:43 GMT</pubDate>
            <atom:updated>2023-02-07T14:54:43.242Z</atom:updated>
            <content:encoded><![CDATA[<h4>定義有參數的 Function，可傳入字串修改歌詞</h4><h4>白安ANN [ 多想隨遇而安 Whatever Happens ] Official Music Video</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLuS5w7r8ZG0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLuS5w7r8ZG0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLuS5w7r8ZG0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2baf58410a3f281158ba677af7cf7591/href">https://medium.com/media/2baf58410a3f281158ba677af7cf7591/href</a></iframe><h4>原始歌詞</h4><pre>冷冷清清的街上<br>漫無目的的遊盪<br>天空安靜的太過孤單<br>想法太多沒答案<br>未來還是太凌亂<br>以為勇敢就是不轉彎<br>然後就這樣碰撞<br>然後就這樣長大<br>然後越來越不明白在找什麼<br>我多想隨遇而安<br>不管明天在什麼地方<br>我都能保持浪漫去欣賞<br>擁有或失去都不會怎樣<br>我多想隨遇而安<br>不管到哪都不慌張<br>無論明天是快樂或悲傷<br>都能喜歡 我的模樣<br>雨後不一定晴朗<br>永遠只存在遠方<br>時間在牆上悠悠地唱<br>討厭人海裡飄蕩<br>多想有你在身旁<br>不想告別總沒能說完<br>然後就這樣長大<br>然後就這樣遺忘<br>然後越來越不明白在找什麼<br>我多想隨遇而安<br>不管明天在什麼地方<br>我都能保持浪漫去欣賞<br>擁有或失去都不會怎樣<br>我多想隨遇而安<br>不管到哪都不慌張<br>無論明天是快樂或悲傷<br>都能喜歡 我的模樣<br>我的堅強 我的脆弱 我的自滿<br>我多想隨遇而安<br>不管明天在什麼地方<br>我都能保持浪漫去欣賞<br>擁有或失去都不會怎樣<br>我多想隨遇而安<br>不管到哪都不慌張<br>無論明天是快樂或悲傷<br>都能喜歡 我的模樣<br>無論明天是快樂或悲傷<br>柔軟擁抱 劇烈成長</pre><h4>改編版</h4><pre>import UIKit<br><br>func 副歌A(name: String) -&gt; Void {<br>    print(&quot;\(name) 多想隨遇而安&quot;)<br>    print(&quot;不管明天在什麼地方&quot;)<br>    print(&quot;我都能保持浪漫去欣賞&quot;)<br>    print(&quot;擁有或失去都不會怎樣&quot;)<br>}<br><br>func 副歌B(name: String) -&gt; Void {<br>    print(&quot;\(name) 多想隨遇而安&quot;)<br>    print(&quot;不管到哪都不慌張&quot;)<br>    print(&quot;無論明天是快樂或悲傷&quot;)<br>    print(&quot;都能喜歡 我的模樣&quot;)<br>}<br><br>副歌A(name: &quot;Daman&quot;)<br>副歌B(name: &quot;Daman&quot;)</pre><h4>參考資料</h4><p><a href="https://medium.com/%E5%BD%BC%E5%BE%97%E6%BD%98%E7%9A%84%E8%A9%A6%E7%85%89-%E5%8B%87%E8%80%85%E7%9A%84-100-%E9%81%93-swift-ios-app-%E8%AC%8E%E9%A1%8C/%E5%AE%9A%E7%BE%A9-function-%E5%8D%B0%E5%87%BA%E8%AE%93%E8%87%AA%E5%B7%B1%E4%B8%80%E7%A7%92%E8%90%BD%E6%B7%9A%E7%9A%84%E6%83%85%E6%AD%8C%E6%AD%8C%E8%A9%9E-851ff4147fda">#64 定義 function，印出讓自己一秒落淚的情歌歌詞</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=982ecf7004fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ubuntu, Python, and MySQL]]></title>
            <link>https://jacktsai045.medium.com/mysql-3256251202e0?source=rss-e5b858992d8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3256251202e0</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Jack Tsai]]></dc:creator>
            <pubDate>Fri, 03 Feb 2023 10:43:45 GMT</pubDate>
            <atom:updated>2023-02-03T13:02:02.478Z</atom:updated>
            <content:encoded><![CDATA[<h4>在 Ubuntu 上使用 Python &amp; MySQL 的筆記</h4><h4>安裝 MySQL 伺服器</h4><pre>sudo apt install mysql-server</pre><h4>驗證 MySQL 伺服器是否正在運行</h4><pre># Method 1<br>sudo systemctl status mysql<br># Method 2<br>sudo service mysql status</pre><h4>登入 MySQL 伺服器</h4><pre>mysql -u root -p</pre><p><strong>若登入失敗，可創建一個新的專用管理用戶，該用戶可以訪問所有數據庫</strong></p><pre>sudo mysql<br><br>ALTER USER &#39;root&#39;@&#39;localhost&#39; IDENTIFIED WITH mysql_native_password BY &#39;你的密碼&#39;;<br><br>FLUSH PRIVILEGES;</pre><h4>Ubuntu 中退出 MySQL 指令</h4><pre># Method 1<br>quit<br># Method 2<br>exit</pre><h4>參考資料</h4><ul><li><a href="https://www.w3schools.com/python/python_mysql_getstarted.asp">Python MySQL</a></li><li><a href="https://www.w3schools.com/mysql/default.asp">W3Schools.com</a></li><li><a href="https://slime-firefly-ca7.notion.site/MySQL-43251c006b334153b0422372119e5cc9">MySQL</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3256251202e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>