参数的输入和验证问题是开发时经常遇到的,一般的验证方法如下:public bool Register(string name, int age){ if (string.IsNullOrEmpty(name)) { throw new ArgumentException("...
分类:
编程语言 时间:
2014-12-18 22:04:39
阅读次数:
288
在.h文件中,使用关键字@property,xcode会自动生成某个变量的get和set方法的声明,比如
@property int age
如果是相同类型也可以写在一行里
@property int age,height;
在.m文件中的实现方法是
@synthesize age =_age
调用的时候如下
person* p= [person new ];
[p setA...
分类:
其他好文 时间:
2014-12-18 20:39:22
阅读次数:
159
iOS开发网络篇—JSON数据的解析iOS开发网络篇—JSON介绍一、什么是JSONJSON是一种轻量级的数据格式,一般用于数据交互服务器返回给客户端的数据,一般都是JSON格式或者XML格式(文件下载除外)JSON的格式很像OC中的字典和数组{"name" : "jack", "age" : 10...
分类:
移动开发 时间:
2014-12-18 20:33:23
阅读次数:
223
\\客户属性CREATE TABLE `users` ( `id` int(11) NOT NULL auto_increment COMMENT '编号', `name` varchar(255) default NULL COMMENT '客户姓名', `age` int(3) COMMENT ...
分类:
数据库 时间:
2014-12-18 16:35:15
阅读次数:
229
1、默认访问跟property同名的成员变量。如: 有成员变量 int age ; int age1;@property int age;@sythesize age; 则代表的是成员变量age的getter和setter方法。2、使用property和synthesize时,可以省略该成员变量的声...
分类:
其他好文 时间:
2014-12-17 20:18:30
阅读次数:
153
union alluse myDBSELECT '大于20' as scope,count(*) as 人数FROM student where age>=60union all SELECT '小于20' as scope ,count(*) as 人数FROM student where ag....
分类:
数据库 时间:
2014-12-17 18:03:38
阅读次数:
351
if语法:类型一:if expression : if_suitelse: else_suit例如:adic={"name":"paulwinflo","age":18,"sex":"man"}if "name" in adic: print "hello "+ adic["name"]e...
分类:
其他好文 时间:
2014-12-17 16:08:42
阅读次数:
187
IOS: https://itunes.apple.com/lookup?bundleId=com.chenfengfeng.age 安卓: https://play.google.com/store/apps/details?id=com.ushaqi.zhuishushenqi?...
分类:
其他好文 时间:
2014-12-17 14:45:56
阅读次数:
247
*1,hibernate查询语句涉及到多表关联时,如果不需要修改同步到数据库中,避免查询出持久对象,可提高效率现在有两条HQL查询语句,分别如下:from Customer c inner join c.orders o group by c.age;(1)select c.ID,c.name,c....
分类:
其他好文 时间:
2014-12-17 14:24:42
阅读次数:
171
还没开始看js的时候经常会听群里的朋友说到原型,每当别人说的时候自己都不知道别人在说什么,最近在自己看书,记了点笔记,希望可以记住自己学习的印记,哪里写的不对的地方,希望路过的大牛指点一下。function Person(name,age,job){ this.name=name; th...
分类:
其他好文 时间:
2014-12-17 12:25:57
阅读次数:
122