2020年12月21日 星期一

RLE(Run-length encoding)

多媒體資料壓縮常用的方法,常與Huffman code並用
例如一個字串
aaabbcccccdddeee=>2ab2c5d3e3
RLE就是將一連串的資料改以兩部分來顯示,前面是symbol,後面是重複次數, run length), 實務上使用
會出現一次的字元長度無需紀錄

2020年12月18日 星期五

Google Chrome Helper (Renderer) caused High CPU usage - Troubleshooting PartII

  1. first, use Activity Monitor to see the process id
  2. use ps command to get the full parameter command, for example the process id is 2575 ps -eaf |grep 2575
    501 2575 977 0 9:35AM ?? 13:41.86 /Applications/Google Chrome.app/Contents/Frameworks/Google Chrome Framework.framework/Versions/87.0.4280.88/Helpers/Google Chrome Helper (Renderer).app/Contents/MacOS/Google Chrome Helper (Renderer) --type=renderer --field-trial-handle=1718379636,11371335434017450687,8516321483698338535,131072 --lang=en-US --num-raster-threads=4 --enable-zero-copy --enable-gpu-memory-buffer-compositor-resources --enable-main-frame-before-activation --renderer-client-id=32 --no-v8-untrusted-code-mitigations --shared-files --seatbelt-client=443
  3. take the example, we see there is --enable-zero-copy parameter
  4. we can continue to check chrome settting. chrome://flags/ 3.Disable "Enable Render Level Data Use Optimization

2020年12月17日 星期四

Google Chrome Helper (Renderer) 在Mac OS 佔用過高的CPU問題

最近筆電風扇狂轉,發現幾乎都是Google Chrome造成的,剛好最近很熱門的一個議題chrome is back 裡面提到的問題有兩個

1. 一個是chrome會自動更新,之前還曾經因為自動幫所有使用者更新,早成沒開啟SIP的系統無法開機,如果要關閉,可以考慮把/Library/LaunchAgents/裡面兩個含有keystone 關鍵字的daemon 關閉,就是額外增加一個Disabled

com.google.keystone.agent.plist
com.google.keystone.xpcservice.plist

2.佔用太多cpu問題,在chrome search bar上輸入

chrome://settings/content/unsandboxedPlugins
然後把原本 Ask when a site wants to use a plugin to access your coputer (recommned) 這選項關閉
即可把問題解決,缺點就是之後可能一些影片就不會在自動播放

2020年12月11日 星期五

ACK: 一個好用的檔案搜尋工具

用法:

ack option [搜尋文字]  [文件或目錄]

範例

-i —ignore-case 忽略大小寫
-v —invert-match 反轉比對,列出不含選擇字詞
-A —after-context 跟grep 用法想法,顯示比對到字詞的後幾行
-B —before-context 跟grep 用法想法,顯示比對到字詞的前幾行
—type 限制搜尋的特定type,可以搭配 --help-types

2020年12月7日 星期一

談『階級複製』

最近看者很多政二代,星二代,富二代一連串的浮出檯面創業出道,以前對這問題其實沒想太多,也沒太感嘆,但隨者年紀越大,會發現這階級複製根本也不是近代才出現,回頭去看我自己世代
出頭天的人其實本身也是富二代,甚至很多明星也是星二代,這類問題不是今日才出現,而是一直存在的事實,然後回頭想一想,對於自己小孩的教育,到底要如何,才能讓他們突破這個難以打破的階級複製包袱,我原本對小孩的要求

自學的能力:

安排時間的能力:

  • 對於緊急的事情,要仔細思考再動手,避免犯錯
  • 對於不急的事情,得趕快去做,不要拖延

How to restore a deleted onenote page

復原不小心誤刪的onenote