Web blog of yydzero
姚延栋(Yandong Yao)的博客
归档
« 十一月 2009
星期日星期一星期二星期三星期四星期五星期六
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
今天
Click me to subscribe
Search In My Blog

链接
 

今日点击: 34

Locations of visitors to this page
星期一 二月 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  欧米伽  欧姆(大写);角速(小写);角

Posted at 09:23上午 二月 04, 2008 by Yaodong Zero Yao in C&C++  |  评论[0]

星期二 七月 31, 2007
mkfile(1M)

1. use mkfile(1M) to add swap file

2. use mkfile(1M) to learn zfs

3. use mkfile(1M) to create a UFS inside one file

Posted at 02:55上午 七月 31, 2007 by Yaodong Zero Yao in C&C++  |  评论[3]

星期四 九月 21, 2006
C books and articles

1. Books on C programming languages

  • The C Programming Language, Kernighan and Ritchie, 2nd Edition. Still reads well. I still have and use the first edition dated 1978. See <http://cm.bell-labs.com/cm/cs/cbook/>.
  • C Puzzle Book, Alan R Feuer, Addison-Wesley, 2nd edition 1999, ISBN 0201604612. The best ever book on understanding the quirks of C and how to use pointers properly.
  • The Practice of Programming, Kernighan and Pike, Addison-Wesley, 1999. An update of an earlier book written in the 1970s. Timeless advice, not just on C but on Java, C++ and Perl. See <http://cm.bell-labs.com/cm/cs/tpop/>.
  • The Standard C Library, PJ Plauger, Prentice Hall, 1992. Literally how it all works with full source code and tests.

    2. Some intresting articles and books

    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

     

     

    Expert C Programming

    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.

     

    很不错的一本书,不过包含很多看似和语言无关的东西,我第一遍看的时候都跳过去了。这也造成本书的组织有点散。

     

     

    References

     

  • Posted at 11:56下午 九月 21, 2006 by Yaodong Zero Yao in C&C++  |  评论[1]

    星期二 七月 04, 2006
    C tips from daily usage

    确定数组的长度

    通常我们需要在一个循环中遍历数组的所有元素,因此需要知道数组的长度。硬编码数组长度显然是不可取的,因为如果改变数组元素的个数的话,需要改动多处代码。使用下面的方式可以很好的避免这个问题:

    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]);
    }

    [转载]NULL 0 \0以及nul的区别


    信息来源: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"

     


    匿名参数的使用

    有时候我们需要使用匿名参数以匹配指定的接口,譬如g_list_foreach()函数需要他的函数参数有两个参数,而如果我们把g_free传递给他时会报告错误,这样我们就可以使用一个函数封装g_free。例如

    o_free (gpoint p, gpoint /* data */)

    Posted at 10:17下午 七月 04, 2006 by Yaodong Zero Yao in C&C++  |  评论[0]

    C语言中可变长参数的处理

    如何写可变参数函数

    void va_start(va_list pvar, name): 根据name参数获得可变参数的指针 pvar。
    (type *) va_arg(va_list pvar, type): 获得下一个可变参数,需要指定参数的类型。
    void va_end(va_list pvar): 结束使用可变参数,使它不再指向内存有效地址。

    例如:
    void simple_va_func (int i, ...)
    {
        va_list arg_ptr;
        int j = 0;

        va_start (arg_ptr, i);
        //这里的arg_ptr可以传递给任意函数作为参数,在那个函数内需要使用va_* 宏去获得对应的参数。
        j = va_arg (arg_ptr, int); 
        va_end (arg_ptr);

        return;
    }

    如何实现可变参数

    可变参数的实现与具体的编译器/硬件平台相关,我们这里简单看一下 cdecl calling convention 下的参数传递。

    cdecl模式下参数从右向左压入堆栈,而且是由调用者来做这个操作。
                              
                                                   内存高地址(x86平台)
    +-----------------------------+
    | 最后一个可变参数     |
    +-----------------------------+
    | 倒数第二个可变参数 |
    +-----------------------------+
    |          ......                      |
    +-----------------------------+
    | 第一个可变参数         |      va_start 之后,arg_ptr 指向这里
    +-----------------------------+
    | 最后一个固定参数     |      这个参数的名字需要传递给va_start
    +-----------------------------+
    |          ......                      |
    +-----------------------------+
    | 第一个参数                 |
    +-----------------------------+
    | 函数返回地址             |
    +-----------------------------+
    | 调用者的 BP               |     被调用函数的栈基址
    +-----------------------------+
    | 局部变量                     |
    +-----------------------------+

    注意事项

    参考

    C语言中可变参数的用法
    水滴石穿C语言之可变参数问题
    CSDN C/C++电子杂志第一期 之 可变参数学习笔记
    Posted at 08:55下午 七月 04, 2006 by Yaodong Zero Yao in C&C++  |  评论[0]