Ray's playground

 
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 56 下一页

2010年11月28日

Doctest: The Easiest Testing Tool(Chapter 2 of Python Testing Beginner's Guide)

摘要: test.txtCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1ThisisasimpledoctestthatcheckssomeofPython'sarithmeticoperations.2>>>2+2344>>&... 阅读全文

posted @ 2010-11-28 14:04 Ray Z 阅读(295) 评论(0) 推荐(0) 编辑

2010年11月27日

Operator Overloading part 2(Chapter 12 of Thinking in C++)

摘要: [代码] 阅读全文

posted @ 2010-11-27 14:20 Ray Z 阅读(194) 评论(0) 推荐(0) 编辑

2010年11月26日

Operator Overloading part 1(Chapter 12 of Thinking in C++)

摘要: IntegerCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1#include<iostream>2usingnamespacestd;34classInteger5{6longi;7Integer*This(){returnthis;}... 阅读全文

posted @ 2010-11-26 22:15 Ray Z 阅读(211) 评论(0) 推荐(0) 编辑

2010年11月24日

Python虚拟中的控制流(Python 源码剖析第十章)

摘要: COMPARE_OPCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1caseCOMPARE_OP:2w=POP();3v=TOP();4if(PyInt_CheckExact(w)&&PyInt_CheckExact(v)){5/*I... 阅读全文

posted @ 2010-11-24 21:54 Ray Z 阅读(208) 评论(0) 推荐(0) 编辑

2010年11月23日

CDay−5/CDay−4(可爱的Python)

摘要: CDay−5Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1>>>frommathimportsqrt2>>>N=1003>>>result=[pforpinrange(2,N)if0... 阅读全文

posted @ 2010-11-23 21:33 Ray Z 阅读(338) 评论(0) 推荐(0) 编辑

2010年11月22日

References & the Copy-Constructor(Chapter 11 of Thinking in C++)

摘要: There are certain rules when using references:  1. A reference must be initialized when it is created. (Pointerscan be initialized at any time.)  2. Once a reference is initialized to an object, it ca... 阅读全文

posted @ 2010-11-22 22:38 Ray Z 阅读(195) 评论(0) 推荐(0) 编辑

2010年11月20日

Name Control(Chapter 10 of Thinking in C++)

摘要: The escape mechanism provided in C++ is the alternate linkagespecification, which was produced in the language by overloadingthe extern keyword. The extern is followed by a string thatspecifies the li... 阅读全文

posted @ 2010-11-20 15:55 Ray Z 阅读(171) 评论(0) 推荐(0) 编辑

2010年11月18日

Inline Functions(Chapter 9 of Thinking in C++)

摘要: The exceptions are when you needto use three special features in the C preprocessor (which is also theC++ preprocessor): stringizing, string concatenation, and tokenpasting. Stringizing, introduced ea... 阅读全文

posted @ 2010-11-18 22:19 Ray Z 阅读(173) 评论(0) 推荐(0) 编辑

2010年11月17日

Python虚拟机框架(Python 源码剖析第八章)

摘要: frameCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1>>>importsys2>>>value=33>>>defg():4frame=sys._getframe()5print'curren... 阅读全文

posted @ 2010-11-17 21:34 Ray Z 阅读(334) 评论(0) 推荐(0) 编辑

2010年11月16日

Python的编译结果-code对象与pyc文件(Python 源码剖析第七章)

摘要: codeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1>>>source=open('e:\python\p9.py').read()2>>>source3'forainrange(1,1000):\n\tfor... 阅读全文

posted @ 2010-11-16 23:06 Ray Z 阅读(361) 评论(0) 推荐(0) 编辑

上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 56 下一页

导航