上一页 1 ··· 4 5 6 7 8 9 10 下一页

iOS5 automatic reference counting (ARC)

摘要: ARC is a feature of the new LLVM compiler, it avoids memory management problems completely by automatically inserting the proper retains and releases for you.It is important to realize that ARC is a feature of the Objective-C compiler and therefore all the ARC stuff happens when you build your app. 阅读全文
posted @ 2012-05-27 22:07 grep 阅读(467) 评论(0) 推荐(0) 编辑

Concurrent networking in iOS5

摘要: NSURLConnectionNSURLRequestNSURLResponserequire a lot of boilterplate codein iOS5,+(void)sendAsynchronousRequest:(NSURLRequest*)requestqueue:(NSOperationQueue*)queuecompletionHandler:(void(^)(NSURLResponse*,NSData*,NSError*))handler;so,//Create the requestNSURL*url=[NSURLURLWithString:@"https:/ 阅读全文
posted @ 2012-05-26 21:38 grep 阅读(704) 评论(0) 推荐(0) 编辑

AST Walker

摘要: public final void accept(ASTVisitor visitor) { if (visitor == null) { throw new IllegalArgumentException(); } // begin with the generic pre-visit if (visitor.preVisit2(this)) { // dynamic dispatch to internal method for type-specific visit/endVi... 阅读全文
posted @ 2012-05-14 15:54 grep 阅读(253) 评论(0) 推荐(0) 编辑

greedy(meta-algo III)

摘要: Every two years old knows the greedy algorithm.In order to get what you want, just start grabbing what looks best.Surprisingly, many important and practical computational problems can be solved this way.Ingredients:the possible inputs to the problem.each instance has an exponentially large set of so 阅读全文
posted @ 2012-05-13 10:35 grep 阅读(268) 评论(0) 推荐(0) 编辑

process management

摘要: pid,ppid,cmdpsps -f to show parent pidps -ef to show all processyou can trace process fork order through ppid...ps -ef | grep bashps -lps axps ax | headls -l /procpstree | head -20top to check top processes running the system.top: click h key to show all tips.kill -1 1234signal 1,2,3,15,9killall -9 阅读全文
posted @ 2012-05-11 22:32 grep 阅读(173) 评论(0) 推荐(0) 编辑

Iterative algorithm(meta-algo I)

摘要: abstract: value simplicityabstract away the inessential features of a problemgoal: understand and think about complex algorithm in simple ways.If you do not get all the details of the new algorithm correct, it won't be a disaster.If you do not get the steps of the "meta algorithm" corr 阅读全文
posted @ 2012-05-10 21:07 grep 阅读(473) 评论(0) 推荐(0) 编辑

Understanding iphone View Controllers

摘要: Build an iphone applicationWrite the code you care aboutExtend in the futureFocus on dataOne thing at a timeScreenfuls of contentnavigation bar vs tab barnavigation barhierarchy of contentdrill down into great detailtab-barself-contained modesA Screenful of contentsslice of your applicationviews, da 阅读全文
posted @ 2012-05-02 22:10 grep 阅读(212) 评论(0) 推荐(0) 编辑

xcode tips

摘要: The keyboard shortcut for switching between the header file and the implementation file is Command-Control-UP arrow.ESCautocompleteSHIFT+COMMAND+UPswitch header/implSHIFT+OPTION+COMMAND+?help docOPTION+DOUBLE CLICKdocCOMMAND+DOUBLE CLICKdocOPTION+COMMAND+LEFTfold(collapse) blockOPTION+COMMAND+RIGHTu 阅读全文
posted @ 2012-04-28 10:00 grep 阅读(251) 评论(0) 推荐(0) 编辑

SSH ALL-IN-ONE

摘要: 很多新来的同事不了解我们的项目架构 准备补充一下我们的项目架构 Spring-Hibernate Based.主要涉及到一下几个方面Queue-based event processingProducer: IDBSyncConsumer: EAIfor producer:shell, bash, cron job,for consumer:hibernate to persistentspring to glue business and others together, such as transaction,exception,Schedule,Mail,Webservice,apach 阅读全文
posted @ 2012-04-26 13:10 grep 阅读(224) 评论(0) 推荐(0) 编辑

System performance

摘要: Evidence-Based Performance Analysis and TuningReal-world performance problems are not solvable in 5 minutes with a short list of random suggestions.Instead, you must step back, understand the issues, and then make suggestions that have two key qualities:The suggestions are based on evidence.There is 阅读全文
posted @ 2012-04-25 13:33 grep 阅读(256) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 下一页