File类测试
//根据指定的文件名和路径创建File对象
File file = new File("myFile.txt");
//file.exists();检测文件是否存在
boolean exists = file.exists();
System.out.println(exists);
//按照file对象指定的路径和文件名创建一个新的文件
...
分类:
编程语言 时间:
2014-06-05 09:31:59
阅读次数:
293
hibbernate的异常的一种情况
org.dom4j.DocumentException: Connection timed out
Connection timed out: connect Nested exception: Connection timed out: connect
出现这个异常的原因之一是读取配置文件超时。通常是在读...
分类:
系统相关 时间:
2014-06-05 08:52:44
阅读次数:
371
集合框架总览:
Collection 接口常用方法
//1.add()向集合中添加数据
c.add(apple01);
c.add(apple02);
c.add(apple03);
c.add(apple04);
c.add(apple05);
//2.isEmepty()检测当前集合是否为空
boolean empty = c.isEmpty();
System.out.println("i...
分类:
编程语言 时间:
2014-06-05 08:52:09
阅读次数:
323
这节我们介绍NFS的相关概念,以及如何配置NFS和在客户端中查看NFS。
NFS的配置过程很简单。在服务器端中编辑/etc/exports文件,添加如下内容:
/home/nfs-share 192.168.1.122 *(rw,sync)
第一项是要共享的目录,后者为共享的配置参数一般为:*(rw,sync,no_root_squash,no_all_squas...
分类:
系统相关 时间:
2014-06-05 06:13:16
阅读次数:
459
http://photo-sync.herokuapp.com/photos获取图片信息 最开始想的是用jquery ajax实现,用的传统的方法总是readystatus 等等都返回0 ,,百度怎么都不行,,,好吧,现在这么搞可以,之前不知道,现在mark一下$.ajax({ url: "http://photo-sync.herokuapp.com/photos",}).done(functi...
分类:
移动开发 时间:
2014-06-05 05:33:38
阅读次数:
204
date_default_timezone_set('PRC') or die('时区设置失败,请联系管理员!'); //设置php的时区,例如使用time函数
mysql_query("SET time_zone = '+8:00'") or die('时区设置失败,请联系管理员!'); //设置mysql的时区,例如使用now函数...
分类:
数据库 时间:
2014-06-05 00:27:46
阅读次数:
329
【题目】Given a set of files, of which the sizes
will not exceed 10 Gigabytes, find out whether an input string appears or
not.Your program is judged base...
分类:
其他好文 时间:
2014-06-03 07:15:17
阅读次数:
472
Hibernate provides SQL logging out of the box,
but such logging only shows prepared statements, and not the actual SQL queries
sent to the database.It...
分类:
数据库 时间:
2014-05-31 16:47:16
阅读次数:
514
ProblemYou want to point out a specific
location on a map to the user.SolutionUse built-in map view annotations. Follow
these steps:1. Create a new cl...
分类:
其他好文 时间:
2014-05-31 12:30:19
阅读次数:
240
#建立 CA 目录结构mkdir -p
./demoCA/{private,newcerts}touch ./demoCA/index.txtecho 01 >
./demoCA/serial#生成 CA 的 RSA 密钥对openssl genrsa -des3 -out ./demoCA/pri...
分类:
其他好文 时间:
2014-05-31 08:16:41
阅读次数:
252