<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3301040538324131755</id><updated>2026-06-01T19:05:25.099-07:00</updated><category term="Javascript"/><category term="教學"/><category term="tutorial"/><category term="stock"/><category term="Tradingview"/><category term="Pine腳本"/><category term="策略"/><category term="Linux"/><category term="Vim"/><category term="AngularJS"/><category term="Game"/><category term="Mercurial"/><category term="回測"/><category term="Ruby on Rails"/><category term="rust"/><category term="C Language"/><category term="ChatGPT"/><category term="筆記"/><category term="C"/><category term="C#"/><category term="HTML5"/><category term="Pine Script"/><category term="Windows"/><category term="powershell"/><category term="遊戲"/><category term="CSS"/><category term="Cscope and Ctags"/><category term="docker"/><category term="C++"/><category term="Database"/><category term="Linux Device Drivers"/><category term="PS4"/><category term="Ruby"/><category term="Ubuntu"/><category term="assemble"/><category term="dotnet core"/><category term="小說"/><category term="Git"/><category term="Grunt"/><category term="HTML"/><category term="Jslibs"/><category term="Linux指令"/><category term="Load Balancer"/><category term="MSSQL"/><category term="Node.js"/><category term="Rakefile"/><category term="Reactjs"/><category term="Taiko"/><category term="code"/><category term="curl"/><category term="golang"/><category term="kernel"/><category term="leantime"/><category term="程式碼"/><category term="範例"/><category term=".Net 6"/><category term="0050"/><category term="2330"/><category term="Animation"/><category term="DB"/><category term="End-to-End 測試"/><category term="GTA5"/><category term="Github Action"/><category term="IoT"/><category term="Kubernetes"/><category term="LLVM"/><category term="Mac"/><category term="Objective-C"/><category term="OpenAi"/><category term="PHP"/><category term="Raspberry Pi"/><category term="Testing"/><category term="Testing Framework"/><category term="World War Z"/><category term="Yeoman"/><category term="Youtube"/><category term="command"/><category term="example"/><category term="google+"/><category term="jQuery"/><category term="k3s"/><category term="k3sup"/><category term="k8s"/><category term="nc"/><category term="ping"/><category term="table"/><category term="telnet"/><category term="vuejs"/><category term="個人心情"/><category term="元大台灣50"/><category term="台積電"/><category term="密室遊戲"/><category term="末日之戰"/><category term="湯姆克蘭西"/><category term="碧血狂殺2"/><category term="表格"/><category term="語法"/><category term="資料庫"/><category term="閒聊"/><category term=".NET Framework 4.5.2"/><category term=".NET Framework DateTime"/><category term="0056"/><category term="AOP"/><category term="Acer"/><category term="Acer Helios 300"/><category term="Android"/><category term="Array"/><category term="Aspect-oriented programming"/><category term="Bower"/><category term="CI"/><category term="CSS3"/><category term="Canvas"/><category term="CoffeeScript"/><category term="DNS"/><category term="Dart"/><category term="Desktop"/><category term="E2E"/><category term="Executables"/><category term="Fail Over"/><category term="Fallout 76"/><category term="Free"/><category term="GeForce GTX 1060"/><category term="Get-Content"/><category term="Get-FileHash"/><category term="Higher Order Functions"/><category term="Icon"/><category term="Image"/><category term="Inherit"/><category term="Iterators"/><category term="Learn"/><category term="Live Chat"/><category term="Makefile"/><category term="Mocha"/><category term="Mx Linux"/><category term="NMAP"/><category term="Paste Code"/><category term="Performance"/><category term="Port"/><category term="Program"/><category term="QUnit"/><category term="RWD"/><category term="Red Dead Redemption 2"/><category term="Resolve-DnsName"/><category term="Reverse Proxy"/><category term="RxDB"/><category term="SMA"/><category term="SQL"/><category term="SSL"/><category term="SVG"/><category term="Sapper"/><category term="Security"/><category term="Source Maps"/><category term="Strategy"/><category term="Svelte"/><category term="TLS1.2"/><category term="Tagbar"/><category term="Terminal"/><category term="Titanium"/><category term="Tom Clancy&#39;s The Division 2"/><category term="Travis CI"/><category term="Unions"/><category term="Unit testing"/><category term="Unity"/><category term="Unix"/><category term="Vagrant"/><category term="Web"/><category term="Web Application"/><category term="ack"/><category term="aop proxy"/><category term="attribute"/><category term="automatic"/><category term="babel"/><category term="backtesting"/><category term="cat"/><category term="chart"/><category term="component"/><category term="csharp"/><category term="ctags"/><category term="d3js"/><category term="dall-e-2"/><category term="debug"/><category term="design"/><category term="docker-compose"/><category term="dokcer"/><category term="example struct"/><category term="example vector"/><category term="excel"/><category term="gdb"/><category term="goodinfo"/><category term="grep"/><category term="hamisme"/><category term="hash"/><category term="hashmap"/><category term="hotkey"/><category term="ie"/><category term="input tag"/><category term="k線"/><category term="library"/><category term="logs"/><category term="manjaro"/><category term="md5"/><category term="memory leak"/><category term="mock"/><category term="nodejs"/><category term="openxml"/><category term="overlay"/><category term="picture"/><category term="postgresql"/><category term="project"/><category term="python"/><category term="regular expression"/><category term="schema"/><category term="sha256"/><category term="shell"/><category term="str.format"/><category term="taglist"/><category term="tcp"/><category term="tcpdump"/><category term="template"/><category term="think"/><category term="trading"/><category term="traffic_light"/><category term="typescript"/><category term="vue-cli"/><category term="wStorage"/><category term="weather"/><category term="一行"/><category term="乖離率河流圖"/><category term="交易"/><category term="介紹"/><category term="停利/停損"/><category term="元大高股息"/><category term="加速開發速度"/><category term="反向代理"/><category term="台灣駭客年會"/><category term="天氣"/><category term="好用軟體"/><category term="字串格式化"/><category term="宏碁"/><category term="客製化"/><category term="專案管理"/><category term="戰地風雲1"/><category term="扣抵值"/><category term="指令"/><category term="明鏡止水玩樂"/><category term="校園"/><category term="正規表示法"/><category term="測試"/><category term="湯姆克蘭西2"/><category term="碧血狂殺 2"/><category term="碧血狂殺 2 online之尋寶中"/><category term="碧血狂殺 2 武x肺炎快消失ㄇㄉㄈㄎ"/><category term="第一章"/><category term="第二章"/><category term="結構"/><category term="美股"/><category term="股價強弱"/><category term="股票"/><category term="解析網域"/><category term="註解"/><category term="走進山洞"/><category term="道瓊工業指數"/><category term="邀請"/><category term="防疫"/><title type='text'>Hamisme Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>257</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-8390857274436800156</id><published>2023-09-28T08:55:00.005-07:00</published><updated>2023-09-28T08:55:39.905-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="debug"/><category scheme="http://www.blogger.com/atom/ns#" term="logs"/><category scheme="http://www.blogger.com/atom/ns#" term="Pine腳本"/><category scheme="http://www.blogger.com/atom/ns#" term="stock"/><category scheme="http://www.blogger.com/atom/ns#" term="Tradingview"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="回測"/><category scheme="http://www.blogger.com/atom/ns#" term="教學"/><category scheme="http://www.blogger.com/atom/ns#" term="策略"/><title type='text'>[STOCK] [新功能][TRADINGVIEW] 使用Pine logs來Debug Pine Script (總算有debug 功能)</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;新功能&lt;/h2&gt;&lt;div&gt;https://www.tradingview.com/blog/tw/pine-logs-in-pine-script-40490/&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: #f7f7f8; color: #374151; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; white-space-collapse: preserve;&quot;&gt;​&lt;/span&gt;&lt;/div&gt;&lt;div&gt;TradingView新推出的log.*()功能可以協助你在Pine Script中來做Debug。然後可以透過log.error(), log.info(), 和 log.warning()函數，可以在Pine logs視窗中看到Script執行時的不同類型的資訊。例如錯誤、一般和警告訊息。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;然後你可以從編輯器或腳本的“更多”選單中選擇“腳本日誌”來查看這些日誌。這些功能可以在任何類型的腳本和腳本中的任何位置使用，可以讓開發腳本上可以更方便&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;使用logs的腳本必須是個人腳本，私人或公開發佈的腳本無法生成logs, 大概是怕發佈出去寫錯導致一堆人系統Crash。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;這個功能真的很需要之前在寫真的只能用看的圖表來debug&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkr7NtRxeymm0JdBzv7F9S-8dVv7QgzA1HMNrtDi3uXSzAg0mFu4RCJ1XLzWG9zr3rMF-azVCuekxrexvMpHJIiELAlIh5AhY0EhAFTq3iI6r43HTlSprwDpestR1mh1HSSLujz8BTOCZvP0UMw2dP-fkp2XmsCrvaBhZEMgKj7dMO_kQ7SJEdbel6N0w/s574/A0.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;84&quot; data-original-width=&quot;574&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkr7NtRxeymm0JdBzv7F9S-8dVv7QgzA1HMNrtDi3uXSzAg0mFu4RCJ1XLzWG9zr3rMF-azVCuekxrexvMpHJIiELAlIh5AhY0EhAFTq3iI6r43HTlSprwDpestR1mh1HSSLujz8BTOCZvP0UMw2dP-fkp2XmsCrvaBhZEMgKj7dMO_kQ7SJEdbel6N0w/s16000/A0.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjJcsJ1EaSF2pa_4Lx1o8IpdKRqzrRsylA7vI88UZoOj9BQwD1CTQXzFZaUzL2ll7LOlfiQJqxTU-kmRy6AtiSdeUcJQv_FnqVw8pptWNb85e0jR6Yz0_ujzA9WOYeCtQ0o_oPZ_nzWQ9z3x0tKGxvNWXcDXRWIL45gpMb1w7EDRb4zXmatCPtfvw18kc/s390/A1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;390&quot; data-original-width=&quot;260&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjJcsJ1EaSF2pa_4Lx1o8IpdKRqzrRsylA7vI88UZoOj9BQwD1CTQXzFZaUzL2ll7LOlfiQJqxTU-kmRy6AtiSdeUcJQv_FnqVw8pptWNb85e0jR6Yz0_ujzA9WOYeCtQ0o_oPZ_nzWQ9z3x0tKGxvNWXcDXRWIL45gpMb1w7EDRb4zXmatCPtfvw18kc/s16000/A1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvxHpxuEezMJf4Zm1zuee7VEQQH36BDWyuv33wHdjNlQqeFkG1vYKT9bbdlyTGySazyGDy4a0ZKKufmxsJDHecxizaiWtwGkIX0G5Gge2FyXUPyDXgrVsBTXvrYVbjEaslPoLHgq-nzZudd5E_Ex3lLHymcRAgEHj0A9TnbnCgmMF2BIxxTrVsWls15oE/s632/A2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;632&quot; data-original-width=&quot;515&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvxHpxuEezMJf4Zm1zuee7VEQQH36BDWyuv33wHdjNlQqeFkG1vYKT9bbdlyTGySazyGDy4a0ZKKufmxsJDHecxizaiWtwGkIX0G5Gge2FyXUPyDXgrVsBTXvrYVbjEaslPoLHgq-nzZudd5E_Ex3lLHymcRAgEHj0A9TnbnCgmMF2BIxxTrVsWls15oE/s16000/A2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/8390857274436800156/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/8390857274436800156' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/8390857274436800156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/8390857274436800156'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2023/09/stock-tradingview-pine-logsdebug-pine.html' title='[STOCK] [新功能][TRADINGVIEW] 使用Pine logs來Debug Pine Script (總算有debug 功能)'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkr7NtRxeymm0JdBzv7F9S-8dVv7QgzA1HMNrtDi3uXSzAg0mFu4RCJ1XLzWG9zr3rMF-azVCuekxrexvMpHJIiELAlIh5AhY0EhAFTq3iI6r43HTlSprwDpestR1mh1HSSLujz8BTOCZvP0UMw2dP-fkp2XmsCrvaBhZEMgKj7dMO_kQ7SJEdbel6N0w/s72-c/A0.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-2386387961295343308</id><published>2023-03-18T11:01:00.001-07:00</published><updated>2023-03-18T11:01:11.651-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ChatGPT"/><category scheme="http://www.blogger.com/atom/ns#" term="密室遊戲"/><category scheme="http://www.blogger.com/atom/ns#" term="小說"/><category scheme="http://www.blogger.com/atom/ns#" term="第二章"/><category scheme="http://www.blogger.com/atom/ns#" term="走進山洞"/><title type='text'>[ChatGPT][小說] 密室遊戲 - 第二章 - 走進山洞</title><content type='html'>&lt;p&gt;&amp;nbsp;第二章 走進密室&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6EGapEntFEcpRu2bPVrYmezfA0qNAJqJZsTAQu6DecZ8KEjk1j2mdPDW2IT0-vGoLtHAPxqSg4ef-r2eUn8IBSclPpXvAGYxieh1tTxJ6pVBxrZD3t8fq8WKQ0jZe0VfyDEF1Jf2eeL9RRgslPDNjk90cixA5pil4aRxBM96NWF2TaMfYI2PA2Dr4/s512/00001-123214334.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;512&quot; data-original-width=&quot;512&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6EGapEntFEcpRu2bPVrYmezfA0qNAJqJZsTAQu6DecZ8KEjk1j2mdPDW2IT0-vGoLtHAPxqSg4ef-r2eUn8IBSclPpXvAGYxieh1tTxJ6pVBxrZD3t8fq8WKQ0jZe0VfyDEF1Jf2eeL9RRgslPDNjk90cixA5pil4aRxBM96NWF2TaMfYI2PA2Dr4/s16000/00001-123214334.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;福爾摩斯迪卡匹歐和雅森蘋國帶著興奮的心情走進了山洞。山洞裡面非常陰暗，他們不得不使用手電筒照明。山洞的牆壁上布滿了古老的壁畫，看似描繪著一段神秘的故事。他們沿著狹窄的通道前進，不久就發現了一扇巨大的石門。&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJWKHUHbYAPp6ZjoTXCBRLXTvrHFpjGAFNUW24MZ6KeG5NzoZ0b24-S5rCs9EuDulG_ixb47k50pTvLujYxc-x2NQcSONM6BaMELcqQa1UZWAHa-rWxG96-vs4WILFKpPaGG5Rw2VrGeH6UCiDVJclDUcKncYkRJIoRB_gDWzUMQ4I5vK3FOIStHM5/s512/00000-123214334.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;512&quot; data-original-width=&quot;512&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJWKHUHbYAPp6ZjoTXCBRLXTvrHFpjGAFNUW24MZ6KeG5NzoZ0b24-S5rCs9EuDulG_ixb47k50pTvLujYxc-x2NQcSONM6BaMELcqQa1UZWAHa-rWxG96-vs4WILFKpPaGG5Rw2VrGeH6UCiDVJclDUcKncYkRJIoRB_gDWzUMQ4I5vK3FOIStHM5/s16000/00000-123214334.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;石門上刻著一個神秘的圖案，與他們手中的銀色鑰匙形狀相符。&lt;/p&gt;&lt;p&gt;福爾摩斯迪卡匹歐和雅森蘋國猜想這扇石門可能就是通往寶藏的入口。他們小心翼翼地將銀色鑰匙插入石門上的鑰匙孔，慢慢地轉動。石門發出一陣沈重的轟鳴，緩緩地打開了。他們興奮地走進了石門後的空間。&lt;/p&gt;&lt;p&gt;進入石門後，他們發現自己來到了一個巨大的地下室。地下室裡有著高高的拱頂，牆壁上點燃著火把，照亮了整個空間。&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCmGXXdsKuJByYSVQwvPngXRh5CzaIgHa12RAAuVc1J8ter9aVlvJWko4aEy4gVLHYPNNx2Y7xp2kYv-N8BfNGEfQmexUYKDrqxzjtxHUTOkpYRGeVxGscIE-FzdMIE7PHH7mlQn9cRty8ZEHxVXr1pmr7xReI7HHuVHmq6LuO9imDI5tEd1c6Yjkn/s512/00001-123214334.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;512&quot; data-original-width=&quot;512&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCmGXXdsKuJByYSVQwvPngXRh5CzaIgHa12RAAuVc1J8ter9aVlvJWko4aEy4gVLHYPNNx2Y7xp2kYv-N8BfNGEfQmexUYKDrqxzjtxHUTOkpYRGeVxGscIE-FzdMIE7PHH7mlQn9cRty8ZEHxVXr1pmr7xReI7HHuVHmq6LuO9imDI5tEd1c6Yjkn/s16000/00001-123214334.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;地下室的正中央，有一個巨大的寶箱。寶箱上鑲滿了寶石，閃爍著令人眩目的光芒。寶箱的四周，則是擺放著各式各樣的珍貴文物和藝術品，顯示著曾經的榮華富貴。&lt;/p&gt;&lt;p&gt;福爾摩斯迪卡匹歐和雅森蘋國走到寶箱前，緊張地打開它。寶箱裡裝滿了黃金、寶石和各種珍貴的古董。他們驚喜地發現，這些財富足以讓他們的事務所重建起來，並且過上無憂無慮的生活。然而，正當他們欣喜若狂之時，突然間地下室的石門緩緩關閉，當福爾摩斯迪卡匹歐和雅森蘋國發現的時候快速衝往石門，但石門關閉的速度超乎他們想像的快，然後就將他們困在了裡面。&lt;/p&gt;&lt;p&gt;














&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/2386387961295343308/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/2386387961295343308' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/2386387961295343308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/2386387961295343308'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2023/03/chatgpt.html' title='[ChatGPT][小說] 密室遊戲 - 第二章 - 走進山洞'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6EGapEntFEcpRu2bPVrYmezfA0qNAJqJZsTAQu6DecZ8KEjk1j2mdPDW2IT0-vGoLtHAPxqSg4ef-r2eUn8IBSclPpXvAGYxieh1tTxJ6pVBxrZD3t8fq8WKQ0jZe0VfyDEF1Jf2eeL9RRgslPDNjk90cixA5pil4aRxBM96NWF2TaMfYI2PA2Dr4/s72-c/00001-123214334.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-3010025453775113952</id><published>2023-02-12T07:09:00.001-08:00</published><updated>2023-02-12T07:09:07.412-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="curl"/><category scheme="http://www.blogger.com/atom/ns#" term="nc"/><category scheme="http://www.blogger.com/atom/ns#" term="ping"/><category scheme="http://www.blogger.com/atom/ns#" term="powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="telnet"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>[PowerShell] Using PowerShell commands to replace ping, telnet, curl in Windows</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;Situation&lt;/h3&gt;&lt;div&gt;When creating a clean Windows VM or App Service in Azure cloud, it is often necessary to check the network status or if other service ports are open. Previously, I would use ping, telnet or curl to read the HTML content of other websites. However, they are not installed by default and I would have to install them myself. Then I realized that PowerShell is a tool that is always installed by default. So I found the corresponding commands that can be used, which quickly solved the network connectivity issue for me recently.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If this article is helpful to you, please click on the advertisement to provide me with extra income as it is also a form of encouragement for me.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;Command&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Commands to replace ping :&amp;nbsp;&lt;a href=&quot;https://forsenergy.com/zh-tw/windowspowershellhelp/html/87d293e5-10e2-489b-b0a9-922d77c05f3f.htm&quot; target=&quot;_blank&quot;&gt;Test-Connection&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt; $&amp;gt; Test-Connection  www.google.com&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJWjfxRj2Xbd_uu51XpFJuuJJzgMG_DZnrGTswITV87F00Ju9ADULVaihzTwIPEi3XPRQhWtFYIN2ZnL8t_D2xRLZVDbGvA8UeVguLb45HeO0824wthDKNXI8lqNN3x-o0fh-DApTs36g/s1600/PowershellHelp1.PNG&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;263&quot; data-original-width=&quot;1037&quot; height=&quot;162&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJWjfxRj2Xbd_uu51XpFJuuJJzgMG_DZnrGTswITV87F00Ju9ADULVaihzTwIPEi3XPRQhWtFYIN2ZnL8t_D2xRLZVDbGvA8UeVguLb45HeO0824wthDKNXI8lqNN3x-o0fh-DApTs36g/s640/PowershellHelp1.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2nHqmAZrdJyoyBXtO1w1XN8BIE3n5yrL12CFa-h-ZC20VZqNRY3NHNj0Spw9soD4_2hMQLWUHvXUp9bKLFOczBL4L8etEdFLWt9CqwC5fBe30otGKV2K3SDw3Z0YzWMUjE17aT0TjxdI/s1600/Test-Connection.PNG&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;189&quot; data-original-width=&quot;1157&quot; height=&quot;104&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2nHqmAZrdJyoyBXtO1w1XN8BIE3n5yrL12CFa-h-ZC20VZqNRY3NHNj0Spw9soD4_2hMQLWUHvXUp9bKLFOczBL4L8etEdFLWt9CqwC5fBe30otGKV2K3SDw3Z0YzWMUjE17aT0TjxdI/s640/Test-Connection.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;Commands to replace telnet:&amp;nbsp;&lt;a href=&quot;https://docs.microsoft.com/en-us/powershell/module/nettcpip/test-netconnection?view=win10-ps&quot; target=&quot;_blank&quot;&gt;Test-NetConnection&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 16px; font-weight: 400; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt; $&amp;gt; Test-NetConnection  www.google.com -Port 443&lt;/code&gt;&lt;/pre&gt;&lt;/h3&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYNv90TjESTxxEBVc3cXrmj7tTS5LZK_2yrMrRkA28v8Wb9LVaktc5mchAmDTnXpR6JNONRvDh5T2JDSkC6GMh5S-mATKN1-od9qvX7mVP8x9rEnqmel_kvqSCLOuc5ZoGxGrRynITK1Q/s1600/PowershellHelp2.PNG&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;489&quot; data-original-width=&quot;1299&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYNv90TjESTxxEBVc3cXrmj7tTS5LZK_2yrMrRkA28v8Wb9LVaktc5mchAmDTnXpR6JNONRvDh5T2JDSkC6GMh5S-mATKN1-od9qvX7mVP8x9rEnqmel_kvqSCLOuc5ZoGxGrRynITK1Q/s640/PowershellHelp2.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuJJ0qm4NTm3bqZlonTb72W5luCudQl4KgTGG5VlX2SyFQHAwN2OobrOVjAfPKkmcUv4uftRbS7ustEXtzfL5oKHdnZwtDKLCC4foiWs13Ic10cUkdnoQPzj26qrAoaPgpXDAJcimInEU/s1600/Test-NetConnection.PNG&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;222&quot; data-original-width=&quot;717&quot; height=&quot;198&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuJJ0qm4NTm3bqZlonTb72W5luCudQl4KgTGG5VlX2SyFQHAwN2OobrOVjAfPKkmcUv4uftRbS7ustEXtzfL5oKHdnZwtDKLCC4foiWs13Ic10cUkdnoQPzj26qrAoaPgpXDAJcimInEU/s640/Test-NetConnection.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Commands to replace curl:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-6&quot; target=&quot;_blank&quot;&gt;Invoke-WebRequest&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&quot;This example only uses the Get method, for information on how to use the Post method, please refer to the official documentation.&lt;br /&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt; $&amp;gt;  Invoke-WebRequest https://www.google.com &lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWLSFMVqewV_aegZOgaH8SrFy3oSAJML4SbuMC8kxE6ze_so28KulpJS7gyxRQyJ0vFKbiprs0Dn7oczo1sqB3VJTGwzvPmQgZO88A9uCygXsTs0pB9Qu6gLytmiZlUVF3I2WHu8rCyV4/s1600/Invoke-WebRequest.PNG&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;464&quot; data-original-width=&quot;1315&quot; height=&quot;224&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWLSFMVqewV_aegZOgaH8SrFy3oSAJML4SbuMC8kxE6ze_so28KulpJS7gyxRQyJ0vFKbiprs0Dn7oczo1sqB3VJTGwzvPmQgZO88A9uCygXsTs0pB9Qu6gLytmiZlUVF3I2WHu8rCyV4/s640/Invoke-WebRequest.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/3010025453775113952/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/3010025453775113952' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/3010025453775113952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/3010025453775113952'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2023/02/powershell-using-powershell-commands-to.html' title='[PowerShell] Using PowerShell commands to replace ping, telnet, curl in Windows'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJWjfxRj2Xbd_uu51XpFJuuJJzgMG_DZnrGTswITV87F00Ju9ADULVaihzTwIPEi3XPRQhWtFYIN2ZnL8t_D2xRLZVDbGvA8UeVguLb45HeO0824wthDKNXI8lqNN3x-o0fh-DApTs36g/s72-c/PowershellHelp1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-7769395723280322153</id><published>2023-02-04T19:15:00.000-08:00</published><updated>2023-02-04T19:15:23.450-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net 6"/><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="DB"/><category scheme="http://www.blogger.com/atom/ns#" term="docker"/><category scheme="http://www.blogger.com/atom/ns#" term="Github Action"/><category scheme="http://www.blogger.com/atom/ns#" term="MSSQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Testing"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="教學"/><category scheme="http://www.blogger.com/atom/ns#" term="資料庫"/><title type='text'>[Github Action][Tutorial] Using Github Action to create a Database for testing purposes.</title><content type='html'>&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;The purpose&lt;/span&gt;&lt;/b&gt; of this note is to create a test database for unit tests in the project when pushing code to Github using Github Actions. The environment is .Net 6 and the database is MSSQL2019. The code is located at https://github.com/CarterTsai/github-action-container-example. Note that the password for the database will be in plain text for testing purposes, but it is recommended to use Github Secrets for passwords or sensitive information when using it in production.&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;The process is as follows:&lt;/h3&gt;&lt;p&gt;1. Push code to Github&lt;/p&gt;&lt;p&gt;2. Trigger Github Action&lt;/p&gt;&lt;p&gt;3. Run test MSSQL database service from docker-compose.yaml&lt;/p&gt;&lt;p&gt;4. Install MSSQL command line tool&lt;/p&gt;&lt;p&gt;5. Setup .NET Core SDK 6.0.x&lt;/p&gt;&lt;p&gt;6. Create database from create_db.sql (using sqlcmd)&lt;/p&gt;&lt;p&gt;7. Create table from create_table.sql (using sqlcmd)&lt;/p&gt;&lt;p&gt;8. Restore packages&lt;/p&gt;&lt;p&gt;9. Build solution&lt;/p&gt;&lt;p&gt;10. Test&lt;/p&gt;&lt;p&gt;Stop test MSSQL database service.&lt;/p&gt;&lt;p&gt;If the article is helpful to you, please click on an advertisement to give me additional income, which is also a form of encouragement for me.&lt;/p&gt;&lt;h2&gt;Create docker-compose.yaml&lt;/h2&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;pre style=&quot;background-color: var(--color-canvas-subtle); border-radius: 6px; box-sizing: border-box; color: #c9d1d9; font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;version&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-pds&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;3.9&lt;span class=&quot;pl-pds&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;services&lt;/span&gt;:
  &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;MSSQL2019Test&lt;/span&gt;:
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;image&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;mcr.microsoft.com/mssql/server:latest&lt;/span&gt;
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;restart&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;always&lt;/span&gt;
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;container_name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;MSSQL2019Test&lt;/span&gt;
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;ports&lt;/span&gt;:
      - &lt;span class=&quot;pl-c1&quot; color=&quot;var(--color-prettylights-syntax-constant)&quot; style=&quot;box-sizing: border-box;&quot;&gt;1433:1433&lt;/span&gt;
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;volumes&lt;/span&gt;:
      - &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;db-test:/var/opt/mssql&lt;/span&gt;
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;environment&lt;/span&gt;:
      - &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;ACCEPT_EULA=Y&lt;/span&gt;
      - &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;SA_PASSWORD=1qaz@WSX&lt;/span&gt;
      - &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;MSSQL_COLLATION=Chinese_Taiwan_Stroke_CI_AS&lt;/span&gt;
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;networks&lt;/span&gt;:
      - &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;db&lt;/span&gt;

&lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;volumes&lt;/span&gt;:
  &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;db-test&lt;/span&gt;:

&lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;networks&lt;/span&gt;:
  &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;db&lt;/span&gt;:&lt;/pre&gt;&lt;/pre&gt;&lt;h2&gt;Create a github action workflow file dotnet.yml&lt;/h2&gt;&lt;div&gt;Create a github action file, located at /.github/workflows/dotnet.ym&lt;/div&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;pre style=&quot;background-color: var(--color-canvas-subtle); border-radius: 6px; box-sizing: border-box; color: #c9d1d9; font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;dotnet package&lt;/span&gt;

&lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;on&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;[push]&lt;/span&gt;

&lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;jobs&lt;/span&gt;:
  &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;build&lt;/span&gt;:
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;timeout-minutes&lt;/span&gt;: &lt;span class=&quot;pl-c1&quot; color=&quot;var(--color-prettylights-syntax-constant)&quot; style=&quot;box-sizing: border-box;&quot;&gt;10&lt;/span&gt;
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;runs-on&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;ubuntu-latest&lt;/span&gt;
    
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;strategy&lt;/span&gt;:
      &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;matrix&lt;/span&gt;:
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;dotnet-version&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;[&#39;6.0.x&#39; ]&lt;/span&gt;

    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;steps&lt;/span&gt;:
      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;uses&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;actions/checkout@v2&lt;/span&gt;
      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Start containers&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;working-directory&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;./docker/&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;docker-compose -f &quot;docker-compose.yml&quot; up -d --build&lt;/span&gt;
      
      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Install mssql tools &lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;sudo apt-get install mssql-tools&lt;/span&gt;

      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Install mssql tools path &lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;echo &#39;export PATH=&quot;$PATH:/opt/mssql-tools/bin&quot;&#39; &amp;gt;&amp;gt; ~/.bash_profile&lt;/span&gt;

      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Create Database&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;working-directory&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;./sql/&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;sqlcmd -S localhost -U sa -P 1qaz@WSX -i create_db.sql&lt;/span&gt;

      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Create table&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;working-directory&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;./sql/&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;sqlcmd -S localhost -U sa -P 1qaz@WSX -d testDB -i create_table.sql&lt;/span&gt;
        
      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Setup .NET Core SDK ${{ matrix.dotnet-version }}&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;uses&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;actions/setup-dotnet@v1.7.2&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;with&lt;/span&gt;:
          &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;dotnet-version&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;${{ matrix.dotnet-version }}&lt;/span&gt;

      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Install dependencies&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;dotnet restore github-action-container-example&lt;/span&gt;

      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Build&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;dotnet build --configuration Release --no-restore github-action-container-example&lt;/span&gt;
      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Test&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;dotnet test --no-restore --verbosity normal github-action-container-example&lt;/span&gt;

      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Stop containers&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;working-directory&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;./docker/&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;if&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;always()&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;docker-compose -f &quot;docker-compose.yml&quot; down&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2&gt;Reference&lt;/h2&gt;&lt;p&gt;https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action&lt;/p&gt;&lt;p&gt;https://docs.microsoft.com/zh-tw/sql/tools/sqlcmd-utility?view=sql-server-ver15&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/7769395723280322153/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/7769395723280322153' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/7769395723280322153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/7769395723280322153'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2023/02/github-actiontutorial-using-github.html' title='[Github Action][Tutorial] Using Github Action to create a Database for testing purposes.'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-9101238594687439227</id><published>2023-02-04T19:03:00.002-08:00</published><updated>2023-02-04T19:03:47.952-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="backtesting"/><category scheme="http://www.blogger.com/atom/ns#" term="ChatGPT"/><category scheme="http://www.blogger.com/atom/ns#" term="Pine Script"/><category scheme="http://www.blogger.com/atom/ns#" term="stock"/><category scheme="http://www.blogger.com/atom/ns#" term="Strategy"/><category scheme="http://www.blogger.com/atom/ns#" term="trading"/><category scheme="http://www.blogger.com/atom/ns#" term="Tradingview"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><title type='text'>[STOCK] [Strategy][TRADINGVIEW][Tutorial] Using strategy.order in PINE SCRIPT to complete multiple trades strategy</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;This article uses chatgpt for translation.&amp;nbsp;&lt;a href=&quot;https://hamisme.blogspot.com/2023/01/stock-tradingview-pine.html&quot; target=&quot;_blank&quot;&gt;[STOCK] [策略][TRADINGVIEW][教學] PINE SCRIPT使用STRATEGY.ORDER來完成多次交易的策略&lt;/a&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Objective&lt;/h2&gt;&lt;p&gt;In a trading strategy, if you want to add positions midway, you can use the strategy.order function to achieve this. The following example will be:&lt;/p&gt;&lt;p&gt;1. Buy once when it rises above the quarterly line, and the order quantity is 0.&lt;/p&gt;&lt;p&gt;2. Buy again when it rises above the 10-day line.&lt;/p&gt;&lt;p&gt;3. Sell all when it falls below the 60-day line.&lt;/p&gt;&lt;p&gt;P.S. If you don&#39;t want to sell all at once, you can adjust the quantity to be sold by adding the qty parameter to the strategy.close function.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: white; font-size: 13px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: #5b9cf6; font-size: 13px; white-space: pre;&quot;&gt;strategy.close&lt;/span&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: white; font-size: 13px; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: #388e3c; font-size: 13px; white-space: pre;&quot;&gt;&quot;buy&quot;&lt;/span&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: #42bda8; font-size: 13px; font-weight: bold; white-space: pre;&quot;&gt;,&lt;/span&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: white; font-size: 13px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: #d1d4dc; font-size: 13px; white-space: pre;&quot;&gt;comment&lt;/span&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: white; font-size: 13px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: #42bda8; font-size: 13px; font-weight: bold; white-space: pre;&quot;&gt;=&lt;/span&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: white; font-size: 13px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: #388e3c; font-size: 13px; white-space: pre;&quot;&gt;&#39;全賣&#39;, qty&lt;/span&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: #d1d4dc; font-size: 13px; white-space: pre;&quot;&gt; = &lt;/span&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: #388e3c; font-size: 13px; white-space: pre;&quot;&gt;1&lt;/span&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: #388e3c; font-size: 13px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: white; font-size: 13px; white-space: pre;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;if the article is helpful to you, please click on an advertisement to provide me with additional income, which is also an encouragement for me.&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Strategy Script&lt;/h2&gt;&lt;p&gt;For instructions on how to add the script to the chart, please refer to &lt;a href=&quot;https://hamisme.blogspot.com/2021/06/stocktradingview-tradingview.html&quot; target=&quot;_blank&quot;&gt;[STOCK][TRADINGVIEW][Tutorial] Adding your own indicators &amp;amp; strategies to TRADINGVIEW charts.&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div&gt;&lt;div style=&quot;background-color: #131722; color: white; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; line-height: 18px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// © CarterTsai&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;//@version=5&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #5b9cf6;&quot;&gt;strategy&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&quot;加碼範例&quot;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;overlay&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f77c80;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;margin_long&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f57f17;&quot;&gt;1000&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;margin_short&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f57f17;&quot;&gt;100&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;sma10&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;ta.sma&lt;/span&gt;(&lt;span style=&quot;color: #f77c80;&quot;&gt;close&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;10&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;sma60&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;ta.sma&lt;/span&gt;(&lt;span style=&quot;color: #f77c80;&quot;&gt;close&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;60&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;buycondition&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;ta.crossover&lt;/span&gt;(&lt;span style=&quot;color: #f77c80;&quot;&gt;close&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;sma60&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;additioncondition&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;ta.crossover&lt;/span&gt;(&lt;span style=&quot;color: #f77c80;&quot;&gt;close&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;sma10&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;sellcondition&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;ta.crossunder&lt;/span&gt;(&lt;span style=&quot;color: #f77c80;&quot;&gt;close&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;sma60&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// 漲過季線買一次, 並且訂單數量應該是0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #f77c80;&quot;&gt;strategy.position_size&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;and&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;buycondition&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;strategy.entry&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;buy&#39;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f77c80;&quot;&gt;strategy.long&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;comment&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;第一次買&#39;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;qty&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f57f17;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// 漲過10線買一次&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;if&lt;/span&gt; ( &lt;span style=&quot;color: #f77c80;&quot;&gt;strategy.position_size&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;and&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;additioncondition&lt;/span&gt; )&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;strategy.order&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;buy&#39;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f77c80;&quot;&gt;strategy.long&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;comment&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;漲破10線再買一次&#39;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;qty&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// 跌破季線&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #f77c80;&quot;&gt;strategy.position_size&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;and&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;sellcondition&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;strategy.close&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&quot;buy&quot;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;comment&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;全賣&#39;&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #5b9cf6;&quot;&gt;plot&lt;/span&gt;(&lt;span style=&quot;color: #d1d4dc;&quot;&gt;sma60&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f77c80;&quot;&gt;color.yellow&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;linewidth&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f57f17;&quot;&gt;2&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #5b9cf6;&quot;&gt;plot&lt;/span&gt;(&lt;span style=&quot;color: #d1d4dc;&quot;&gt;sma10&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f77c80;&quot;&gt;color.blue&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;linewidth&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f57f17;&quot;&gt;2&lt;/span&gt;)&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;結果&lt;/h2&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-CGiOb2tElaqxGxocU83ZnI_Eo1SZzpP6L2QfuDvd_eNX2YKZo5kbONAI2FY8zCqXjZ-6bpGhDQTmRORrYkX3KQMkTO6W1kDE6P3V1LXLHvSEQU2JjmrYvL0gmI1g0a3d4gOveWj75BgOatSKe6BjV0B4To34MPdxCXAxr_faM5pb2JgpeCe5W9KN/s1195/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202023-01-15%20010001.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;636&quot; data-original-width=&quot;1195&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-CGiOb2tElaqxGxocU83ZnI_Eo1SZzpP6L2QfuDvd_eNX2YKZo5kbONAI2FY8zCqXjZ-6bpGhDQTmRORrYkX3KQMkTO6W1kDE6P3V1LXLHvSEQU2JjmrYvL0gmI1g0a3d4gOveWj75BgOatSKe6BjV0B4To34MPdxCXAxr_faM5pb2JgpeCe5W9KN/s16000/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202023-01-15%20010001.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: white; font-size: 13px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: white; font-size: 13px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: white; font-size: 13px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;background-color: #131722; color: white; font-size: 13px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/9101238594687439227/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/9101238594687439227' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/9101238594687439227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/9101238594687439227'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2023/02/stock-strategytradingviewtutorial-using.html' title='[STOCK] [Strategy][TRADINGVIEW][Tutorial] Using strategy.order in PINE SCRIPT to complete multiple trades strategy'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-CGiOb2tElaqxGxocU83ZnI_Eo1SZzpP6L2QfuDvd_eNX2YKZo5kbONAI2FY8zCqXjZ-6bpGhDQTmRORrYkX3KQMkTO6W1kDE6P3V1LXLHvSEQU2JjmrYvL0gmI1g0a3d4gOveWj75BgOatSKe6BjV0B4To34MPdxCXAxr_faM5pb2JgpeCe5W9KN/s72-c/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202023-01-15%20010001.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-2262759506493089974</id><published>2023-01-14T09:09:00.003-08:00</published><updated>2023-01-14T09:16:05.175-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Pine腳本"/><category scheme="http://www.blogger.com/atom/ns#" term="stock"/><category scheme="http://www.blogger.com/atom/ns#" term="Tradingview"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="交易"/><category scheme="http://www.blogger.com/atom/ns#" term="回測"/><category scheme="http://www.blogger.com/atom/ns#" term="教學"/><category scheme="http://www.blogger.com/atom/ns#" term="策略"/><title type='text'>[STOCK] [策略][TRADINGVIEW][教學] PINE SCRIPT使用strategy.order來完成多次交易的策略</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;目的&lt;/h2&gt;&lt;div&gt;在交易策略中如果要在中途加碼的話可以使用strategy.order這個函數來完成這個，以下範例會是:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. 漲超過季線買一次，並且訂單數量是0&lt;/div&gt;&lt;div&gt;2. 漲超過10線在買一次&lt;/div&gt;&lt;div&gt;3. 跌破季線全賣&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;P.S. 如果你不要一次全賣的話可以strategy.close函數參數加上qty來調整要賣的訂單&amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: #131722; color: white; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #131722; color: #5b9cf6; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; white-space: pre;&quot;&gt;strategy.close&lt;/span&gt;&lt;span style=&quot;background-color: #131722; color: white; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #131722; color: #388e3c; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; white-space: pre;&quot;&gt;&quot;buy&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #131722; color: #42bda8; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; font-weight: bold; white-space: pre;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #131722; color: white; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #131722; color: #d1d4dc; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; white-space: pre;&quot;&gt;comment&lt;/span&gt;&lt;span style=&quot;background-color: #131722; color: white; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #131722; color: #42bda8; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; font-weight: bold; white-space: pre;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #131722; color: white; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #131722; color: #388e3c; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; white-space: pre;&quot;&gt;&#39;全賣&#39;, qty&lt;/span&gt;&lt;span style=&quot;background-color: #131722; color: #d1d4dc; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; white-space: pre;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;background-color: #131722; color: #388e3c; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; white-space: pre;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: #131722; color: #388e3c; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #131722; color: white; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; white-space: pre;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;如果文章對你有幫助在幫我按一下廣告來讓我有額外收入這也是對我來說是一種鼓勵&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;策略腳本&lt;/h2&gt;&lt;div&gt;&lt;p&gt;如何將腳本加入至圖表中請參考&lt;a href=&quot;https://hamisme.blogspot.com/2021/06/stocktradingview-tradingview.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Helvetica Neue Light&amp;quot;;&quot;&gt;[STOCK][TRADINGVIEW][&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;font-family: &amp;quot;PingFang TC Light&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;教學&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Helvetica Neue Light&amp;quot;;&quot;&gt;] TRADINGVIEW&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;font-family: &amp;quot;PingFang TC Light&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;圖表上加入自己寫好的指標＆策略&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style=&quot;background-color: #131722; color: white; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; line-height: 18px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// © CarterTsai&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;//@version=5&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #5b9cf6;&quot;&gt;strategy&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&quot;加碼範例&quot;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;overlay&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f77c80;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;margin_long&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f57f17;&quot;&gt;1000&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;margin_short&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f57f17;&quot;&gt;100&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;sma10&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;ta.sma&lt;/span&gt;(&lt;span style=&quot;color: #f77c80;&quot;&gt;close&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;10&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;sma60&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;ta.sma&lt;/span&gt;(&lt;span style=&quot;color: #f77c80;&quot;&gt;close&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;60&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;buycondition&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;ta.crossover&lt;/span&gt;(&lt;span style=&quot;color: #f77c80;&quot;&gt;close&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;sma60&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;additioncondition&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;ta.crossover&lt;/span&gt;(&lt;span style=&quot;color: #f77c80;&quot;&gt;close&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;sma10&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;sellcondition&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;ta.crossunder&lt;/span&gt;(&lt;span style=&quot;color: #f77c80;&quot;&gt;close&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;sma60&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// 漲過季線買一次, 並且訂單數量應該是0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #f77c80;&quot;&gt;strategy.position_size&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;and&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;buycondition&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;strategy.entry&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;buy&#39;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f77c80;&quot;&gt;strategy.long&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;comment&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;第一次買&#39;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;qty&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f57f17;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// 漲過10線買一次&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;if&lt;/span&gt; ( &lt;span style=&quot;color: #f77c80;&quot;&gt;strategy.position_size&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;and&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;additioncondition&lt;/span&gt; )&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;strategy.order&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;buy&#39;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f77c80;&quot;&gt;strategy.long&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;comment&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;漲破10線再買一次&#39;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;qty&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// 跌破季線&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #f77c80;&quot;&gt;strategy.position_size&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;and&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;sellcondition&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;strategy.close&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&quot;buy&quot;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;comment&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;全賣&#39;&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #5b9cf6;&quot;&gt;plot&lt;/span&gt;(&lt;span style=&quot;color: #d1d4dc;&quot;&gt;sma60&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f77c80;&quot;&gt;color.yellow&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;linewidth&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f57f17;&quot;&gt;2&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #5b9cf6;&quot;&gt;plot&lt;/span&gt;(&lt;span style=&quot;color: #d1d4dc;&quot;&gt;sma10&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f77c80;&quot;&gt;color.blue&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;linewidth&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f57f17;&quot;&gt;2&lt;/span&gt;)&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;結果&lt;/h2&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-CGiOb2tElaqxGxocU83ZnI_Eo1SZzpP6L2QfuDvd_eNX2YKZo5kbONAI2FY8zCqXjZ-6bpGhDQTmRORrYkX3KQMkTO6W1kDE6P3V1LXLHvSEQU2JjmrYvL0gmI1g0a3d4gOveWj75BgOatSKe6BjV0B4To34MPdxCXAxr_faM5pb2JgpeCe5W9KN/s1195/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202023-01-15%20010001.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;636&quot; data-original-width=&quot;1195&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-CGiOb2tElaqxGxocU83ZnI_Eo1SZzpP6L2QfuDvd_eNX2YKZo5kbONAI2FY8zCqXjZ-6bpGhDQTmRORrYkX3KQMkTO6W1kDE6P3V1LXLHvSEQU2JjmrYvL0gmI1g0a3d4gOveWj75BgOatSKe6BjV0B4To34MPdxCXAxr_faM5pb2JgpeCe5W9KN/s16000/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202023-01-15%20010001.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/2262759506493089974/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/2262759506493089974' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/2262759506493089974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/2262759506493089974'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2023/01/stock-tradingview-pine.html' title='[STOCK] [策略][TRADINGVIEW][教學] PINE SCRIPT使用strategy.order來完成多次交易的策略'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-CGiOb2tElaqxGxocU83ZnI_Eo1SZzpP6L2QfuDvd_eNX2YKZo5kbONAI2FY8zCqXjZ-6bpGhDQTmRORrYkX3KQMkTO6W1kDE6P3V1LXLHvSEQU2JjmrYvL0gmI1g0a3d4gOveWj75BgOatSKe6BjV0B4To34MPdxCXAxr_faM5pb2JgpeCe5W9KN/s72-c/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202023-01-15%20010001.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-9099286835175345466</id><published>2022-12-30T09:40:00.005-08:00</published><updated>2026-05-09T11:42:19.987-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ChatGPT"/><category scheme="http://www.blogger.com/atom/ns#" term="密室遊戲"/><category scheme="http://www.blogger.com/atom/ns#" term="小說"/><category scheme="http://www.blogger.com/atom/ns#" term="第一章"/><category scheme="http://www.blogger.com/atom/ns#" term="邀請"/><title type='text'>[ChatGPT][小說] 密室遊戲 - 第一章 邀請</title><content type='html'>&lt;p&gt;&lt;b&gt;本小說的故事內容都是由我引導ChatGPT來寫出來的以及補充部分內容，所有內容都是虛構的&lt;/b&gt;&lt;/p&gt;&lt;p&gt;如果小說對是有趣的話在幫我按一下廣告來讓我有額外收入這也是對我來說是一種鼓勵&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCCTiX-yTQ38JBn2-snwpVuZ3E2cdUci8JYfMC9HZrD-ZjhqKIf3cRzlRPZJPuZqdRQtx2SJDiloJ4r_oXdJwnWVG7MbgS8YlVx3QiwKLlZDIDPuGcWmeR5WQ5YaM6QDlaojH8gV3963kZLzWwzG77SIcbjIIMOxy40WZCqyjhuU5xPrrTJK2tP8c7NLw/s1537/ChatGPT%20Image%202026%E5%B9%B45%E6%9C%8810%E6%97%A5%20%E4%B8%8A%E5%8D%8802_33_36.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1537&quot; data-original-width=&quot;1023&quot; height=&quot;885&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCCTiX-yTQ38JBn2-snwpVuZ3E2cdUci8JYfMC9HZrD-ZjhqKIf3cRzlRPZJPuZqdRQtx2SJDiloJ4r_oXdJwnWVG7MbgS8YlVx3QiwKLlZDIDPuGcWmeR5WQ5YaM6QDlaojH8gV3963kZLzWwzG77SIcbjIIMOxy40WZCqyjhuU5xPrrTJK2tP8c7NLw/w589-h885/ChatGPT%20Image%202026%E5%B9%B45%E6%9C%8810%E6%97%A5%20%E4%B8%8A%E5%8D%8802_33_36.png&quot; width=&quot;589&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;第一章 邀請&lt;/h2&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;有一天，福爾摩斯迪卡匹歐收到了一份神秘的挑戰，邀請他跟他的好夥伴雅森蘋國參加一場密室遊戲並且提供大額的現金。他很興奮因為他們的事務所已經很久沒有收入在不有收入就要關門大吉，所以立刻接受了邀請。&lt;/p&gt;
&lt;p&gt;當福爾摩斯迪卡匹歐跟雅森蘋國到達密室遊戲的地點時，他們很驚訝地發現，這場遊戲是在一座古老的城堡裡舉行的。&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPV0Qj31SMYKfxOqaBa6KHzdCC6aCrQEL8IndcFSVzzEgtK6MbmAwoOIYmra09GItzch0_rEOzW3OmQIQwCodj8f98GIfjh5O_BFnm3ZisMO50cRVE9dWp_JUnWjX5MqfH7qih3CXx1ZS6SpJrayON7xHbV4o2l_07IX25B9UAfY5vZlws4RyJtxLG/s512/00001-123214334.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;512&quot; data-original-width=&quot;512&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPV0Qj31SMYKfxOqaBa6KHzdCC6aCrQEL8IndcFSVzzEgtK6MbmAwoOIYmra09GItzch0_rEOzW3OmQIQwCodj8f98GIfjh5O_BFnm3ZisMO50cRVE9dWp_JUnWjX5MqfH7qih3CXx1ZS6SpJrayON7xHbV4o2l_07IX25B9UAfY5vZlws4RyJtxLG/s16000/00001-123214334.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;當福爾摩斯迪卡匹歐跟雅森蘋國到達古老的城堡時，他們首先注意到了城堡的外觀。這座城堡是由石頭砌成的，外牆上有許多的尖角和垛口。城堡的正面有一道巨大的木門，上面有著金屬製的裝飾。&lt;/p&gt;
&lt;p&gt;福爾摩斯迪卡匹歐觀察到城堡周圍有一道深深的護城河，上面有著一座漂亮的木橋。城堡的城牆上有著許多的塔樓，其中有著許多窗戶，讓城堡裡的人可以看到外面的景色。也注意到了城堡內部的有許多的房間，有的房間裡面有著大量的書籍和文件，有的房間裡面有著精美的藝術品。還有許多的樓梯和走廊，讓人很容易地在城堡裡移動也容易迷路。&lt;/p&gt;
&lt;p&gt;接著他們被帶到了一個叫做「綠密室」的地方，綠密室的房間裡面有著許多古老的木櫃，上面有著許多塵埃，提醒著人們這個房間很久沒有人進入。地板上鋪著的是黑色的木板，上面有著許多灰塵，暗示著這個房間很久沒有人進來過。而密室的外面，則是被一堆樹根給盤根錯節，讓人感覺陌生又不安全。這些都讓綠密室充滿了恐怖的氣氛，讓人無法分辨真實與虛幻。&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxGGhxLTZzde6rf9bEze1dMnZX9XuW2-j6yU54JpCkMjWL7ZFve-1maUFFtQppW4j0SRnzaX_YMo3rjd5WDVFbC2dT74rsLBHCg9m0qfVeHea1KDMbKU83A5nAdwGA7CdltKIYCVctpopaubuOyAtse6eACmCdjKpQERX1tnu7dw69IoXKXLzbLQ2R/s512/00000-123214334.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;512&quot; data-original-width=&quot;512&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxGGhxLTZzde6rf9bEze1dMnZX9XuW2-j6yU54JpCkMjWL7ZFve-1maUFFtQppW4j0SRnzaX_YMo3rjd5WDVFbC2dT74rsLBHCg9m0qfVeHea1KDMbKU83A5nAdwGA7CdltKIYCVctpopaubuOyAtse6eACmCdjKpQERX1tnu7dw69IoXKXLzbLQ2R/s16000/00000-123214334.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;然後在正中間有一張古老的桌子，上面放著一把銀色的鑰匙。在桌子旁邊，有著一張古老的地圖，上面有著許多神秘的圖案。房間裡面的氣氛非常壓抑，有著一種迷幻的氣息。房間裡面有著許多古老的物品，例如青銅長劍、銀色的馬車、古老的鐘錶等。這些物品都有著許多的塵埃，似乎已經很久沒有人用過了。&lt;/p&gt;
&lt;p&gt;房間裡面的氣氛非常恐怖，有著一種莫名的危險感。福爾摩斯迪卡匹歐跟雅森蘋國感覺到，這個地方充滿著謎題和挑戰，他們必須小心謹慎才能解開這些謎題。當福爾摩斯迪卡匹歐看到古老的地圖時，他非常興奮。他知道，這張地圖可能是解開謎題的關鍵。他開始研究地圖上的圖案和指示，希望能找出地圖的正確含義。當他看著地圖上有著許多神秘的圖案，他知道，這些圖案可能代表著許多的信息。他看到地圖上有著許多指示，他知道，這些指示可能指引著他們尋找寶藏的方向。&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnVgYEhyCkJRD_RyF88yeHjuSKCDieZ3YHPXKEwl1LLZqUVM53hCWKliwfB717WwMXE8VSa2e3jlokZJONDVJSVHZ1Fjo1MbcBxLKx_RyWGaGk6YPi1lfsgkaXD5H8FDXCZ2IwTlVHvbgzhV9WBBhxOYHOaHMlmmiSbD9afP2UVrDMRt8dCMjbZ9Sf/s512/00002-123214334.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;512&quot; data-original-width=&quot;512&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnVgYEhyCkJRD_RyF88yeHjuSKCDieZ3YHPXKEwl1LLZqUVM53hCWKliwfB717WwMXE8VSa2e3jlokZJONDVJSVHZ1Fjo1MbcBxLKx_RyWGaGk6YPi1lfsgkaXD5H8FDXCZ2IwTlVHvbgzhV9WBBhxOYHOaHMlmmiSbD9afP2UVrDMRt8dCMjbZ9Sf/s16000/00002-123214334.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;福爾摩斯迪卡匹歐跟雅森蘋國先是遇到一個關於藏寶圖的謎題。福爾摩斯迪卡匹歐提出，應該先找出藏寶圖上的每個圖案代表什麼，再根據地圖上的指示尋找寶藏。而雅森蘋國則建議，應該先找出藏寶圖的正確位置，再根據地圖上的指示尋找寶藏。&lt;/p&gt;
&lt;p&gt;然而福爾摩斯迪卡匹歐跟雅森蘋國因為想法不同開始了激烈的論戰，他們爭論著該如何解開謎題。福爾摩斯迪卡匹歐堅信，應該先從最簡單的謎題開始解，再往更難的謎題進行；而雅森蘋國則認為，應該先從最困難的謎題開始，再往更簡單的謎題進行。兩人開始了鬥嘴的模式，一人一句互相反駁別人的想法，吵到最後雙方都覺得有點累了，只好決定把兩人的想法給結合起來，來先尋找藏寶圖的正確位置，再利用藏寶圖上的圖案提示尋找寶藏。&lt;/p&gt;
&lt;p&gt;福爾摩斯迪卡匹歐首先注意到藏寶圖上有著一個山洞的圖案，他猜想這個山洞可能就是寶藏所在的位置。他跟雅森蘋國討論了一下，決定先尋找這個山洞的位置。福爾摩斯迪卡匹歐跟雅森蘋國帶著地圖，開始在城堡周圍尋找這個山洞，在搜尋山洞的過程中經過許多的山嶺和溪流，然後在某處的樹林中突然遇到了一群毒蛇，他們見狀不對為了防止毒蛇攻擊他們所以快速地離開樹林來到了寬廣的草原中，但毒蛇也快速的移動跟隨著到他們後面彷彿是有人在背後操作著要來攻擊他們，這時福爾摩斯迪卡匹歐跟雅森蘋國看情況不對就拿出了他們隨身攜帶的左輪手槍，向毒蛇開了幾槍，順利的擊中毒蛇的頭部。 他們接近毒蛇後發現毒蛇身上的花紋剛好跟地圖上面山洞的圖案一致，這時他們很篤定山洞已經在附近不遠了，但還是很難找到具體的位置。福爾摩斯迪卡匹歐提出，可以去找當地的老居民，看看他們是否知道山洞的位置。雅森蘋國也同意了這個解決方案。&lt;/p&gt;
&lt;p&gt;福爾摩斯迪卡匹歐跟雅森蘋國他們花了幾天的時間在當地的村莊中尋找任何可能的訊息，經過許多的訪談後，終於找到了一位年老的村長，他告訴他們有一個古老的詩好像有著相關的訊息，山洞就在一座叫做「小山丘」的地方，並且上面有著一棵獨特的古老的樹。這首古老的詩描述著一棵古老的樹，它生長在一座叫做「小山丘」的地方。詩中提到，這棵樹的樹幹有著獨特的花紋，它的枝梢綿延成著漂亮的圓弧。詩人形容著這棵樹的樹幹非常堅硬，而它的枝梢則像是輕盈的絲綢。詩中也提到了這棵樹的根基，它的根基深入土裡，像是一道巨大的河流，將整棵樹的生命支撐起來。詩中還提到了這棵樹的葉子，它們綠油油的，像是一片片青色的海浪。最後，詩人形容著這棵樹的香氣，它散發著淡淡的花香，令人感到舒服。&lt;/p&gt;
&lt;p&gt;福爾摩斯迪卡匹歐和雅森蘋國跟隨著詩中的描述，在村莊的附近尋找這棵古老的樹。他們走遍了整個村莊，最終在村莊與城堡不遠處找到了這棵樹。當他們靠近樹時，他們發現樹幹上有著獨特的花紋，正好跟藏寶圖上的山洞圖案一致。他們非常激動，因為他們終於找到了山洞。他們迫不及待地走進山洞，看看裡面有什麼秘密。&lt;/p&gt;&lt;br /&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;第二章 樹根下的密門&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt;&lt;br /&gt;福爾摩斯迪卡匹歐與雅森蘋國站在那棵巨大的古樹前，樹幹上那些獨特的螺旋花紋在月光下顯得格外詭異。根據老村長提供的詩句：「根基深入土裡，像是一道巨大的河流」，福爾摩斯蹲下身，仔細觀察樹根周圍的土壤。&lt;br /&gt;&lt;br /&gt;「雅森，你看這兒。」福爾摩斯指著樹根下方一塊略微凹陷的石板，「詩裡說根基像河流，但這裡的石板縫隙裡長滿了青苔，只有這裡是乾燥的。這意味著，這裡是『乾涸的河床』，也就是入口。」&lt;br /&gt;&lt;br /&gt;雅森蘋國皺著眉頭，用手中的手電筒照射著石板周圍：「可是上面沒有把手，也沒有鎖孔。我們要怎麼打開它？」&lt;br /&gt;&lt;br /&gt;「不是打開，是『啟動』。」福爾摩斯從口袋裡掏出之前在綠密室拿到的那把銀色鑰匙，但這把鑰匙看起來並沒有對應的鎖孔。他盯著樹幹上的花紋，突然靈光一閃：「你看這些花紋，它們不是隨機的生長，而是按照某種幾何規律排列的。如果我們把鑰匙插入樹根間那條看似自然、實則人為雕刻的細縫，並按照地圖上標記的角度旋轉……」&lt;br /&gt;&lt;br /&gt;雅森半信半疑地協助福爾摩斯，將銀色鑰匙插入那條細縫。當鑰匙轉動到特定角度時，一聲沉悶的機械聲從地下傳來。古樹下方的地面緩緩裂開，露出一段向下延伸的石階，一股陳舊卻帶著淡淡花香的空氣從地底湧出。&lt;br /&gt;&lt;br /&gt;「花香？」雅森嗅了嗅，「這味道跟詩裡描述的一模一樣。我們下去吧，但小心點，我总觉得這下面有什麼東西在盯著我們。」&lt;br /&gt;&lt;br /&gt;兩人身著輕便的探索裝備，手持防身武器，小心翼翼地步入黑暗。隨著他們深入，石階兩側的牆壁上逐漸出現了壁畫，描繪著一座城堡的建立過程，以及一場關於「背叛」與「封印」的儀式。&lt;br /&gt;&lt;br /&gt;穿過石階，兩人進入了一個巨大的地下空間。這裡並非預想中的寶藏庫，而是一個由無數鏡子組成的迷宮。鏡子反射出無數個福爾摩斯和雅森的身影，讓人眼花繚亂。&lt;br /&gt;&lt;br /&gt;「這裡是綠密室的延伸嗎？」雅森低聲問道，手緊握著左輪手槍。&lt;br /&gt;&lt;br /&gt;「不，綠密室是『開始』，這裡是『考驗』。」福爾摩斯觀察著鏡子中的反射，「注意看，有些鏡子中的我們動作比實際動作慢了半秒。那是幻象，或者是陷阱。」&lt;br /&gt;&lt;br /&gt;突然，其中一面鏡子中，「福爾摩斯」的影像突然露出詭異的微笑，並向兩人舉起了手槍。下一秒，現實中的福爾摩斯感到背後一陣寒意，他猛地推開雅森，一顆子彈擦過他的肩膀，擊中了後方的鏡子。&lt;br /&gt;&lt;br /&gt;「是動態感應！鏡子後的機關會根據我們的行為做出反應！」福爾摩斯大喊，「不要看鏡子！閉上眼睛，跟著我的聲音走！」&lt;br /&gt;&lt;br /&gt;雅森雖然驚恐，但選擇信任夥伴。他閉上雙眼，聽著福爾摩斯冷靜的指令：「左轉三步，跨過那道看不見的門檻，然後向右轉……」&lt;br /&gt;&lt;br /&gt;在黑暗中，兩人憑藉聽覺與觸覺，避開了無數從鏡子中射出的暗箭與激光。當他們終於走出迷宮時，雙腿顫抖，但心中充滿了勝利的喜悅。他們發現，迷宮的出口處，有一張新的紙條，上面寫著：&lt;br /&gt;&lt;br /&gt;「唯有信任能照亮黑暗，但真相往往藏在謊言之中。下一道門，需要『聲音』來開啟。」&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;穿過迷宮，他們來到了一座宏偉的圖書館。這裡的書架上堆滿了古老的書籍，但奇怪的是，這裡絕對安靜，連腳步聲都被厚厚的地毯吸收。&lt;br /&gt;&lt;br /&gt;「這裡是『沉默的圖書館』。」雅森低聲說，「我們不能說話？」&lt;br /&gt;&lt;br /&gt;福爾摩斯點頭，從背包裡拿出一副特製的耳塞，遞給雅森一半。他們戴上耳塞，透過手勢溝通，緩緩走向圖書館中央的一座高台。高台上放著一本巨大的、鎖著的書，書的旁邊有一個奇怪的裝置，看起來像是一個巨大的留聲機，但沒有唱針，只有一個空心的金屬喇叭。&lt;br /&gt;&lt;br /&gt;福爾摩斯環顧四周，發現牆壁上刻著許多音符和詩句。他想起之前那首關於「樹」的詩，以及老村長提到的「古老的歌謠」。&lt;br /&gt;&lt;br /&gt;「也許，我們需要唱出那首詩，或者播放那首歌謠。」福爾摩斯比劃著。&lt;br /&gt;&lt;br /&gt;雅森雖然不懂音樂，但他記得老村長哼過的那段旋律。他試著用手拍打高台的邊緣，發出有節奏的叩擊聲。起初，沒有任何反應。福爾摩斯觀察牆壁上的音符，發現它們對應著不同的音高。他拿起身邊的一根金屬棍，輕輕敲擊高台邊緣的不同位置，模擬出不同的音調。&lt;br /&gt;&lt;br /&gt;當他敲出一個特定的旋律時，圖書館的燈光突然閃爍，牆壁上的書籍自動翻動，最終停在一本寫滿密碼的書上。那本大書的鎖也「咔噠」一聲打開了。&lt;br /&gt;&lt;br /&gt;然而，就在他們準備拿取那本書時，圖書館的陰影中，走出了一個身穿黑色長袍的身影。那人手中握著一把類似於左輪手槍的武器，但槍口發出的不是子彈，而是一道黑色的光束。&lt;br /&gt;&lt;br /&gt;「歡迎來到『真相之室』，偵探們。」那人的聲音沙啞而冰冷，「但你們認為，你們有資格知道寶藏的秘密嗎？」&lt;br /&gt;&lt;br /&gt;福爾摩斯與雅森對視一眼，他們知道，真正的挑戰才剛剛開始。這不僅僅是一場遊戲，更是一場關於智慧、勇氣與信任的終極考驗。而那個黑袍人，似乎早就知道他們會來，甚至，他就是這場遊戲的設計者之一……&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/9099286835175345466/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/9099286835175345466' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/9099286835175345466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/9099286835175345466'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2022/12/chatgpt_30.html' title='[ChatGPT][小說] 密室遊戲 - 第一章 邀請'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCCTiX-yTQ38JBn2-snwpVuZ3E2cdUci8JYfMC9HZrD-ZjhqKIf3cRzlRPZJPuZqdRQtx2SJDiloJ4r_oXdJwnWVG7MbgS8YlVx3QiwKLlZDIDPuGcWmeR5WQ5YaM6QDlaojH8gV3963kZLzWwzG77SIcbjIIMOxy40WZCqyjhuU5xPrrTJK2tP8c7NLw/s72-w589-h885-c/ChatGPT%20Image%202026%E5%B9%B45%E6%9C%8810%E6%97%A5%20%E4%B8%8A%E5%8D%8802_33_36.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-582170703580333663</id><published>2022-12-15T10:09:00.001-08:00</published><updated>2022-12-15T10:15:20.397-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ChatGPT"/><category scheme="http://www.blogger.com/atom/ns#" term="小說"/><category scheme="http://www.blogger.com/atom/ns#" term="校園"/><title type='text'>[ChatGPT][小說] 校園情深</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;b&gt;本小說的故事內容都是由我引導ChatGPT來寫出來的，對於內容都是虛構的&lt;/b&gt;&lt;/p&gt;&lt;p&gt;如果小說對是有趣的話在幫我按一下廣告來讓我有額外收入這也是對我來說是一種鼓勵&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6VWmMwlq8BDu1uvZHR8NX9aVZag125v6HN2URDHEwWtU1EpN8B4Ms7wXM_su8EK6s-qzqocxqo4uM_IQ9eGtHUDvPzJKjTpNV9rJAGgUEml94p9NF0HMtfX9Xtm65Nr7sZ4B0bUHN-95G8-KGKvF2DDd9HsmbN5uc37ngkOjejpOaqyknZb4lbf0l/s1024/DALL%C2%B7E%202022-12-16%2002.12.40%20-%20%E6%A0%A1%E5%9C%92%20%20PIXEL%20STYLE.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1024&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6VWmMwlq8BDu1uvZHR8NX9aVZag125v6HN2URDHEwWtU1EpN8B4Ms7wXM_su8EK6s-qzqocxqo4uM_IQ9eGtHUDvPzJKjTpNV9rJAGgUEml94p9NF0HMtfX9Xtm65Nr7sZ4B0bUHN-95G8-KGKvF2DDd9HsmbN5uc37ngkOjejpOaqyknZb4lbf0l/s16000/DALL%C2%B7E%202022-12-16%2002.12.40%20-%20%E6%A0%A1%E5%9C%92%20%20PIXEL%20STYLE.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;第一章&lt;/h2&gt;&lt;div&gt;&lt;p&gt;林右凱和沈欣瑜在仁新高中一年級的政治課上，神仁老師正在講解許多有關政治的概念。&lt;/p&gt;
&lt;p&gt;阿和和阿菜坐在林右凱的前面，育慶則坐在沈欣瑜的前面。林右凱和沈欣瑜坐在一起，肩膀相觸，感覺到對方的熱度。&lt;/p&gt;
&lt;p&gt;小艾和凱欣坐在沈欣瑜的旁邊，不時轉頭看看沈欣瑜和林右凱。&lt;/p&gt;
&lt;p&gt;神仁老師說：「政治是用來管理國家和國民的一種學問，它涉及到許多不同的領域，包括法律、經濟、外交、軍事和社會等等。」&lt;/p&gt;
&lt;p&gt;阿和不耐煩地拍拍桌子，大聲說：「老師，這些東西我們早就學過了，可以不要再重複一遍嗎？」&lt;/p&gt;
&lt;p&gt;神仁老師皺起眉頭，說：「阿和，不要在課堂上大聲喧嘩，這樣會打擾其他同學的。」&lt;/p&gt;
&lt;p&gt;阿和很不服氣地說：「我只是想要問一下，這一課有什麼新東西可以學習啊！」&lt;/p&gt;
&lt;p&gt;神仁老師面帶淡淡的笑容，說：「阿和，你問得好，我們這一課要學習的，就是如何去分析和評價&lt;/p&gt;
&lt;p&gt;一個政治政策或決策的優劣。這是一個非常重要的技能，因為它可以幫助我們做出更明智的選擇，為我們自己和我們的國家帶來更好的未來。」&lt;/p&gt;
&lt;p&gt;阿和听了神仁老師的解釋，瞬間就明白了。他點點頭，說：「原來如此，那我們下一堂課要學什麼呢？」&lt;/p&gt;
&lt;p&gt;神仁老師笑了笑，說：「下一堂課，我們要學習如何通過討論和辯論來表達我們的觀點，並且學會如何尊重別人的意見，共同探討解決問題的方法。」&lt;/p&gt;
&lt;p&gt;阿和和阿菜都非常興奮，他們期待著下一堂課的到來。林右凱和沈欣瑜也都坐直了身子，專注聆聽神仁老師的講話。&lt;/p&gt;
&lt;p&gt;政治課結束後，林右凱和沈欣瑜一起走出教室，沿途不停地談論著今天的上課內容。&lt;/p&gt;
&lt;p&gt;「林右凱，你知道嗎？我覺得神仁老師講得很棒，他讓我們更加了解政治，也讓我們知道如何去看待和分析事情。」沈欣瑜說。&lt;/p&gt;
&lt;p&gt;「是啊，他的講話很生動，讓我們有了很多新的想法和觀點。我也很喜歡他的課，真是太棒了。」林右凱說。&lt;/p&gt;
&lt;p&gt;「你們兩個都很有才華嘛，喜歡政治這個學科。」小艾和凱欣悄悄地從他們身邊走過，輕輕說道。&lt;/p&gt;
&lt;p&gt;「哦，是啊。我們都很喜歡政治，因為它能夠幫助我們了解世界，為我們的未來做好準備。」林右凱和沈欣瑜同時說道。&lt;/p&gt;
&lt;p&gt;「那你們一定很期待下一堂課了，希望老師能夠給我們帶來更多新鮮的東西。」小艾和凱欣笑著說道。&lt;/p&gt;
&lt;p&gt;林右凱和沈欣瑜也都笑了，他們一起走向下一個課堂。他們對於學校裡的一切都充滿著濃濃的期待，希望能夠不斷進步，為自己的未來做好準備。&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;第二章&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;林右凱和沈欣瑜在仁新高中的運動場上，正在參加一場籃球比賽。林右凱是隊長，非常優秀的運動員，擁有超高的投籃準確率。&lt;/p&gt;
&lt;p&gt;沈欣瑜坐在旁邊的看台上，看著林右凱在球場上奮力比賽，心裡充滿著愛慕之情。她細心地觀察著林右凱的一舉一動，不時地為他鼓掌加油。&lt;/p&gt;
&lt;p&gt;小艾和凱欣也坐在沈欣瑜旁邊，一起觀看比賽。他們不停地為林右凱鼓掌加油，並且為他的表現而感到驕傲。&lt;/p&gt;
&lt;p&gt;阿和和阿菜則在球場上一起比賽，他們也是非常優秀的運動員，並且擁有超高的技術水平。他們在球場上相互配合，為隊伍奮力比賽。&lt;/p&gt;
&lt;p&gt;比賽進行到最後幾分鐘，林右凱和阿和發揮出了他們的技術，為隊伍帶來了最後的勝利。&lt;/p&gt;
&lt;p&gt;球場上的人們都非常興奮，不停地鼓掌和歡呼。沈欣瑜也興奮地跳起來，為林右凱和阿和的表現而感到驕傲。&lt;/p&gt;
&lt;p&gt;「林右凱，你真棒！你的投籃真是太厲害了！」沈欣瑜在看台上尖叫著，為林右凱的表現而感到驕傲。&lt;/p&gt;
&lt;p&gt;「沈欣瑜，你也很棒！你一直在為我們加油，讓我們有了更多的勇氣。」林右凱在球場上拿著獎杯，跑到沈欣瑜面前，向她鞠躬表示感謝。&lt;/p&gt;
&lt;p&gt;「林右凱，你真的太棒了！我愛你！」沈欣瑜激動地說道，臉上洋溢著幸福的笑容。&lt;/p&gt;
&lt;p&gt;「沈欣瑜，我也愛你！你是我最重要的人！」林右凱抱住沈欣瑜，在她耳邊輕輕地說道。&lt;/p&gt;
&lt;p&gt;小艾和凱欣在旁邊看著，都非常感動。他們知道林右凱和沈欣瑜之間的感情是真摯的，並且希望他們能夠永遠幸福。&lt;/p&gt;
&lt;p&gt;「林右凱，沈欣瑜，你們真是太棒了！我們真的很高興，能夠見證你們之間的愛情。」小艾和凱欣一起說道，為他們的感情而感到高興。&lt;/p&gt;
&lt;p&gt;「謝謝你們，你們是我們最好的朋友，我們會永遠記住這一刻。」林右凱和沈欣瑜一起說道，表達著對彼此的感激之情。&lt;/p&gt;
&lt;p&gt;這是林右凱和沈欣瑜在仁新高中的一個美好的日子，他們在球場上擁有了勝利，並且得到了彼此的愛慕和尊重。他們非常幸福，並且決定要永遠記住這一刻，為自己的愛情而努力。&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;第三章&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;林右凱和沈欣瑜在仁新高中接近升學考試，他們都非常緊張和擔憂。他們知道這是一個關鍵時刻，對於自己的未來負責。&lt;/p&gt;
&lt;p&gt;林右凱和沈欣瑜一起去圖書館裡讀書，希望能夠在考試前好好準備。他們坐在書桌前，拿起書本，開始讀起來。&lt;/p&gt;
&lt;p&gt;不過，他們並沒有集中精神讀書，而是在書桌旁邊小打小鬧。林右凱和沈欣瑜不停地嬉鬧著，打著蠟球，甚至還在書桌上跳舞。&lt;/p&gt;
&lt;p&gt;這時，圖書館管理員走了過來，看到林右凱和沈欣瑜在書桌旁邊小打小鬧，就生氣地說：「林右凱，沈欣瑜，你們怎麼可以在圖書館裡這樣嬉鬧呢？這裡是學習的地方，不是玩耍的場所。你們應該集中精神讀書，為升學考試做好準備。」&lt;/p&gt;
&lt;p&gt;林右凱和沈欣瑜聽到圖書館管理員的話，都感到很尷尬。他們知道自己應該好好讀書，但是他們太擔心升學考試了，才會分心起來。&lt;/p&gt;
&lt;p&gt;「對不起，圖書館管理員。我們會好好讀書，為升學考試做好準備。我們不會再玩耍了，請原諒我們。」林右凱和沈欣瑜一起說道，表示對自己的錯誤感到抱歉。&lt;/p&gt;
&lt;p&gt;圖書館管理員看到他們的態度，就放心地走了。林右凱和沈欣瑜也都決定好好讀書，為升學考試做好準備。他們知道這是一個重要的時刻，對於自己的未來負責。&lt;/p&gt;&lt;h2&gt;第四章&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;林右凱在仁新高中擔任班長，負責管理班級的事務。他非常講究紀律，希望能夠讓班級保持整潔和有序。&lt;/p&gt;
&lt;p&gt;但是，有一天，林右凱發現阿和、阿菜和育慶三個同學不守紀律。他們在上課的時候嬉鬧，在餐廳裡大聲喧嘩，甚至在宿舍裡打牌。&lt;/p&gt;
&lt;p&gt;林右凱看到他們的行為，非常生氣。他覺得他們不尊重老師，不尊重班級，不尊重自己。於是，他決定把他們告到班導師神仁面前。&lt;/p&gt;
&lt;p&gt;「神仁老師，我要向你報告一件事情。阿和、阿菜和育慶三個同學的行為不守紀律，在上課的時候嬉鬧，在餐廳裡大聲喧嘩，甚至在宿舍裡打牌。他們不尊重老師，不尊重班級，不尊重自己，請您給他們一個處罰。」林右凱向班導師神仁報告道。&lt;/p&gt;
&lt;p&gt;「林右凱，你做得好，你是一個好班長。但是，你應該要記住，阿和、阿菜和育慶也是我們的同學，他們也有自己的想法和感受。我們不能只看到他們的缺點，而忽略了他們的優點。我們應該要給他們一個機會，讓他們吸取教訓，改正錯誤。」神仁老師告訴林右凱。&lt;/p&gt;
&lt;p&gt;林右凱聽到神仁老師的話，頓時感到很反省。他知道自己應該要多一點包容，不能只看到別人的缺點。於是，他向阿和、阿菜和育慶道歉，並且邀請他們一起去參加一個志願者活動，為社區做貢獻。&lt;/p&gt;
&lt;p&gt;阿和、阿菜和育慶看到林右凱的變化，都感到非常感動。他們知道林右凱是一個好班長，並且決定努力改正自己的錯誤，變得更加守紀律。&lt;/p&gt;
&lt;p&gt;這是林右凱在仁新高中學習到的一個重要道理：要包容別人，不能只看到別人的缺點。通過這次經歷，他變得更加成熟，也更加了解別人的想法和感受。&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;第五章&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;校內園遊是仁新高中的盛事之一。每年都會有各種擺攤和活動，讓學生們能夠放鬆心情，玩耍一下。&lt;/p&gt;
&lt;p&gt;林右凱和沈欣瑜都非常期待校內園遊的到來。他們決定一起擺攤，賣一些小吃和手工藝品。他們做好了準備，等待著校內園遊的來臨。&lt;/p&gt;
&lt;p&gt;當天，林右凱和沈欣瑜帶著他們的擺攤，走到了校園的中心。他們的擺攤裡擺放著各種美味的小吃和漂亮的手工藝品。&lt;/p&gt;
&lt;p&gt;在擺攤活動中，林右凱和沈欣瑜遇到了很多有趣的顧客。有一位顧客，是一位小學生，他看到林右凱和沈欣瑜的擺攤，非常高興。他跑過來，想要買一些糖果。&lt;/p&gt;
&lt;p&gt;但是，他只有一塊五元紙鈔。林右凱和沈欣瑜看到他的樣子，非常同情。於是，他們決定給他免費贈送一些糖果，讓他能夠享受到校內園遊的樂趣。&lt;/p&gt;
&lt;p&gt;那位小學生非常感激，他笑著跟林右凱和沈欣瑜說聲謝謝。他和他的朋友們，一起吃著糖果，享受著校內園遊的樂趣。&lt;/p&gt;
&lt;p&gt;林右凱和沈欣瑜看著他們的樣子，心裡感到非常開心。他們知道，這次的擺攤活動，不僅僅是為了賺錢，還是為了讓更多的人享受校內園遊的樂趣。&lt;/p&gt;
&lt;p&gt;在擺攤活動中，林右凱和沈欣瑜還遇到了一位老人。這位老人看著林右凱和沈欣瑜的擺攤，非常高興。他說，他看到年輕人們有這麼大的熱情，非常欣慰。於是，他走過來，想要買一些小吃。&lt;/p&gt;
&lt;p&gt;林右凱和沈欣瑜為他準備了一份美味的食物，並且給了他一些建議。他們告訴他，這些小吃非常美味，並且很健康。&lt;/p&gt;
&lt;p&gt;那位老人非常感激，他吃了一些小吃，並且跟林右凱和沈欣瑜聊了一些關於校內園遊的事情。他告訴他們，他在年輕時也曾經參加過校內園遊，那時候的感覺非常棒。&lt;/p&gt;
&lt;p&gt;林右凱和沈欣瑜聽到他的話，非常感動。他們發現，這次的擺攤活動，不僅僅是讓他們賺錢，還能夠為大家帶來快樂。他們很高興，感到自己做了一件好事。&lt;/p&gt;
&lt;p&gt;林右凱和沈欣瑜在擺攤活動中，也遇到了一些困難。有時候，他們會遇到訂單過多，無法及時完成。有時候，他們會遇到顧客抱怨食物的味道，他們不知道該怎麼辦。&lt;/p&gt;
&lt;p&gt;在這種情況下，林右凱和沈欣瑜不會放棄。他們會繼續努力，想出一些解決方案。例如，他們會請求同學們的幫忙，讓更多的人參與進來。&lt;/p&gt;
&lt;p&gt;通過這樣的合作，林右凱和沈欣瑜的擺攤活動變得更加順利。他們的同學們都非常支持他們，為他們打氣。他們一起忙碌，一起享受擺攤活動的樂趣。&lt;/p&gt;
&lt;p&gt;林右凱和沈欣瑜感到非常感激，因為他們發現，合作是一件非常重要的事情。通過合作，他們能夠分擔壓力，也能夠互相幫助。這樣，他們就能夠更好地完成擺攤活動，為大家帶來更多的樂趣。&lt;/p&gt;
&lt;p&gt;在擺攤活動中，林右凱和沈欣瑜也學習到了很多有關信任的道理。他們發現，只有通過信任，才能夠建立起一段真正穩固的關係。通過這次的擺攤活動，他們與同學們之間的信任也變得更加深厚。&lt;/p&gt;
&lt;p&gt;在擺攤活動中，林右凱和沈欣瑜也學習到了很多有關互助的道理。他們發現，只有通過互助，才能夠讓每個人都能夠發揮所長，完成更多的工作。通過這次的擺攤活動，他們與同學們之間的友誼也變得更加深厚。&lt;/p&gt;
&lt;p&gt;這次的擺攤活動，讓林右凱和沈欣瑜學習到了很多有關人生的道理。他們發現，只有通過不斷努力，才能夠實現自己的夢想。通過這次的擺攤活動，他們的人生也變得更加精彩。&lt;/p&gt;
&lt;p&gt;林右凱和沈欣瑜一起忙著接待顧客，為他們提供服務。他們笑著和顧客打招呼，熱情地介紹他們的小吃和手工藝品。&lt;/p&gt;
&lt;p&gt;林右凱和沈欣瑜的擺攤很受歡迎，顧客們都給予了他們很好的評價。他們很高興，感到校內園遊的活動很成功。&lt;/p&gt;
&lt;p&gt;在擺攤的過程中，林右凱和沈欣瑜也學習到了很多東西。他們學習到了如何接待顧客，如何管理擺攤，以及如何與人相處。通過這次的經歷，他們變得更加獨立，也更加了解如何與人溝通。&lt;/p&gt;
&lt;p&gt;在擺攤的過程中，林右凱和沈欣瑜也更加了解彼此。他們一起忙碌，一起面對困難，也一起分享快樂。這次的擺攤活動，讓他們的感情更加穩固，也讓他們更加親密。&lt;/p&gt;
&lt;p&gt;當天晚上，林右凱和沈欣瑜在擺攤的收益中，分別給自己的父母買了一件禮物。他們覺得這是一個特別的日子，因為他們通過自己的努力，贏得了成功。&lt;/p&gt;
&lt;p&gt;林右凱和沈欣瑜非常高興，因為他們發現自己有能力去面對挑戰，也有信心去追求夢想。這是他們在校內園遊中學習到的一個重要道理：只要你有決心，就一定能夠達成目標。&lt;/p&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;第六章&lt;/h2&gt;&lt;div&gt;&lt;p&gt;沈欣瑜的父親收到了一份新工作的邀請。這份工作需要他搬家，搬到另一個城市。&lt;/p&gt;
&lt;p&gt;沈欣瑜感到非常難過。她不想離開仁新高中，也不想離開林右凱。她們之間有著一段甜蜜的愛情，她不想失去他。&lt;/p&gt;
&lt;p&gt;林右凱也很難過。他不想失去沈欣瑜，也不想失去她的陪伴。他們一起度過了很多美好的時光，他不想要離別。&lt;/p&gt;
&lt;p&gt;但是，沈欣瑜的父親已經決定了搬家，他們無法改變這個決定。於是，沈欣瑜決定去跟她的父親道別，並且準備搬到新的城市。&lt;/p&gt;
&lt;p&gt;在離別的時候，林右凱和沈欣瑜都感到非常難過。他們擁抱在一起，流著眼淚。他們知道，離別是很痛苦的，但是他們必須面對現實。&lt;/p&gt;
&lt;p&gt;沈欣瑜為了適應新的生活，努力學習新的環境。她和父親一起搬到了新的城市，開始了新的生活。&lt;/p&gt;
&lt;p&gt;雖然她很難過，但是她決定努力适应新的环境。她在新的學校里結識了新的朋友，并且努力學習新的知識。&lt;/p&gt;
&lt;p&gt;沈欣瑜也許無法忘記林右凱，但是她決定繼續前進，為自己的未來奮鬥。&lt;/p&gt;
&lt;p&gt;林右凱也努力過著自己的生活。他繼續在仁新高中念書，並且努力追求自己的夢想。&lt;/p&gt;
&lt;p&gt;雖然他們之間有了距離，但是他們仍然保持著聯繫。他們會互相打電話，經常聊天，分享彼此的生活。&lt;/p&gt;
&lt;p&gt;沈欣瑜和林右凱都深知，離別是很痛苦的，但是他們決定勇敢面對現實，繼續前進，努力追求自己的夢想。&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/582170703580333663/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/582170703580333663' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/582170703580333663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/582170703580333663'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2022/12/chatgpt.html' title='[ChatGPT][小說] 校園情深'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6VWmMwlq8BDu1uvZHR8NX9aVZag125v6HN2URDHEwWtU1EpN8B4Ms7wXM_su8EK6s-qzqocxqo4uM_IQ9eGtHUDvPzJKjTpNV9rJAGgUEml94p9NF0HMtfX9Xtm65Nr7sZ4B0bUHN-95G8-KGKvF2DDd9HsmbN5uc37ngkOjejpOaqyknZb4lbf0l/s72-c/DALL%C2%B7E%202022-12-16%2002.12.40%20-%20%E6%A0%A1%E5%9C%92%20%20PIXEL%20STYLE.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-8788420329190876930</id><published>2022-12-11T07:47:00.002-08:00</published><updated>2022-12-11T07:47:21.442-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ChatGPT"/><category scheme="http://www.blogger.com/atom/ns#" term="dall-e-2"/><category scheme="http://www.blogger.com/atom/ns#" term="小說"/><title type='text'>[ChatGPT][Dall-e-2][小說] 宇宙之戰: 地球聯邦共和國的冒險</title><content type='html'>&lt;h3 style=&quot;text-align: left;&quot;&gt;本小說是使用ChatGPT來產生內容，然後再利用Dall-e-2來產生插圖&amp;nbsp;&lt;/h3&gt;&lt;div&gt;如果小說對是有趣的話在幫我按一下廣告來讓我有額外收入這也是對我來說是一種鼓勵&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;故事背景&lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGZn0QqJ4j5OPXI9zQGeuCBdUrBVXNXED9F5xWAoaF13AiUIw1WzF_1xfLgXSHJSLlftUHUYv7bf5lcKWVOgt8aqBrDHGlnqcf_yfxnzbDhUhmh9U6AsbaY47L6oixIoZ4dIkusAFBz-zRjRhUDU72art8rEzha8ZWDFm7d8PmbKA4ThFtVvdCTYZr/s1024/DALL%C2%B7E%202022-12-11%2017.46.34%20-%20%E5%9C%A8%E9%80%99%E5%80%8B%E7%A7%91%E5%B9%BB%E6%87%B8%E7%96%91%E5%B0%8F%E8%AA%AA%E4%B8%AD%EF%BC%8C%E9%98%BF%E5%87%B1%E5%92%8C%E4%BB%96%E7%9A%84%E6%9C%8B%E5%8F%8B%E5%80%91%E5%B0%87%E9%9D%A2%E8%87%A8%E8%91%97%E4%B8%80%E7%B3%BB%E5%88%97%E7%9A%84%E6%8C%91%E6%88%B0%E5%92%8C%E5%8D%B1%E9%9A%AA%E3%80%82%E5%9C%A8%E5%9C%B0%E7%90%83%E8%81%AF%E9%82%A6%E5%85%B1%E5%92%8C%E5%9C%8B%E9%80%99%E5%80%8B%E9%81%99%E9%81%A0%E7%9A%84%E6%9C%AA%E4%BE%86%E4%B8%96%E7%95%8C%E4%B8%AD%EF%BC%8C%E5%A4%96%E6%98%9F%E4%BE%B5%E7%95%A5%E8%80%85%E4%B8%8D%E6%96%B7%E5%A8%81%E8%84%85%E8%91%97%E4%BA%BA%E9%A1%9E%E7%9A%84%E5%AE%89%E5%85%A8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1024&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGZn0QqJ4j5OPXI9zQGeuCBdUrBVXNXED9F5xWAoaF13AiUIw1WzF_1xfLgXSHJSLlftUHUYv7bf5lcKWVOgt8aqBrDHGlnqcf_yfxnzbDhUhmh9U6AsbaY47L6oixIoZ4dIkusAFBz-zRjRhUDU72art8rEzha8ZWDFm7d8PmbKA4ThFtVvdCTYZr/s16000/DALL%C2%B7E%202022-12-11%2017.46.34%20-%20%E5%9C%A8%E9%80%99%E5%80%8B%E7%A7%91%E5%B9%BB%E6%87%B8%E7%96%91%E5%B0%8F%E8%AA%AA%E4%B8%AD%EF%BC%8C%E9%98%BF%E5%87%B1%E5%92%8C%E4%BB%96%E7%9A%84%E6%9C%8B%E5%8F%8B%E5%80%91%E5%B0%87%E9%9D%A2%E8%87%A8%E8%91%97%E4%B8%80%E7%B3%BB%E5%88%97%E7%9A%84%E6%8C%91%E6%88%B0%E5%92%8C%E5%8D%B1%E9%9A%AA%E3%80%82%E5%9C%A8%E5%9C%B0%E7%90%83%E8%81%AF%E9%82%A6%E5%85%B1%E5%92%8C%E5%9C%8B%E9%80%99%E5%80%8B%E9%81%99%E9%81%A0%E7%9A%84%E6%9C%AA%E4%BE%86%E4%B8%96%E7%95%8C%E4%B8%AD%EF%BC%8C%E5%A4%96%E6%98%9F%E4%BE%B5%E7%95%A5%E8%80%85%E4%B8%8D%E6%96%B7%E5%A8%81%E8%84%85%E8%91%97%E4%BA%BA%E9%A1%9E%E7%9A%84%E5%AE%89%E5%85%A8.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;p style=&quot;text-align: left;&quot;&gt;在這個科幻懸疑小說中，阿凱和他的朋友們將面臨著一系列的挑戰和危險。在地球聯邦共和國這個遙遠的未來世界中，外星侵略者不斷威脅著人類的安全。阿凱和他的朋友們將必須面對各種险境，並展現他們的勇氣和智慧，才能保護地球不受外星侵略者的侵害。&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;在這個故事中，女主角竹韻將扮演著重要的角色。她將會成為阿凱和他朋友們的重要支援，幫助他們度過困難。除了竹韻之外，阿凱的朋友們，包括小孫，書信和仁心也將發揮重要作用。他們將團結一心，面對外星侵略者的威脅，團結一心，共同對抗外星侵略者的威脅並努力保護地球和人類的安全。&lt;/p&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;角色說明&lt;/h2&gt;&lt;div&gt;&lt;div&gt;阿凱是一名年輕有為的青年，他夢想著成為一名英勇的邦防衛隊士兵，並且在準備參加地球邦防衛隊選拔考試時努力訓練。這顯示出他有著較強的意志和毅力，堅持不懈地追求自己的夢想。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;小孫是一名年輕有為的邦防衛隊士兵，他和阿凱一樣夢想著能夠保護地球不受外星侵略者的威脅。他在訓練方面十分努力，希望能夠在考試中取得好成績，爭取到一個合格的名額。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;書信是一名熱心的科學家，他對於外星文明和科技有著濃厚的興趣。他一直在研究外星來自地球的訊息，並且積極參與邦防衛隊的科技研究工作。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;仁心是一名經驗豐富的邦防衛隊士兵，他曾經參加過多次的防衛戰役，為了保護地球而不惜犧牲生命。他對阿凱和他的朋友們都很關心，並且經常給他們提供寶貴的建議和幫助。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;竹韻是一名年輕的女性科學家，她對於外星文明和科技也有著濃厚的興趣。她和書信一樣積極參與邦防衛隊的科技研究工作，並且在這方面有著非常出色的表現。在遇見阿凱和他的朋友們之後，她也成為了他們的好友。竹韻在考試中表現傑出，成為了阿凱和他的朋友們的榜樣。然而，在考試進行的時候，一股神秘的能量出現在考場中，導致所有人都陷入了昏迷。當阿凱醒來的時候，發現自己身處在一個陌生的世界裡。&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;第一章 初次見面&lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgipXKWgZ3lNJ-MBfA3fc4Ker_dP_i9IbFHxhYXxmEO9XSF0pQDsv_6OGDcBS60H3jNVbkXTSrNLwP1YoP9wu5EBWloFeZj9WyCX4jJB70y59H2acRO5rcWNc57rQfvyVs3Fc0Qf9SqMpKXHJAAr4BrE5CrzpoaewdPPiXOyKPUZiPIP0jFl5PQsQn-/s1024/DALL%C2%B7E%202022-12-11%2017.52.21%20-%203033%E5%B9%B4%E7%9A%84%E5%9C%B0%E7%90%83%E8%81%AF%E9%82%A6%E5%85%B1%E5%92%8C%E5%9C%8B.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1024&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgipXKWgZ3lNJ-MBfA3fc4Ker_dP_i9IbFHxhYXxmEO9XSF0pQDsv_6OGDcBS60H3jNVbkXTSrNLwP1YoP9wu5EBWloFeZj9WyCX4jJB70y59H2acRO5rcWNc57rQfvyVs3Fc0Qf9SqMpKXHJAAr4BrE5CrzpoaewdPPiXOyKPUZiPIP0jFl5PQsQn-/s16000/DALL%C2%B7E%202022-12-11%2017.52.21%20-%203033%E5%B9%B4%E7%9A%84%E5%9C%B0%E7%90%83%E8%81%AF%E9%82%A6%E5%85%B1%E5%92%8C%E5%9C%8B.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;3033年的地球聯邦共和國，阿凱正在和他的朋友群小孫，書信，仁心一起準備參加每年一度的地球邦防衛隊選拔考試。阿凱是個年輕有為的青年，夢想著成為一名英勇的邦防衛隊士兵，為了保護地球免受外星侵略者的威脅。&lt;/p&gt;
&lt;p&gt;然而，在阿凱和他的朋友們準備參加考試的途中，他們發現周圍的環境似乎與他們所熟悉的地球不太一樣。他們感到困惑和恐懼，不知道自己該怎麼辦。他們決定暫時擱置考試的計劃，先調查周圍的情況，確保自己的安全。&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE0HtEqlA6Lg1qI0xLIKmNnZlBbQEw9lrl_bfELgeHTN2MtV2f2FdPZpA36EGr7WL4GQJie_UfDcWK500RJYCqZTttQknw421sMyTFoVh2sMy_-wbGF-U9mRlHYUQQPg3tjY2r2Wr1rCTlWPdAvWKp3lqAks2RH6fN9BsjRE0i7x7Eq5WXBQKPs3ZL/s1024/DALL%C2%B7E%202022-12-11%2018.12.17%20-%20%E7%A7%91%E5%B9%BB%E6%87%B8%E7%96%91%E6%97%A5%E6%9C%AC%E6%BC%AB%E7%95%AB%E9%A2%A8%E6%A0%BC%20%E5%9C%B0%E7%90%83%E5%87%BA%E7%8F%BE%E4%BA%86%E4%B8%80%E7%BE%A4%E5%A4%96%E6%98%9F%E4%BA%BA.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1024&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE0HtEqlA6Lg1qI0xLIKmNnZlBbQEw9lrl_bfELgeHTN2MtV2f2FdPZpA36EGr7WL4GQJie_UfDcWK500RJYCqZTttQknw421sMyTFoVh2sMy_-wbGF-U9mRlHYUQQPg3tjY2r2Wr1rCTlWPdAvWKp3lqAks2RH6fN9BsjRE0i7x7Eq5WXBQKPs3ZL/s16000/DALL%C2%B7E%202022-12-11%2018.12.17%20-%20%E7%A7%91%E5%B9%BB%E6%87%B8%E7%96%91%E6%97%A5%E6%9C%AC%E6%BC%AB%E7%95%AB%E9%A2%A8%E6%A0%BC%20%E5%9C%B0%E7%90%83%E5%87%BA%E7%8F%BE%E4%BA%86%E4%B8%80%E7%BE%A4%E5%A4%96%E6%98%9F%E4%BA%BA.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;在調查的過程中，阿凱和他的朋友們遇到了一群友善的外星人。外星人告訴他們，他們被帶到了另一個世界，而且必須想辦法逃回地球才能活下去。&lt;/p&gt;
&lt;p&gt;阿凱和他的朋友們感到非常震驚和恐懼。他們不知道該怎麼辦。幸運的是，女主角竹韻出現在了他們面前。她告訴他們，她也被外星人帶到了這個世界，並且已經找到了一種可以逃回地球的方法。&lt;/p&gt;
&lt;p&gt;阿凱和他的朋友們決定與竹韻一起展開計畫逃回地球&lt;/p&gt;
&lt;p&gt;「我們必須想辦法逃回地球！我們不能在這裡待下去！阿凱說。&lt;/p&gt;
&lt;p&gt;「放心，我已經找到了一種方法。我們可以使用遺跡中的傳送門，通過它逃回地球。」竹韻說。&lt;/p&gt;
&lt;p&gt;「但是，我們不知道遺跡在哪裡！我們怎麼找到它？」小孫說。&lt;/p&gt;
&lt;p&gt;「我知道遺跡的位置。我們可以一起前往遺跡，找到傳送門。」竹韻說。&lt;/p&gt;
&lt;p&gt;「但是，我們可能會遇到很多危險。我們怎麼辦？」書信說。&lt;/p&gt;
&lt;p&gt;「我們必須保持冷靜，採取措施保護自己。我們有能力面對危險，只要我們團結一心，一定能成功。」竹韻說。&lt;/p&gt;
&lt;p&gt;「那麼，我們該怎麼做？」仁心說。&lt;/p&gt;
&lt;p&gt;「我們必須立刻行動！我們一起前往遺跡，找到傳送門」阿凱說。&lt;/p&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;第二章 挑戰&lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7RDS6epeuW2Oo4uLbXphdB8FWQHmpgq1tqrTvMCb3yU0rAMq0wZ4r_sCTrEwTuA-gSbaXFS0oa37AZzcFoB2DUjW0LV-CyIUM7701fIppdi8aupz0gx2E6nTYOIuvizBZk7EF1h_afdPtaEYnhf26b6pay0xYyNYT_okn9hAWELS_tg2LRYnws_bE/s1024/DALL%C2%B7E%202022-12-11%2018.20.11%20-%20%E7%A7%91%E5%B9%BB%E6%87%B8%E7%96%91%20%20%E4%B8%80%E5%BA%A7%E7%A5%9E%E7%A7%98%E7%9A%84%E9%81%BA%E8%B7%A1%EF%BC%8C%E6%B7%B1%E5%B1%B1%E8%80%81%E6%9E%97%EF%BC%8C%E5%8F%A4%E8%80%81%E7%9A%84%E5%BB%A2%E5%A2%9F%E8%A3%A1%20%E5%90%84%E7%A8%AE%E7%A7%98%E5%AF%86%E5%92%8C%E5%AF%B6%E8%97%8F%20.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1024&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7RDS6epeuW2Oo4uLbXphdB8FWQHmpgq1tqrTvMCb3yU0rAMq0wZ4r_sCTrEwTuA-gSbaXFS0oa37AZzcFoB2DUjW0LV-CyIUM7701fIppdi8aupz0gx2E6nTYOIuvizBZk7EF1h_afdPtaEYnhf26b6pay0xYyNYT_okn9hAWELS_tg2LRYnws_bE/s16000/DALL%C2%B7E%202022-12-11%2018.20.11%20-%20%E7%A7%91%E5%B9%BB%E6%87%B8%E7%96%91%20%20%E4%B8%80%E5%BA%A7%E7%A5%9E%E7%A7%98%E7%9A%84%E9%81%BA%E8%B7%A1%EF%BC%8C%E6%B7%B1%E5%B1%B1%E8%80%81%E6%9E%97%EF%BC%8C%E5%8F%A4%E8%80%81%E7%9A%84%E5%BB%A2%E5%A2%9F%E8%A3%A1%20%E5%90%84%E7%A8%AE%E7%A7%98%E5%AF%86%E5%92%8C%E5%AF%B6%E8%97%8F%20.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;p&gt;竹韻帶領著阿凱和他的朋友們進入了一座神秘的遺跡，在尋找遺跡的過程中，阿凱和他的朋友們不停地探索和搜尋。他們曾經進入過深山老林，還有古老的廢墟裡。他們一路上不斷發現各種秘密和寶藏，並且面臨著各種危險。他們必須保持警惕，謹慎行事，才能成功完成任務。&lt;/p&gt;
&lt;p&gt;「我們必須小心，這裡可能有危險！」阿凱說。
「你說得對，我們一定要小心謹慎！」仁心回答道。
「我們應該怎麼辦？」書信問道。
「我們可以分成兩組，一組在前面探索，另一組在後面支援。」阿凱建議道。
「好主意！我們一起加油！」小孫激勵道。
於是，阿凱和他的朋友們決定按照這個計劃行動，繼續尋找遺跡中&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXV3EgOFTzAK9GfweGYDrsa3DlUnF0-x5mc3tiqCYvrxK-kX8fp7kIlaAeE9fKoLnVZQv7bgXnGwnsbjrINRKdaR3OZV-skdwCcEVzqr0uLj67SbfWdZRI5ZHsFRJYVD-xTHQ4hpTx00os1Uc0eHICXX7jnX79ukr5QhWwEL-BS2V8K_fyh5L4aWTw/s1024/DALL%C2%B7E%202022-12-11%2018.23.31%20-%20%E7%A7%91%E5%B9%BB%E6%87%B8%E7%96%91%E9%A2%A8%E6%A0%BC%20%20%E5%8F%A4%E4%BB%A3%E7%A5%9E%E7%A7%98%E9%81%BA%E8%B7%A1%E5%85%A7%E9%83%A8%20%E6%9C%89%E4%B8%80%E7%BE%A4%E5%A4%96%E6%98%9F%E4%BA%BA%20.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1024&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXV3EgOFTzAK9GfweGYDrsa3DlUnF0-x5mc3tiqCYvrxK-kX8fp7kIlaAeE9fKoLnVZQv7bgXnGwnsbjrINRKdaR3OZV-skdwCcEVzqr0uLj67SbfWdZRI5ZHsFRJYVD-xTHQ4hpTx00os1Uc0eHICXX7jnX79ukr5QhWwEL-BS2V8K_fyh5L4aWTw/s16000/DALL%C2%B7E%202022-12-11%2018.23.31%20-%20%E7%A7%91%E5%B9%BB%E6%87%B8%E7%96%91%E9%A2%A8%E6%A0%BC%20%20%E5%8F%A4%E4%BB%A3%E7%A5%9E%E7%A7%98%E9%81%BA%E8%B7%A1%E5%85%A7%E9%83%A8%20%E6%9C%89%E4%B8%80%E7%BE%A4%E5%A4%96%E6%98%9F%E4%BA%BA%20.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;p&gt;，阿凱和他的朋友們發現了許多令人驚奇的事情。他們在遺跡裡發現了許多古代的文物和寶藏。&lt;/p&gt;
&lt;p&gt;「哇，看看這些古代的器物，這些寶藏！」小孫說道。
「我們真幸運，能夠在這裡發現這些東西！」仁心說道。
「但是，我們要小心，這裡可能還有其他危險！」阿凱提醒道。
「沒錯，我們必須保持警惕！」書信說道。&lt;/p&gt;
&lt;p&gt;突然，他們聽到了異議的聲音。他們轉頭一看，發現了一群外星人正在向他們逼近。&lt;/p&gt;
&lt;p&gt;「哇，這是什麼？」小孫驚恐地喊道。&lt;/p&gt;
&lt;p&gt;阿凱和他的朋友們決定向外星人挺身而出，用他們在遺跡中找到的武器和防身裝備，去抵禦外星人的攻擊。他們利用遺跡中的障礙物，例如石頭和樹木，來保護自己，並小心謹慎地接近外星人，盡可能不讓外星人發現他們的存在。&lt;/p&gt;
&lt;p&gt;「讓我們準備迎擊外星人的攻擊！」阿凱說道。
「好，我們一起加油！」仁心回答道。
「我們要小心，不要讓外星人發現我們！」書信說道。
「沒錯，我們要盡可能地保護自己！」小孫說道。&lt;/p&gt;
&lt;p&gt;但是阿凱和他的朋友們突然發現外星人會使用心靈感應來尋找敵人的存在。&lt;/p&gt;
&lt;p&gt;「啊，外星人在用心靈感應來找我們！」阿凱說道。
「我們必須更加小心，不能讓他們發現我們！」仁心回答道。
「我們要利用遺跡中的障礙物來掩蓋我們的位置！」書信說道。
「對，我們要盡可能地躲避他們的攻擊！」小孫說道。&lt;/p&gt;
&lt;p&gt;阿凱和他的朋友們躲藏在遺跡中的障礙物裡，小心謹慎地避開外星人的心靈感應。但是，外星人也開始使用他們的超能力來攻擊阿凱和他的朋友們。他們的能量球飛向阿凱和他的朋友們，想要將他們擊倒。&lt;/p&gt;
&lt;p&gt;「啊，外星人在使用超能力攻擊我們！」阿凱說道。
「我們必須拿出武器，迎擊他們的攻擊！」仁心回答道。
「我們要利用路上撿到的外星武器來抵禦他們！」書信說道。
「對，我們一定要把他們擊退！」小孫說道。&lt;/p&gt;
&lt;p&gt;阿凱和他的朋友們拿出了路上撿到的外星武器，迎擊外星人的攻擊。他們使用武器的特殊能力，朝外星人發射能量光束，想要擊退他們。外星人感到驚訝，他們沒想到這些小小的生物竟然會使用外星武器。&lt;/p&gt;
&lt;p&gt;阿凱和他的朋友們繼續使用他們的外星武器，抵禦外星人的攻擊。外星人也不甘示弱，他們繼續使用超能力攻擊阿凱和他的朋友們。戰鬥中，主角群和外星人不斷地互相叫囂，對著對方挑釁。&lt;/p&gt;
&lt;p&gt;「哇，你們這些蠢貨，怎麼還沒有倒下！」外星人大喊道。
「你們這些異形，我們不會輕易屈服！」阿凱叫喊道。
「我們會用我們的武器，把你們全部擊倒！」仁心說道。
「沒錯，我們要保護我們的地球，不讓你們搞亂！」書信說道。&lt;/p&gt;
&lt;p&gt;阿凱和他的朋友們不停地攻擊外星人，他們使用武器的特殊能力，朝外星人發射能量光束。外星人也不甘示弱，繼續使用超能力攻擊阿凱和他的朋友們。戰鬥中，主角群和外星人不斷地互相叫囂，對著對方挑釁。&lt;/p&gt;
&lt;p&gt;最後在戰鬥過程中，阿凱發現了外星人的弱點，並使用孫子兵法中的計謀來打敗他們。他利用外星人的心靈感應能力，將自己的思想隱藏起來，讓外星人無法發現他們的存在。他和他的朋友們隱藏在遺跡裡，等待外星人的攻擊。當外星人走近時，阿凱和他的朋友們突然出擊，發射武器，擊退外星人。外星人感到驚訝，他們沒有想到阿凱和他的朋友們會使用如此巧妙的計謀來打敗他們。&lt;/p&gt;
&lt;p&gt;「哇，你們這些家伙真是太厲害了！」外星人大喊道。
「我們是地球的英雄，不會輕易屈服！」阿凱叫喊道。
「我們會用我們的武器，把你們全部擊倒！」仁心說道。
「沒錯，我們要保護我們的地球，不讓你們搞亂！」書信說道。&lt;/p&gt;
&lt;p&gt;阿凱和他的朋友們不停地攻擊外星人，他們使用武器的特殊能力，朝外星人發射能量光束。外星人感到無力，無法抵抗阿凱和他的朋友們的攻擊相繼撤退離開。&lt;/p&gt;
&lt;p&gt;「哇，我們真的成功了！」阿凱說道。
「是的，我們真的很厲害！」仁心回答道。
「我們一定要好好休息，恢復精力，再次挑戰更大的挑戰！」書信說道。
「對，我們一定會更強大，再次擊敗敵人！」小孫說道。&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;第三章 結束&lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3Fsdv_nWt4jO2aciIrPi4V9ubxLS3UMnzb4g02Fxrp6jrdtxdR7e3qldsV3LLSgulsHeZ_sjCe-7VL7J2_ybVdzW7JSZpGBkAiHOpFiiG7ExNqnx5EBxwGWO_N3jwfnumWDSkrP0JkYCKhSbniAaR123K_coB6Z457cWSPDcIOWTG_KlfCUelpP6-/s1024/DALL%C2%B7E%202022-12-11%2018.27.14%20-%20the%20war%20is%20end%20%20%E7%A7%91%E5%B9%BB%E6%87%B8%E7%96%91%E5%B0%8F%E8%AA%AA.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1024&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3Fsdv_nWt4jO2aciIrPi4V9ubxLS3UMnzb4g02Fxrp6jrdtxdR7e3qldsV3LLSgulsHeZ_sjCe-7VL7J2_ybVdzW7JSZpGBkAiHOpFiiG7ExNqnx5EBxwGWO_N3jwfnumWDSkrP0JkYCKhSbniAaR123K_coB6Z457cWSPDcIOWTG_KlfCUelpP6-/s16000/DALL%C2%B7E%202022-12-11%2018.27.14%20-%20the%20war%20is%20end%20%20%E7%A7%91%E5%B9%BB%E6%87%B8%E7%96%91%E5%B0%8F%E8%AA%AA.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;原來，遠古文明留下來的科技超過了現代人的想像，他們擁有超級武器和高科技裝備，可以對抗外星侵略者。但是，在進入遺跡的同時，他們也惹來了麻煩。原來，遺跡中隱藏著一個古怪的生物，它們擁有超強的攻擊能力，對他們構成了威脅。&lt;/p&gt;&lt;p&gt;當阿凱和他的朋友們探索遺跡時，他們發現了一個密封的房間。他們決定探索裡面的秘密，打開了房門。裡面有一個被囚禁的外星人，看起來非常虛弱。阿凱和他的朋友們感到非常震驚，他們沒想到會在遺跡裡發現這樣的情況。他們立刻試圖幫助外星人，給他補充食物和水，讓他恢復體力。&lt;/p&gt;&lt;p&gt;隨著時間的推移，外星人漸漸恢復了健康，並且向阿凱和他的朋友們坦白了他的遭遇。原來，他是一名外星探險家，在探索遺跡時不幸被困住。阿凱和他的朋友們決定幫助外星人逃離遺跡，並且給他們提供安全的避難所。&lt;/p&gt;&lt;p&gt;阿凱和他的朋友們制定了一個詳細的計畫，以確保外星人能夠安全地逃離遺跡。他們首先要確保遺跡周圍沒有外星人的警戒，再準備必要的裝備和食物。&lt;/p&gt;&lt;p&gt;在夜晚，他們偷偷溜出遺跡，沿著一條安全的路徑前進。他們走得非常小心，時刻提高警惕，以防發現。&lt;/p&gt;&lt;p&gt;當他們到達安全的地方時，他們給了外星人食物和水，幫助他們恢復體力。然後，他們帶著外星人沿著另一條安全的路徑離開了遺跡，逃離了外星人的控制。&lt;/p&gt;&lt;p&gt;最終，他們成功地幫助外星人逃離了遺跡，並且給了他們安全的避難所。阿凱和他的朋友們也因此獲得了外星人的感激，並且阿凱和他的朋友們給了外星人一些寶貴的科技，包括高科技武器和裝備。這些科技可以幫助他們更有效地抵抗外星侵略者的威脅，並且提升他們的戰鬥能力。&lt;/p&gt;&lt;p&gt;例如，他們給了他們一種新型的能量劍，可以對抗外星人的攻擊。還有一種先進的外星裝甲，可以提升他們的防禦能力。這些科技對他們的戰鬥力有著巨大的幫助。&lt;/p&gt;&lt;p&gt;在接下來的日子裡，阿凱和他的朋友們努力研究這些科技，並且嘗試將它們運用到他們對抗外星侵略者的戰鬥中。他們也不斷加強自己的能力，為了更好地保護地球不受外星侵略者的威脅，他們也與地球聯邦邦防衛隊合作，分享自己的經驗和知識。地球聯邦也給予他們更多的資源和支持，幫助他們更好地準備接下來的挑戰。&lt;/p&gt;&lt;p&gt;不久之後，外星侵略者的特種部隊再次進攻。阿凱和他的朋友們迎戰在即，他們使用訓練有素的技能，和外星侵略者展開了一場激烈的戰鬥。在戰鬥中，在戰鬥中，阿凱和他的朋友們表現出了超乎想像的勇氣和毅力，他們用自己手中的武器和高科技裝備，使用了各種武器和高科技裝備，如雷射槍、火箭筒和像空氣震擊波一樣強大的超級武器。他們還利用了自己精湛的技能，對抗外星人的攻擊。並利用自己精湛的技能，對抗外星人的攻擊。不僅擊退了外星侵略者，還摧毀了他們的戰艦。&lt;/p&gt;&lt;p&gt;









&lt;/p&gt;&lt;p&gt;但是，戰鬥並不容易。阿凱和他的朋友們在戰鬥中付出了巨大的代價。他們不僅擊退了外星侵略者，還摧毀了他們的戰艦，但是他們也損失了許多戰友。在這場激烈的戰鬥中，阿凱和他的朋友們必須面對許多挑戰，並且付出巨大的代價。&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqg4bFn0HPLEOi2enUFuaikBGUU0aJlkHfKBBXyfmf49nB6ywRPtuUk3F2unyJB5ul5FINRI5n19Dae7h16_nmof-kO8d7ymUC5DwubpgOUs7NeJIwNPXMEgiZZ8ftwZKrkiLZT9FMhj4CWEOdxOqQlDLxhavnB39WlzFTKKF2GRR5P-0Yk94zL679/s1024/DALL%C2%B7E%202022-12-11%2018.27.36%20-%20the%20war%20is%20end%20%20%E7%A7%91%E5%B9%BB%E6%87%B8%E7%96%91%E5%B0%8F%E8%AA%AA.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1024&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqg4bFn0HPLEOi2enUFuaikBGUU0aJlkHfKBBXyfmf49nB6ywRPtuUk3F2unyJB5ul5FINRI5n19Dae7h16_nmof-kO8d7ymUC5DwubpgOUs7NeJIwNPXMEgiZZ8ftwZKrkiLZT9FMhj4CWEOdxOqQlDLxhavnB39WlzFTKKF2GRR5P-0Yk94zL679/s16000/DALL%C2%B7E%202022-12-11%2018.27.36%20-%20the%20war%20is%20end%20%20%E7%A7%91%E5%B9%BB%E6%87%B8%E7%96%91%E5%B0%8F%E8%AA%AA.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;阿凱和他的朋友們在戰鬥後感到疲憊不堪，但是他們深知自己的使命，決定繼續保護地球。他們知道，外星侵略者可能會再次進攻，他們必須準備好迎接下一次挑戰。&lt;/p&gt;&lt;p&gt;因此，阿凱和他的朋友們繼續努力訓練，為了更好地抵抗外星侵略者的威脅。他們和地球聯邦的部隊一起合作，為了保護地球而奮鬥。&lt;/p&gt;&lt;p&gt;

&lt;/p&gt;&lt;p&gt;在這段時間裡，阿凱和他的朋友們獲得了許多支持和尊敬，成為了地球人民的英雄。他們決心要保護地球，不讓外星侵略者再次威脅到他們的家園。&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/8788420329190876930/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/8788420329190876930' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/8788420329190876930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/8788420329190876930'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2022/12/chatgptdall-e-2.html' title='[ChatGPT][Dall-e-2][小說] 宇宙之戰: 地球聯邦共和國的冒險'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGZn0QqJ4j5OPXI9zQGeuCBdUrBVXNXED9F5xWAoaF13AiUIw1WzF_1xfLgXSHJSLlftUHUYv7bf5lcKWVOgt8aqBrDHGlnqcf_yfxnzbDhUhmh9U6AsbaY47L6oixIoZ4dIkusAFBz-zRjRhUDU72art8rEzha8ZWDFm7d8PmbKA4ThFtVvdCTYZr/s72-c/DALL%C2%B7E%202022-12-11%2017.46.34%20-%20%E5%9C%A8%E9%80%99%E5%80%8B%E7%A7%91%E5%B9%BB%E6%87%B8%E7%96%91%E5%B0%8F%E8%AA%AA%E4%B8%AD%EF%BC%8C%E9%98%BF%E5%87%B1%E5%92%8C%E4%BB%96%E7%9A%84%E6%9C%8B%E5%8F%8B%E5%80%91%E5%B0%87%E9%9D%A2%E8%87%A8%E8%91%97%E4%B8%80%E7%B3%BB%E5%88%97%E7%9A%84%E6%8C%91%E6%88%B0%E5%92%8C%E5%8D%B1%E9%9A%AA%E3%80%82%E5%9C%A8%E5%9C%B0%E7%90%83%E8%81%AF%E9%82%A6%E5%85%B1%E5%92%8C%E5%9C%8B%E9%80%99%E5%80%8B%E9%81%99%E9%81%A0%E7%9A%84%E6%9C%AA%E4%BE%86%E4%B8%96%E7%95%8C%E4%B8%AD%EF%BC%8C%E5%A4%96%E6%98%9F%E4%BE%B5%E7%95%A5%E8%80%85%E4%B8%8D%E6%96%B7%E5%A8%81%E8%84%85%E8%91%97%E4%BA%BA%E9%A1%9E%E7%9A%84%E5%AE%89%E5%85%A8.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-6465576949962440073</id><published>2022-12-04T00:18:00.000-08:00</published><updated>2022-12-04T00:18:07.882-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ChatGPT"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenAi"/><category scheme="http://www.blogger.com/atom/ns#" term="測試"/><category scheme="http://www.blogger.com/atom/ns#" term="註解"/><category scheme="http://www.blogger.com/atom/ns#" term="閒聊"/><title type='text'>[ChatGPT] [開發] 利用ChatGPT來寫測試跟註解來加速工作效率</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h2&gt;主題&lt;/h2&gt;&lt;div&gt;在軟體開發中常常要花很多時間來寫測試跟註解，這個時候ChatGPT可以省下你很多時間來完成這項工作，讓你可以有更多時間來陪家人你只要輸入程式碼請他幫你撰寫測試跟註解完成後你在去review就行。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;範例&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;請ChatGPT來寫我網路上隨便找的函數來寫一個BDD的測試程式&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGOHI8Ww04mgkhjgdDyi_1WN3eiGhZOrVHT7nzXcbpS1xMrCoXR_HrU88xnMDdT-jnPhBkd7u57lcGiY562-mpNzrAW8C7XL0QcUND_3bTo4_O3oAWbMpW8a9ltit5HU2fNefCypR_XrobGA6Sh_bgEhVDbByHZT8iSx-hTugyt35W9ZFtOj6luLTU/s804/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-12-04%20160515.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;777&quot; data-original-width=&quot;804&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGOHI8Ww04mgkhjgdDyi_1WN3eiGhZOrVHT7nzXcbpS1xMrCoXR_HrU88xnMDdT-jnPhBkd7u57lcGiY562-mpNzrAW8C7XL0QcUND_3bTo4_O3oAWbMpW8a9ltit5HU2fNefCypR_XrobGA6Sh_bgEhVDbByHZT8iSx-hTugyt35W9ZFtOj6luLTU/s16000/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-12-04%20160515.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;請ChatGPT來幫忙寫註解&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBBdYdlTXstBL0aN9EcS-6CjQJuBbMbe_b68XFC-RkIaRusMj8kqZulj-EOU8Qbo2bQoB00zQORb9AU44c-DOFPI-4Qc4tMpR-7SJuxw1JaRDW_TvDaCUU9xmgP2vjyPdYOq3b2lZlgAi9t7bggyhwIWIdLVoXd8-791VL_tFwZZG8I2n3V-9YNsoi/s662/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-12-04%20160750.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;662&quot; data-original-width=&quot;656&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBBdYdlTXstBL0aN9EcS-6CjQJuBbMbe_b68XFC-RkIaRusMj8kqZulj-EOU8Qbo2bQoB00zQORb9AU44c-DOFPI-4Qc4tMpR-7SJuxw1JaRDW_TvDaCUU9xmgP2vjyPdYOq3b2lZlgAi9t7bggyhwIWIdLVoXd8-791VL_tFwZZG8I2n3V-9YNsoi/s16000/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-12-04%20160750.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;也可以請他寫JavaDocs的style註解&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigMPvSwZf4T9CtrT3KPj4jrN_Uv4xu6WF5xeyqrnouCRM9K6cy3amP1QQIpsM9ozhNMYQpTAOvvOorToHC_koUd-p2LDU-piS1mB3age8LzhCm22TWdWZutNROc6S1KXD6-cauLlkXCDTuL7CV6ptvQsEHX_qc11Bany1rbia9n5IZiCTuqQGFYjU_/s766/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-12-04%20161034.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;766&quot; data-original-width=&quot;653&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigMPvSwZf4T9CtrT3KPj4jrN_Uv4xu6WF5xeyqrnouCRM9K6cy3amP1QQIpsM9ozhNMYQpTAOvvOorToHC_koUd-p2LDU-piS1mB3age8LzhCm22TWdWZutNROc6S1KXD6-cauLlkXCDTuL7CV6ptvQsEHX_qc11Bany1rbia9n5IZiCTuqQGFYjU_/s16000/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-12-04%20161034.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/6465576949962440073/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/6465576949962440073' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/6465576949962440073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/6465576949962440073'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2022/12/chatgpt-chatgpt_4.html' title='[ChatGPT] [開發] 利用ChatGPT來寫測試跟註解來加速工作效率'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGOHI8Ww04mgkhjgdDyi_1WN3eiGhZOrVHT7nzXcbpS1xMrCoXR_HrU88xnMDdT-jnPhBkd7u57lcGiY562-mpNzrAW8C7XL0QcUND_3bTo4_O3oAWbMpW8a9ltit5HU2fNefCypR_XrobGA6Sh_bgEhVDbByHZT8iSx-hTugyt35W9ZFtOj6luLTU/s72-c/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-12-04%20160515.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-799772191486362855</id><published>2022-12-03T01:55:00.001-08:00</published><updated>2022-12-03T01:55:04.830-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ChatGPT"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenAi"/><category scheme="http://www.blogger.com/atom/ns#" term="閒聊"/><title type='text'>[ChatGPT] [閒聊˙] ChatGPT能做什麼呢?</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h2&gt;本篇文章部分內容由ChatGPT回答出來的，然後我稍作修改 👻&lt;/h2&gt;&lt;h2&gt;&lt;span style=&quot;font-size: medium; font-weight: 400;&quot;&gt;如果文章對你有幫助在幫我按一下廣告來讓我有額外收入這也是對我來說是一種鼓勵&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;主題&lt;/h2&gt;&lt;div&gt;ChatGPT是由OpenAI所開發出來的一個大型語言模型，OpenAI 是一家人工智能研究公司，致力於通過研究人工智能技術來推進人類發展，通過大量的訓練和學習來模仿人類的語言思維方式，以便能夠回答人類的問題。&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;他能夠做什麼呢?&amp;nbsp;作為一個訓練的語言模型，他可以回答人類提出的問題，並提供有用的訊息。ㄊ他可以解釋概念，解答問題，幫助人們尋找信息，並提供普遍的建議和意見。雖然他沒有訪問網路的能力，但他可以根據所知的信息來回答您的問題。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;先講一下解論，當未來AI都可以回答你的專業的問題並且提出解決方案，這時候你就要思考一下，會不會被取代了。但是也可以這麼說當打不過就加入他，最好的方式就是立刻去學習如何使用他來幫助你提升你的價值這是非常重要的。&lt;b&gt;&lt;i&gt; 當然他提供的資訊不一定會是對的，只能當作參考來用最好再做一下交叉驗證，這個才是這個資訊爆炸的世界需要有的技能。&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;用途&lt;/h2&gt;&lt;div&gt;以下使用方式是我在亂試中覺得還不錯的部分跟有趣的地方&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1.&amp;nbsp; 修改你的英文句子，如果你的英文能力不夠好也覺得寫出來的並不是很確定有沒有錯&lt;/div&gt;&lt;div&gt;可以利用他來修正你的英文句子並且他會給你一些意見。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxDoONAVmutxACq0vEe63w0KT43wOvm3HCLPa2d85BU6OrcoiFelW-iovC3cdyysYb5Yv2fMllr-cFfDrEfTEs8zPDeK66K-dHkYGkaHIxEM5eGgSFo2miSNpiYTZvWkrOFD0n7y_BHM6QImaQMS9fORUf1lqG70v-IrFuhiA9ZXjkERVUHTluIPWA/s838/image_2022_12_03T09_17_34_143Z.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;406&quot; data-original-width=&quot;838&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxDoONAVmutxACq0vEe63w0KT43wOvm3HCLPa2d85BU6OrcoiFelW-iovC3cdyysYb5Yv2fMllr-cFfDrEfTEs8zPDeK66K-dHkYGkaHIxEM5eGgSFo2miSNpiYTZvWkrOFD0n7y_BHM6QImaQMS9fORUf1lqG70v-IrFuhiA9ZXjkERVUHTluIPWA/s16000/image_2022_12_03T09_17_34_143Z.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;2. 請他給你ChatGPT 的API呼叫範例&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjseQV_3-AdMcwf_jXOmWPPtMHFzHpqxeZ_nds74BZ-4XYV9Hskv6StEw1OChs9cr9TF32P_bV2eowTvdZMbY_h_1HCXzy4TFP-jcjJqL4QjrxD6ffUJ81pXIMAm55aWtd_pa64iBbtWlllmpVXH3giIktdWOm5GUwJWpwHfquv5-OI1CrXmyuxMMxS/s742/1670053824235.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;742&quot; data-original-width=&quot;676&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjseQV_3-AdMcwf_jXOmWPPtMHFzHpqxeZ_nds74BZ-4XYV9Hskv6StEw1OChs9cr9TF32P_bV2eowTvdZMbY_h_1HCXzy4TFP-jcjJqL4QjrxD6ffUJ81pXIMAm55aWtd_pa64iBbtWlllmpVXH3giIktdWOm5GUwJWpwHfquv5-OI1CrXmyuxMMxS/s16000/1670053824235.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. 請他評估一個球員的數據如何，請他給意見&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPRviLoWJta5OT67Ek8tKI06RO5r_Q-ad0LRSvmCc9SKX9EHlKSy69J3ZR7eK91JMc_6YdgUSt6qL9n47yfSsd0KeqO50u_mAJhS6EZHolM6e0c0zXoTLjrABnr3vzA4dsko0NEKddmmKDN3zKumI0jZpR72hti9Dcsyj7Da-pYJYsKUui0dcNNAM7/s735/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-12-03%20173649.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;545&quot; data-original-width=&quot;735&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPRviLoWJta5OT67Ek8tKI06RO5r_Q-ad0LRSvmCc9SKX9EHlKSy69J3ZR7eK91JMc_6YdgUSt6qL9n47yfSsd0KeqO50u_mAJhS6EZHolM6e0c0zXoTLjrABnr3vzA4dsko0NEKddmmKDN3zKumI0jZpR72hti9Dcsyj7Da-pYJYsKUui0dcNNAM7/s16000/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-12-03%20173649.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;4. 請他提供你不熟悉的程式語言範例&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBgvhWcMjElCtXwmScym71BlXEYuFICIjcZWM0x4g6rcr5ggQy-L-QpP4rWmG7M2gyPk16n_VzybNTHOK7Qh7DhJxKL09ZcgKliK7KDLxBSdr1G8Q0FOpJMrNr4RiNa7qYD81Ak81nKSzkF6rohRU3qGsvrqkO6xJbsaiC4oGtiWgwVW_aHV2XFbjB/s843/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-12-03%20174041.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;801&quot; data-original-width=&quot;843&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBgvhWcMjElCtXwmScym71BlXEYuFICIjcZWM0x4g6rcr5ggQy-L-QpP4rWmG7M2gyPk16n_VzybNTHOK7Qh7DhJxKL09ZcgKliK7KDLxBSdr1G8Q0FOpJMrNr4RiNa7qYD81Ak81nKSzkF6rohRU3qGsvrqkO6xJbsaiC4oGtiWgwVW_aHV2XFbjB/s16000/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-12-03%20174041.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;5. 你不知道早餐吃什麼請他提供意見 ，雖然他有時候不一定會回答你 XD&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHZJfgBkIDCGGt33lakUhJUfLyrFYZuo_v1dY_jR89-wmYn-xIY4uGCAuq_LA623fV85xk0iytsfl5brEYninWeST6zU67F5ytdq62KSP_QzpxsihrBztkMTBcUN8wyOQn8gdVwjEBpFuZsRP7QXkLWrPc6c_UIU4JtNDN8KcnekNgwihhvc_npi0F/s1103/S__40050727.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1039&quot; data-original-width=&quot;1103&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHZJfgBkIDCGGt33lakUhJUfLyrFYZuo_v1dY_jR89-wmYn-xIY4uGCAuq_LA623fV85xk0iytsfl5brEYninWeST6zU67F5ytdq62KSP_QzpxsihrBztkMTBcUN8wyOQn8gdVwjEBpFuZsRP7QXkLWrPc6c_UIU4JtNDN8KcnekNgwihhvc_npi0F/s16000/S__40050727.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;6. 提供你專業的意見&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXIL88kdf2AnaHaUwNAk5Xwb7QE-NXepU6oN3YPjIPgF1Y4LASClQ5c9m9CyfvR6X5xM_dctoWSXPxvD6zB44IX7uiE9hOBRyGLZPpJ9-nfS_f8xfW8VLU2iCbuq4DL3LkwhAkc8WCZuELBxjEDNZSYPHOXPJe-4PYy-OWUQCOyF8GGxE48zFkLbEs/s670/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-12-03%20175339.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;559&quot; data-original-width=&quot;670&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXIL88kdf2AnaHaUwNAk5Xwb7QE-NXepU6oN3YPjIPgF1Y4LASClQ5c9m9CyfvR6X5xM_dctoWSXPxvD6zB44IX7uiE9hOBRyGLZPpJ9-nfS_f8xfW8VLU2iCbuq4DL3LkwhAkc8WCZuELBxjEDNZSYPHOXPJe-4PYy-OWUQCOyF8GGxE48zFkLbEs/s16000/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-12-03%20175339.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/799772191486362855/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/799772191486362855' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/799772191486362855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/799772191486362855'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2022/12/chatgpt-chatgpt.html' title='[ChatGPT] [閒聊˙] ChatGPT能做什麼呢?'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxDoONAVmutxACq0vEe63w0KT43wOvm3HCLPa2d85BU6OrcoiFelW-iovC3cdyysYb5Yv2fMllr-cFfDrEfTEs8zPDeK66K-dHkYGkaHIxEM5eGgSFo2miSNpiYTZvWkrOFD0n7y_BHM6QImaQMS9fORUf1lqG70v-IrFuhiA9ZXjkERVUHTluIPWA/s72-c/image_2022_12_03T09_17_34_143Z.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-1046660912519196351</id><published>2022-11-16T09:32:00.001-08:00</published><updated>2022-11-16T09:32:19.997-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Pine腳本"/><category scheme="http://www.blogger.com/atom/ns#" term="stock"/><category scheme="http://www.blogger.com/atom/ns#" term="Tradingview"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="回測"/><category scheme="http://www.blogger.com/atom/ns#" term="教學"/><category scheme="http://www.blogger.com/atom/ns#" term="策略"/><title type='text'>[STOCK] [策略][TRADINGVIEW][教學] 使用PINE SCRIPT來顯示最近幾天K棒平均的百分比</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h2&gt;目的&lt;/h2&gt;&lt;div&gt;本篇文章的交易策略範例是顯示最近幾天內的K棒平均百分比跟最大跟最小K棒百分比&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;如果文章對你有幫助在幫我按一下廣告來讓我有額外收入這也是對我來說是一種鼓勵&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;策略腳本&lt;/h2&gt;&lt;/div&gt;&lt;p&gt;如何將腳本加入至圖表中請參考&lt;a href=&quot;https://hamisme.blogspot.com/2021/06/stocktradingview-tradingview.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Helvetica Neue Light&amp;quot;;&quot;&gt;[STOCK][TRADINGVIEW][&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;font-family: &amp;quot;PingFang TC Light&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;教學&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Helvetica Neue Light&amp;quot;;&quot;&gt;] TRADINGVIEW&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;font-family: &amp;quot;PingFang TC Light&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;圖表上加入自己寫好的指標＆策略&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div&gt;&lt;pre style=&quot;background: rgb(240, 243, 250); border-radius: 6px; border: 0px solid rgb(209, 212, 220); box-sizing: border-box; line-height: 23px; margin-bottom: 20px; margin-top: 20px; overflow-wrap: normal; overflow: auto; padding: 14px 0px 14px 20px; word-break: break-all;&quot;&gt;&lt;div style=&quot;background-color: #131722; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; line-height: 18px;&quot;&gt;&lt;div style=&quot;line-height: 18px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// © CarterTsai&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;//@version=5&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #5b9cf6;&quot;&gt;indicator&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&quot;計算k棒最近百分比&quot;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;overlay&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f77c80;&quot;&gt;true&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;days&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;input.int&lt;/span&gt;(&lt;span style=&quot;color: #d1d4dc;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #388e3c;&quot;&gt;&quot;計算的時間區間&quot;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;defval&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f57f17;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;minval&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;maxval&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;4999&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;var&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;dashboardTable&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;table.new&lt;/span&gt;(&lt;span style=&quot;color: #d1d4dc;&quot;&gt;position&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f77c80;&quot;&gt;position.top_right&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;columns&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;rows&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;bgcolor&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f77c80;&quot;&gt;color.yellow&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;border_width&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;border_color&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f77c80;&quot;&gt;color.blue&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;a&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;array.new_float&lt;/span&gt;(&lt;span style=&quot;color: #f57f17;&quot;&gt;0&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// 算出平均三十天的交易量&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;to&lt;/span&gt; (&lt;span style=&quot;color: #d1d4dc;&quot;&gt;days&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;-1&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;math.abs&lt;/span&gt;(((&lt;span style=&quot;color: #f77c80;&quot;&gt;high&lt;/span&gt;[&lt;span style=&quot;color: #d1d4dc;&quot;&gt;i&lt;/span&gt;] &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #f77c80;&quot;&gt;low&lt;/span&gt;[&lt;span style=&quot;color: #d1d4dc;&quot;&gt;i&lt;/span&gt;])&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #f77c80;&quot;&gt;low&lt;/span&gt;[&lt;span style=&quot;color: #d1d4dc;&quot;&gt;i&lt;/span&gt;]) &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;100&lt;/span&gt; )&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;array.push&lt;/span&gt;(&lt;span style=&quot;color: #d1d4dc;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;p&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;avg&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;array.avg&lt;/span&gt;(&lt;span style=&quot;color: #d1d4dc;&quot;&gt;a&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;max_val&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;array.max&lt;/span&gt;(&lt;span style=&quot;color: #d1d4dc;&quot;&gt;a&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;min_val&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;array.min&lt;/span&gt;(&lt;span style=&quot;color: #d1d4dc;&quot;&gt;a&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f77c80;&quot;&gt;barstate.islast&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;table.cell&lt;/span&gt;(&lt;span style=&quot;color: #d1d4dc;&quot;&gt;table_id&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;dashboardTable&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;column&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;row&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;width&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;15&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;text&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;str.format&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&quot;平均{0,number,#.##}時間區間\n每個K棒百分比&quot;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;days&lt;/span&gt;)&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;text_color&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f77c80;&quot;&gt;color.white&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;nbsp;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;bgcolor&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f77c80;&quot;&gt;color.blue&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;table.cell&lt;/span&gt;(&lt;span style=&quot;color: #d1d4dc;&quot;&gt;table_id&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;dashboardTable&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;column&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;row&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;width&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;15&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;text&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;str.format&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&quot;平均{0,number,#.##}時間區間\n最大/最小K棒百分比&quot;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;days&lt;/span&gt;)&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;text_color&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f77c80;&quot;&gt;color.white&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &amp;nbsp;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;bgcolor&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f77c80;&quot;&gt;color.blue&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;table.cell&lt;/span&gt;(&lt;span style=&quot;color: #d1d4dc;&quot;&gt;table_id&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;dashboardTable&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;column&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;row&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;text&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &amp;nbsp;&lt;span style=&quot;color: #5b9cf6;&quot;&gt;str.format&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&quot;{0,number,#.##}%&quot;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;avg&lt;/span&gt;)&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;bgcolor&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f77c80;&quot;&gt;color.white&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;table.cell&lt;/span&gt;(&lt;span style=&quot;color: #d1d4dc;&quot;&gt;table_id&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;dashboardTable&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;column&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;row&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;text&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &amp;nbsp;&lt;span style=&quot;color: #5b9cf6;&quot;&gt;str.format&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&quot;{0,number,#.##}%/{1,number,#.##}%&quot;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;max_val&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;min_val&lt;/span&gt;)&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;bgcolor&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f77c80;&quot;&gt;color.white&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2&gt;結果&lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF1YDpadwJfPSO_jAodV59aGiiKhibrWqwBMDtKlzHwMVI2VxlhbQN0ZaAZL5dfy3KVLh-iCu9AUkBtgrvO3ox-bQokeEAkxxEszK-tA9BXIvUF0vXfFwEu2i4FeQE3ie0puXW9ORZDugGEi5KGvyJJi5_uK5G4aNSLbFBHqUhgVri87ygERNckDnF/s1087/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-11-17%20013041.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;627&quot; data-original-width=&quot;1087&quot; height=&quot;639&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF1YDpadwJfPSO_jAodV59aGiiKhibrWqwBMDtKlzHwMVI2VxlhbQN0ZaAZL5dfy3KVLh-iCu9AUkBtgrvO3ox-bQokeEAkxxEszK-tA9BXIvUF0vXfFwEu2i4FeQE3ie0puXW9ORZDugGEi5KGvyJJi5_uK5G4aNSLbFBHqUhgVri87ygERNckDnF/w1107-h639/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-11-17%20013041.png&quot; width=&quot;1107&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/1046660912519196351/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/1046660912519196351' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/1046660912519196351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/1046660912519196351'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2022/11/stock-tradingview-pine-scriptk.html' title='[STOCK] [策略][TRADINGVIEW][教學] 使用PINE SCRIPT來顯示最近幾天K棒平均的百分比'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF1YDpadwJfPSO_jAodV59aGiiKhibrWqwBMDtKlzHwMVI2VxlhbQN0ZaAZL5dfy3KVLh-iCu9AUkBtgrvO3ox-bQokeEAkxxEszK-tA9BXIvUF0vXfFwEu2i4FeQE3ie0puXW9ORZDugGEi5KGvyJJi5_uK5G4aNSLbFBHqUhgVri87ygERNckDnF/s72-w1107-h639-c/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-11-17%20013041.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-6954856365217889599</id><published>2022-11-16T08:07:00.002-08:00</published><updated>2022-11-16T08:07:16.509-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="0050"/><category scheme="http://www.blogger.com/atom/ns#" term="Pine腳本"/><category scheme="http://www.blogger.com/atom/ns#" term="stock"/><category scheme="http://www.blogger.com/atom/ns#" term="Tradingview"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="元大台灣50"/><category scheme="http://www.blogger.com/atom/ns#" term="回測"/><category scheme="http://www.blogger.com/atom/ns#" term="教學"/><category scheme="http://www.blogger.com/atom/ns#" term="策略"/><title type='text'>[STOCK] [策略][TRADINGVIEW][教學] 使用PINE SCRIPT來建立KD小於20買 大於80賣的交易策略(0050為範例)</title><content type='html'>&lt;h2&gt;目的&lt;/h2&gt;&lt;div&gt;本篇文章的交易策略範例是利用KD黃金交叉（買）跟死亡交叉（賣）來看元大台灣50(0050)&lt;/div&gt;&lt;div&gt;看回測的勝率好不好。此腳本只是教學為主，投資前請注意風險。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;如果文章對你有幫助在幫我按一下廣告來讓我有額外收入這也是對我來說是一種鼓勵&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;策略腳本&lt;/h2&gt;&lt;/div&gt;&lt;p&gt;如何將腳本加入至圖表中請參考&lt;a href=&quot;https://hamisme.blogspot.com/2021/06/stocktradingview-tradingview.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Helvetica Neue Light&amp;quot;;&quot;&gt;[STOCK][TRADINGVIEW][&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;font-family: &amp;quot;PingFang TC Light&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;教學&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Helvetica Neue Light&amp;quot;;&quot;&gt;] TRADINGVIEW&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;font-family: &amp;quot;PingFang TC Light&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;圖表上加入自己寫好的指標＆策略&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div&gt;&lt;pre style=&quot;background: rgb(240, 243, 250); border-radius: 6px; border: 0px solid rgb(209, 212, 220); box-sizing: border-box; line-height: 23px; margin-bottom: 20px; margin-top: 20px; overflow-wrap: normal; overflow: auto; padding: 14px 0px 14px 20px; word-break: break-all;&quot;&gt;&lt;div style=&quot;background-color: #131722; font-family: Menlo, &amp;quot;Ubuntu Mono&amp;quot;, Consolas, source-code-pro, monospace, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; line-height: 18px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// © CarterTsai&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;//@version=5&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #5b9cf6;&quot;&gt;strategy&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;0050 KD買賣策略&#39;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;overlay&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f77c80;&quot;&gt;true&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;periodK&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;input.int&lt;/span&gt;(&lt;span style=&quot;color: #f57f17;&quot;&gt;14&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;K&#39;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;minval&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f57f17;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;periodD&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;input.int&lt;/span&gt;(&lt;span style=&quot;color: #f57f17;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;D&#39;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;minval&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f57f17;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;smoothK&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;input.int&lt;/span&gt;(&lt;span style=&quot;color: #f57f17;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;Smooth&#39;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;minval&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f57f17;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;k&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;ta.sma&lt;/span&gt;(&lt;span style=&quot;color: #5b9cf6;&quot;&gt;ta.stoch&lt;/span&gt;(&lt;span style=&quot;color: #f77c80;&quot;&gt;close&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f77c80;&quot;&gt;high&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f77c80;&quot;&gt;low&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;periodK&lt;/span&gt;)&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;smoothK&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d1d4dc;&quot;&gt;d&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;ta.sma&lt;/span&gt;(&lt;span style=&quot;color: #d1d4dc;&quot;&gt;k&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;periodD&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// 買進策略：K值小於20 買&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;if&lt;/span&gt;( &lt;span style=&quot;color: #d1d4dc;&quot;&gt;k&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;20&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;strategy.entry&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;buy&#39;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f77c80;&quot;&gt;strategy.long&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;comment&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;買進&#39;&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// 賣出策略：當K值高於80賣&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #d1d4dc;&quot;&gt;k&lt;/span&gt; &lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #f57f17;&quot;&gt;80&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #5b9cf6;&quot;&gt;strategy.close&lt;/span&gt;(&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;buy&#39;&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d1d4dc;&quot;&gt;comment&lt;/span&gt;&lt;span style=&quot;color: #42bda8; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #388e3c;&quot;&gt;&#39;賣出&#39;&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// 畫出KD值&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// plot(k, title=&quot;%K&quot;, color=color.blue)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #787b86;&quot;&gt;// plot(d, title=&quot;%D&quot;, color=color.orange)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2&gt;結果&lt;/h2&gt;&lt;div&gt;用0050周K線回測完的勝率為77.79%, 交易次數為18次, 淨利22.05&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1aZWwlM2DEHy2I_TNjORZrbgPVUedbQkotJh34ajcgj7QaAoOMieIvMsAqXfOO2B9erIZqw5vQzRYroHXpDjtkiZ6Uqpc0XVK01ivIknXEeK-0YvookRYhQ8i8A8olB1yjyG_anFcWepikDAFEuFiFxMY3CWF9BIUAVjy-ajPOHfJ18Y6uScZF9R-/s959/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-11-17%20000500.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;959&quot; data-original-width=&quot;816&quot; height=&quot;683&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1aZWwlM2DEHy2I_TNjORZrbgPVUedbQkotJh34ajcgj7QaAoOMieIvMsAqXfOO2B9erIZqw5vQzRYroHXpDjtkiZ6Uqpc0XVK01ivIknXEeK-0YvookRYhQ8i8A8olB1yjyG_anFcWepikDAFEuFiFxMY3CWF9BIUAVjy-ajPOHfJ18Y6uScZF9R-/w581-h683/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-11-17%20000500.png&quot; width=&quot;581&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/6954856365217889599/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/6954856365217889599' title='3 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/6954856365217889599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/6954856365217889599'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2022/11/stock-tradingview-pine-scriptkd20-800050.html' title='[STOCK] [策略][TRADINGVIEW][教學] 使用PINE SCRIPT來建立KD小於20買 大於80賣的交易策略(0050為範例)'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1aZWwlM2DEHy2I_TNjORZrbgPVUedbQkotJh34ajcgj7QaAoOMieIvMsAqXfOO2B9erIZqw5vQzRYroHXpDjtkiZ6Uqpc0XVK01ivIknXEeK-0YvookRYhQ8i8A8olB1yjyG_anFcWepikDAFEuFiFxMY3CWF9BIUAVjy-ajPOHfJ18Y6uScZF9R-/s72-w581-h683-c/%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202022-11-17%20000500.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-7840175211031542099</id><published>2022-03-11T08:57:00.000-08:00</published><updated>2022-03-11T08:57:01.812-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET Framework DateTime"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="筆記"/><title type='text'>[筆記][日期][C#] 找出當月的最後一天</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;情境&lt;/h2&gt;&lt;div&gt;如果要在C#來取得當月的最後一天可以使用DateTime.DaysInMonth這個方法來快速取得。&lt;/div&gt;&lt;div&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;div style=&quot;background-color: #1e1e1e; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px;&quot;&gt;&lt;div style=&quot;color: #d4d4d4; line-height: 19px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;using&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;System&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;Program&lt;/span&gt;&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;Main&lt;/span&gt;()&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;var&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;i&lt;/span&gt; = &lt;span style=&quot;color: #9cdcfe;&quot;&gt;DateTime&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;DaysInMonth&lt;/span&gt;(&lt;span style=&quot;color: #b5cea8;&quot;&gt;2022&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;02&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;Console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;WriteLine&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;$&quot;{&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;}&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: monospace, monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;結果&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;div&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;div style=&quot;background-color: #1e1e1e; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;28&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/7840175211031542099/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/7840175211031542099' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/7840175211031542099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/7840175211031542099'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2022/03/c.html' title='[筆記][日期][C#] 找出當月的最後一天'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-3751046032867609844</id><published>2021-12-06T21:25:00.005-08:00</published><updated>2021-12-09T22:25:47.094-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net 6"/><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="DB"/><category scheme="http://www.blogger.com/atom/ns#" term="docker"/><category scheme="http://www.blogger.com/atom/ns#" term="Github Action"/><category scheme="http://www.blogger.com/atom/ns#" term="MSSQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Testing"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="教學"/><category scheme="http://www.blogger.com/atom/ns#" term="資料庫"/><title type='text'>[GithubAction][教學] 使用Github Action來建立測試用的Database</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;目的&lt;/h2&gt;&lt;p&gt;此筆記主要是目的是要Push Code到Github的時候可以在Github Action會建立測試用的Database來做專案的Unit Test。&lt;/p&gt;&lt;p&gt;環境為.Net 6 , Database為&lt;span color=&quot;var(--color-prettylights-syntax-string)&quot; face=&quot;ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace&quot;&gt;MSSQL2019&lt;/span&gt;&lt;/p&gt;&lt;p&gt;程式在&lt;a href=&quot;https://github.com/CarterTsai/github-action-container-example&quot;&gt;https://github.com/CarterTsai/github-action-container-example&lt;/a&gt;&lt;/p&gt;&lt;p&gt;P.S. 因為是測試DB所以DB密碼都會是明碼方式呈現，但是在正式使用的時候建議用Github Secrets來放密碼或是敏感資訊可以參考&lt;a href=&quot;https://ithelp.ithome.com.tw/articles/10263300?sc=iThomeR&quot; target=&quot;_blank&quot;&gt;GitHub Action YAML 撰寫技巧 - 環境變數(Environment Variables) 與 秘密 (Secrets)&lt;/a&gt;&lt;/p&gt;&lt;p&gt;如果文章對你有幫助在幫我按一下廣告來讓我有額外收入這也是對我來說是一種鼓勵。&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;流程&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times; font-size: medium;&quot;&gt;1. Push Code To Github&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: times; font-size: medium;&quot;&gt;2. Trigger Github Action&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: times; font-size: medium;&quot;&gt;3. Run Test MSSQL Database Service from docker-compose.yaml&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: times; font-size: medium;&quot;&gt;4. Install MSSQL Command Line Tool&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: times; font-size: medium;&quot;&gt;7.&amp;nbsp;&lt;span color=&quot;var(--color-prettylights-syntax-string)&quot;&gt;Setup .NET Core SDK 6.0.x&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: times; font-size: medium;&quot;&gt;5. Create Database from&amp;nbsp;&lt;span color=&quot;var(--color-prettylights-syntax-string)&quot;&gt;create_db.sql (using sqlcmd)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: times; font-size: medium;&quot;&gt;6.&amp;nbsp;Create Table from create_table.sql (using sqlcmd)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: times; font-size: medium;&quot;&gt;&lt;span color=&quot;var(--color-prettylights-syntax-string)&quot;&gt;7. restore package&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: times; font-size: medium;&quot;&gt;&lt;span color=&quot;var(--color-prettylights-syntax-string)&quot;&gt;8. Build solution&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: times; font-size: medium;&quot;&gt;&lt;span color=&quot;var(--color-prettylights-syntax-string)&quot;&gt;9. Test&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: times; font-size: medium;&quot;&gt;&lt;span color=&quot;var(--color-prettylights-syntax-string)&quot;&gt;10. Stop&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: times; font-size: large;&quot;&gt;Test MSSQL Database Service&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;建立docker-compose.yaml&lt;/h2&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;pre style=&quot;background-color: var(--color-canvas-subtle); border-radius: 6px; box-sizing: border-box; color: #c9d1d9; font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;version&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-pds&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;3.9&lt;span class=&quot;pl-pds&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;services&lt;/span&gt;:
  &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;MSSQL2019Test&lt;/span&gt;:
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;image&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;mcr.microsoft.com/mssql/server:latest&lt;/span&gt;
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;restart&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;always&lt;/span&gt;
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;container_name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;MSSQL2019Test&lt;/span&gt;
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;ports&lt;/span&gt;:
      - &lt;span class=&quot;pl-c1&quot; color=&quot;var(--color-prettylights-syntax-constant)&quot; style=&quot;box-sizing: border-box;&quot;&gt;1433:1433&lt;/span&gt;
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;volumes&lt;/span&gt;:
      - &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;db-test:/var/opt/mssql&lt;/span&gt;
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;environment&lt;/span&gt;:
      - &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;ACCEPT_EULA=Y&lt;/span&gt;
      - &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;SA_PASSWORD=1qaz@WSX&lt;/span&gt;
      - &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;MSSQL_COLLATION=Chinese_Taiwan_Stroke_CI_AS&lt;/span&gt;
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;networks&lt;/span&gt;:
      - &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;db&lt;/span&gt;

&lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;volumes&lt;/span&gt;:
  &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;db-test&lt;/span&gt;:

&lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;networks&lt;/span&gt;:
  &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;db&lt;/span&gt;:&lt;/pre&gt;&lt;/pre&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;建立github action的workflows檔案dotnet.yml&lt;/h2&gt;&lt;div&gt;建立github action的檔案，位置在/.github/workflows/dotnet.yml&lt;/div&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;pre style=&quot;background-color: var(--color-canvas-subtle); border-radius: 6px; box-sizing: border-box; color: #c9d1d9; font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;dotnet package&lt;/span&gt;

&lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;on&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;[push]&lt;/span&gt;

&lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;jobs&lt;/span&gt;:
  &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;build&lt;/span&gt;:
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;timeout-minutes&lt;/span&gt;: &lt;span class=&quot;pl-c1&quot; color=&quot;var(--color-prettylights-syntax-constant)&quot; style=&quot;box-sizing: border-box;&quot;&gt;10&lt;/span&gt;
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;runs-on&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;ubuntu-latest&lt;/span&gt;
    
    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;strategy&lt;/span&gt;:
      &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;matrix&lt;/span&gt;:
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;dotnet-version&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;[&#39;6.0.x&#39; ]&lt;/span&gt;

    &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;steps&lt;/span&gt;:
      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;uses&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;actions/checkout@v2&lt;/span&gt;
      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Start containers&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;working-directory&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;./docker/&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;docker-compose -f &quot;docker-compose.yml&quot; up -d --build&lt;/span&gt;
      
      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Install mssql tools &lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;sudo apt-get install mssql-tools&lt;/span&gt;

      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Install mssql tools path &lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;echo &#39;export PATH=&quot;$PATH:/opt/mssql-tools/bin&quot;&#39; &amp;gt;&amp;gt; ~/.bash_profile&lt;/span&gt;

      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Create Database&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;working-directory&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;./sql/&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;sqlcmd -S localhost -U sa -P 1qaz@WSX -i create_db.sql&lt;/span&gt;

      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Create table&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;working-directory&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;./sql/&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;sqlcmd -S localhost -U sa -P 1qaz@WSX -d testDB -i create_table.sql&lt;/span&gt;
        
      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Setup .NET Core SDK ${{ matrix.dotnet-version }}&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;uses&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;actions/setup-dotnet@v1.7.2&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;with&lt;/span&gt;:
          &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;dotnet-version&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;${{ matrix.dotnet-version }}&lt;/span&gt;

      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Install dependencies&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;dotnet restore github-action-container-example&lt;/span&gt;

      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Build&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;dotnet build --configuration Release --no-restore github-action-container-example&lt;/span&gt;
      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Test&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;dotnet test --no-restore --verbosity normal github-action-container-example&lt;/span&gt;

      - &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;Stop containers&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;working-directory&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;./docker/&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;if&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;always()&lt;/span&gt;
        &lt;span class=&quot;pl-ent&quot; color=&quot;var(--color-prettylights-syntax-entity-tag)&quot; style=&quot;box-sizing: border-box;&quot;&gt;run&lt;/span&gt;: &lt;span class=&quot;pl-s&quot; color=&quot;var(--color-prettylights-syntax-string)&quot; style=&quot;box-sizing: border-box;&quot;&gt;docker-compose -f &quot;docker-compose.yml&quot; down&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;參考&lt;/h2&gt;&lt;p&gt;https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action&lt;/p&gt;&lt;p&gt;https://docs.microsoft.com/zh-tw/sql/tools/sqlcmd-utility?view=sql-server-ver15&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/3751046032867609844/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/3751046032867609844' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/3751046032867609844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/3751046032867609844'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2021/12/githubaction-github-action.html' title='[GithubAction][教學] 使用Github Action來建立測試用的Database'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-1278612807974075030</id><published>2021-11-14T05:57:00.002-08:00</published><updated>2021-11-14T06:17:04.943-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hamisme"/><category scheme="http://www.blogger.com/atom/ns#" term="NMAP"/><category scheme="http://www.blogger.com/atom/ns#" term="Port"/><category scheme="http://www.blogger.com/atom/ns#" term="powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="一行"/><category scheme="http://www.blogger.com/atom/ns#" term="教學"/><category scheme="http://www.blogger.com/atom/ns#" term="筆記"/><title type='text'>[Powershell][筆記] 使用PowerShell一行來取代NMAP來掃描主機有開啟哪些Port</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;情境&lt;/h2&gt;&lt;div&gt;參考:&amp;nbsp;https://www.anquanke.com/post/id/86241&lt;/div&gt;&lt;div&gt;&lt;h3&gt;在Windows的環境下如果想使用類似NMAP掃描主機有開啟那些Port可以使用以下的指令來幫助你快速知道那些Port有被開啟&lt;/h3&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt; $&amp;gt;  1..1024 | % {echo ((new-object Net.Sockets.TcpClient).Connect(&quot;127.0.0.1&quot;,$_)) &quot;Port $_ is open!&quot;} 2&amp;gt;$null&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;br /&gt;&lt;div&gt;或是以下這個指令&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;foreach&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;$port&lt;/span&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;..&lt;span style=&quot;color: #b5cea8;&quot;&gt;1024&lt;/span&gt;) {&lt;span style=&quot;color: #dcdcaa;&quot;&gt;Test-NetConnection&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;-Port&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;$port&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;-InformationLevel&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Quiet&quot;&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;127.0&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;0.1&lt;/span&gt;}&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/1278612807974075030/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/1278612807974075030' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/1278612807974075030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/1278612807974075030'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2021/11/powershell-powershellnmapport.html' title='[Powershell][筆記] 使用PowerShell一行來取代NMAP來掃描主機有開啟哪些Port'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-2051349555208800298</id><published>2021-10-10T07:31:00.002-07:00</published><updated>2021-10-10T07:31:42.889-07:00</updated><title type='text'>[Mac][筆記] Mac使用指令來刪除指定的目錄</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;指令&lt;/h2&gt;&lt;div&gt;&lt;h3&gt;範例 : 刪除nodejs的node_modules目錄&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;使用以下指令的時候請先下&amp;nbsp;&lt;span style=&quot;caret-color: rgb(51, 51, 51); color: inherit; font-size: inherit; white-space: pre-wrap;&quot;&gt;find . -type d -name &quot;node_modules&quot;來確定目錄找出來是對的，避免刪錯指令&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt; $&amp;gt;  find . -type d -name &quot;node_modules&quot; -exec rm -rf &quot;{}&quot; \;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/2051349555208800298/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/2051349555208800298' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/2051349555208800298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/2051349555208800298'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2021/10/mac-mac.html' title='[Mac][筆記] Mac使用指令來刪除指定的目錄'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-9101864306078925487</id><published>2021-09-13T09:57:00.002-07:00</published><updated>2021-09-13T09:57:37.508-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Game"/><category scheme="http://www.blogger.com/atom/ns#" term="PS4"/><category scheme="http://www.blogger.com/atom/ns#" term="World War Z"/><category scheme="http://www.blogger.com/atom/ns#" term="Youtube"/><category scheme="http://www.blogger.com/atom/ns#" term="明鏡止水玩樂"/><category scheme="http://www.blogger.com/atom/ns#" term="末日之戰"/><category scheme="http://www.blogger.com/atom/ns#" term="遊戲"/><title type='text'>[遊戲][Youtube] [PS4] [World War Z 末日之戰] 瘋狂打爆殭屍 提高難度在挑戰一次</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/moDphJAXssA&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;

</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/9101864306078925487/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/9101864306078925487' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/9101864306078925487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/9101864306078925487'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2021/09/youtube-ps4-world-war-z_13.html' title='[遊戲][Youtube] [PS4] [World War Z 末日之戰] 瘋狂打爆殭屍 提高難度在挑戰一次'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/moDphJAXssA/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-3694329032842474498</id><published>2021-09-03T08:40:00.001-07:00</published><updated>2021-09-06T07:50:14.166-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Game"/><category scheme="http://www.blogger.com/atom/ns#" term="PS4"/><category scheme="http://www.blogger.com/atom/ns#" term="World War Z"/><category scheme="http://www.blogger.com/atom/ns#" term="Youtube"/><category scheme="http://www.blogger.com/atom/ns#" term="末日之戰"/><category scheme="http://www.blogger.com/atom/ns#" term="遊戲"/><title type='text'>[遊戲][Youtube] [PS4] [World War Z 末日之戰]  瘋狂打爆殭屍 紓壓的遊戲</title><content type='html'>Part1&lt;br /&gt;&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/r7dl_1db3dg&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;br /&gt;
Part2&lt;br /&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/275R_OB81cA&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;br /&gt;
Part3&lt;br /&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/XfmJ0RC0hx4&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;br /&gt;

Part4&amp;nbsp;紐約 第三節 出生入死&lt;br /&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/6hmVvf7ca7E&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;div&gt;Part 5&amp;nbsp;紐約 第四節 水中往者&lt;/div&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/vg6HOr60wOk&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;div&gt;Part 6&amp;nbsp;耶路撒冷 第一節 開顱手術&lt;/div&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/xgyg0IZt3RI&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;div&gt;Part 7&amp;nbsp;耶路撒冷 第二節 死海漫步&lt;/div&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/8yi25fed1sc&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;div&gt;Part 8&amp;nbsp;耶路撒冷 技術支援&lt;/div&gt;

&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/HC-Kid5O-ow&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;div&gt;Part 9&amp;nbsp;莫斯科 天降之跡&lt;/div&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/p-IeO99zOnk&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;div&gt;Part 10&amp;nbsp;&amp;nbsp;莫斯科 城市的關鍵&lt;/div&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/5k3F2630fCA&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/3694329032842474498/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/3694329032842474498' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/3694329032842474498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/3694329032842474498'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2021/09/youtube-ps4-world-war-z.html' title='[遊戲][Youtube] [PS4] [World War Z 末日之戰]  瘋狂打爆殭屍 紓壓的遊戲'/><author><name>Carter</name><uri>http://www.blogger.com/profile/07082164797564588954</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/r7dl_1db3dg/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-4926676089806808535</id><published>2021-08-31T22:02:00.002-07:00</published><updated>2021-08-31T22:02:25.813-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="command"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="shell"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><category scheme="http://www.blogger.com/atom/ns#" term="weather"/><category scheme="http://www.blogger.com/atom/ns#" term="天氣"/><category scheme="http://www.blogger.com/atom/ns#" term="指令"/><title type='text'>[筆記][Linux, Mac, Unix] 使用command來顯示天氣狀況</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;情境&lt;/h2&gt;&lt;p&gt;如果在Linux, Mac, Unix想用shell的指令來顯示目前所在地的氣象可以使用https://wttr.in/所提供的服務來做到 , 這個還滿有趣的。&lt;/p&gt;&lt;p&gt;如果文章對你有幫助在幫我按一下廣告來讓我有額外收入這也是對我來說是一種鼓勵&lt;/p&gt;&lt;h2&gt;指令&lt;/h2&gt;&lt;div&gt;如果只輸入網址他會自動顯示你的所在天氣&lt;/div&gt;&lt;div&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt; $&amp;gt; curl https://wttr.in&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf55SmuDLxSpVIob4OwL1ON0cZvK8IUSyOCKJ3FZm-N-_yoGGFGKu_rKJZOUnfegC1IgdBa-KLiOMXToSNrz6RI7QzyuLznZDkoVWJRd1wDpijMBDXf-cSjrCbzC71XLHXOewAnjsR8FU/s1766/fish___usr_local_Cellar_python_1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1078&quot; data-original-width=&quot;1766&quot; height=&quot;391&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf55SmuDLxSpVIob4OwL1ON0cZvK8IUSyOCKJ3FZm-N-_yoGGFGKu_rKJZOUnfegC1IgdBa-KLiOMXToSNrz6RI7QzyuLznZDkoVWJRd1wDpijMBDXf-cSjrCbzC71XLHXOewAnjsR8FU/w640-h391/fish___usr_local_Cellar_python_1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;你也可以在網址後面加入國家或地區名稱&lt;/div&gt;&lt;div&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt; $&amp;gt; curl https://wttr.in/Taiwan&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheVvWCRAMawBcOeE9ej-WIypJ_SZfw9zWXMy9TAGx0Os-ai589CGiswivrWxYbabhBO7EVlhOsiW-VPXayZ_gGb70whWjiPB2daUPvAO-it9YCDp4_SXc_NyuWEHm497FLgPjMPtCAyWU/s1774/fish___usr_local_Cellar_python_2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1150&quot; data-original-width=&quot;1774&quot; height=&quot;414&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheVvWCRAMawBcOeE9ej-WIypJ_SZfw9zWXMy9TAGx0Os-ai589CGiswivrWxYbabhBO7EVlhOsiW-VPXayZ_gGb70whWjiPB2daUPvAO-it9YCDp4_SXc_NyuWEHm497FLgPjMPtCAyWU/w640-h414/fish___usr_local_Cellar_python_2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/4926676089806808535/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/4926676089806808535' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/4926676089806808535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/4926676089806808535'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2021/08/linux-mac-unix-command.html' title='[筆記][Linux, Mac, Unix] 使用command來顯示天氣狀況'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf55SmuDLxSpVIob4OwL1ON0cZvK8IUSyOCKJ3FZm-N-_yoGGFGKu_rKJZOUnfegC1IgdBa-KLiOMXToSNrz6RI7QzyuLznZDkoVWJRd1wDpijMBDXf-cSjrCbzC71XLHXOewAnjsR8FU/s72-w640-h391-c/fish___usr_local_Cellar_python_1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-6759882147505588504</id><published>2021-08-31T07:56:00.006-07:00</published><updated>2021-08-31T07:56:49.521-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cat"/><category scheme="http://www.blogger.com/atom/ns#" term="Get-Content"/><category scheme="http://www.blogger.com/atom/ns#" term="powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>[PowerShell][筆記] 使用PowerShel的指令Get-Content來顯示檔案內容(類似Linux的cat指令)</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;情境&lt;/h2&gt;&lt;p&gt;如果想用Powershell的指令來做到類似Linux的cat指令，可以使用Get-Content&lt;/p&gt;&lt;p&gt;來達成顯示檔案的內容。&lt;/p&gt;&lt;p&gt;如果文章對你有幫助在幫我按一下廣告來讓我有額外收入這也是對我來說是一種鼓勵&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://docs.microsoft.com/zh-tw/powershell/module/microsoft.powershell.management/get-content?view=powershell-7.1&quot; target=&quot;_blank&quot;&gt;官方指令說明&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;指令&lt;/h2&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;範例一 : 顯示文字檔案內容&lt;/h3&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt; $&amp;gt;  Get-Content -Path .\test.txt&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;顯示結果&lt;/p&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt;Line 1
Line 2
Line 3
Line 4
Line 5
Line 6&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;範例二 : 限制顯示文字檔案內容數量&lt;/h3&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt; $&amp;gt; Get-Content -Path .\test.txt -TotalCount 2&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;顯示結果&lt;/p&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt;Line 1
Line 2&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;範例三 : 顯示文字檔案的特定行數&lt;/h3&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt; $&amp;gt; (Get-Content -Path .\test.txt)[2]&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;顯示結果(範例是取得第三行的資訊)&lt;/p&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt;Line 3&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Get-Content回傳的是&lt;a href=&quot;https://www.csie.ntu.edu.tw/~b98902112/cpp_and_algo/cpp/array.html&quot; target=&quot;_blank&quot;&gt;陣列&lt;/a&gt;，所以第一行是[0], 第三行是[2]&lt;/p&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;範例四: 顯示文字檔案的最後一行&lt;/h3&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt; $&amp;gt;  Get-Content -Path .\test.txt -Tail 1&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;顯示結果&lt;/p&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt;Line 6&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;範例五: 過濾只要顯示的檔案&lt;/h3&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt;PS C:\Temp&amp;gt; ls


    目錄: C:\Temp


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----       2021/8/31  下午 10:50             33 access.log
-a----       2021/8/31  下午 10:10             46 test.txt&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt;$&amp;gt; Get-Content -Path C:\Temp\* -Filter *.log&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;顯示結果(以上指令範例只顯示副檔名是log的檔案)&lt;/p&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt;Log 1
Log 2
Log 3
Log 4
Log 5&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/6759882147505588504/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/6759882147505588504' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/6759882147505588504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/6759882147505588504'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2021/08/powershell-powershelget-contentlinuxcat.html' title='[PowerShell][筆記] 使用PowerShel的指令Get-Content來顯示檔案內容(類似Linux的cat指令)'/><author><name>Carter</name><uri>http://www.blogger.com/profile/07082164797564588954</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-8014408252737497556</id><published>2021-08-21T21:03:00.003-07:00</published><updated>2021-08-21T21:05:37.405-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Desktop"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="manjaro"/><category scheme="http://www.blogger.com/atom/ns#" term="Mx Linux"/><title type='text'>[筆記][Linux] 介面不錯看的Linux發行版</title><content type='html'>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;筆記一下看到兩個新的Linux發行版本, 介面看起來都滿漂亮的&lt;/p&gt;&lt;p&gt;在網路上找到的圖片看起來都很簡潔&amp;nbsp;&lt;/p&gt;&lt;p&gt;1. &lt;a href=&quot;https://mxlinux.org/&quot;&gt;MX Linux&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3JKhyphenhyphenMA6BMV_rI_-0uRZcUAEOgSYL63w6CIl7D3Ff7A2jA8svnC7g1m_jmg2HjpYgU94mz9vyknhkaI37I_C6Ao0k-NwFIkHgXkIseHyb_o47H7sisBwHko-KzGUyetz6vnl43QWjfc4/s1686/975B11CD-4987-4A65-8B4D-E893B4E7C6BC.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;936&quot; data-original-width=&quot;1686&quot; height=&quot;356&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3JKhyphenhyphenMA6BMV_rI_-0uRZcUAEOgSYL63w6CIl7D3Ff7A2jA8svnC7g1m_jmg2HjpYgU94mz9vyknhkaI37I_C6Ao0k-NwFIkHgXkIseHyb_o47H7sisBwHko-KzGUyetz6vnl43QWjfc4/w640-h356/975B11CD-4987-4A65-8B4D-E893B4E7C6BC.jpeg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;2. &lt;a href=&quot;https://manjaro.org/&quot; target=&quot;_blank&quot;&gt;Manjaro&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAVODO2s7vkq4OjWZcN5YlriNamD-iXqFMUknV8ap2ZnNxow8dX8kOCOoW8Wg9QBC9qPhbygyTMsLN_L2S6uYDaEUSF0nXiEWyN8aYdeR3wy3k4nW8GK-7Ey-TetcDX_HUZGVmBBYpzow/s2048/905C037A-5C9E-4DCF-AA40-3619F507BAC0.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1280&quot; data-original-width=&quot;2048&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAVODO2s7vkq4OjWZcN5YlriNamD-iXqFMUknV8ap2ZnNxow8dX8kOCOoW8Wg9QBC9qPhbygyTMsLN_L2S6uYDaEUSF0nXiEWyN8aYdeR3wy3k4nW8GK-7Ey-TetcDX_HUZGVmBBYpzow/w640-h400/905C037A-5C9E-4DCF-AA40-3619F507BAC0.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/8014408252737497556/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/8014408252737497556' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/8014408252737497556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/8014408252737497556'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2021/08/linux-linux.html' title='[筆記][Linux] 介面不錯看的Linux發行版'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3JKhyphenhyphenMA6BMV_rI_-0uRZcUAEOgSYL63w6CIl7D3Ff7A2jA8svnC7g1m_jmg2HjpYgU94mz9vyknhkaI37I_C6Ao0k-NwFIkHgXkIseHyb_o47H7sisBwHko-KzGUyetz6vnl43QWjfc4/s72-w640-h356-c/975B11CD-4987-4A65-8B4D-E893B4E7C6BC.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-7295574706624640165</id><published>2021-08-20T21:18:00.002-07:00</published><updated>2021-08-29T10:36:59.492-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Get-FileHash"/><category scheme="http://www.blogger.com/atom/ns#" term="hash"/><category scheme="http://www.blogger.com/atom/ns#" term="md5"/><category scheme="http://www.blogger.com/atom/ns#" term="powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="sha256"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>[PowerShell][筆記][Hash] 使用PowerShel的指令Get-FileHash來取得檔案的雜湊值</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;情境&lt;/h2&gt;&lt;div&gt;在網路上下載軟體或是其他檔案的時候比較有規模或是有資安觀念的公司或網站都會提供雜湊值來讓你下載完檔案可以用來做驗證避免下載下來的檔案被有心人士給植入密碼，然後以前在Windows都要額外下載工具才能取得檔案的雜湊值，然後PowerShell本身提供了這個功能不用再依賴額外的工具。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;如果文章對你有幫助在幫我按一下廣告來讓我有額外收入這也是對我來說是一種鼓勵&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://docs.microsoft.com/zh-tw/powershell/module/microsoft.powershell.utility/get-filehash?view=powershell-7.1&quot; target=&quot;_blank&quot;&gt;官方指令說明&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ithelp.ithome.com.tw/articles/10208884&quot; target=&quot;_blank&quot;&gt;雜湊值是什麼&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;指令&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;指令如果沒有指定演算法預設是SHA256&lt;/div&gt;&lt;div&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt; $&amp;gt;  Get-FileHash .\ubuntu-20.04.2.0-desktop-amd64.iso | Format-List&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicqAun-ZxdTaxKpWyE8JYpo1lvNU-_vr9kIZj45zAe7tYcqAnCni-V_j4nDmQWQZSRTVlb9SzAj7LnuMWazkTSuRCHwMvZjgKP6XreOALtT7I6NUAPsTLYNMeGwJW6YvNFrgblJRc7K1k/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img data-original-height=&quot;106&quot; data-original-width=&quot;930&quot; height=&quot;72&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicqAun-ZxdTaxKpWyE8JYpo1lvNU-_vr9kIZj45zAe7tYcqAnCni-V_j4nDmQWQZSRTVlb9SzAj7LnuMWazkTSuRCHwMvZjgKP6XreOALtT7I6NUAPsTLYNMeGwJW6YvNFrgblJRc7K1k/w640-h72/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;p style=&quot;text-align: left;&quot;&gt;如果要指定言算法只要加上-Algorithm [演算法]，以下的範例是使用SHA512&lt;/p&gt;&lt;pre class=&quot;hljs&quot; style=&quot;background-color: #222222; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; caret-color: rgb(51, 51, 51); color: white; font-family: monospace, monospace; font-size: 16px; line-height: 1.42857; margin-bottom: 10px; overflow-wrap: break-word; overflow: auto; padding: 15px; position: relative; text-align: left; word-break: normal;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: inherit; font-family: monospace, monospace; font-size: inherit; padding: 0px; white-space: pre-wrap;&quot;&gt; $&amp;gt;   Get-FileHash .\ubuntu-20.04.2.0-desktop-amd64.iso  -Algorithm SHA512 | Format-List&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_fUPUNLP83Hkxc4ePbTpqB5nZbZnPi1MGCTKPTJ9EsRiNxs7hMCdgdtuQmgMZVFLhyphenhyphenJXrAsN7WrcOh0E2LTWnPynkXdL2n82t50pp_OGkZio5V2DImgIZXCrKNQp1-y5SS_Z7Sj1FEsg/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img data-original-height=&quot;136&quot; data-original-width=&quot;1465&quot; height=&quot;63&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_fUPUNLP83Hkxc4ePbTpqB5nZbZnPi1MGCTKPTJ9EsRiNxs7hMCdgdtuQmgMZVFLhyphenhyphenJXrAsN7WrcOh0E2LTWnPynkXdL2n82t50pp_OGkZio5V2DImgIZXCrKNQp1-y5SS_Z7Sj1FEsg/w667-h63/image.png&quot; width=&quot;667&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;指令只有提供以下的演算法&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;box-sizing: inherit; font-family: &amp;quot;Segoe UI&amp;quot;, SegoeUI, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; list-style: none; margin: 16px 0px 16px 38px; outline-color: inherit; padding: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #ffa400;&quot;&gt;SHA1&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #ffa400;&quot;&gt;SHA256&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #ffa400;&quot;&gt;SHA384&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #ffa400;&quot;&gt;SHA512&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #ffa400;&quot;&gt;MD5&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/7295574706624640165/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/7295574706624640165' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/7295574706624640165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/7295574706624640165'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2021/08/powershellhash-powershelget-filehash.html' title='[PowerShell][筆記][Hash] 使用PowerShel的指令Get-FileHash來取得檔案的雜湊值'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicqAun-ZxdTaxKpWyE8JYpo1lvNU-_vr9kIZj45zAe7tYcqAnCni-V_j4nDmQWQZSRTVlb9SzAj7LnuMWazkTSuRCHwMvZjgKP6XreOALtT7I6NUAPsTLYNMeGwJW6YvNFrgblJRc7K1k/s72-w640-h72-c/image.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-7418196507021061622</id><published>2021-08-20T09:33:00.000-07:00</published><updated>2021-08-20T09:33:34.586-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="0056"/><category scheme="http://www.blogger.com/atom/ns#" term="goodinfo"/><category scheme="http://www.blogger.com/atom/ns#" term="Pine腳本"/><category scheme="http://www.blogger.com/atom/ns#" term="stock"/><category scheme="http://www.blogger.com/atom/ns#" term="Tradingview"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="乖離率河流圖"/><category scheme="http://www.blogger.com/atom/ns#" term="元大高股息"/><category scheme="http://www.blogger.com/atom/ns#" term="回測"/><category scheme="http://www.blogger.com/atom/ns#" term="教學"/><category scheme="http://www.blogger.com/atom/ns#" term="策略"/><title type='text'>[Stock][TradingView][教學] TradingView圖表上加入乖離率河流圖以0056(元大高股息)為範例(參考goodinfo)</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;目的&lt;/h2&gt;&lt;div&gt;最近大盤不是很好跌所以想來看看能不能等到0056超跌到合理的價位然後再來買進長期持有&lt;/div&gt;&lt;div&gt;賺點價差跟股息，然後看了節目有人介紹了乖離率河流圖如果股價跌倒-20%就可以試看看買進&lt;/div&gt;&lt;div&gt;他們也介紹了goodinfo的&lt;a href=&quot;https://goodinfo.tw/StockInfo/ShowK_ChartFlow.asp?RPT_CAT=DR%5F3M&amp;amp;STOCK_ID=0056&amp;amp;CHT_CAT=DATE&quot; target=&quot;_blank&quot;&gt;0056乖離率河流圖&lt;/a&gt;來方便大家參考，但是我比較常用tradingview來看股票所以我就自己寫了一個一樣的河流圖來看，今天先將圖畫完之後會在寫pine script利用乖離率河流圖的數據來回測看看這樣的方法勝率如何。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;如果不知道什麼是河流圖可以參考這個連結：&lt;a href=&quot;https://factpedia.org/index.php?title=%E6%B2%B3%E6%B5%81%E5%9C%96&amp;amp;variant=zh&quot; target=&quot;_blank&quot;&gt;河流圖是什麼&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;文章對你有幫助在幫我按一下廣告來讓我有額外收入這也是對我來說是一種鼓勵。&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;font-family: Lora, serif; font-weight: 400;&quot;&gt;策略腳本&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;將策略腳本寫好放進Pine編輯器 以下是腳本範例可以參考說明&lt;a href=&quot;https://hamisme.blogspot.com/2020/05/stock-tradingview-pine-script2330.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Helvetica Neue Light&amp;quot;;&quot;&gt;[STOCK] [&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;font-family: &amp;quot;PingFang TC Light&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;策略&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Helvetica Neue Light&amp;quot;;&quot;&gt;][TRADINGVIEW][&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;font-family: &amp;quot;PingFang TC Light&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;教學&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Helvetica Neue Light&amp;quot;;&quot;&gt;]&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;font-family: &amp;quot;PingFang TC Light&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;使用&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Helvetica Neue Light&amp;quot;;&quot;&gt;PINE SCRIPT&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;font-family: &amp;quot;PingFang TC Light&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;來建立簡單的股票策略以台積電&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Helvetica Neue Light&amp;quot;;&quot;&gt;2330&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;font-family: &amp;quot;PingFang TC Light&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;為範例&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style=&quot;background: rgb(240, 243, 250); border-radius: 6px; border: 0px solid rgb(209, 212, 220); box-sizing: border-box; line-height: 23px; margin-bottom: 20px; margin-top: 20px; overflow-wrap: normal; overflow: auto; padding: 14px 0px 14px 20px; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: green; font-family: monospace, monospace;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;b&gt;// © CarterTsai

//@version=4
study(&quot;乖離率河流圖&quot;, overlay = true)

// 季線(120日線)
sma_number = input(title=&quot;均線(預設季均線)&quot;, type=input.integer, defval=60)
sma_linewidth = input(title=&quot;均線線的寬度&quot;, type=input.integer, defval=2)
ma = sma(close, sma_number)

// 正乖離 = (季線 - 季線*百分比)
bias10 = (ma + (ma*10)/100)
bias20 = (ma + (ma*20)/100)
bias30 = (ma + (ma*30)/100)
bias40 = (ma + (ma*40)/100)

sub_bias10 = (ma - (ma*10)/100)
sub_bias20 = (ma - (ma*20)/100)
sub_bias30 = (ma - (ma*30)/100)
sub_bias40 = (ma - (ma*40)/100)

// 顏色
plotColors = array.from(color.red, color.green, color.silver, color.white, color.maroon, color.purple, color.fuchsia, color.yellow)

// 均線線的寬度
line40 = input(title=&quot;40%線寬度&quot;, type=input.integer, defval=1)
line30 = input(title=&quot;30%線寬度&quot;, type=input.integer, defval=1)
line20 = input(title=&quot;20%線寬度&quot;, type=input.integer, defval=1)
line10 = input(title=&quot;10%線寬度&quot;, type=input.integer, defval=1)

sub_line40 = input(title=&quot;-40%線寬度&quot;, type=input.integer, defval=1)
sub_line30 = input(title=&quot;-30%線寬度&quot;, type=input.integer, defval=1)
sub_line20 = input(title=&quot;-20%線寬度&quot;, type=input.integer, defval=1)
sub_line10 = input(title=&quot;-10%線寬度&quot;, type=input.integer, defval=1)

// 畫線
plot(ma, linewidth = sma_linewidth)

plot(bias40, color = array.get(plotColors, 0), linewidth=line40)
plot(bias30, color = array.get(plotColors, 1), linewidth=line30)
plot(bias20, color = array.get(plotColors, 2), linewidth=line20)
plot(bias10, color = array.get(plotColors, 3), linewidth=line10)

plot(sub_bias10, color = array.get(plotColors, 4), linewidth=sub_line10)
plot(sub_bias20, color = array.get(plotColors, 5), linewidth=sub_line20)
plot(sub_bias30, color = array.get(plotColors, 6), linewidth=sub_line30)
plot(sub_bias40, color = array.get(plotColors, 7), linewidth=sub_line40)&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;font-family: Lora, serif; font-weight: 400;&quot;&gt;結果&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;腳本設定完後加入圖表後就可以看到河流圖的線圖拉。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbJDB-5Uf8nERTL9zFPvJO6aL6r13vuO1SQ4kGzBMklX5ySK1r3g1i3vgB1ROnv0zzDz4bGIaf6tPgvkw5pXBaW9kHm5V5HRC18WTQTw0RH2uCcs-HS5J-vtvS93b-mPBtnW-iINod84c/s2346/0056_32_26_%25E2%2596%25BC_%25E2%2588%25920_19__%25E8%25B3%25BC%25E8%25B2%25B7%25E7%25AD%2596%25E7%2595%25A5.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1172&quot; data-original-width=&quot;2346&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbJDB-5Uf8nERTL9zFPvJO6aL6r13vuO1SQ4kGzBMklX5ySK1r3g1i3vgB1ROnv0zzDz4bGIaf6tPgvkw5pXBaW9kHm5V5HRC18WTQTw0RH2uCcs-HS5J-vtvS93b-mPBtnW-iINod84c/w640-h320/0056_32_26_%25E2%2596%25BC_%25E2%2588%25920_19__%25E8%25B3%25BC%25E8%25B2%25B7%25E7%25AD%2596%25E7%2595%25A5.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;如果要調整均線的長度可以，點擊設定並且將均線做調整你想要看的數值&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCcHYQOdFQu8bDBURtDLAVsOheYx4uvjYbu-bfD2Iq2dGK6ApxvfDYGiZokATzM8VrQ2Ygc5EIrBJJ0Y_OnSIU0ljgd4QKNh6PcJWEizicX_GSrmBcMLMqpd-0h2gXb65JcHQmrBDgTXE/s2048/0056_32_26_%25E2%2596%25BC_%25E2%2588%25920_19__%25E8%25B3%25BC%25E8%25B2%25B7%25E7%25AD%2596%25E7%2595%25A5_set.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1095&quot; data-original-width=&quot;2048&quot; height=&quot;342&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCcHYQOdFQu8bDBURtDLAVsOheYx4uvjYbu-bfD2Iq2dGK6ApxvfDYGiZokATzM8VrQ2Ygc5EIrBJJ0Y_OnSIU0ljgd4QKNh6PcJWEizicX_GSrmBcMLMqpd-0h2gXb65JcHQmrBDgTXE/w640-h342/0056_32_26_%25E2%2596%25BC_%25E2%2588%25920_19__%25E8%25B3%25BC%25E8%25B2%25B7%25E7%25AD%2596%25E7%2595%25A5_set.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/7418196507021061622/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/7418196507021061622' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/7418196507021061622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/7418196507021061622'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2021/08/stocktradingview-tradingview0056goodinfo.html' title='[Stock][TradingView][教學] TradingView圖表上加入乖離率河流圖以0056(元大高股息)為範例(參考goodinfo)'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbJDB-5Uf8nERTL9zFPvJO6aL6r13vuO1SQ4kGzBMklX5ySK1r3g1i3vgB1ROnv0zzDz4bGIaf6tPgvkw5pXBaW9kHm5V5HRC18WTQTw0RH2uCcs-HS5J-vtvS93b-mPBtnW-iINod84c/s72-w640-h320-c/0056_32_26_%25E2%2596%25BC_%25E2%2588%25920_19__%25E8%25B3%25BC%25E8%25B2%25B7%25E7%25AD%2596%25E7%2595%25A5.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3301040538324131755.post-1548845020201884091</id><published>2021-08-15T08:44:00.000-07:00</published><updated>2021-08-15T08:44:15.177-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Game"/><category scheme="http://www.blogger.com/atom/ns#" term="Tom Clancy&#39;s The Division 2"/><category scheme="http://www.blogger.com/atom/ns#" term="湯姆克蘭西2"/><category scheme="http://www.blogger.com/atom/ns#" term="遊戲"/><title type='text'>[遊戲][Youtube] [Tom Clancy&#39;s The Division 2] 湯姆克蘭西2</title><content type='html'>&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/SDOFpmcUP54&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://hamisme.blogspot.com/feeds/1548845020201884091/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3301040538324131755/1548845020201884091' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/1548845020201884091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3301040538324131755/posts/default/1548845020201884091'/><link rel='alternate' type='text/html' href='http://hamisme.blogspot.com/2021/08/youtube-tom-clancys-division-2-2.html' title='[遊戲][Youtube] [Tom Clancy&#39;s The Division 2] 湯姆克蘭西2'/><author><name>hamisme</name><uri>http://www.blogger.com/profile/10004131697729808300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/SDOFpmcUP54/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>