public class Solution { public boolean isValid(String s) { if(s==null || s.length() st = new Stack(); for(int i=0;i<s.length();i++){ ...
分类:
其他好文 时间:
2015-05-31 09:03:35
阅读次数:
112
一:自定义实现InputFormat*数据源来自于内存 *1.InputFormat是用于处理各种数据源的,下面是实现InputFormat,数据源是来自于内存. *1.1 在程序的job.setInputFormatClass(MyselfmemoryInputFormat.class); *1....
分类:
其他好文 时间:
2015-05-31 07:58:22
阅读次数:
158
有些时候你想在运行时加载一个lib或者function or class,这种事情经常发生在你开发一个plugin或者module时遇到。在C语言里,你可以轻松的利用dlopen, dlsym, dlclose来做到,但是在C++的世界里却没那么简单了。本文简单介绍如何在运行时加载c++ function和class的简单实现方法。...
分类:
其他好文 时间:
2015-05-31 06:50:16
阅读次数:
119
Runtime Complexity of .NET Generic CollectionI had to implement some data structures for my computational geometry class. Deciding whether to implemen...
分类:
Web程序 时间:
2015-05-31 06:47:30
阅读次数:
228
点选主要是重载osg的GUIEventHandler, 1 class CPickHandler : public osgGA::GUIEventHandler{ //自定义回调函数名:CPickHandler 2 osgViewer::Viewer * mViewer; //在...
分类:
编程语言 时间:
2015-05-31 06:46:12
阅读次数:
200
------- android培训、java培训、期待与您交流! ----------22.01 数据输入输出流的概述和讲解操作基本数据类型public class DataInputStreamextends FilterInputStream implements DataInput数据输入流允...
分类:
编程语言 时间:
2015-05-31 01:24:19
阅读次数:
263
过滤器
1、概述:过滤器就像一个保安,可以对请求和响应进行拦截。
2、编写过滤的步骤:
1)编写一个类,实现javax.servlet.Filter接口,这样的类一般称之为过滤器类
public class FilterDemo1 implements Filter {
public void init(FilterConfig filterConfig) th...
分类:
其他好文 时间:
2015-05-31 00:09:17
阅读次数:
168
namespace 计算器_新{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private bo...
namespace 记事本{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } //编辑栏 ...
分类:
其他好文 时间:
2015-05-30 23:55:00
阅读次数:
191
CGLIB(Code Generation Library),简单来说,就是一个代码生成类库。它可以在运行时候动态是生成某个类的子类。
此处使用前面定义的 Chinese 类,现在改为直接使用 CGLIB 来生成代理,这个代理类同样可以实现 Spring AOP 代理所达到的效果。
下面先为 CGLIB 提供一个拦截器实现类:
public class AroundAdvice imple...
分类:
编程语言 时间:
2015-05-30 22:42:18
阅读次数:
212