Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3....
分类:
其他好文 时间:
2014-04-29 13:47:20
阅读次数:
251
今天想在应用的Loading页面加载一个gif动画,但又不知道怎么弄,就网上搜了下,看到好多人都是使用ant.cy.liao@gmail.com写的GifView.jar包,
于是就简单了解了一下:
看了下作者的源码,编写的GifView继承自View,那么在使用的时候也就很方便了,可以当做一个普通的UI组件来用。
在使用普通的UI组件的时候,我们一般都使用如下的方式:...
分类:
移动开发 时间:
2014-04-29 13:42:21
阅读次数:
545
有时候我们会需要在界面上拖动view;uiview是继承于uiresponder的,所以可以响应触摸相关的事件。
重点是以下一组方法:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent...
分类:
移动开发 时间:
2014-04-29 13:41:20
阅读次数:
485
Hadoop2.3.0+Hbase0.96.1.1+Hive0.14.0+Zookeeper3.4.6+Sqoop1.99.3安装配置流程
一、 配置Hadoop
源码包:hadoop-2.3.0-src.tar.gz
1. 安装以下软件:
yum -yinstall lzo-devel zlib-devel gcc autoconf automake li...
分类:
其他好文 时间:
2014-04-29 13:37:20
阅读次数:
541
从开始看STL源码到今天差不多有一个月的时间了,在这研读STL源码过程中确实学习到了很多,深深被大师们的设计思想所打动。其中使用迭代器的思想是其STL的最大的亮点,通过泛型编程,是得所有的容器对外都提供统一的访问接口,而屏蔽掉了各个容器底层实现的细节。相对了面向对象的编程,泛型编程同样能够实现多态的功能,而且还具有更高的安全性以及效率,因为泛型编程就是编译期间就已经决定了变量的类型。...
分类:
其他好文 时间:
2014-04-29 13:36:19
阅读次数:
701
在制作元件package封装,选择package type 封装为Heterogeneous,给元件新定义封装,却在原理图中显示不了。
解决方法:
1、调出如图所示User Property对话框(Option----》Part properties),图中方框中的packGRP为笔者定义属性,却没在原理图中显示。
2、选中新建属性-----点击右侧的Display,如下图所示:
...
分类:
其他好文 时间:
2014-04-29 13:34:21
阅读次数:
364
#include
using namespace std;
template
class testClass{
public:
static int _data;
};
int testClass::_data = 1;
int testClass::_data = 2;
int main()
{
cout ::_data << endl;
cout ::_data << ...
分类:
其他好文 时间:
2014-04-29 13:21:20
阅读次数:
410
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
void func()
{
string url;
cout << "输...
分类:
Web程序 时间:
2014-04-29 13:21:20
阅读次数:
506
会话清除与过期
程序主动清除session数据
设置会话失效:session.invalidate()
移除会话中一个属性:
语法:public void removeAttribute(String name);
服务器主动清除长时间没有再次发出请求的session
设置会话过期时间
方法一:public void setMaxInactiveInterval(int interv...
分类:
编程语言 时间:
2014-04-28 10:36:41
阅读次数:
322