className.class.getResourceAsStream 用法: 第一:
要加载的文件和.class文件在同一目录下,例如:com.x.y 下有类Test.class
,同时有资源文件config.properties那么,应该有如下代码://前面没有“/”代表当前类的目录InputS...
分类:
编程语言 时间:
2014-05-12 16:18:54
阅读次数:
436
Given an unsorted array of integers, find the
length of the longest consecutive elements sequence.For example,Given[100, 4,
200, 1, 3, 2],The longest ...
分类:
其他好文 时间:
2014-05-10 20:06:26
阅读次数:
404
在J2EE中,注解使得开发更加便利,省去了生成XML文件的过程,在Hibernate实体声明中,可以简简单单的用几个注解就可以免去生成
一个XML的文件操作。这里就主要论述一下annotation的用法和自定义注解处理器。当在创建描述符性质的类或接口时,有大量重复性的工作时候,就
可以利用注解来.....
分类:
编程语言 时间:
2014-05-06 08:52:35
阅读次数:
341
GridView跟ListView都是比较常用的多控件布局,而GridView更是实现九宫图的首选!本文就是介绍如何使用GridView实现九宫图。GridView的用法很多,网上介绍最多的方法就是自己实现一个ImageAdapter继承BaseAdapter,再供GridView使用,类似这种的方...
分类:
其他好文 时间:
2014-05-06 01:18:37
阅读次数:
295
Say you have an array for which theithelement
is the price of a given stock on dayi.Design an algorithm to find the maximum
profit. You may complete a...
分类:
其他好文 时间:
2014-05-06 00:51:29
阅读次数:
353
相关函数fork, execle, execlp, execv, execve,
execvpWindows下头文件#include Linux下头文件#include 函数定义int execl(const char *path,
const char *arg, ...);函数说明execl()...
分类:
其他好文 时间:
2014-05-02 17:52:52
阅读次数:
674
这节,我们来通过具体的实例来看看Java8的具体用法。 首当其冲,就是lambda用法。
这里的案例,就是用lambda来实现runnable接口,我们知道以前用匿名内部类的方式来实现runnable接口,这种方法晦涩难懂,用lambda表达式实现以后,这样的代码清爽了不少。上两种对比的代码...
分类:
编程语言 时间:
2014-05-02 15:55:50
阅读次数:
310
我是好文章的搬运工,原文来自ChinaUnix,博主scq2099yt,地址:http://blog.chinaunix.net/uid-22312037-id-4217835.html一、基本用法grep是linux中很常用的一个命令,主要功能就是进行字符串数据的对比,能使用正则表达式搜索文本,并...
分类:
其他好文 时间:
2014-05-02 15:34:11
阅读次数:
353
1.C语言的基本数据类型直接与底层硬件相对应。2#define
是可能出现问题12345#define a(y) a_ex(y)a(x)被扩展为 a_ex(x)#define a (y) a_ex(y)a(x)被扩展为
(y) a_ex(y)(x)#define宏的用法1.简单宏定义1#define...
分类:
其他好文 时间:
2014-05-02 15:12:33
阅读次数:
253
Where's Waldorf?
Given a m by n grid
of letters, ( ),
and a list of words, find the location in the grid at which the word can be found. A word matches a straight, uninterrupted line o...
分类:
其他好文 时间:
2014-05-02 10:59:15
阅读次数:
514