技术宅,fat-man

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

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

07 2014 档案

一个消除if语句的例子
摘要:// 一个按钮点击事件,判断点击按钮是那一个显示出他的信息- (IBAction)buttonPressed:(id)sender { if (sender == self.leftButton) { NSLog(@"%@", self.leftButton.currentTit... 阅读全文

posted @ 2014-07-15 19:04 codestyle 阅读(1297) 评论(0) 推荐(0) 编辑

转载:如何避免代码中的if嵌套
摘要:http://top.jobbole.com/4960/http://stackoverflow.com/questions/24430504/how-to-avoid-if-chains在Stack Overflow上的一个挺有趣的问题,详细整理问题和部分巧妙的回答如下。假设我刻意写了一段代码:b... 阅读全文

posted @ 2014-07-09 10:35 codestyle 阅读(1180) 评论(0) 推荐(0) 编辑

java程序编译
摘要:Empoyee.javapackage Company;public class Empoyee{ String name = ""; public Empoyee(String name) { this.name = name; } public Str... 阅读全文

posted @ 2014-07-08 20:30 codestyle 阅读(305) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示