XpandNotes

exploring the intersection of technology and creativity

gdisk 新增磁區、mdadm 磁碟陣列、ZFS 設定

此文為計算機系統與網路管理課程 lab4 的實作 gdisk 首先助教分配了 /dev/vdb 和 /dev/vdc 這兩顆磁碟,各自都有 8 GiB 的容量。首先要將它們各自切成 4 GiB 的分割,總共會產生 4 個磁區。 因為我是先做完一次了,所以 gdisk 進入時會偵測到 GPT table 已經存在。如果是完全空的磁碟, gdisk 會在記憶體中先創建一個 GPT tabl...

Leetcode #7 Reverse Integer

Description Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 - 1], then return 0. Assum...

Leetcode #6 ZigZag Conversion

Description The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H ...

Leetcode #96 Unique Binary Search Trees

Description Given an integer n, return the number of structurally unique BST’s (binary search trees) which has exactly n nodes of unique values from 1 to n. Example 1: Input: n = 3 Output: 5 ...

Leetcode #5 Longest Palindromic Substring

Description Given a string s, return the longest palindromic substring in s. Example 1: Input: s = "babad" Output: "bab" Note: "aba" is also a valid answer. Example 2: Input: s = "cbbd" Outpu...

旅遊主頁

2021 2021 林口櫻花星巴克照片 2023 2023 北海道:十勝之丘公園 2023 北海道:十勝池田酒廠、釧路丹頂鶴自然公園、釧路溼原、阿寒湖 2023 北海道:摩周湖、屈斜路湖、鄂霍次克流冰館、北見狐狸村、層雲峽 2024 參加 IEEE ICBC 2024 都柏林遊記

林口櫻花星巴克

分享一些照片,拍攝時間: 2021-02-06 星巴克正門 從裡面看出去的樣子

Cooler Master CK550 紅軸鍵盤開箱

因為筆電的鍵盤不好按,而且敲筆電的鍵盤時常常不知不覺駝背,眼睛又離螢幕很近,所以就想購入一把機械鍵盤。 一開始的目標就是想購入下手不用太用力的鍵盤,因為青軸實在太吵,吵到感覺我會被自己敲鍵盤的聲音煩死,而茶軸和黑軸需要按壓較大力,怕小指常常按 ctrl 、 enter 、 home 、 end 會酸,因此紅軸最符合需求。 逛了各個電子用品店後,發現大多只有青軸的現貨,最後找到這款 CK5...

Leetcode #4 Median of Two Sorted Arrays

Description Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. Follow up: The overall run time complexity should be O(log (m+n)). E...

Leetcode #3 Longest Substring Without Repeating Characters

Description Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length ...