摘要:
URLConnection类给应用 程序 和web资源之间架设起了通信的桥梁,这些web资源通常是通过url来标记的,本文将讲述如何使用HttpURLConnection来访问web页面(发送数据流)和读取数据流。 在Servlet中对于需要用post方式(get会暴露参数)写入参数的时候就用到了HttpURLConnection. 请求的Servlet,也可以写入main方法中进行测试package com; import JAVA .io.BufferedReader; import java.io.IOException; import java.io.... 阅读全文
posted @ 2013-07-08 14:33
jlins
阅读(1169)
评论(0)
推荐(0)
摘要:
一般查询实体的时候,都需要这么使用/** * 根据id查询 * * @return */ public Emp queryEmpById(Integer id) { String sql = "select * from emp where empno = ?"; ParameterizedRowMapper mapper = new ParameterizedRowMapper() { public Emp mapRow(ResultSet rs, int rowNum) throws SQLException { Emp emp ... 阅读全文
posted @ 2013-07-08 14:31
jlins
阅读(621)
评论(0)
推荐(0)
摘要:
我下载的是 mongo-2.8.0.jar — Version 2.8.0 打开mongo shell -- 新建数据库test --( use test) 打开eclipse新建工程,把junit,mongo-2.8.0.jar导入。 新建测试类如下: package com.db; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.List; import org.bson.types.ObjectId; import org.j... 阅读全文
posted @ 2013-07-08 14:29
jlins
阅读(317)
评论(0)
推荐(0)
摘要:
在前面,我们分别使用Pointcut、Advice、Advisor接口来描述切点、增强、切面。而现在我们使用@AdpectJ注解来描述。在下面的例子中,我们是使用Spring自动扫描和管理Bean。(http://blog.csdn.net/p_3er/article/details/9239605) 3.6.1一个简单的例子 a、目标类 @Repositorypublic class UserDaoImpl implements UserDao { public void save() { System.out.println("保存用户..."); } public v 阅读全文
posted @ 2013-07-08 14:27
jlins
阅读(4395)
评论(0)
推荐(1)
摘要:
如题: 一般而言虚拟机不会卡的。CPU跟随你的操作而增减,内存设置vmware的推荐值就好。遇到卡的情况,检查一下如下情况。 两个方法: 1》内存分配最好是1G,512少了点 2》虚拟机的定制服务少下来,如下图: 3》还不能解决,硬件改升级了,或者出了些问题。 阅读全文
posted @ 2013-07-08 14:25
jlins
阅读(1268)
评论(0)
推荐(0)
摘要:
@interface myGrayTexture : CCTexture2D// @param exposure 曝光+(id) textureWithFile:(NSString*) file exposure:(int) exposure;@end @implementation myGrayTexturetypedef enum { ALPHA = 0, BLUE = 1, GREEN = 2, RED = 3} PIXELS;+(UIImage*) getGrayImage:(NSString*) file exposure:(int) exposure{ ... 阅读全文
posted @ 2013-07-08 14:23
jlins
阅读(266)
评论(0)
推荐(0)
摘要:
昨晚在编译源码,make一段时间之后报错如下:# A fatal error has been detected by the Java Runtime Environment:## SIGSEGV (0xb) at pc=0x40362d33, pid=12195, tid=2835454784## JRE version: 6.0_45-b06# Java VM: Java HotSpot(TM) Server VM (20.45-b01 mixed mode linux-x86 )# Problematic frame:# V [libjvm.so+0x158d33][error o.. 阅读全文
posted @ 2013-07-08 14:20
jlins
阅读(293)
评论(0)
推荐(0)
摘要:
把QString转换为double类型 方法1.QString str="123.45"; double val=str.toDouble(); //val=123.45 方法2.很适合科学计数法形式转换 bool ok; double d; d=QString("1234.56e-02").toDouble(&ok); //ok=true;d;12.3456. 把QString转换为float形 1.QString str="123.45"; float d=str.toFloat(); //d=123.45 2.QStri 阅读全文
posted @ 2013-07-08 14:19
jlins
阅读(5205)
评论(0)
推荐(0)
摘要:
Abstract Our dating site introduced scoring and its related functionalities innovatively, conforming to people's natural inclination to score people of the other sex, while other sites simply ignored. In addition, we use the 2012 Nobel Laureate El Roth's algorithm to compute a fair match set 阅读全文
posted @ 2013-07-08 14:17
jlins
阅读(270)
评论(0)
推荐(0)
摘要:
一、用户与用户组为了更好地理解文件权限,我们需要先有用户和用户组的概念。因为在Linux里面,任何一个文件都具有“User(用户)、Group(用户组)及Others(其他用户)”3种身份的个别权限。 1、用户和文件所有者的概念 你用来登陆Linux主机的那个用户名就是一个用户,例如,root就是一个用户,而Linux上存在很多的用户。如果你在Linux上创建了一个文件,那么默认情况下你就是这个文件的所有者。 2、用户组的概念 有了用户就可以区分不同的文件的所有者,也可以根据文件的所有者来限定用户可不可以对文件进行读写或执行等操作,那为什么还要有用户组的概念呢? ... 阅读全文
posted @ 2013-07-08 14:15
jlins
阅读(261)
评论(0)
推荐(0)

浙公网安备 33010602011771号