浅克隆:public class Person implements Cloneable { private String name; private int age; private Teacher teacher; public Person(String name, int age) { .....
分类:
其他好文 时间:
2015-08-25 13:32:31
阅读次数:
126
mongoDB中 ?find函数语法:db.collection.find(query,fileds,limit,sikp) 1 、qurey参数相当于sql中的where子句用来指明查询条件列:db.account.find({name:"lewesyang",age:{$it:22}}) 2、fileds参数相当于sel...
分类:
数据库 时间:
2015-08-25 12:50:57
阅读次数:
454
Properties:
Hashtable的子类,属于集合类。存储属性累心公的键值对, 键和值默认都是String 是集合中可以和流结合使用的一个集合类
Properties pro = new Properties();
pro.setProperty(“name”, “Tom”);
pro.setProperty(“age”, “19”);...
分类:
编程语言 时间:
2015-08-21 15:47:48
阅读次数:
168
用new和调用一个函数的区别:如果函数返回值是一个值类型(Number、String、Boolen)时,new函数将会返回这个函数的实例对象,而如果这个函数的返回值是一个引用类型(Object、Array、Funtion)时,new函数和直接调用函数的结果相同。测试代码如下:
/*//工厂模式
function Person(name,age)
{
...
分类:
Web程序 时间:
2015-08-21 15:42:15
阅读次数:
164
The government of “Moderdesh” is planning to enter the digital age and so people of different profession
and business are proposing different ways to enter that age successfully. The hardware vendors...
分类:
其他好文 时间:
2015-08-20 19:01:34
阅读次数:
204
1、使用 __slots__ 给实例绑定方法,>>> def set_age(self, age): # 定义一个函数作为实例方法... self.age = age...>>>from types import MethodType>>>s.set_age=MethodType(set_a...
分类:
编程语言 时间:
2015-08-20 15:16:55
阅读次数:
136
{{name}} {{age}} {{name}} {{sel}} ...
分类:
Web程序 时间:
2015-08-20 14:44:41
阅读次数:
155
Invitation CardsTime Limit: 8000MSMemory Limit: 262144KTotal Submissions: 22277Accepted: 7298DescriptionIn the age of television, not many people atte...
分类:
编程语言 时间:
2015-08-20 12:57:43
阅读次数:
119
__definedGetter\Setter__ 是JS5在创建对象后内置的方法,用于在读写对象属性的时候执行的方法。 1 zhangmingzhi.__defineSetter__('age',function(age){ 2 if(age < 30){ 3...
分类:
其他好文 时间:
2015-08-19 23:29:26
阅读次数:
171
NSArray*persons=@[jack,tom,rose,lucy,bob,john,lily];//指定谓词条件NSPredicate*pre1=[NSPredicatepredicateWithFormat:@"age<40"];for(Person*personinpersons){//条件匹配//验证对象是否符合谓词pre1BOOLbool1=[pre1evaluateWithObject:person];if(bool1){NSLog(@"%@",..
分类:
编程语言 时间:
2015-08-19 17:51:49
阅读次数:
145