星期一 二月 04, 2008
星期一 二月 04, 2008
好久没碰数学,很多数学符号发音都忘了,读一些文章时特别别扭,所以从网上搜了一下,运气还不错,已经有网站收集了数学符号及其发音,参考这里和这里。
| 序号 | 大写 | 小写 | 英文注音 | 国际音标注 | 中文注音 | 意义 |
| 1 | Α | α | alpha | a:lf | 阿尔法 | 角度;系数 |
| 2 | Β | β | beta | bet | 贝塔 | 磁通系数;角度;系数 |
| 3 | Γ | γ | gamma | ga:m | 伽马 | 电导系数(小写) |
| 4 | Δ | δ | delta | delt | 德尔塔 | 变动;密度;屈光度 |
| 5 | Ε | ε | epsilon | ep`silon | 伊普西龙 | 对数之基数 |
| 6 | Ζ | ζ | zeta | zat | 截塔 | 系数;方位角;阻抗;相对粘度;子序数 |
| 7 | Η | η | eta | eit | 艾塔 | 磁滞系数;效率(小写) |
| 8 | Θ | θ | thet | θit | 西塔 | 温度;相位角 |
| 9 | Ι | ι | iot | aiot | 约塔 | 微小,一点儿 |
| 10 | Κ | κ | kappa | kap | 卡帕 | 介质常数 |
| 11 | Λ | λ | lambda | lambd | 兰布达 | 波长(小写);体积 |
| 12 | Μ | μ | mu | mju | 缪 | 磁导系数;微(千分之一);放大因数(小写) |
| 13 | Ν | ν | nu | nju | 纽 | 磁阻系数 |
| 14 | Ξ | ξ | xi | ksi | 克西 | |
| 15 | Ο | ο | omicron | omik`ron | 奥密克戎 | |
| 16 | Π | π | pi | pai | 派 | 圆周率=圆周÷直径=3.1416 |
| 17 | Ρ | ρ | rho | rou | 肉 | 电阻系数(小写) |
| 18 | Σ | σ | sigma | `sigma | 西格马 | 总和(大写),表面密度;跨导(小写) |
| 19 | Τ | τ | tau | tau | 套 | 时间常数 |
| 20 | Υ | υ | upsilon | jup`silon | 宇普西龙 | 位移 |
| 21 | Φ | φ | phi | fai | 佛爱 | 磁通;角 |
| 22 | Χ | χ | chi | phai | 西 | |
| 23 | Ψ | ψ | psi | psai | 普西 | 角速;介质电通量(静电力线);角 |
| 24 | Ω | ω | omega | o`miga | 欧米伽 | 欧姆(大写);角速(小写); |
1 Α α alpha a:lf 阿尔法 角度;系数
2 Β β beta bet 贝塔 磁通系数;角度;系数
3 Γ γ gamma ga:m 伽马 电导系数(小写)
4 Δ δ delta delt 德尔塔 变动;密度;屈光度
5 Ε ε epsilon ep`silon 伊普西龙 对数之基数
6 Ζ ζ zeta zat 截塔 系数;方位角;阻抗;相对粘度;原子序数
7 Η η eta eit 艾塔 磁滞系数;效率(小写)
8 Θ θ thet θit 西塔 温度;相位角
9 Ι ι iot aiot 约塔 微小,一点儿
10 Κ κ kappa kap 卡帕 介质常数
11 ∧ λ lambda lambd 兰布达 波长(小写);体积
12 Μ μ mu mju 缪 磁导系数;微(千分之一);放大因数(小写)
13 Ν ν nu nju 纽 磁阻系数
14 Ξ ξ xi ksi 克西
15 Ο ο omicron omik`ron 奥密克戎
16 ∏ π pi pai 派 圆周率=圆周÷直径=3.14159 26535 89793
17 Ρ ρ rho rou 肉 电阻系数(小写)
18 ∑ σ sigma `sigma 西格马 总和(大写),表面密度;跨导(小写)
19 Τ τ tau tau 套 时间常数
20 Υ υ upsilon jup`silon 宇普西龙 位移
21 Φ φ phi fai 佛爱 磁通;角
22 Χ χ chi phai 西
23 Ψ ψ psi psai 普西 角速;介质电通量(静电力线);角
24 Ω ω omega o`miga 欧米伽 欧姆(大写);角速(小写);角
星期二 七月 31, 2007
星期四 九月 21, 2006
| Interview with Brian Kernighan | Enjoyable reading with some support for our views on C++. Plus advice on how to pronounce his name correctly. |
| comp.lang.c Frequently Asked Questions |
Link to www version. Highly relevant. An up-to-date copy may be obtained from ftp.eskimo.com in directory u/s/scs/C-faq/. 中文faq的地址(提供了PDF格式):http://c-faq-chn.sourceforge.net/ccfaq/node1.html |
| ANSI C Programming Lanuage | A useful short help on C Programming, including precedence and the preprocessor. |
| ANSI C Standard Library | Summary of the ANSI C standard library functions (that's the real ANSI C). |
| Rationale for ANSI C | A link to the original Rationale for American National Standard for Information Systems - Programming Language - C. This was included in the original ANSI standard explaining why things were done as they were. It was unfortunately dropped from the ISO standard. |
| Style in C | Rob Pike's set of essays on coding style and a "philosophy of clarity in programming" as opposed to laying down hard rules. |
| C Traps and pitfalls | An essay by Andrew Koenig of AT&T Bell Labs written as the basis to his book C Traps and Pitfalls. "The C language is like a carving knife: ... This paper shows some of the ways C can injure the unwary, and how to avoid injury." Worth reading (and then re-reading). |
| How To Steal Code | Henry Spencer's article on inventing the wheel only once. "Never build what you can (legally) steal! Done right, it yields better programs for less work". There are some useful C programs at the end. |
| The Ten Commandments for C Programmers | Henry Spencer's amusing, but true, adaptation of the ten commandments for C programmers. We love number 6: If a function be advertised to return an error code in the event of difficulties, thou shalt check for that code, yea, even though the checks triple the size of thy code and produce aches in thy typing fingers, for if thou thinkest ``it cannot happen to me'', the gods shall surely punish thee for thy arrogance. Read and take note. |
|
How to write unmaintainable code
|
A link to Roedy Green's very amusing article on how to guarantee a lifetime's employment by making life impossible for maintenance programmers. (He actually has to explain that it's a joke!) Although focused on Java, he gives plenty of examples in C. If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime. More quotes below.
很不错的一本书,不过包含很多看似和语言无关的东西,我第一遍看的时候都跳过去了。这也造成本书的组织有点散。 |
星期二 七月 04, 2006
通常我们需要在一个循环中遍历数组的所有元素,因此需要知道数组的长度。硬编码数组长度显然是不可取的,因为如果改变数组元素的个数的话,需要改动多处代码。使用下面的方式可以很好的避免这个问题:
char * hero[][2] = {
{ "Guo Jing", "She Diao" },
{ "Ling Huchong", "Xiao ao Jiang Hu" },
{ "Yang Guo", "Shen Diao" },
{ "Hu Fei", "Xue Shan Fei Hu" },
};
for (i=0; i < sizeof (hero) / sizeof (*hero); i++)
{
printf ("%s come from %s\n", hero[i][0], hero[i][1]);
}
信息来源:cprogramming.com
NULL is a macro defined in several standard headers, 0 is an integer constant, '\0' is a character constant, and nul is the name of the character constant. All of these are *not* interchangeable:
NULL is to be used for pointers only since it may be defined as ((void *)0), this would cause problems with anything but pointers.
Use cc -E you can see what NULL means on solaris. Commonly NULL is defined by "#define NULL 0" or "#define NULL (void *)0"
0 can be used anywhere, it is the generic symbol for each type's zero value and the compiler will sort things out.
'\0' should be used only in a character context.
nul is not defined in C or C++, it shouldn't be used unless you define it yourself in a suitable manner, like:
#define nul '\0'
empty string "" is "\0"