今天一起来探讨一下Objective-C中几种不同方式实现的锁,在这之前我们先构建一个测试用的类,假想它是我们的一个共享资源,method1与method2是互斥的,代码如下:12345678910111213@implementation TestObj- (void)method1{ NSLo....
分类:
其他好文 时间:
2015-06-01 13:00:28
阅读次数:
144
ASI#import "ViewController.h"
#import "ASIHTTPRequest.h"@interface HMViewController ()
@property (nonatomic, strong) ASIHTTPRequest *request;
@end@implementation HMViewControll...
分类:
移动开发 时间:
2015-06-01 11:37:11
阅读次数:
153
完整代码如下: /*
?*?this?file?is?the?implementation?of?hanoi?game
?*?file?name:?hanoi.c
?*?author:?John?Woods
?*?date:?2015/05/30
?*?statement:?anyone?can?use?this?file?...
分类:
编程语言 时间:
2015-05-31 00:09:54
阅读次数:
140
Servlet implementation class NewsListServlet 1 package com.wangjialin.server.xml; 2 3 import java.io.IOException; 4 import java.util.List; 5 6 impor.....
分类:
移动开发 时间:
2015-05-30 12:01:57
阅读次数:
143
Servlet implementation class NewsListServlet 1 package com.wangjialin.server.xml; 2 3 import java.io.IOException; 4 import java.util.List; 5 6 impor.....
分类:
移动开发 时间:
2015-05-30 12:00:03
阅读次数:
137
#import "ZYDownViewController.h"@interface ZYDownViewController ()@end@implementation ZYDownViewController{ // NSMutableData * buffer; long long _tot....
分类:
移动开发 时间:
2015-05-28 17:44:24
阅读次数:
220
前言: 2004年,IBM在13th USENIXSecurity Symposium上发表文章《Design and Implementation of a TCG-based Integrity MeasurementArchitecture》,第一次提出了IMA架构。该架构通过在内核中进行patch,实现当应用程序运行、动态链接库加载、内核模块加载时,将用到的代码和关键数据(如配置文件和结构化数据)做一次度量,将度量结果扩展到PCR10,并创建与维护一个度量列表ML。当挑战者发起挑战时,将度量列表与T...
分类:
其他好文 时间:
2015-05-27 15:56:35
阅读次数:
2939
//person.M// -------- computer属性的存在时间//------------ person的存在时间 #import "Person.h"#import "Computer.h"#import "ClassRoom.h"@implementation Person...
分类:
其他好文 时间:
2015-05-26 21:16:44
阅读次数:
136
@interface ViewController (){ UIView *firstView; UIView *secondView; UIView *thirdView; }@end@implementation ViewController- (void)v...
分类:
移动开发 时间:
2015-05-26 18:39:24
阅读次数:
160
【C++自我精讲】基础系列六 PIMPL模式
前言
很实用的一种基础模式。
1 PIMPL解释
定义:PIMPL(PrivateImplementation
或 Pointer to Implementation)是通过一个私有的成员指针,将指针所指向的类的内部实现数据进行隐藏。
2 PIMPL优点
举例:
//x.h
class X
{...
分类:
编程语言 时间:
2015-05-25 09:59:16
阅读次数:
132