技术宅,fat-man

增加语言的了解程度可以避免写出愚蠢的代码

导航

上一页 1 2 3 4 5 6 7 ··· 50 下一页

2014年10月29日 #

转:优秀程序员写可调试的代码

摘要: 原文:http://blog.jobbole.com/61732/所有的程序都需要某种形式的日志记录建立在它们之上,以便我们可以观察到它正在做什么。这尤其在程序出错时就显得非常重要。一个优秀的程序员和一个糟糕的程序员之间的一个不同之处是一个优秀的程序员会增加日志或其他工具以便在程序失败时方便调试。当... 阅读全文

posted @ 2014-10-29 12:50 codestyle 阅读(222) 评论(0) 推荐(0) 编辑

2014年10月27日 #

转:靠谱的代码和DRY

摘要: http://www.cppblog.com/vczh/archive/2014/07/15/207658.html靠谱的代码和DRY上次有人来要求我写一篇文章谈谈什么代码才是好代码,是谁我已经忘记了,好像是AutoHotkey还是啥的专栏的作者。撇开那些奇怪的条款不谈,靠谱的 代码有一个共同的特点... 阅读全文

posted @ 2014-10-27 12:56 codestyle 阅读(825) 评论(0) 推荐(0) 编辑

2014年10月22日 #

python将图片转为base64编码

摘要: import base64f = open("m1.jpg", "rb")res = f.read()s = base64.b64encode(res)f = open("hello.txt","w")f.write(s) 阅读全文

posted @ 2014-10-22 11:26 codestyle 阅读(1984) 评论(0) 推荐(0) 编辑

2014年10月18日 #

自定义等待视图

摘要: AlertView.h#import @interface AlertView : UIView@property (strong, nonatomic) UILabel *messageLabel;@endAlertView.m#import "AlertView.h"@interface Ale... 阅读全文

posted @ 2014-10-18 00:32 codestyle 阅读(349) 评论(0) 推荐(0) 编辑

2014年10月13日 #

自定义TableViewCell

摘要: BookStoreCell.h#import @interface BookStoreCell : UITableViewCell@property (strong, nonatomic) UIImageView *bookImageView;@property (strong, nonatomic... 阅读全文

posted @ 2014-10-13 22:03 codestyle 阅读(415) 评论(0) 推荐(0) 编辑

2014年10月10日 #

iOS: Core Data入门

摘要: Core Data是ORM框架,很像.NET框架中的EntityFramework。使用的基本步骤是:在项目属性里引入CoreData.framework (标准库)在项目中新建DataModel (生成*.xcdatamodeld文件)在DataModel里创建Entity为Entity生成头文件... 阅读全文

posted @ 2014-10-10 17:21 codestyle 阅读(228) 评论(0) 推荐(0) 编辑

2014年10月9日 #

iOS:处理XML文件

摘要: NSXMLParser是标准库类Book.xml 金庸 sfdgasidfhasdfb --> hello,world i'm lishujun sdfsdfs\ aaaasdfsdf ... 阅读全文

posted @ 2014-10-09 19:20 codestyle 阅读(480) 评论(0) 推荐(0) 编辑

2014年10月8日 #

iOS:等待控件

摘要: 定义:@interface ViewController (){ UIActivityIndicatorView *testActivityIndicator;}实例化,开始旋转:-(void) showWaitStatus{ NSLog(@"wait..."); testActi... 阅读全文

posted @ 2014-10-08 20:19 codestyle 阅读(341) 评论(0) 推荐(0) 编辑

异步请求HTTP

摘要: 代码:@interface HttpProcessor : NSObject { NSMutableData *buffer;}@property BOOL finished;@property (strong, nonatomic) NSString *html;@end@implement... 阅读全文

posted @ 2014-10-08 18:05 codestyle 阅读(496) 评论(0) 推荐(0) 编辑

同步的HTTP请求

摘要: 代码:#import void request(NSString *urlString){ NSLog(@"BEGIN"); // make request object NSURL *url = [[NSURL alloc]initWithString:urlString]; ... 阅读全文

posted @ 2014-10-08 17:30 codestyle 阅读(649) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 50 下一页