属性定义@interface Nothin : NSObject@property NSString *prop;@end访问属性 Nothin *nothin = [Nothin new]; //get [nothinprop]; //set [nothin setProp: @"Nothin"]...
分类:
其他好文 时间:
2014-07-22 08:13:34
阅读次数:
302
#import <Foundation/Foundation.h> @interface NSString (InputCheck) - (BOOL) validateEmail; - (BOOL) validateMobile; - (BOOL) validateqq; - (BOOL) validateRealName; - (BOOL) validateNickName; - (BOO...
分类:
移动开发 时间:
2014-07-21 10:27:02
阅读次数:
211
百度找了一下没找到,谷歌搜一下就出来了(会点英语就是好) 直接在注解上面加@Inherited @Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface MyAnnotation {
} 原来C...
分类:
其他好文 时间:
2014-07-21 10:15:56
阅读次数:
482
【Interface Property】 Properties can be declared on aninterface (C# Reference). 按如下形式实现interfac来避免冲突。 在没有interface前缀的情况下,编译器不会报错,2个interface引用同一...
分类:
其他好文 时间:
2014-07-21 10:03:52
阅读次数:
253
环境要求:JDK1.7,并配置Java的环境变量BaseDao 接口:/*** 要使得成为一个可供访问的接口,必须添加:@WebService* */@WebServicepublic interface BaseDao { //添加一个加法的接口 @WebResult(name="adddddd....
分类:
编程语言 时间:
2014-07-21 00:29:05
阅读次数:
333
一、简单工厂模式
1.动物管理系统的例子
public interface Animal{
public void eat();
}
public class Tiger implements Animal
{
public void eat(){
sysout.out.println("老虎会吃");
};
public void run(){
sysou...
分类:
其他好文 时间:
2014-07-20 23:03:30
阅读次数:
195
#import "ViewController.h"#import "FMDB.h"@interface ViewController ()- (IBAction)insert;- (IBAction)update;- (IBAction)delete;- (IBAction)select;@pro...
分类:
数据库 时间:
2014-07-20 23:00:11
阅读次数:
455
iOS开发中,发现UITextView没有想UITextField中textFieldShouldReturn:这样的方法,那么要实现UITextView return键隐藏键盘,可以通过判断输入的字符是不是回车符来实现。首先,声明要实现UITextView 的delegate。@interface...
分类:
其他好文 时间:
2014-07-20 21:31:57
阅读次数:
224
最近看的关于网络爬虫和模拟登陆的资料,发现有这样一个包mechanize ['mek?.na?z]又称为机械化的意思,确实文如其意,确实有自动化的意思。mechanize.Browser and mechanize.UserAgentBase implement the interface of u...
分类:
其他好文 时间:
2014-07-20 10:13:11
阅读次数:
213
先从一个例子开始讲起,以下是jdk1.7中的迭代器接口的代码(去掉了注释的部分): public interface Iterator { boolean hasNext(); E next(); void remove();} 程序开发的老油条们都不太喜欢这个接口的remove方法,原因可能是: ...
分类:
其他好文 时间:
2014-07-19 23:01:14
阅读次数:
206