BP

@WhitePen

Joined on Jul 2, 2021

  • Redis 是什麼 ? Redis (Remote Dictionary Server) 是一個 open-source 的 in-memory 的資料儲存系統,分類上屬於 NoSQL。資料儲存在記憶體中所以速度可以很快,根據需求也可以支援寫入硬碟。不過最常用的功能是作為 cache。 建立一個 cloud Redis database 到此網站去建立 free account 選一個 cloud provider 後就會自動幫你建立 Redis database 了 基本操作 (Python) 下載 Python 套件pip install redis
     Like  Bookmark
  • 在想換頁的地方添加 <div style="page-break-after:always"></div>
     Like 3 Bookmark
  • From Official Website, you’ll find two methods for installation. Environment: arch linux It FINALLY works with Method 1 (a) + Method 2 (a)FYR, here are some problems I met and you probably have to fix it by:In Method 1 (a), the url of PPL in the provided script doesn’t work, so I use this instead. In Method 2 (a), when you want to execute ./local/phaver/src/phaver, you’ll encounter an error: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory if you haven’t had libstdc++.so.5 installed/linked.To install, you can find something like apt install; however, in my case, I don’t have the permission to do in my environment. Alternatives:install libstdc++5libstdc++5 lib32-libstdc++5 (for 32-bit) if you got error: error while loading shared libraries: libstdc++.so.5: wrong ELF class: ELFCLASS64 in the repo chmod +x PKGBUILD
     Like  Bookmark
  • Why ? 某些檔案不想被 Avira 及時偵測 用 VS Code 寫 C / C++ 時突然被嚇到 btw 我現在已經沒在用 Avira 了 : ) 被防毒軟體偵錯的過程 在桌面創建空資料夾 ( myFile ) 用 VS Code 打開該資料夾![](https://i.imgur.com/zC8LlMs.png =90%x)
     Like  Bookmark
  • 了解 F2FS 之前,一些 LFS 的筆記 Background 大部分的 I/O 都是 random,對於 random read,我們現在有足夠大的 page cache 可以把大部分的 read 都 cache,但 random write 卻沒有很好的方案。 Concept Log-structured file system: 像 append log 一樣 sequentailly 的寫入 disk 最後面,不會對先前已經寫入的資料做修改。 把一堆 file system change 先 buffer 起來存在 file cache,再集結成一個 disk write operation 寫入 disk。所有需要用來管理 file system 的資訊都可以這樣操作。
     Like  Bookmark
  • WSL2 在 Windows 中會建立虛擬硬碟 (Virtual Hard Disk, VHD),以 ext4.vhdx 檔案形式表示,一開始 WSL2 會先配置空間,而這些空間並非都是目前真正有使用到的。 以系統管理員進入 powershell wsl --shutdown diskpart Windows Diskpart 指令 select vdisk file="C:\Users\…\ext4.vhdx"ext4.vhdx 路徑類似 "C:\Users\<your-username>\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\ext4.vhdx" ,可以用 list vdisk 查到路徑 attach vdisk readonly compact vdisk detach vdisk exit
     Like 3 Bookmark
  • Ref: Stack Overflow 應該是更新到 Windows 11 後,發現在檔案總管中點右鍵沒有了「以 Git Bash / Code 開啟」(或是其他的詞,但大概是這樣?),上網查遍後終於找到 Stack Overflow 的解法,記錄在這邊方便查詢。 以下以 Git Bash 為例,其他程式應該都適用~ 1. 在工具列搜尋 "regedit" 或 "登錄編輯程式" 2. 在畫面最上排輸入 HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell 進到該機碼中 ![](https://i.imgur.com/DMtSyNE.png =80%x)
     Like  Bookmark