原创 藉助expect快捷切換至root權限
先使用sudo apt-get install expect 安裝expect包. 切換到root權限的方法有: (假設root密碼爲123456) 1. Shell 腳本下. a. 命令行: /usr/bin/expec
原创 gcc下__attribute__ ((constructor))和__attribute__ ((destructor))的使用
__attribute__ ((constructor))指定的函數在共享庫loading的時候調用,__attribute__ ((destructor))指定的函數在共享庫unloading的時候調用。 1. 編寫源碼文件ktes
原创 視頻幀格式
YUV422 (UYVY) NV12, YV12 (YUV420SP) YUV420 (I420) To be continue ... src: http://www.four
原创 C/C++編程Trick
1. 數組名和數組名解引用等同. #include <stdio.h> #define LIST_MAX 10 typedef int node; typedef node node_list[LIST_MAX]; void te
原创 Vi使用
1. 使tab鍵由默認的8個空格鍵變爲4個空格鍵 :set tabstop=4 ### try :set all for more info. ###增加到$HOME/.vimrc中即可. 2. 替換OLD爲NEW操