Ray's playground

 
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 56 下一页

2011年1月10日

Objective-C(Chapter 3 of Cocoa Programming for Mac OS X)

摘要: [代码][代码][代码] 阅读全文

posted @ 2011-01-10 10:45 Ray Z 阅读(274) 评论(0) 推荐(0) 编辑

2011年1月9日

Item 4: Use Conditional Attributes Instead of #if(Effective C#)

摘要: The Conditional attribute generates more efficient IL than #if/#endifdoes. It also has the advantage of being applicable only at the functionlevel, which forces you to better structure your conditional code. The compileruses the Conditional attribute to help you avoid the common errorswe have all ma 阅读全文

posted @ 2011-01-09 22:31 Ray Z 阅读(231) 评论(0) 推荐(0) 编辑

Item 3: Prefer the is or as Operators to Casts(Effective C#)

摘要: Remember that user-defined conversion operators operate only on thecompile-time type of an object, not on the runtime type.  Now that you know to use as when possible, let’s discuss when you can’tuse it. The as operator does not work on value types.  The is operator should be used only when you cann 阅读全文

posted @ 2011-01-09 11:16 Ray Z 阅读(213) 评论(0) 推荐(0) 编辑

2011年1月8日

2011计划

摘要: 2011年已经过去一周,月底就要回家过年了,定下计划先.  这次不能像之前那样计划定得太粗,完全没有东西可以准确衡量完成度.  1. 随笔达到600篇,这样算来,每月必须写25篇左右.一年下来,应该会看完至少20本书了.  2. C++, Python, Java应该都算入门了,希望在这一年里能更进一步  3. C++之前囫囵吞枣的看了好多书,但现在想想应该更深入地看一次.  Thinking in C++(60%)  Effective C++/More Effetive C++  The C++ Standard Libray  Windows via C/C++  研究开源项目Mongo 阅读全文

posted @ 2011-01-08 23:15 Ray Z 阅读(249) 评论(0) 推荐(0) 编辑

STL Containers & Iterators part1(Chapter 4 of Thinking in C++ Vol 2)

摘要: codeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1#include<iostream>2#include<vector>3#include<iterator>4usingnamespacestd;56template<classCont,classPtrMemFun>7voidapply(Cont&c,PtrMemFunf)8{9typenameCont::iteratorit= 阅读全文

posted @ 2011-01-08 22:17 Ray Z 阅读(223) 评论(0) 推荐(0) 编辑

Item 2: Prefer readonly to const(Effective C#)

摘要: Compile-time constants are limited to numbers and strings. Read-onlyvalues are also constants, in that they cannot be modified after the constructorhas executed.  You can use readonly values for instance constants, storing different valuesfor each instance of a class type. Compile-time constants are 阅读全文

posted @ 2011-01-08 16:57 Ray Z 阅读(191) 评论(0) 推荐(0) 编辑

Item 1: Use Properties Instead of Accessible Data Members(Effective C#)

摘要: You can specify different accessibility modifiers to the getand set accessors in a property in C#.  Indexers can be virtual or abstract; indexerscan have separate access restrictions for setters and getters. You cannotcreate implicit indexers as you can with properties.[代码] 阅读全文

posted @ 2011-01-08 16:08 Ray Z 阅读(178) 评论(0) 推荐(0) 编辑

Memory Management(Chapter 4 of Cocoa Programming for Mac OS X)

摘要: If you are using the garbage collector, it is important that you not keep references to objects that you don't care about. In the main function of lottery, you should set the now and array pointers to nil when you lose interest in them.[代码]  Objects are added to the current autorelease pool when t 阅读全文

posted @ 2011-01-08 14:24 Ray Z 阅读(205) 评论(0) 推荐(0) 编辑

JavaScript in HTML(Chapter 2 of Professional JavaScript® for Web Developers 2nd Edition)

摘要: For pages that require a lot ofJavaScript code, this can cause a noticeable delay in page rendering, during which time the browser willbe completely blank. For this reason, modern web applications typically include all JavaScript referencesin the body element, after the page content.  HTML 4.01 de 阅读全文

posted @ 2011-01-08 13:04 Ray Z 阅读(200) 评论(0) 推荐(0) 编辑

What Is JavaScript?(Chapter 1 of Professional JavaScript® for Web Developers 2nd Edition)

摘要: 阅读全文

posted @ 2011-01-08 12:29 Ray Z 阅读(175) 评论(0) 推荐(0) 编辑

上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 56 下一页

导航