最近一直没有写笔记, 总感觉自己少了点什么, 也没有转载什么有用的笔记, 今天小弟特此献上一篇图片旋转和保存旋转的功能实现, 注意这是转载, 我是来当自己笔记的, 哈哈哈哈... 1 @interface ViewController () 2 { 3 UIImageView * iv; 4...
分类:
其他好文 时间:
2014-07-16 18:41:02
阅读次数:
195
#import "AppDelegate.h"#import "FisrtViewController.h"@interface AppDelegate () @end@implementation AppDelegate - (BOOL)applicat...
分类:
其他好文 时间:
2014-07-16 18:16:12
阅读次数:
156
l GDI图形接口l 绘制图形l DC,HDC设备CDC类l 绘制矩形 一、了解GDI与GUI GDI是Graphics Device Interface的缩写,含义是图形设备接口,它的主要任务是负责系统与绘图程序之间的信息交换,处理所有Windows程序的图形输出。 在Windows操作系统下,绝...
分类:
其他好文 时间:
2014-07-16 00:52:32
阅读次数:
394
1.virtual 函数版本
class GameCharacter{
public:
virtual int healthValue() const; //返回人物的健康指数, derived classes 可重新定义它
};
2.使用 non-virtual interface 手法,那是 Template Method 设计模式的一种特殊形式。
让客户通过 public non-virtual 成员函数间接调用 private virtual 函数
class GameCharacter{
pu...
分类:
编程语言 时间:
2014-07-15 22:36:18
阅读次数:
364
-----------------------------------IDocument.cs(定义一个接口)usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
namespaceConsoleApplication3
{
publicinterfaceIDocument
{
stringTitle{get;set;}//文..
分类:
其他好文 时间:
2014-07-15 11:38:31
阅读次数:
272
iOS 的单例模式 dispatch_once
有些变量只需要初始化一次(如从文件中读取配置参数,读取设备型号等等),可以使用dispatch_once来进行读取优化,保证只调用API一次,以后就只要直接访问变量即可.
WeatherClient.h
#import "AFHTTPClient.h"
@interface WeatherClient : AFHTTPClient
+(WeatherClient *)sharedClient;
@end
WeatherClient.m...
分类:
移动开发 时间:
2014-07-14 18:45:46
阅读次数:
251
场景说明:目前在CentOS版本上进行网桥br0到普通网络的配置eth0,发现如下的一个问题ifconfigbr0Linkencap:EthernetHWaddr00:0C:29:5D:07:15inetaddr:192.168.40.250Bcast:192.168.40.255Mask:255.255.255.0inet6addr:fe80::20c:29ff:fe5d:715/64Scope:LinkUPBROADCASTRUNNINGMU..
分类:
其他好文 时间:
2014-07-14 16:35:23
阅读次数:
1017
@interface MoveView : UIView{ CGPoint startPoint;}#import "MoveView.h"@implementation MoveView- (id)initWithFrame:(CGRect)frame{ self = [super i...
分类:
其他好文 时间:
2014-07-14 15:42:42
阅读次数:
157
#import "ViewController.h"@interface ViewController () @property (weak, nonatomic) IBOutlet UIImageView *imageView;@end/**// 下载进度跟进- (void)URLSession:...
分类:
其他好文 时间:
2014-07-14 14:53:15
阅读次数:
271
执行 service network restart 出现了网卡无法启动,说找到不到
Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization
解决办法:
1》 修改/etc/udev/rules.d/70-persistent-net.rules文件,删除或...
分类:
其他好文 时间:
2014-07-14 13:36:10
阅读次数:
255