Ray's playground

 

2011年2月23日

Item 35: Learn How PLINQ Implements Parallel Algorithms(Effective C#)

摘要: Every parallel query begins with a partitioning step. PLINQ needs to partitionthe input elements and distribute those over the number of taskscreated to perform the query. Partitioning is one of the most importantaspects of PLINQ, so it is important to understand the differentapproaches, how PLINQ . 阅读全文

posted @ 2011-02-23 20:48 Ray Z 阅读(179) 评论(0) 推荐(0) 编辑

Item 34: Avoid Overloading Methods Defined in Base Classes(Effective C#)

摘要: 1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Linq;4usingSystem.Text;56namespaceEffectiveCSharpItem347{8publicclassB2{}9publicclassD2:B2{}1011publicclassB12{13publicvoidFoo(D2parm)14{15Console.WriteLine("InB.Foo");16}17publicvoidBar(B2parm)18{19Console.WriteLine("InB.Bar& 阅读全文

posted @ 2011-02-23 20:08 Ray Z 阅读(180) 评论(0) 推荐(0) 编辑

Localization(Chapter 16 of Cocoa Programming for Mac OS X)

摘要: Clearly, as you develop and localize many applications, you will develop a set of common translations. It would be handy to have an automated way to get the translated strings into a nib file. This is one of several uses for ibtool. The ibtoolcommand, which is run from the terminal, can list the cl. 阅读全文

posted @ 2011-02-23 17:41 Ray Z 阅读(150) 评论(0) 推荐(0) 编辑

Using Alert Panels(Chapter 15 of Cocoa Programming for Mac OS X)

摘要: The NSRunAlertPanel() function returns an intthat indicates which button the user clicked. There are global variables for these constants: NSAlertDefaultReturn, NSAlertAlternateReturn, and NSAlertOtherReturn. int NSRunAlertPanel(NSString *title, NSString *msg, NSString *defaultButton, NSString *alt. 阅读全文

posted @ 2011-02-23 11:44 Ray Z 阅读(218) 评论(0) 推荐(0) 编辑

Using Notifications(Chapter 14 of Cocoa Programming for Mac OS X)

摘要: PreferenceControllerCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1#import"PreferenceController.h"234@implementationPreferenceController56NSString*constBNRTableBgColorKey=@"TableBackgroundColor";7NSString*constBNREmptyDocKey= 阅读全文

posted @ 2011-02-23 11:15 Ray Z 阅读(274) 评论(0) 推荐(0) 编辑

导航