public static String sendPost(String url, String
param)throws Exception { PrintWriter out = null; BufferedReader in = null;
Stri...
分类:
其他好文 时间:
2014-06-10 09:30:00
阅读次数:
234
获取资源timeout:异常信息如下:Caused by:
java.sql.SQLException: An attempt by a client to checkout a Connection has timed
out.[Cause: com.mchange.v2.resourcepool...
分类:
其他好文 时间:
2014-06-09 19:30:09
阅读次数:
728
子类在继承父类后,创建子类对象会首先调用父类的构造函数,先运行父类的构造函数,然后再运行子类的构造函数,例如以下所看到的:class
Father{ public Father(){ System.out.println("I am father"); }}public class Child
e....
分类:
编程语言 时间:
2014-06-09 19:22:33
阅读次数:
203
System.out.println("java版本号:" +
System.getProperty("java.version")); // java版本号 System.out.println("Java提供商名称:"
+ System.getProperty("java....
分类:
其他好文 时间:
2014-06-09 17:16:33
阅读次数:
210
刚安装了,office2010,打开里面的access时,总是提示要配置Office single
image,但打开word和excel没问题,很是不舒服在网上找到N种方法,试下来还是不行。后来就把office2010卸掉,重新安装了一下,安装的时候,只把里面用不到的输入法、publish,out...
分类:
数据库 时间:
2014-06-09 16:52:40
阅读次数:
338
服务器配置编辑/etc/exports,在文件中列出,要共享的目录。书写规则是:共享目录主机(参数)。并且每条规则占据一行。例如:/mnt/mp3
192.168.10.168(ro,sync, no_root_squash)上面的规则代表将/mnt/mp3目录以读写同步方式共享给主机192.168...
分类:
其他好文 时间:
2014-06-09 13:23:49
阅读次数:
378
yum install "@Chinese
Support"System->Preferences->Input Method,勾选"Enable input method
feature",Input Method选择"Use IBus",Log Out重新登录后"ctrl+空格"即可切换输入法
分类:
其他好文 时间:
2014-06-09 00:54:37
阅读次数:
182
项目里面 需要对已手机号码进行 如下的显示比如15088688388
要显示为150****8388的效果实现这个简单的效果
方法有很多我想试试用正则表达式去实现查了点资料最终试出来以下方法可行System.out.println("15088688388".replaceAll("(\\d{3})...
分类:
其他好文 时间:
2014-06-08 19:00:34
阅读次数:
203
遍历List集合中的元素的方法有两种:
第一种:利用迭代器遍历
代码1:
// 迭代器
Iterator it=list.iterator();
while(it.hasNext())
{
System.out.println(it.next());
}或者代码2:
for(Iterator it=list.iterator();it.hasNext();)
{
System.o...
分类:
其他好文 时间:
2014-06-08 15:22:50
阅读次数:
189
文件输入输出
使用文件流对象
创建文件流对象时,我们可以提供文件名(可选)。如果提供了一个文件名,则open会自动被调用:
ifstream in(ifile); //构造一个ifstream并打开给定文件
ofstream out; //输出文件流未关联到任何文件
用fstream代替iostream&
首先这里有一个头文件和一个定义的文件要使用
...
分类:
编程语言 时间:
2014-06-08 03:10:07
阅读次数:
253