<?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-8945098301149388521</id><updated>2026-06-23T22:11:18.970+08:00</updated><category term="Linux"/><category term="php"/><category term="一般生活文章"/><category term="Windows"/><category term="抱怨科技面"/><category term="CentOS的點點"/><category term="osTube"/><category term="Fedora事件簿"/><category term="apache"/><category term="mysql"/><category term="自寫-詩、詞、曲、句"/><category term="Scientific"/><category term="爛的工作環境-學校"/><category term="javascript"/><category term="cacti"/><category term="docker"/><category term="jquery"/><category term="phpmyadmin"/><category term="憑證"/><category term="SSL"/><category term="grub"/><category term="usb開機"/><category term="vnc"/><category term="win 10"/><category term="防毒"/><category term="Dreamweaver"/><category term="MariaDB"/><category term="android"/><category term="html5"/><category term="openvpn"/><category term="ubuntu"/><category term="vmware"/><category term="CodeIgniter"/><category term="Flash"/><category term="Google Flutter"/><category term="SELinux"/><category term="WordPress"/><category term="amazon ec2"/><category term="amfphp"/><category term="android studio"/><category term="cipher"/><category term="command"/><category term="css"/><category term="flartoolkit"/><category term="html"/><category term="mrtg"/><category term="npm"/><category term="regular"/><category term="rescue"/><category term="rsyslog"/><category term="windows server 2012"/><category term="xampp"/><category term="網頁程式"/><category term="網頁編寫"/><category term="自己畫"/><category term="造詩應時事"/><category term="Certificate"/><category term="ISMS"/><category term="Laravel"/><category term="NOFILE"/><category term="SSH"/><category term="Web"/><category term="app"/><category term="aruba"/><category term="brotli"/><category term="certsrv"/><category term="cordova"/><category term="esxi"/><category term="esxi 4"/><category term="esxi 6.0"/><category term="fastcgi"/><category term="git"/><category term="google"/><category term="iis"/><category term="jquery plugins"/><category term="mssql"/><category term="openssl"/><category term="phonegap"/><category term="php-fpm"/><category term="problem"/><category term="python"/><category term="sflow"/><category term="vsphere"/><category term="webmin"/><category term="windows server"/><category term="windows server 2008"/><category term="小紅傘"/><category term="解決方法"/><category term="資安"/><category term="1909"/><category term="3com"/><category term="AVG"/><category term="BitDefender"/><category term="CPUExecutionProvider"/><category term="CodePen"/><category term="CoreMLExecutionProvider"/><category term="Dr.Web"/><category term="EMET"/><category term="FMS"/><category term="IIFE"/><category term="Microsoft"/><category term="Nginx"/><category term="Office"/><category term="Office 2016"/><category term="Sophos"/><category term="Tomcat"/><category term="acrobat"/><category term="adobe"/><category term="alert"/><category term="asp.net"/><category term="bind9"/><category term="bootstrap"/><category term="buntu"/><category term="capturing group"/><category term="certbot"/><category term="chrome"/><category term="cisco"/><category term="colorbox"/><category term="cs5.5"/><category term="cs6"/><category term="css tricks"/><category term="doctype"/><category term="email"/><category term="emoji"/><category term="error"/><category term="esbuild"/><category term="esxi 6.5"/><category term="event"/><category term="extensions"/><category term="factory reset"/><category term="freeradius"/><category term="ftp"/><category term="gmail"/><category term="google apps"/><category term="google translate"/><category term="google翻譯"/><category term="htaccess"/><category term="iis 8.5"/><category term="ios"/><category term="java"/><category term="kms"/><category term="let&#39;s encrypt"/><category term="lightbox"/><category term="llama.cpp"/><category term="localLLM"/><category term="mailto"/><category term="mdn"/><category term="minimist"/><category term="mqtt"/><category term="msi afterburner"/><category term="mssql 2012"/><category term="named"/><category term="office365"/><category term="onblur"/><category term="onnxruntime"/><category term="pfx"/><category term="pop3"/><category term="rabbitmq"/><category term="redis"/><category term="regexp"/><category term="rewrite"/><category term="rivatuner"/><category term="rtmp"/><category term="smtp"/><category term="splunk"/><category term="sudo"/><category term="sudoer"/><category term="switch"/><category term="symbolic link"/><category term="sysfsutils"/><category term="tls"/><category term="ubuntu lts"/><category term="urlencode"/><category term="usb病毒"/><category term="using"/><category term="utf8"/><category term="visual studio"/><category term="visual studio code"/><category term="vscode"/><category term="windows server 2003"/><category term="wsl"/><category term="yum_update"/><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="電影"/><title type='text'>死狐狸的單行本</title><subtitle type='html'>狐狸的腳是滑的…&lt;br&gt;&#xa;但死狐狸呢？哈哈…腦袋中想的東西是滑溜溜的…</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>289</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-6668698982857710868</id><published>2026-06-06T15:25:37.331+08:00</published><updated>2026-06-06T15:25:37.331+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="llama.cpp"/><category scheme="http://www.blogger.com/atom/ns#" term="localLLM"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="wsl"/><title type='text'>在 Ubuntu on WSL2 裡打造 localLLM 的環境</title><summary type="text">硬體環境CPU: 9800x3dRAM: 64GBGPU: Nvidia 3080-ti 12GOS: Windows 11準備Ubuntu 24.04 on WSL2sudo apt updatesudo apt upgradesudo apt install build-essential cmake git wget python3-pip參考資料Getting Started with LLaMA.cpp (A Complete Guide)由此可知需要 cmakehttps://github.com/ggml-org/llama.cpp主要以此 repo 為主Hugging Face – The AI community building the future.下載 model 的地方llama.cpp 有&quot;-hf&quot;可以直接指定 model 的方式https://</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/6668698982857710868/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/6668698982857710868' title='4 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/6668698982857710868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/6668698982857710868'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2026/06/ubuntu-on-wsl2-localllm.html' title='在 Ubuntu on WSL2 裡打造 localLLM 的環境'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEj89r3JUukFejAfINQXTrzSDaL0uLBJbEY2UcTZwWFakAJc_BFeGFBWncM_hz4EZu9LLlKlZnHCHaJ2iSCkFuGWdakGDikm36OusmQZDHD7vHtPBREqOTP1XZAa-XFBsZZKkerQFBxf9kyIJi3RZkD5de0jgX0iqTVCPEfQ_VE_gnod0_a_GJY-t3lDwLoH=s72-w400-h188-c" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-9164367186083894610</id><published>2024-12-28T14:12:00.005+08:00</published><updated>2024-12-28T14:15:22.841+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="docker"/><category scheme="http://www.blogger.com/atom/ns#" term="mssql"/><title type='text'>在用 Docker 架設 MSSQL 時，容器的啟用會警告 [Error response from daemon: Ports are not available...]</title><summary type="text">在網路上查到的文章大至上得到的說明是，這是因為 windows 可能在某個版本的升級開始會把某些 port 或某個範圍的 port 給「保留」，其中就有包含 mssql 一般慣用的 1433/tcp，而 windows 的一個 HNS 的服務有把一些 port 給「保留」但也有一說是因為 windows 本身使用了 Hyper-V 把 1433/tcp 給保留了起來我比較認為是 hyper-v 的問的，因為我目前的 docker 並不是運行在 WSL2 的，還是在比較早期要用 hyper-v 的虛擬機上，所以我比較認為是 hyper-v 引起的故，如果有跟我遇到一樣問是的，可以先用netsh interface ipv4 show excludedportrange protocol=tcp的指定來列出被「保留」下來的 tcp port&amp;nbsp;(注: 上述的指令要用「管理員身份」去</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/9164367186083894610/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/9164367186083894610' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/9164367186083894610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/9164367186083894610'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2024/12/docker-mssql-error-response-from-daemon.html' title='在用 Docker 架設 MSSQL 時，容器的啟用會警告 [Error response from daemon: Ports are not available...]'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-121609838530662280</id><published>2024-08-17T01:23:00.003+08:00</published><updated>2024-08-17T01:23:23.048+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>[Python] pip install 套件時，最後出現`error: Microsoft Visual C++ 14.0 or greater is required`的解決方式</title><summary type="text">主要是在 windows 的環境使用 python 安裝套件…有些套件安裝有相依的其他套件時，可能會出現一個訊息error: Microsoft Visual C++ 14.0 or greater is required. Get it with &quot;Microsoft C++ Build Tools&quot;: https://visualstudio.microsoft.com/visual-cpp-build-tools/然後，在下載`Build Tools`後，卻往往不知道到底是要選擇安裝什麼…這裡提供一個以下載的檔案`vs_buildtools.exe`為主的安裝指令vs_buildtools.exe --norestart --passive --downloadThenInstall --includeRecommended --add </summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/121609838530662280/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/121609838530662280' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/121609838530662280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/121609838530662280'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2024/08/python-pip-install-error-microsoft.html' title='[Python] pip install 套件時，最後出現`error: Microsoft Visual C++ 14.0 or greater is required`的解決方式'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-7374891908531461134</id><published>2024-06-01T14:28:00.002+08:00</published><updated>2024-06-01T14:28:24.350+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="amazon ec2"/><category scheme="http://www.blogger.com/atom/ns#" term="NOFILE"/><category scheme="http://www.blogger.com/atom/ns#" term="rescue"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>[救援記事] EC2 Ubuntu 20.04 - systemd-journald[xxx]: File /run/log/journal/[...]/system.journal corrupted or uncleanly shut down, renaming and replacing.</title><summary type="text">前言: 這是公司的一台在未來要做主要的 DB server，幾天前 instance 才創建好，老闆就讓我有空在上面開始佈署相關的軟體跟設定，大至上在前一、兩天就都已經設定好了，因為並沒有急著上線使用，所以就先擺著，然後我也一樣時不時的上去刷系統更新，就前最近，跟前一篇救援記事提到的公司的測試機的狀況一下，系統更新完重開機就連不到了狀況: 其這一台發生問題的時間比測試機早，這一台是我在上班時間發生的狀況，測試機是同一天的半夜…只不過，aws 的 ebs 只能掛載在同一個「可用區域」的 instance 中，這台 DB instance 的可用區域我老闆建置在別的地方，跟公司原本的可用區域的位置不同，所以一開始我沒辦法把 db 的 ebs 掛到另一個區域的救援機上，所以之前只能先救援測試機就在凌晨把測試機救援回來就有相對的信心來處理 DB server救援操作啟動 DB instance</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/7374891908531461134/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/7374891908531461134' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/7374891908531461134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/7374891908531461134'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2024/06/ec2-ubuntu-2004-systemd-journaldxxx.html' title='[救援記事] EC2 Ubuntu 20.04 - systemd-journald[xxx]: File /run/log/journal/[...]/system.journal corrupted or uncleanly shut down, renaming and replacing.'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-6246849514702406423</id><published>2024-06-01T03:13:00.004+08:00</published><updated>2024-06-01T16:11:32.776+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="amazon ec2"/><category scheme="http://www.blogger.com/atom/ns#" term="NOFILE"/><category scheme="http://www.blogger.com/atom/ns#" term="rescue"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>[救援記事] EC2 buntu 20.04 - systemd-udev-trigger.service: Failed to adjust resource limit RLIMIT_NOFILE: Operation not permitted</title><summary type="text">*心得: 好累，以後要切記進行系統更新前保險的做法是做一個快照前言: 這是公司的一台測試區的環境，Ubuntu 20.04 LTS，這一台從開始就是公司讓我去建置的，所以我大概五至十天就會上來刷更新，但就在最近，有 intel-microcode, libc-bin, libc-dev-bin, libc6, libc6-dev, libtss2-esys0, locales, ubuntu-advantage-tools, ubuntu-pro-client, ubuntu-pro-client-l10n 列出要更新，所以我一如往常的就進行更新，然後因為 intel-microcode 的關係，所以會需要重開機，但我進行重開機之後就再也連不到了狀況: 重開機後我 ssh 就一直連不到，而且重點是發生在半夜…沒辦法，我只能先向老闆報告，也說明我更新的操作是一直以來就有，但唯獨這次有狀況…</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/6246849514702406423/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/6246849514702406423' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/6246849514702406423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/6246849514702406423'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2024/06/ec2-instance-ubuntu-2004-apt-upgrade.html' title='[救援記事] EC2 buntu 20.04 - systemd-udev-trigger.service: Failed to adjust resource limit RLIMIT_NOFILE: Operation not permitted'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-9100735318842472585</id><published>2024-05-29T11:31:00.001+08:00</published><updated>2024-05-29T11:31:05.319+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="certbot"/><category scheme="http://www.blogger.com/atom/ns#" term="let&#39;s encrypt"/><category scheme="http://www.blogger.com/atom/ns#" term="憑證"/><title type='text'>[Certbot] ImportError: cannot import name &#39;appengine&#39; from &#39;urllib3.contrib&#39; ...</title><summary type="text">*Certbot 是一個由 Let&#39;s Encrypt 的組織維護的一個用來申請加密憑證的工具之前公司網站的 https 憑證是透過 Certbot 的來輔助申請使用的，公司網站的系統是 Ubuntu 18.04 LTS ，在安裝好 Certbot 後，它會在 /etc/cron.d 中增加一個 certbot 的排程，定期是每天的「0 */12 * * *」會執行 renew 檢測操作憑證一般申請後的有效期是三個月，但一般應該是可以提前幾天就讓你 renew 展延而最近我會發現異常是因為在五月初收到來自 Let&#39;s Encrypt Expir 寄過來告知還有 xx 天就要過期了，要記得去 renew ，當時我就覺得怪怪的，因為公司這個憑證已經運行有幾年了，我還是第一次收到通知信，不過當時我還有別的事在忙，想說因為有排程會去自動 renew 也就沒有多想直到前幾天我又收到同一封告知即將要</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/9100735318842472585/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/9100735318842472585' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/9100735318842472585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/9100735318842472585'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2024/05/certbot-importerror-cannot-import-name.html' title='[Certbot] ImportError: cannot import name &#39;appengine&#39; from &#39;urllib3.contrib&#39; ...'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-4222233091881990449</id><published>2024-05-25T01:32:00.002+08:00</published><updated>2024-05-25T01:35:22.446+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mqtt"/><category scheme="http://www.blogger.com/atom/ns#" term="rabbitmq"/><title type='text'>[MQTT] 1 - 試著來架設 MQTT - RabbitMQ</title><summary type="text">*先說個前言，其實在下個人覺得，直接用 docker 來創建可以方便許多前言2: 啥是 MQTT？是 Message Queuing Telemetry Transport 的縮寫，叫做「訊息隊列遙測傳輸」的意思，但這是啥東東，其實詳細的說明在下也不是很會講，但在下粗略的理解，就是訊息即時相關傳送、接收的意思，透過在指定的 Topic(主題) 進行發布(Publish)訊息，而有關聯的終端可以訂閱(Subscribe)想要接收訊息的 Topic 來取得發布的訊息，而 MQTT 就是為了這個操作而設計出來的協定。前言3: MQTT 除了可以透過 MQTT 的協定來傳送資料，它另一種傳送的方式是 WebSockets，所以對於網頁前端來說，技術上也是比較友善，上手門檻不會太高；也因為是可以 over WebSockets 的關係，所以 MQTT 的技術是可以開發成即時通訊的架構，而且還有 </summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/4222233091881990449/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/4222233091881990449' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/4222233091881990449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/4222233091881990449'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2024/05/mqtt-1-mqtt-rabbitmq.html' title='[MQTT] 1 - 試著來架設 MQTT - RabbitMQ'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-236740464829938513</id><published>2024-04-28T00:20:00.001+08:00</published><updated>2024-04-28T00:20:14.462+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CoreMLExecutionProvider"/><category scheme="http://www.blogger.com/atom/ns#" term="CPUExecutionProvider"/><category scheme="http://www.blogger.com/atom/ns#" term="onnxruntime"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>[Python] 使用 CnOcr 進行辨識時出現在 Windows/Linux 和 MacOSX 的結果不一樣的情況</title><summary type="text">最近公司的案子有要使用 OCR 辨識，然後技術方面是要用 python 去處理，公司的 RD 就利用 CnOcr 開發了一個程式…然後最近這個案子的相關成員就跟老闆匯報進度跟問題，在會後老闆就在跟 RD 討論問題的部份，然後老闆就讓 RD 來找在下一起討論，看看我有沒有想法。這邊遇到的問題是這樣的因為 RD 在轉交辨識程式給案子其他的開發者時，有一位後端反應該程式運行時有狀況，無法正常辨識…先說明一下，該程式是要辨識表格中的數據，然後回傳某幾欄跟列的值，而遇到問題的後端是運行程式後，最後出現錯誤是『Indexerror: list index out of range』我說: 這不就很明顯，就是辨識完後的結果並不存在指定的 index 位置RD說: 是，但這不太可能，同一個程式用同一個模型去辨識同一個檔案，我在自己的環境跑是正常的我說: 那有確定後端那邊的環境，python 安裝的套件的</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/236740464829938513/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/236740464829938513' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/236740464829938513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/236740464829938513'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2024/04/python-cnocr-windowslinux-macosx.html' title='[Python] 使用 CnOcr 進行辨識時出現在 Windows/Linux 和 MacOSX 的結果不一樣的情況'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-2230015616844880984</id><published>2024-03-24T18:34:00.002+08:00</published><updated>2024-03-24T18:34:09.523+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="docker"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>[Windows] docker desktop 4.26.0 開始會遇到 container 在啟動後維持了一定時間(大概30分鐘)時，外部host就無法對該容器進行操作</title><summary type="text">先說明，這有可能只是在下自己遇到的情況…就是，某天在下 Windows 11 當時使用的 docker desktop 是在 4.25.0 然後更新到 4.26.0 時發生了一些奇怪的問題…先說明在未更新前的環境os: win11cpu: amd ryzen 2700xram: 2 * 16Gapp: docker desktop 4.25.0containers: ubuntu 20.04 lts(內裝了 apache, php, mysql, phpmyadmin)因為我大部份進行開發都是在公司上班時用工作機(筆電)，當時工作機的 docker desktop 是更新到 4.25.2，家裡的桌機主要是為了在家工作時可以拿來開發，所以平時 docker desktop 我是不太會去更新然後就有天看到有提醒有新版本 4.26.0 可以更新，我也沒想太多，就進行動作，然後更新完就把 </summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/2230015616844880984/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/2230015616844880984' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/2230015616844880984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/2230015616844880984'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2024/03/windows-docker-desktop-4260-container.html' title='[Windows] docker desktop 4.26.0 開始會遇到 container 在啟動後維持了一定時間(大概30分鐘)時，外部host就無法對該容器進行操作'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-617528940498009849</id><published>2024-03-23T20:20:00.003+08:00</published><updated>2024-03-24T17:55:02.366+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="docker"/><title type='text'>docker-compose 在 windows 環境該如何在 volumns 中設定掛載外部路徑</title><summary type="text">在 docker run 建立 container 的指令中，可以用 &quot;-v {host-path}:{container-host-path}&quot; 的方式來掛載主機路徑(host-path)至容器路徑(container-host-path)。而主機路徑可以直接用絕對路徑的寫法，像 &quot;-v D:\abc:/var/www/html&quot;...但，這方式在 docker-compose.yml 的 volumns 中這樣寫雖然不會報錯，但容器路徑 /var/www/html 卻會是空的，我假設 docker-compose.yml 中是這樣寫的(容器路徑我是假設的)volumns:&amp;nbsp; - &quot;D:\abc:/var/www/html&quot;&amp;nbsp; - &quot;./def:/var/www/html2&quot;&quot;./def&quot; 是以 docker-compose.yml 這個檔案的路徑開始中的 def </summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/617528940498009849/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/617528940498009849' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/617528940498009849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/617528940498009849'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2024/03/docker-compose-windows-volumns.html' title='docker-compose 在 windows 環境該如何在 volumns 中設定掛載外部路徑'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-7842057576658686085</id><published>2024-03-23T09:36:00.002+08:00</published><updated>2024-03-23T09:36:52.661+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="docker"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><title type='text'>MySQL: ERROR...Aborted connection...to db: unconnected user:... host:... (init_connect command failed)... MySQL server has gone away!!</title><summary type="text">呃，沒錯，mysql 又遇坑了不過遇上的前因是…我在把 apache, mysql, php-fpm, phpmyadmin 利用 docker 來運行在各自專屬的 container 上時，在 phpmyadmin 登入後所出現的訊息因為這作法我沒有特別在 mysql 的 container 中去指定我自己優化的 mysql.cnf，而是改用 command 的命令加載去啟動的，所以我在 docker-compose.yml 中，mysql 的 command 的部份我有用到command: [...,&#39;--init_connect=&quot;SET NAMES utf8mb4&quot;&#39;,&#39;--init_connect=&quot;SET collation_connection = utf8mb4_unicode_ci&quot;&#39;]然後 docker-compose up 的過程是沒什麼問題，當用 </summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/7842057576658686085/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/7842057576658686085' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/7842057576658686085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/7842057576658686085'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2024/03/mysql-erroraborted-connectionto-db.html' title='MySQL: ERROR...Aborted connection...to db: unconnected user:... host:... (init_connect command failed)... MySQL server has gone away!!'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-371110682159914059</id><published>2023-12-05T02:38:00.005+08:00</published><updated>2023-12-05T02:38:42.139+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><title type='text'>MySQL 沒有特別注意的 Collation 問題</title><summary type="text">這情況是一個我沒有特別發現，但是當出現錯誤時卻花了大把的時間 trace &amp;amp; debug 的事…事由：&amp;nbsp; &amp;nbsp; 我有兩個表，就叫 a 跟 b 好了a {&amp;nbsp; `id`: big integer, auto_increment, primary key,&amp;nbsp; `sn`: varchar(50), utf8mb4_bin, unique key}b {&amp;nbsp; `id`: big integer, auto_increment, primary key,&amp;nbsp; `a_id`: big integer, foreign key references `a`.`id`,&amp;nbsp; `sn`: varchar(50), utf8mb4_unicode_ci, unique key}我是後面接手維護的，我進行調整 a/b 表的 sn 的計算，利用</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/371110682159914059/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/371110682159914059' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/371110682159914059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/371110682159914059'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2023/12/mysql-collation.html' title='MySQL 沒有特別注意的 Collation 問題'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-6919353651619878534</id><published>2023-03-08T22:55:00.005+08:00</published><updated>2023-03-08T22:55:32.583+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Laravel"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><title type='text'>MySQL 遭遇奇怪的 VIEW ERROR 1356 view &#39;xxx&#39; references invalid table(s) or column(s) or function(s) or definer/invoker...</title><summary type="text">&amp;nbsp;環境說明windows server 2019apache 2.4mysql 8.0.28Laravel 8, php 7.4---吃完晚餐後，突然接到老闆的 line call 說客戶系統那邊有關 mes 的功能頁面都會出現 server error 的 alarm 訊息，讓我去看看查看 laravel.log 後發現反饋的訊息是如標題的view &#39;xxx&#39; references invalid table(s) or column(s) or function(s) or definer/invoker...的訊息看到就利用 CLI 連入 mysql engine 查看 user 權限，但利用 mysql information_schema 查權限，發現都沒有奇怪的地方。該套系統除了客戶的環境有用，在公司的 aws 的環境上也有用，但沒有同樣的問題發生。後來直接針對一頁</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/6919353651619878534/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/6919353651619878534' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/6919353651619878534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/6919353651619878534'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2023/03/mysql-view-error-1356-view-xxx.html' title='MySQL 遭遇奇怪的 VIEW ERROR 1356 view &#39;xxx&#39; references invalid table(s) or column(s) or function(s) or definer/invoker...'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-2356670128615751110</id><published>2022-10-27T22:04:00.003+08:00</published><updated>2022-10-27T22:04:26.228+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="capturing group"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="regexp"/><title type='text'>MySQL 5.7 REGEXP 的坑，不支援 Capturing Group ( )</title><summary type="text">這是在案子上遇到的一次很奇異的狀況…先描述環境a 區mysql 5.7.40b 區mysql 8.0.31Localmysql 8.0.31在下的 case 是要在過濾出「不是以 A123 為開頭編號」，要達成這樣的查詢語句(在下只列出 where clause)WHERE `sn` NOT LIKE &#39;A123%&#39;WHERE `sn` REGEXP &#39;^(?!A123).+&#39;WHERE `sn` NOT REGEXP &#39;^A123&#39;在下在local開發時，使用 2 的查詢子句，能正確的查詢到結果，然後傳上 b區 要交由 pm 測試，也正常…所以在下就很放心的直上到 a區 給客戶測，但錯就錯在自己傳上去 a區 時沒馬上自己試試，結果當天下午 pm 就告知客戶有反應有一個功能查出來的資料都是空的，但明明檢查了一下至少會有五、六筆資料的才對，要在下檢查一下。在下先是看 local 上的版本</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/2356670128615751110/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/2356670128615751110' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/2356670128615751110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/2356670128615751110'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2022/10/mysql-57-regexp-capturing-group.html' title='MySQL 5.7 REGEXP 的坑，不支援 Capturing Group ( )'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-4806243122404398129</id><published>2022-09-29T01:59:00.001+08:00</published><updated>2022-09-29T01:59:13.997+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="event"/><category scheme="http://www.blogger.com/atom/ns#" term="html5"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>在 input + datalist 情況下如果確定值的切換是由 datalist 的 option 而來的？</title><summary type="text">
  See the Pen 
  Input + datalist + trigger by cheaster43 (@cheaster)
  on CodePen.


以 codepen 所示，主要是利用 input 的 keydown 事件來進行，真的實際在 input 輸入值時，事件的型式會是 keyboardEvent ，若是利用 datalist 的選項來點選的，仍會觸發 keydown 的事件，只是型式就不是 keyboardEvent 了。比較能利用的方式是確認事件發生時所帶的資料中有沒有 key 這屬性，如果沒有就是透過 datalist 進行的。雖然，按理來說應該是在 input 去 listen 值 onchange 的事件就行，我本來一開始的寫法也是如此，但因為實際上我真實的案例會是 datalist 的 option 會因為 input 的值的變動而向 api</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/4806243122404398129/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/4806243122404398129' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/4806243122404398129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/4806243122404398129'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2022/09/input-datalist-datalist-option.html' title='在 input + datalist 情況下如果確定值的切換是由 datalist 的 option 而來的？'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-3013151237148065829</id><published>2022-07-28T20:19:00.002+08:00</published><updated>2022-07-31T10:43:28.697+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="alert"/><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="chrome"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="onblur"/><title type='text'>一個奇異的坑：window.alert() 作用在 android chrome app 中</title><summary type="text">&amp;nbsp;今天在協助同事處理一個問題，此問題是這樣的網頁中使用 onScan.js 來做 barcode scanner 的動作，同事的操作的殾用帶有 scanner 功能的 android pda 開同事寫好的網頁，預設的動作是：利用 scanner 掃描某一編號而成的 QRcode，由 scanner 解析完的文字拿去到一個 json 中搜尋，若找不到資料就回饋 window.alert(&quot;查無資料&quot;) 後，就進行 window.location.reload()此狀況，如果是在筆電或桌機的環境，使用 chrome 開網頁，然後電腦用的 scanner 是用 usb 外接的，以上的操作一切正常。但改用帶有 scanner 的 android pda 時，window.alert() =&amp;gt; window.location.reload() 前的動的作一切正常，但 reload(</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/3013151237148065829/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/3013151237148065829' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/3013151237148065829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/3013151237148065829'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2022/07/windowalert-android-chrome-app.html' title='一個奇異的坑：window.alert() 作用在 android chrome app 中'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-7476745341347925533</id><published>2022-05-11T08:04:00.002+08:00</published><updated>2022-05-11T08:04:49.062+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="amazon ec2"/><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="rescue"/><category scheme="http://www.blogger.com/atom/ns#" term="sudo"/><category scheme="http://www.blogger.com/atom/ns#" term="sudoer"/><title type='text'>壞習慣記錄_01 - 不要用文字編輯器改 /etc/sudoers &amp; /etc/sudoers.d/*，要用 visudo</title><summary type="text">前言：這是新開的篇章，主要是要讓自己修正自己以前的壞習慣…XD如標題所示，在下知道這是老狀況了，但不得不說，人…果然不是可以被信任的生物狀況發生是這樣的…因為一些狀況，在下想要讓 A 帳號可以使用 sudo -u B 來執行某個程式(假設要用python)，但要不用需入密碼確認，所以就要去增加A ALL=(B) NOPASSWD: /usr/bin/python在 /etc/sudoers 中…而且，在下本來還想到以前的經驗是不要用文字編輯器直接改 /etc/sudoers ，以免造成系統鎖住 sudo 指令，然後想到現在有 /etc/sudoers.d 可以個別載入…然後就用 nano 開了 /etc/sudoer.d/A 來寫上述的東西…一存檔就屎了…當下是不緊張，因為以前的經驗是可以用pkexec visudo來修正…但在下是在 AWS EC2 的環境，ubuntu 的帳號是用 </summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/7476745341347925533/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/7476745341347925533' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/7476745341347925533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/7476745341347925533'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2022/05/01-etcsudoers-etcsudoersd-visudo.html' title='壞習慣記錄_01 - 不要用文字編輯器改 /etc/sudoers &amp; /etc/sudoers.d/*，要用 visudo'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-2098553927704637368</id><published>2022-05-06T07:12:00.001+08:00</published><updated>2022-05-06T07:12:08.661+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="buntu"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="redis"/><category scheme="http://www.blogger.com/atom/ns#" term="sysfsutils"/><title type='text'>Ubuntu Redis-server 啟動警告的修正</title><summary type="text">最近開始想玩玩 redis，所以開始進行安裝安裝完後第一次啟動算正常，但當檢查啟動記錄( /var/log/redis/redis-server.log )時有看到以下的警告# Server initialized# WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add &#39;vm.overcommit_memory = 1&#39; to /etc/sysctl.conf and then reboot or run the command &#39;sysctl vm.overcommit_memory=1&#39; for this to take effect.# WARNING you have Transparent Huge </summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/2098553927704637368/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/2098553927704637368' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/2098553927704637368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/2098553927704637368'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2022/05/ubuntu-redis-server.html' title='Ubuntu Redis-server 啟動警告的修正'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-5706912355177601535</id><published>2022-05-05T00:56:00.003+08:00</published><updated>2022-05-05T00:56:30.167+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><title type='text'>在 mysql_secure_installation 一直卡在設定新密碼給 root 中</title><summary type="text">在下是在使用 Ubuntu 20.04 LTS 安裝 mysql 8.0.29 時遇到以下狀況$&amp;gt;: sudo mysql_secure_installationSecuring the MySQL server deployment.Connecting to MySQL using a blank password.VALIDATE PASSWORD COMPONENT can be used to test passwordsand improve security. It checks the strength of passwordand allows the users to set only those passwords which aresecure enough. Would you like to setup VALIDATE PASSWORD </summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/5706912355177601535/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/5706912355177601535' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/5706912355177601535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/5706912355177601535'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2022/05/mysqlsecureinstallation-root.html' title='在 mysql_secure_installation 一直卡在設定新密碼給 root 中'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-3940037389698299990</id><published>2022-05-04T00:37:00.007+08:00</published><updated>2022-05-04T00:56:09.570+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="minimist"/><category scheme="http://www.blogger.com/atom/ns#" term="npm"/><title type='text'>解決 npm install 時出現警告 minimist 風險問題</title><summary type="text">應該有很有一段時間，在手上的專案在部署時，進行「npm install」，雖然過程沒有什麼問題，但最後都會出現一些風險警告，然後輸入「npm audit」查看時，會發現排在第一個的都是minimist &amp;lt;= 1.2.5Serverity: ciriticalPrototype Pollution in minimist - xxxxxxxx...雖然是警告，但這層級有到 ciritical …一直讓我覺得要解決(但其實經手了幾個案子…現在新案子開啟時我才想到…)那這邊提供兩個解法https://sca.analysiscenter.veracode.com/vulnerability-database/security/prototype-pollution/javascript/sid-34731其實應該不少人看到這裡會覺得「呃，我的 packages.json 的 </summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/3940037389698299990/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/3940037389698299990' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/3940037389698299990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/3940037389698299990'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2022/05/npm-install-minimist.html' title='解決 npm install 時出現警告 minimist 風險問題'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-6042552364413072278</id><published>2022-05-01T10:13:00.002+08:00</published><updated>2022-05-01T13:26:51.130+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="Laravel"/><category scheme="http://www.blogger.com/atom/ns#" term="npm"/><title type='text'>Larave 8 使用 terser-webpack-plugin 在 webpack 時用 esbuild 進行 minify</title><summary type="text">用 Laravel 的朋友們應該都知道，無論用 vue、react 或單純 js、css 都可以經由 webpack.mix.js 來打包成 webpack 或單純就是把上述的 code 集收起來…不過，開發到一定時日或用的套件越來越多時，這個 pack …就會越來越肥大。雖說在發佈成 production 時會自帶 minify，但不知道有沒有和在下一樣的，因為案子是多 pg 合作，pg 有全端或單後端或單前端…前端目前有分 js + jq 和 js + vue3 的，在下是全端，在前端雖會用 vue，但目前來說還是 js + jq 是主力；但目前案子很常是 npm run watch 或 npm run dev 出來的 vue 是可以運作的，但發佈成 npm run prod 後就壞掉了…所以案子都是以 development 的方式在運行…但，匯出來的 js 頗肥呀。在下原本用來</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/6042552364413072278/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/6042552364413072278' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/6042552364413072278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/6042552364413072278'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2022/05/larave-8-terser-webpack-plugin-webpack.html' title='Larave 8 使用 terser-webpack-plugin 在 webpack 時用 esbuild 進行 minify'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-8183695756881819881</id><published>2022-05-01T08:22:00.006+08:00</published><updated>2022-05-01T13:26:25.443+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="esbuild"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="npm"/><title type='text'>利用 esbuild 指令來對 js, css 進行 minify</title><summary type="text">esbuild 是個快速又不錯用的 javascript 打包工具，速度快就不說了，還可以幫你檢查語法。可以利用以下參數來進行 minify (這個應該要叫壓縮還是縮小…或，就是檔案容量縮小)esbuild --charset=utf8 index.js --minify --minify-whitespace --minify-syntax --drop:debugger --drop:console --legal-comments=none --sourcemap --outfile=index.min.js以下把一些特別參數拿出來說明一下--minify-whitespae把多餘空格拿掉--minify-syntax簡化語法--legal-comments=none把註解拿掉--out-extension:.js=.min.js轉換後的是存為 xxx.min.js此參數與參數「-</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/8183695756881819881/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/8183695756881819881' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/8183695756881819881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/8183695756881819881'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2022/05/esbuild-js-css-minify.html' title='利用 esbuild 指令來對 js, css 進行 minify'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-8096407008981764911</id><published>2021-08-04T01:53:00.006+08:00</published><updated>2021-08-04T01:57:16.268+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MariaDB"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="xampp"/><title type='text'>如何將 xampp-win 中的 mariadb 換成 mysql-community 的版本</title><summary type="text">&amp;nbsp;xampp-win 中打包的資料庫好像從某個版本開始就改成 mariadb 了，雖然 mariadb 跟 mysql 在大部份的狀況下是相似的，但…mariadb好像到目前的版本(寫文章時mariadb 最新的是10.6.3)在json的使用上跟mysql不太一樣，但我比較習慣用mysql的。那因為在 linux 中大部份的來源庫好像是mysql的版本，所以比較沒有要從mariadb換mysql的要求…但因為目前service架在windows中，所以xampp-win是用mariadb，就找了一下資料，把mariadb換成mysql engine的方式。環境說明：xampp-winapache: 2.4.48db: mariadb 10.4.20要更換為mysql-community 8.0.26免安裝的版本mariadb =&amp;gt; mysql先停止目前正在使用的</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/8096407008981764911/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/8096407008981764911' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/8096407008981764911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/8096407008981764911'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2021/08/xampp-win-mariadb-mysql-community.html' title='如何將 xampp-win 中的 mariadb 換成 mysql-community 的版本'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-1901732829679114468</id><published>2021-06-24T00:10:00.006+08:00</published><updated>2021-06-24T00:10:29.678+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><title type='text'>jQuery - event.originalEvent: 用來判定是否由user實際操作產生或是由script操作產生</title><summary type="text">標題有些繞口…稍微解釋一下，就是，要怎麼判斷在 jQ 那些 $(selector).on(....) 事件觸發的源頭，是使用者自己的操作，是指真實的操作，透過 I/O ，而不是 script 去模擬出來的。網路上找了一些，大概是有分兩個…1) event.isTrigger2) event.orignalEvent大至上看了一下介紹後，我是選擇使用 event.orignalEvent === undefined 的條件下去確認它是由 script 模擬。event.isTrigger 似乎是有在一些情況下時會異常!!!</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/1901732829679114468/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/1901732829679114468' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/1901732829679114468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/1901732829679114468'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2021/06/jquery-eventoriginalevent-userscript.html' title='jQuery - event.originalEvent: 用來判定是否由user實際操作產生或是由script操作產生'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8945098301149388521.post-714432389588186795</id><published>2021-03-26T01:37:00.006+08:00</published><updated>2021-04-01T18:41:08.638+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><title type='text'>git note 2 - 以指定分支中的特定檔案取代目前分支的同一個檔案</title><summary type="text">有時候在專案中想開發某功能而又想保留目前專案的可用性，在 git 中會以用 branch (分支) 的方式來進行，等此分支中該功能已開發完整後，再 merge (合併) 到原本的專業主線 (main, master) 來更新新功能。可是，有時候在分支開發時發現專案中其他的功能有一些小 BUG 在還沒開分支前就已經存在，但在現在有開分支的情況下，改了分支中的 BUG 但主線的卻還是舊的，只能 checkout (切換) 到主線後再改一次同一個 BUG 的部份才行。這種狀況，一般有幾種處理的方式：回到主線，然後把分支合併回主線這會有另一個問題是本來分支主要是要開發新功能的部份可能會在還沒有開發完整的情況下就合併到主線上，結果造成主線不協調為了要再繼續改新功能，還需要再開分支再改先複製好在分支為了修改 BUG 而影響的檔案的內容，再切換到主線時再將那一些檔案的內容貼上應該這種沒啥大問題，主要</summary><link rel='replies' type='application/atom+xml' href='http://cheaster.blogspot.com/feeds/714432389588186795/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8945098301149388521/714432389588186795' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/714432389588186795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8945098301149388521/posts/default/714432389588186795'/><link rel='alternate' type='text/html' href='http://cheaster.blogspot.com/2021/03/git-note-2.html' title='git note 2 - 以指定分支中的特定檔案取代目前分支的同一個檔案'/><author><name>死狐狸</name><uri>http://www.blogger.com/profile/13935595637918676031</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZr0pZTQFEGYp6BZJprcu6G_26RyQ28KCKDQd7JBPa9gZdpyBE9BC8gfsdBmSeihCNzp6OCw5eiveoO4K4-yICbQ9VLN6uEy7evTH2QcfGBZyoPCVG7piav0nvVxe9tQ/s220/死狐狸.jpg'/></author><thr:total>0</thr:total></entry></feed>