1. 1 #import "Fraction.h" 2 3 @interface Fraction (MathOps) 4 5 - (Fraction *) add: (Fraction *) f; 6 7 - (Fraction *) mul: (Fraction *) f; 8 9 - ...
分类:
其他好文 时间:
2014-11-21 01:22:09
阅读次数:
139
复制了一个eth0 的网卡 内容为eth1但是在service network restart 重启的时候出现 [root@ssc ~]# service network restartShutting down interface eth0: ...
分类:
其他好文 时间:
2014-11-20 21:39:35
阅读次数:
276
ASIHttpRequest是一个很好的库,不过直接使用稍嫌麻烦,下面就尝试来封装一下吧!
思路:每次请求时,需要创建一个ASIHttpRequest对象,设置它的属性(url,delegate,postValue,requestMethod等)之后即可开始异步请求。所以我们可以创建一个类,对外提供一个请求方法,结构如下:@interface RequestService : NSObject
...
分类:
Web程序 时间:
2014-11-20 17:03:12
阅读次数:
141
自定义导航栏:
// CustomNaviBarView.h
#import
@interface CustomNaviBarView : UIView
{
@private
/**
* 左侧按钮
*/
UIButton* _leftButton;
/**
* 右侧按钮
*/
UIButton* _rightBu...
分类:
移动开发 时间:
2014-11-20 13:44:01
阅读次数:
189
引入OC类库md5.h:#import @interface Md5Controller : UIViewController@endmd5.m:#import "Md5Controller.h"@interface Md5Controller ()@end@implementation Md5Co...
分类:
编程语言 时间:
2014-11-20 11:39:13
阅读次数:
237
#import@interface ViewController : UIViewController@property (retain, nonatomic) IBOutlet UIImageView *imgV;- (IBAction)openCamera:(id)sender;- (IBAct...
分类:
移动开发 时间:
2014-11-20 06:48:42
阅读次数:
257
#import #import "ViewController.h"@interface ViewController ()@property(nonatomic, weak) IBOutlet UILabel *label1;@end@implementation ViewController- ...
分类:
其他好文 时间:
2014-11-20 06:44:28
阅读次数:
307
接口(interface)可以说成是抽象类的一种特例,接口中的所有方法都必须是抽象的。接口中的方法定义默认为public abstract类型,接口中的成员变量类型默认为public static final。下面比较一下两者的语法区别:1.抽象类可以有构造方法,接口中不能有构造方法。2.抽象类中可...
分类:
其他好文 时间:
2014-11-20 01:18:41
阅读次数:
186
一直以来知道plsqldev有格式化功能,每次写完sql后,也习惯性的点击按钮来进行格式化,只是未曾注意到还可以对默认格式化进行设置。昨天刚从同事那学来的,在此分享下。默认格式化设置方法:Tools->Preference->User Interface->PL/SQL Beautifier界面,点...
分类:
数据库 时间:
2014-11-19 18:25:30
阅读次数:
339
在做UIAlertView取消操作时,发现委托函数alertViewCancel:并不被调用,只好在alertView: didDismissWithButtonIndex:中进行判断。 1 @interface DateViewController () 2 @property (weak, n....
分类:
移动开发 时间:
2014-11-19 13:58:19
阅读次数:
186