![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
hunaifei2008
这个作者很懒,什么都没留下…
展开
-
jquery mobile入门(转)
组件页面jQuery Mobile 应用了 HTML5 标准的特性,在结构化的页面中完整的页面结构分为 header、content、footer 这三个主要区域。在 body 中插入内容块:<div data-role="page"> <div data-role="header">...</div> <div data-r...原创 2013-04-17 16:21:20 · 62 阅读 · 0 评论 -
20非常有用的Java程序片段(1)
下面是20个非常有用的Java程序片段,希望能对你有用。1. 字符串有整型的相互转换String a = String.valueOf(2); //integer to numeric string int i = Integer.parseInt(a); //numeric string to an int 2. 向文件末尾添加内容BufferedWrite...原创 2013-06-17 15:54:42 · 97 阅读 · 0 评论 -
20非常有用的Java程序片段(2)
9. 创建 JSON 格式的数据请先阅读这篇文章 了解一些细节,并下面这个JAR 文件:json-rpc-1.0.jar (75 kb)import org.json.JSONObject; ... ... JSONObject json = new JSONObject(); json.put("city", "Mumbai"); json.p...原创 2013-06-17 15:55:31 · 78 阅读 · 0 评论 -
20非常有用的Java程序片段(3)
15. 创建ZIP和JAR文件import java.util.zip.*; import java.io.*; public class ZipIt { public static void main(String args[]) throws IOException { if (args.length < 2) {...原创 2013-06-17 15:56:11 · 66 阅读 · 0 评论 -
20非常有用的Java程序片段(4)
17. 把 Array 转换成 Map import java.util.Map; import org.apache.commons.lang.ArrayUtils; public class Main { public static void main(String[] args) { String[][] countri...原创 2013-06-17 15:57:00 · 84 阅读 · 0 评论 -
eclipse classic添加html之类的web插件(转)
最近,准备用eclipse+pydev开发django项目,到eclipse官网上安装了最新版本的eclipse classic版本,Eclipse SDK Version: 4.2.0,发现居然不支持编辑html,到网上搜索了下,安装GEF+HTMLEditor的方法,重启eclipse之后,还是不能象网上说的那样,使用html编辑器。 我的解决方法是,点击"Help"-...原创 2013-01-09 10:00:40 · 81 阅读 · 0 评论 -
Java if-else的另一种写法
因为实际开发中不常用这种写法,今天突然要用的时候怎么都想不起来该怎么写了,让我很是郁闷,还好最终还是想起来了! int t = 2; System.out.println(t==1?1:0); 等同于: int t =2; if(t==1){ System.out.println("1"); }else{ System.out.pri...原创 2013-01-16 10:30:06 · 1170 阅读 · 0 评论