原创 check and disable device
#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH disk_info_file='../
原创 Read file line by line on a Bash Unix & Linux shell
https://www.cyberciti.biz/faq/unix-howto-read-line-by-line-from-file/ How do I read a text file line by line under
原创 自學計算機科學
https://github.com/keithnull/TeachYourselfCS-CN/blob/master/TeachYourselfCS-CN.md 本文檔是對TeachYourselfCS內容的中文翻譯,原作者爲Ozan
原创 Teach Yourself Computer Science
https://teachyourselfcs.com/ If you’re a self-taught engineer or bootcamp grad, you owe it to yourself to learn compute
原创 程序的加載過程——閱讀CSAPP第九章虛擬內存總結
啓動一個程序即開啓一個進程,系統先要加載磁盤文件,系統把磁盤的程序文件按圖1(a)的組織形式映射到虛擬內存。虛擬內存的組織形式是由內核的一些特殊結構維護的,如圖1(b)所示,linux內核爲系統的每一個進程維護着一個單獨的task結構。t
原创 patch and diff
When programs are distributed, it’s almost inevitable that users will discover bugs or that the author will want to
原创 阿里技術大牛陳皓談如何通過Leetcode編程訓練準備技術面試(C++版的完整實現)
Leetcode這個網站上的題都是一些經典的公司用來面試應聘者的面試題,很多人通過刷這些題來應聘一些喜歡面試算法的公司,比如:Google、微軟、Facebook、Amazon之類的這些公司,基本上是應試教育的功利主義。 我做這些題目
原创 電子信息工程專業,大學要學什麼
主要課程 ①c語言 c語言是國內外廣泛使用的計算機語言,是計算機應用人員應掌握的一種程序設計工具。 c語言功能豐富,表達能力強,使用靈活方便,應用面廣,目標程序效率高,可移植性好,既具有高級語言的優點,又具有低級語言的許多特點。因此,c語
原创 C的小特點
定義在struct內部的struct,也可以在struct外面使用,與定義在全局的效果是一樣的。 #include <stdio.h> struct queue_t { int value; char key[100];
原创 Mac日常
如何在 Mac 上啓用 root 用戶或更改 root 密碼 https://support.apple.com/zh-cn/HT204012 如何通過 macOS 恢復功能重新安裝 macOS https://support.apple
原创 Ray-casting algorithm
https://rosettacode.org/wiki/Ray-casting_algorithm This page uses content from Wikipedia. The original article was
原创 向量夾角計算
//座標點 struct Point { //public: double x; double y; }; //平面向量 struct Vector2 { double x; double y
原创 比較運算符 (== , != )的自動類型轉換
比較運算符 (== , != )也會自動類型轉換,例如下面的代碼中語句 newp[j] != (index & 0xFF) , newp[j]會自動轉換爲int類型,還會進行符合擴展,使得本來期望是相等的結果不相等。語句 newp[
原创 終端顯示git分支
Git branch in prompt. 修改/etc/bashrc文件 parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/*
原创 How to Become an Embedded Systems Geek, by Jack Ganssle
http://www.ganssle.com/startinges.htm Disclaimer: I love this field. It's a ton of fun. But jobs can be hard to find. D