- 博客(10)
- 资源 (3)
- 收藏
- 关注
转载 maven 常用命令
一、将maven 依赖复制到指定目录mvn dependency:copy-dependencies -DoutputDirectory=lib -DincludeScope=compile二、Maven 手动添加 JAR 包到本地仓库 Maven 常用仓库网址:http://mvnrepository.com/http://search.maven
2015-02-15 14:15:42 463
原创 通过servletcontext读取WEB-INF下的配置文件
InputStream is = request.getSession().getServletContext().getResourceAsStream("/WEB-INF/a.properties");Properties properties = new Properties();properties.load(is);System.out.println(propert
2015-02-15 13:59:17 578
转载 检查数据库是否存在
出处:http://stackoverflow.com/questions/12414596/how-to-check-if-a-particular-database-in-mysql-already-exists-using-java// Connection connection = ResultSet resultSet = connection.getMetaData().ge
2015-02-15 10:32:52 443
转载 java中为何使用十六进制
http://blog.csdn.net/java2009cgh/article/details/6967679Java开发中有时候用十六进制定义常量有什么好处?什么时候考虑使用十六进制?十六进制在可能牵扯到位操作的时候,更加直观,因为一个数字代表4位二进制0或1 例如 0x02 相当于 00000010 ,而十进制就没有那么直观。
2015-02-08 15:09:50 516
转载 如何设置eclipse下查看java源码
出处 http://blog.csdn.net/ludengji/article/details/6367979windows--preferences--java--installed jres --选中jre6--点击右边的edit--选中jre6/lib/rt.jar --点击右边的 source attachment configuration -- external fil
2015-02-08 11:47:17 424
转载 java 2、8、10、16进制之间的转换
java.lang.Integer类可以在2,8,16进制与10进制进行转换十进制转成十六进制: Integer.toHexString(int i) 十进制转成八进制 Integer.toOctalString(int i) 十进制转成二进制 Integer.toBinaryString(int i) 十六进制转成十进制 Integer.valueOf("FFFF",16).
2015-02-08 11:13:25 531
转载 java int 和 byte数组转换
int --> byte[]方式一ByteBuffer.allocate(4).putInt(yourInt).array();方式二public static byte[] intToByteArray(int a){ byte[] ret = new byte[4]; ret[3] = (byte) (a & 0xFF); ret[2
2015-02-06 16:48:53 447
转载 防止jquery ajax 重复提交
var requestSent = false;jQuery("#buttonID").click(function() { if(!requestSent) { requestSent = true; jQuery.ajax({ url: "http://example.com", ...., tim
2015-02-06 10:22:33 426
原创 tomcat 性能检测
一、jconsole1、tomcat在windows上,start方式启动在catalina.bat 文件中的:doRun和:doStart下添加以下代码 (没有换行)set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.ssl=false
2015-02-05 11:13:31 459
原创 java 中的 '\0'
java 中的 '\0' 代表空的字符,!=0 !=null !=' ' public static void main(String[] args) throws UnsupportedEncodingException { byte zero = '0'; byte slashZero = '\0'; System.out.println("zero\t" +
2015-02-03 14:41:23 2900
java内存模型说明
2015-03-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人