1.适配器优化1.1ViewHolder类封装1.ViewHolder类
原始类
class ViewHolder{
TextView name;
TextView age;
}封装类
/**
* 封装视图类
* @author 顾学武
*/
public class CommViewHolder
{
/**
* 视图容器
*/
pr...
分类:
其他好文 时间:
2015-04-25 18:30:44
阅读次数:
162
connect('127.0.0.1','11211')){ echo '连接OK'.'';}else{ echo '连接失败'.'';}echo '';class mem{ public function __construct($name,$age){ $...
分类:
系统相关 时间:
2015-04-25 18:18:56
阅读次数:
224
在SpringMVC捕获异常只需要实现接口org.springframework.web.servlet.HandlerExceptionResolver,即可自定义返回异常,如:属性转换异常
@RequestMapping("/test")
@ResponseBody
public String str(Integer age) throws Exception {
retur...
分类:
编程语言 时间:
2015-04-25 16:42:01
阅读次数:
162
#include #include #include typedef struct student{ int id; char name[20]; int age; char sex; char birthday[20]; char address[20]; char phone[15]; char...
分类:
其他好文 时间:
2015-04-24 21:03:44
阅读次数:
369
1 int age = 0; 2 string vv = this.textBox2.Text; 3 if (int.TryParse(vv, out age)) 4 { 5 age = in...
分类:
其他好文 时间:
2015-04-24 18:08:30
阅读次数:
100
Person类中
@property(nonatomic,strong)
NSString * name ;
@property(nonatomic ,strong)NSString *year;
@property(nonatomic,assign)
int age;
-(id)initWithName:(NSString *)name andYear:(NSStri...
分类:
编程语言 时间:
2015-04-24 14:23:42
阅读次数:
158
实例:
复制简历
UML类图:
实例实现代码:
//简历
class Resume : ICloneable
{
private string name;
private string sex;
private string age;
private WorkExperie...
分类:
其他好文 时间:
2015-04-24 09:23:14
阅读次数:
178
为了阐明其作用,我们先来假设有如下一个Person类。
class Person
{
public Person(String name, int age)
{
this.name = name;
this.age = age;
}
private String name;
private int age;
public String getName()
{
ret...
分类:
其他好文 时间:
2015-04-23 23:33:11
阅读次数:
172
Scala 禁止case class inheritancecase class Person(name: String, age: Int)case class FootballPlayer(name: String, age: Int, number: Int) extends Person(n...
分类:
其他好文 时间:
2015-04-23 23:23:16
阅读次数:
299
我们一般获取某个类型或对象的属性信息均采用以下几种方法:一、通过类型来获取属性信息var p= typeof(People).GetProperty("Age");//获取指定属性var ps = typeof(People).GetProperties();//获取类型的所有属性二、通过实例来获取...
分类:
其他好文 时间:
2015-04-23 23:14:07
阅读次数:
169