迭代器模式(iterator pattern) 详解本文地址: http://blog.csdn.net/caroline_wendy迭代器模式(iterator pattern) : 提供一种方法顺序访问一个聚合对象中的各个元素, 而又不暴露其内部的表示;建立迭代器接口(iterator interface), 包含hasNext()方法和next()方法;不同聚合对象的具体的迭代器(concr...
分类:
其他好文 时间:
2014-06-28 07:43:35
阅读次数:
306
这两天在服务器为php安装curl拓展是遇到一个问题。很是纠结了一下...系统是centos6.464位系统,php版本5.3.3,因需要安装curl拓展,但是使用5.3.3的源码包安装curl拓展时make报错:/php-5.3.3/ext/curl/interface.c:319:警告:初始化丢弃了指针目标类型的限定/php-5.3.3/ext/cu..
分类:
Web程序 时间:
2014-06-28 00:57:26
阅读次数:
310
代码:SELECTa.First_Load_Time,
a.Sql_Text,
s.Sid,
s.Serial#,
s.Program--,
,
a.*
--Utl_Inaddr.Get_Host_Address(s.Terminal)Ip
FROMV$sqlareaa,V$sessions
WHEREs.Sql_Address(+)=a.Address
ANDUpper(a.Sql_Text)LIKE‘%DELETEFROM%MTL_TRANSACTIONS_INTERFACE%‘;有人删除..
分类:
数据库 时间:
2014-06-28 00:41:47
阅读次数:
423
第一步:我们需要在Fragment中定一个接口,并确保我们的容器Activity实现了此接口:
public interface onTestListener {
public void onTest(String str);
}
@Override
public void onAttach(Activity activity) {
super.onAttach(act...
分类:
其他好文 时间:
2014-06-27 23:30:44
阅读次数:
229
单元不能被循环引用(Circular unit reference)的。循环引用的意思是:A引用了B,而B又引用了A,且都是在interface部分进行引用。example:unit Unit1;interfaceusesUnit2;......unit Unit2;interfaceuses Un...
分类:
其他好文 时间:
2014-06-27 15:10:23
阅读次数:
233
工程目录:Singleton.h//.h#define single_interface(class) + (class *)shared##class;//.m// \ 代表下一行也属于宏// ##是分隔符#define single_implementation(class) \static c...
分类:
数据库 时间:
2014-06-27 14:15:13
阅读次数:
255
在IOS开发中经常会用到回调的情况,下面介绍如何用block实现回调。1 #import 2 3 @interface BLock : NSObject4 5 + (void)getBlock:(void (^)(NSString *))someblock;6 7 @endBLock.h 1 #im...
分类:
移动开发 时间:
2014-06-27 13:05:40
阅读次数:
159
一个简单的计算器例子来描述工厂模式
Operator公共接口
package com.iss.factory;
public interface Operator {
public int getResult(int x, int y);
}
Add.java
package com.iss.factory;
public class Add i...
分类:
其他好文 时间:
2014-06-27 08:34:28
阅读次数:
243
首先代理的类和被代理的类要实现共同的接口其实也就是通过接口进行代理,然后在代理类的构造函数中创建被代理类的实例就可以实现代理了。
这样可能很乱看代码就知道明白了!
公共接口类
package com.iss.proxy;
public interface Object {
void action();
}
被代理类
package com.iss.proxy;
...
分类:
其他好文 时间:
2014-06-27 08:29:04
阅读次数:
217
1.将图片放进images文件夹,并改名为images.bundle.拖进项目中
2拖动scrollView 并在左上角按住Scroll View 拖到View Controller中 选择deleagte.
这时候.指定Scroll View的代理为controller.
为指定的controller加上代理
#import
@interface C...
分类:
移动开发 时间:
2014-06-27 07:19:43
阅读次数:
259