先上curl监控web自动重启脚本(这个一个接口调用,只考虑返回码200的情况) #!/bin/bash?
check_ip="x.x.x.x"
check_port="6500"
logdir="/data/log/check/"
LOG="$logdir/check_interface.log"
#指定json格式post的...
分类:
Web程序 时间:
2015-03-12 11:44:54
阅读次数:
239
unit DateUtils;
interface
uses
SysUtils, Math, Types;
// 把完整时间分解成日期和时间两部分
function DateOf(const AValue: TDateTime): TDateTime;
function TimeOf(const AValue: TDateTime): TDateTime;
// ...
分类:
其他好文 时间:
2015-03-12 11:38:35
阅读次数:
177
设置IP、DNS、网关 >netsh?interface?ip?set?address?name="本地连接"?source=static?addr=192.168.132.5?mask=255.255.255.0
>netsh?interface?ip?set?address?name="本地连接"?gateway=192...
分类:
其他好文 时间:
2015-03-12 01:13:31
阅读次数:
243
#import "YYViewController.h" 10 11 //私有扩展 12 @interface YYViewController () 13 14 @property(nonatomic,weak)IBOutlet UIButton *headImageView; 15 @end.....
分类:
移动开发 时间:
2015-03-12 00:53:24
阅读次数:
273
#import "ViewController.h"#define kImage @"image"#define kDescribe @"describe"@interface ViewController ()@property (nonatomic, weak) UIImageView *pro...
分类:
其他好文 时间:
2015-03-12 00:50:27
阅读次数:
132
// 实现图片的旋转和移动和放大缩小#import "ViewController.h"@interface ViewController ()@property (nonatomic, weak) UIButton *_btnImage;@end@implementation ViewContro...
分类:
其他好文 时间:
2015-03-12 00:48:16
阅读次数:
191
#import "ViewController.h"@interface ViewController ()@property (nonatomic, weak) UITextField *_textName;@property (nonatomic, weak) UITextField *_tex...
分类:
其他好文 时间:
2015-03-12 00:40:04
阅读次数:
253
抽象类:
定义:包含抽象方法的类称为抽象类。
语法:抽象类和抽象方法都必须用abstract声明
抽象类可声明但不可直接实例化,抽象类的实例化必须依靠子类继承来完成。
抽象类中可包含构造方法,但依靠子类调用。
代码示例:
abstract class A{
public A(){ // 构造方法
System.out.println("**********************...
分类:
其他好文 时间:
2015-03-11 23:33:19
阅读次数:
293
初始化方法的模板 -(id) init { // 标准初始化模板 self = [super init]; if (self) { // 实例变量初始化 } return self ; }多个初始化方法 @interface Person : NSObject// 定义属性@property(non...
分类:
其他好文 时间:
2015-03-11 23:27:22
阅读次数:
180
在OC中我们可以通过指令@property定义属性。
OC对属性封装了许多方法,同时也会自动实现一些方法,相比实例变量,感觉更加面向对象些。
一般定义属性的方法如下,在Class Test中定义属性int a。
@interface Test:NSObject
@property int a;
-(void) changeAValue:(int) newValue;
@end
在类的实例方...
分类:
其他好文 时间:
2015-03-11 19:49:20
阅读次数:
9399