码迷,mamicode.com
首页 >  
搜索关键字:instance    ( 6546个结果
单例模式
方法一:(用互斥锁实现)1、ARC中单例模式的实现:1.1在.m中保留一个全局的static的实例static id _instance;1.2重写allocWithZone:方法,在这里创建唯一的实例(注意线程安全)+ (id)allocWithZone:(struct_NSZone*)zone{...
分类:其他好文   时间:2014-08-28 22:30:56    阅读次数:361
在aws上建立EC2与增加卷
新建instance时,不用新加vol,只需留root,后面到volumn那里创建卷。再添加到实例上。利用到的命令:sudo fdisk -llsblk分区:fdisk -S 56 /dev/xvdb依次输入“n”,“p”“1”,两次回车,“wq”,分区就开始了,很快就会完成。格式化:mkfs -t...
分类:其他好文   时间:2014-08-28 20:57:56    阅读次数:797
springmvc json
加入支持的jar: jackson-core-asl jackson-mapper-asl 项目pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mav...
分类:编程语言   时间:2014-08-28 18:12:27    阅读次数:414
spring mvc 上传文件
springmvc配置文件: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" ...
分类:编程语言   时间:2014-08-28 18:07:45    阅读次数:389
内存管理的常见错误
内存管理常见错误 没有改为自动管理内存     解决方法: 野指针问题 [Person retainCount]: message sent to deallocated instance 0x1002032d0 消息发送给一个已经回收的对象 野指针异常现象:可能会崩溃,也可能不会崩溃,写到某一行代码时突然崩溃(没有写任何和引用计数相关的...
分类:其他好文   时间:2014-08-27 14:50:58    阅读次数:194
spring整合quartz
pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v...
分类:编程语言   时间:2014-08-26 17:27:46    阅读次数:219
mysql 主从同步原理
Replication 线程 Mysql的 Replication 是一个异步的复制过程,从一个 Mysql instace(我们称之为 Master)复制到另一个 Mysql instance(我们称之 Slave)。在 Master 与 Slave 之间的实现整个复制过程主要由三个线程来完成.....
分类:数据库   时间:2014-08-26 11:09:25    阅读次数:248
场景(Scene)
// 创建Scene类class MyScene : public cocos2d::Layer{public: // there's no 'id' in cpp, so we recommend returning the class instance pointer static ...
分类:其他好文   时间:2014-08-26 11:07:05    阅读次数:195
JavaEE学习之路-Servlet Lifecycle
The lifecycle of a servlet is controlled by the container in which the servlet has been deployed. When a request is mapped to a servlet, the container performs the following steps. If an instance...
分类:编程语言   时间:2014-08-26 09:55:25    阅读次数:292
java解决 No enclosing instance of type XXX is accessible的问题
有些时候我们要把Activity的一些实现类移到java类里来实现,比如把写以下两个类: 在LifeCircle这个类中: public class LifeCircle { public class Mybroadcast extends BroadcastReceiver { @Override public void onReceive(Context context,...
分类:数据库   时间:2014-08-25 10:06:54    阅读次数:252
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!