一、概述:我们可以将Redis中的Hashes类型看成具有StringKey和StringValue的map容器。所以该类型非常适合于存储值对象的信息。如Username、Password和Age等。如果Hash中包含很少的字段,那么该类型的数据也将仅占用很少的磁盘空间。每一个Hash可以存储4294967295个键值对。二、..
分类:
其他好文 时间:
2015-05-14 20:43:55
阅读次数:
143
Mybatis在使用resultMap来映射查询结果中的列,如果查询结果中包含空值的列(不是null),则Mybatis在映射的时候,不会映射这个字段,例如 查询 name,sex,age,数据库中的age字段没有值,Mybatis返回的map中只映射了 name和sex字段,而age字段则没有包含...
分类:
其他好文 时间:
2015-05-14 18:15:17
阅读次数:
238
prototype的经典使用场景就是为对象增加属性和方法,如给自定义的Man对象增加个姓名属性和语言方法:function man() {this.age = "22";}var tom = new man();man.prototype.name = "tom";man.prototype.say...
分类:
编程语言 时间:
2015-05-14 17:59:00
阅读次数:
160
A.封装内部细节,根据需求暴露方法 1 #import 2 3 @interface Student : NSObject 4 { 5 int age; 6 } 7 8 - (void) setAge:(int) newAge; 9 - (int) age;10 11 - (void)...
分类:
其他好文 时间:
2015-05-13 21:27:54
阅读次数:
116
1.NSString基本使用使用%@占位符输出对象1 int age = 15;2 int no = 5;3 NSString *str2 = [NSString stringWithFormat:@"My age is %d and no is %d", age, no];...
分类:
其他好文 时间:
2015-05-13 21:17:55
阅读次数:
125
A. 基本知识与数组的对比数组:构造类型只能有多个相同类型的数据构成结构体:结构体类型可以由多个不同类型的数据构成1. 定义类型1 struct Student2 {3 int age;4 char *name;5 float heig...
分类:
编程语言 时间:
2015-05-13 18:33:47
阅读次数:
157
@synthesize用法1)@property int age; @synthesize age; 表示生成.h中变量 age的 get和 set方法注意: 如果@synthesize 变量名要先在.h文件中声明 @property int age; @synthesize age;展...
分类:
其他好文 时间:
2015-05-13 16:35:52
阅读次数:
102
Dog *d = [Dog new];//查看对象地址NSLog(@"\n d= %p ",d);//打印的为地址 例:0x1001002e0//查看对象实例变量的值NSLog(@"\n %d",[d age]);//打印d的对象NSLog(@"\n@=",d); //例 调用了对象的 descr....
分类:
其他好文 时间:
2015-05-13 12:40:47
阅读次数:
105
public class Person{ private String name;//,sex; private int age; public Person(String name, int age) { super(); this.name =...
分类:
其他好文 时间:
2015-05-13 12:16:11
阅读次数:
119
有一类特殊的属性,即这个属性的类型是另外一个JavaBean,如有一个User类,代码如下:
package data;
public class User
{
private String name;
private int age;
public String getName()
{
return name;
...
分类:
其他好文 时间:
2015-05-13 10:38:35
阅读次数:
128