2022年6月7日 星期二
[Raspberry]安裝firefox
chrome雖然是raspberry預裝的瀏覽器,但竟然會無法登入google...
只好裝firefox
raspberry用的是firefox-esr
$ sudo apt-get install firefox-esr
本想裝來解決影片撥放卡頓問題,但似乎是無解
[Raspberry]安裝firefox
[Raspberry] Pi4 無法安裝套件,swap錯誤
錯誤訊息: dpkg: error processing package dphys-swapfile 之類的,沒有完整複製
解法: 關掉swap file
但不之為何,sudo無法關閉swap
$sudo su
#systemctl disable dphys-swapfile
[Raspberry] Pi4 無法安裝套件,swap錯誤
[raspbessy] 更改時區
2022年5月23日 星期一
Pi4在viewsonic螢幕上黑屏,沒訊號
pi4是一便宜好用的上網機
之前用Dell的螢幕搭配BerryBoot沒啥問題
今天換了viewsonic的螢幕螢幕就吃不到Pi4的訊號
查了一下發現可以在config.txt中加入
config_hdmi_boost=11
增強HDMI訊號就能順利看到畫面了(這個數值是越小越好)
--
但我一開始以為是berryboot死了,重新裝了一次,目前OS好像開不起來
Pi4在viewsonic螢幕上黑屏,沒訊號
2021年10月13日 星期三
[Raspbian]搜尋隱藏ssid
Raspbian用GUI看不到隱藏的ssid,也沒地方可以輸入
如果要連隱藏的ssid需要編輯
/etc/wpa_supplicant/wpa_supplicant.conf 檔案
>sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
檔案大概長這樣
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=TW
network={
ssid="mySSID"
scan_ssid=1
psk="PW"
key_mgmt=WPA-PSK
}
將network={}的內容改成欲連線的SSID
要注意要有 scan_ssid=1才會去連隱藏的SSID
我自己測的時候network={}只能有一組,因此需要先將原本的network={}刪除,否則重開機後新增的SSID會不見
完成之後存檔重開機
[Raspbian]搜尋隱藏ssid
2021年9月13日 星期一
Regular express正規化表示法好用網站
移動式冷氣使用心得,如何吹得涼,吹整晚耗電量
先說結論,在特定的條件下,移動式冷氣確實可以吹得涼,耗電量也可以接受。當住的地方無法安裝一般冷氣,不失為一個度過炎炎夏日,讓你一夜好眠的選擇。
今年夏天因為住的地方沒裝冷氣,所以就研究了一下移動冷氣。
移動式冷氣使用心得,如何吹得涼,吹整晚耗電量
Netflix集數卡住
最近在看斯卡羅,但不知怎麼搞得,明明更新到第十集了,我的Netflix卻停留在第二集
是可以繼續往下看,但要一集一集往下跳,好麻煩..
後來在Dcard上看到,原來只要登出在登入就能解決了!
實測成功!
Netflix集數卡住
2021年8月23日 星期一
2021年8月4日 星期三
resize /home without live CD / USB 重新分割 /home
OS: Ubuntu 18.04
前提 / 跟 /home(目標partition) 在不同partition
因為電腦一開始swap割太小,想重新分割/home,分點給swap
但電腦因為某些原因不能使用USB/CD boot...
看有個說法是可以用fdisk去割,但感覺毛毛的,之前割另一台raspberry pi,用fdisk割完就整台掛了..
想說還是GPart安全,但gpart會有/home沒卸載不能割的狀況
1. 建立新的 user gp
sudo useradd -s /bin/bash -d /gpHome -m -G sudo gp
2. 登出目前user,以新user登入
3. 卸載 /home
若嘗試sudo umount /home會得到 umount: /home: target is busy. 這時候可以用
sudo fuser -m /home查看誰鎖住了 /home 再用
sudo kill -9 pid去殺,或
sudo fuser -mvik /home再
sudo umount /home
4. gpart
gpart
resize /home without live CD / USB 重新分割 /home
2021年7月24日 星期六
c++ const method
一個method被標記為const 表示他不會改變所屬class的member,function若能被標記為const應盡量這麼做
class A{
int b;
void c(){
b = 0; // compiling error
};
};
c++ const method
pixel 3a navigation button die
I found sometimes my pixel 3a's navigation buttons die, sometimes include lower part of the keyboard, which is really annoying, make me can't go back to last page / home or typing.
Recently I found out it's cause by high temperature (but not extremely high, hence I'm still holding it by my hand), putting a usb fan behind it could release the situation.
pixel 3a 的鍵盤下半部(導航鍵與鍵盤下半部,包含倒退鍵) 有時候會失去作用或變得很遲鈍,最近發現是溫度造成的,將風扇在手機背面,一切就會復原了。但其實也不是多高溫,因為還能用手拿著..
pixel 3a navigation button die
2021年7月23日 星期五
Lowe's Ratio Test排除易混淆特徵點對應
再做特徵點對應的時候,若有重複的圖形,用local資訊提取的特徵很容易有錯誤的對應
所以可以用 Lowe's Ratio Test 排除易混淆的對應,意義上來說是如果有相近的對應就將該組對應排除
這個方法很簡單, Lowe在SIFT原始論文就有提出這個方法, 在7.1
https://www.cs.ubc.ca/~lowe/papers/ijcv04.pdf
L1,L2 是最相近的對應特徵點與二相近的對應特徵點對應分數
L2/L1 = RoD (ration of distance)
原始論文中建議設為0.8, 但可能做3D重建更介意false positive,設為0.5
Lowe's Ratio Test排除易混淆特徵點對應
Bag of visual words,TF-IDF
Bag of visual words (BOVW)是把影像用特徵來描述
譬如說用SIFT提取特徵,之後一張影像就用這些特徵來表示,並且也只保留這些特徵,
這可以用在影像特徵的萃取與比對
一張影像可以提取出許多字彙,直接用每個字彙出現的數量來描述影像是一種方式
而應用TF-IDF (Term freq. inverse document frequency )的技術,在此描述中加上字彙的稀有程度這項因素
t = (nid/nd) log(N/ni)
nid:字彙i出現在目標影像中的次數
nd :目標影像總字數
N:總影像數
ni:含有字彙i的影像數
(nid/nd)這項表示若這張影像的字彙數越少,每個字彙的權重越高
(log(N/ni))這項表示若這字彙越稀有,則這個字彙權重越高
接著再計算影像之間的cosine distance,
ref : https://www.youtube.com/watch?v=a4cFONdc6nc
ref :https://github.com/ovysotska/in_simple_english
Bag of visual words,TF-IDF
2021年7月22日 星期四
Ubuntu suspend problem
When using Ubuntu 18.04, there's always buggy blank screen / suspend action that force me to reboot my PC
The easiest one is blank the screen, than unplug your second screen, boom your PC die..
so I just change to xscreensaver
$ sudo apt-get install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra
then remove buggy gnome -screensaver
$ sudo apt-get remove gnome-screensaver
then search for startup and add an entry
Ubuntu suspend problem
Git traped?
I've a file in a Git control project that I've do some local change, and don't want it to be overwrite.
so I use
$ git update-index --skip-worktree <file-list>
to avoid the over write
but strange thing happen today when I'm trying to checkout another branch, Git ask me to commit / stash local change, but when I stash local change
git> No local change to save
but when I checkout
git > please commit your changes or stash them before you switch branches
my Git version is 2.30.2
so I can only
$ git update-index --no-skip-worktree <file-list>
then
$ git stash
$ git checkout
Git traped?
2021年5月28日 星期五
power point 調整圖片透明
power point 調整圖片透明
2021年5月27日 星期四
MPV ubuntu 下好用的播放器 video player
舊版本自訂熱鍵
自行compile
直接用第三方repository安裝
Hotkeys
MPV ubuntu 下好用的播放器 video player
2021年5月20日 星期四
[Ubuntu] Silver Searcher , a fast code searching tool
The Silver Searcher
A code searching tool similar to ack, with a focus on speed.
install on ubuntu
sudo apt-get install silversearcher-ag
usage
search i_am_sample_code in /
sudo ag --silent i_am_sample_code /