2010年9月27日 星期一
Gmail IMAP, SMTP, POP3 設定值
IMAP
- imap.gmail.com
- Port: 993
- Use SSL: Yes
- smtp.gmail.com
- Port for TLS/STARTTLS: 587
- Port for SSL: 465
- pop.gmail.com
- Port: 995
- Use SSL: Yes
Meld : Diff and merge tool.
Meld is a visual diff and merge tool. You can compare two or three files and edit them in place (diffs update dynamically). You can compare two or three folders and launch file comparisons. You can browse and view a working copy from popular version control systems such such as CVS, Subversion, Bazaar-ng and Mercurial. Look at the screenshots page for more detailed features.
Token-pasting operator(##) in C
我們都知道C語言define前端處理假指令用來定義變數、字串或幾行的原始碼(統稱為巨集, Macro)。
當某一巨集被定義為參數帶入之巨集, 我們最常用的就是把該參數當作變數或指標來使用,如下所示:
然而,我們可以把巨集所帶入的參數當作為識別子(Token)的一部分,如下所示:
如上列所示,class_num可以經由GET_MEMBER巨集(帶入部份識別子, 也就是num)取得,此參數傳遞方法稱為Token-pasting operator,這是一個非常好用的方法, 提供給大家參考。
繼上次提到Token-pasting operator (##) in C文章後, 這次講一下在C語言define巨集參數使用的另一種方法, 在參數名稱前加一個#運算子, 此運算子代表所帶入的參數會被編譯器視為"字串", 所以#運算子又被稱為字串化運算子, 底下為一簡單的例子:
#define GET_RESULT(exp) printf(#exp "=%d\n", exp)
int main(void)
{
GET_RESULT(3+2);
return ;
}
當某一巨集被定義為參數帶入之巨集, 我們最常用的就是把該參數當作變數或指標來使用,如下所示:
#define INC_IDX(val, size) (++val % size) -> 以參數為變數之值帶入此巨集
#define GET_DATA(ptr) (ptr->data) -> 以參數為指標帶入此巨集
然而,我們可以把巨集所帶入的參數當作為識別子(Token)的一部分,如下所示:
#include
int class_num = 9;
int class_stds = 10;
#define GET_MEMBER(postfix) class_ ## postfix
int main(void)
{
printf("class_num: %d\n", GET_MEMBER(num));
printf("class_stds: %d\n", GET_MEMBER(stds));
return 0;
}
如上列所示,class_num可以經由GET_MEMBER巨集(帶入部份識別子, 也就是num)取得,此參數傳遞方法稱為Token-pasting operator,這是一個非常好用的方法, 提供給大家參考。
The Stringify Operator (#) in C
#define GET_RESULT(exp) printf(#exp "=%d\n", exp)
int main(void)
{
GET_RESULT(3+2);
return ;
}
訂閱:
文章 (Atom)
How to use simple speedtest in RaspberryPi CLI
pi@ChunchaiRPI2:/tmp $ wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py --2023-06-26 10:4...
-
from: https://www.wpgdadatong.com/tw/blog/detail?BID=B0594 一. PHY包含的各個子層 : PCS:編碼和解碼 PMA:串行器和反序列化器 PMD:取決於物理介質 Firgure 1: OSI模型裡示意...
-
From: http://blog.chinaaet.com/justlxy/p/5100064818 SMI:串行管理接口(Serial Management Interface),通常直接被稱為MDIO接口(Management Data Input/Output I...
-
from:https://zhuanlan.zhihu.com/p/36165475 VXLAN(Virtual eXtensible Local Area Network)或許是目前最熱門的網絡虛擬化技術。 網絡虛擬化是指在一套物理網絡設備上虛擬出多個二層網絡。 VXL...