《父与子的编程之旅:与小卡特一起学Python》
The First | The Second |
---|---|
graphical user interface | 图形用户界面(GUI) |
IDLE | Python shell(Python GUI) |
Nginx | 一个高性能的HTTP和 反向代理 服务器 |
Fedora | [fi'dore]一个linux发行版 |
console | 控制台 |
prompt | [pra:mpt]迅速的,提示符 |
reserved world | 保留字 |
execute | [eksi kjut]执行 |
synonym | 同义词 |
cascade | [kae'sked]串联 |
nested | 嵌套的[nest] |
demonstrate | 证明 |
Haar | 哈尔算法 |
LBP | Local Binary Pattern 局部二值模式 |
rigid | 僵硬的,严格的 |
Usage | 使用,用法 |
frontal | 正面的 |
optional secondary classifier | 可选二级分类器 |
image scale greater | 图像比例尺,相标 |
haarcascades | Haar级联 |
frontalface | 正面 |
execution | [eksi'kjution]执行 |
E记法 | 0.0000000000001752=1.752e-13 |
3**5 | 3的5次幂 |
3e5 | 3乘以10的5次幂 |
arithmetic expression | 算术表达式 |
evaluate | 计算 |
Matrix | 矩阵['metriks] |
argc | argument counter[] |
argument | =actual parameter 实参 |
argv | argument vector |
char*argv[] | argv is the pinter points to array |
nestedCascadeName | 嵌套级联名称 |
nested | 嵌套的 |
typically | 通常地 |
facility | 能力,功能[fe'sileti] |
allocate | ['aelekeit]分配 |
free store | 自由存储区 |
global variables | 全局变量 |
在Python中,不能把两个完全不同的东西加在一起,比如说数字和文本。正是因为这个原因,print"Bye for now"+5会给出错误消息。这就像是在说:“5个苹果加三只鳄鱼是多少”
Arguments to main
- For those writing programs which will run in a hosted environment,argument to main provide a useful opportunity to give parameters to programs.Typically,this facility is used to direct the way the program goes about its task.it's particulary common to provide file names to a program through its arguments.
- The declaration of main looks like this:
int main(int argc,char *argv[]);
Freeing Dynamic memory
When we allocate memory,we must must eventually free it.Otherwise,memory is gradually used up and may be exhausted.When we no longer need the array,we must explicitly return its memory to the free store.We do so by applying the delete [] expression to pointer that addresses the array we want to release:
delete [] pia;
Pinters to pointers
- Pointers are themselves objects in memory.They,therefore,have addresses that we can store in a pointer:
int ival=1024;
int *pi=&ival; //pi points to an int
int **ppi=π //ppi points to a pointer to an int
Pointers Are Iterators for Arrays
//equivalent loop using iterators to reset all the elements in ivec to 0
for (vector<int>::iterator iter=iver.begin();iter!=ivec.end();++iter)
*iter=0; //set element to which iter refer to 0