/** * 得到汉字字库的集合 * @return */ public static Map
getChinaWordStorage() { BufferedReader bu=null; try { Map ma...
分类:
其他好文 时间:
2014-06-11 11:39:12
阅读次数:
265
//get 发送短信 public static String send_sms(String
mobile_phone, String msg) { String ret_str = ""; BufferedReader rd=null; try
{...
分类:
其他好文 时间:
2014-06-11 11:31:29
阅读次数:
216
assert宏的原型定义在中,其作用是假设它的条件返回错误,则终止程序运行,原型定义:#include
void assert( int expression );assert的作用是现计算表达式 expression
,假设其值为假(即为0),那么它先向stderr打印一条出错信息,然后通过调用 ...
分类:
其他好文 时间:
2014-06-11 07:53:25
阅读次数:
190
在专业化的软件开发过程中,无论什么平台语言,现在都需要UnitTest单元测试.
Node.js有built-in的Assert。 今天让我们来看一下Node.js的单元测试。在这儿我们使用nodeunit, 通过NPM安装: npm
install nodeunit -g 支持命令行,浏览器运行....
分类:
Web程序 时间:
2014-06-10 00:11:06
阅读次数:
397
在create table的时候出现如下问题
1. ERROR: java.io.IOException: Table Namespace Manager not ready yet, try again later
解决方案:这个问题是从单机配置到多机配置的时候出的问题,修改conf/hbase-env.sh 注释掉export HBASE_MANAGES_ZK=true...
分类:
其他好文 时间:
2014-06-09 23:38:14
阅读次数:
304
5年前写的站, 当时是在apache下写的error page, 换了nginx后, 404页面直接跳到了500 服务器内部错误.
只需要在配置
try_files 的时候指定一下就可以了
我的是debian, 在/etc/nginx/site-available/default 里面location /
server{
location / {
try_fi...
分类:
其他好文 时间:
2014-06-08 17:01:43
阅读次数:
204
异步模型看起来很美,但其实它也是有天生缺陷的.看下面代码
try {
setTimeout( function(){
throw new Error( '你抓不到我的!' );
}, 100);
} catch (e) {
console.error(e);
}
如果你已经理解了上一篇博客,那你一定了解了这样的写法是捕...
分类:
编程语言 时间:
2014-06-08 14:54:17
阅读次数:
328
public static Date stringToDate(String str) {
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Date date = null;
try {
// Fri Feb 24 00:00:00 CST...
分类:
编程语言 时间:
2014-06-08 09:49:00
阅读次数:
268
@Test@Before@After测试方法运行前执行Before动作(比如创建资源),运行后执行After动作(比如销毁资源)@BeforeClass@AfterClass测试类运行前执行Before动作(比如创建资源),运行后执行After动作(比如销毁资源)Assert对方法结果进行判断,是否...
分类:
编程语言 时间:
2014-06-07 23:08:14
阅读次数:
319
package chap04_Divide_And_Conquer;import static
org.junit.Assert.*;import java.util.Arrays;import org.junit.Test;/** * 算反导论第四章
4.1 最大子数组 * * @author ....
分类:
其他好文 时间:
2014-06-07 20:21:38
阅读次数:
212