一、Java保留2位小数1 double acc = 22.4322;2 String
accX = String.format("%.2f", acc);二、freemarker保留两位小数1 2
${centerFreeSize?string("#.##")}3 4 0.005 ...
分类:
编程语言 时间:
2014-05-15 21:25:48
阅读次数:
675
jquery下json数组的操作用法实例:
jquery中操作JSON数组的情况中遍历方法用的比较多,但用添加移除这些好像就不是太多了。
试过json[i].remove(),json.remove(i)之后都不行,看网页的DOM对象中好像JSON数据是以数组的形式出现的,下面是一些实例,仅供参考。...
分类:
Web程序 时间:
2014-05-15 20:52:49
阅读次数:
351
放狗搜索动态调用webservices
的类,太多。问题挺纠结的。公司需要net调用java的webservices接口,蛋疼的是java端的接口,全部传入String类型的数据。蛋疼啊,接口你不编写成传递参数的形式就算了,尼玛,传递的对象是String(把xml格式化成string类型,在使用报文...
分类:
Web程序 时间:
2014-05-15 20:47:03
阅读次数:
577
echocli.c
#include
#include
#include
#include
#include
#include
#include
#include
#define ERR_EXIT(m) do { perror(m); exi...
分类:
其他好文 时间:
2014-05-15 18:10:50
阅读次数:
240
/// /// 信息写入记事本 /// /// /// public static void
Write(string text, string path) { try { DateTime newDat...
分类:
其他好文 时间:
2014-05-15 17:51:53
阅读次数:
262
Given a string, find the length of the longest
substring without repeating characters. For example, the longest substring
without repeating letters fo...
分类:
其他好文 时间:
2014-05-15 17:50:38
阅读次数:
298
Given two binary strings, return their sum
(also a binary string).For example, a = "11" b = "1" Return "100".string
的操作,短string补位。两个“0”会输出一个“00”,要特殊处理...
分类:
其他好文 时间:
2014-05-15 17:47:57
阅读次数:
283
字符串连接误用 错误的写法:String s = ""; for (Person p :
persons) { s += ", " + p.getName(); } s = s.substring(2); //remove first comma
正确的写法:StringBuilde...
分类:
编程语言 时间:
2014-05-15 17:38:49
阅读次数:
493
有各种不同的策略来定位页面中的元素。你可以使用最合适定位方式用于你的用例。Selenium提供了以下方法来定位页面中的元素:find_element_by_idfind_element_by_namefind_element_by_xpathfind_element_by_link_textfi.....
分类:
编程语言 时间:
2014-05-15 17:28:48
阅读次数:
430
public class Url { /** * @param args * @throws
IOException */ public static void main(String[] args) throws IOException { ...
分类:
其他好文 时间:
2014-05-15 17:14:47
阅读次数:
260