import org.json.JSONArray;import org.json.JSONObject;public class JSONTest{ public static void main(String[] args){ //JSONObject String js...
分类:
Web程序 时间:
2015-06-16 12:32:32
阅读次数:
90
生产者-消费者模问题/** * 使用阻塞队列实现生产者-消费者模型 * 阻塞队列只允许元素以FIFO的方式来访问 * @author Bingyue * */public class ProducerCustomerPattern { public static void main(String.....
分类:
其他好文 时间:
2015-06-16 12:26:56
阅读次数:
211
原文: VSTO 得到Office文档的选中内容(Word、Excel、PPT、Outlook) 目的:得到在Word、Excel、PPT、Outlook中选中的一段内容。 Word: private string GetSelectCont() { string w = ""; Word....
分类:
其他好文 时间:
2015-06-16 12:24:37
阅读次数:
131
问题:UnicodeDecodeError: 'gb2312' codec can't decode bytes in position 2-3: illegal multibyte sequence
原因:python在做将普通字符串转换为unicode对象时,
例如:u_string = unicode(string , "gb2312"),如果你的字符串string中有诸如某些繁体字,例...
分类:
编程语言 时间:
2015-06-16 11:11:19
阅读次数:
545
方法一:返回的是作为唯一64位十六进制字符串的Android设备ID。import android.provider.Settings.Secure;private String android_id = Secure.getString(getContext().getContentResolver(), S...
分类:
移动开发 时间:
2015-06-16 11:09:36
阅读次数:
144
typeof:获取一个变量或表达式的类型,返回值只能是:number,boolean,string,function,Object(NULL,Array,object),undefined。使用typeof可以判断一个变量是否存在:if(typeof a === 'undefined') {'变量不...
分类:
编程语言 时间:
2015-06-16 10:57:16
阅读次数:
175
定义一个下面这样的类,此类有Serializable属性,并且有一个属性的定义没有使用自动属性来实现。[Serializable] public class Users { public int UserID { get; set; } public string UserName ...
分类:
编程语言 时间:
2015-06-16 10:50:54
阅读次数:
137
Java去除掉HTML里面所有标签,主要就两种,要么用开源的jar处理,要么就自己写正则表达式。自己写的话,可能处理不全一些自定义的标签。企业应用基本都是能找开源就找开源,实在不行才自己写……1,开源的,我目前找到的就是Jsoup包: public static String getTextF...
分类:
编程语言 时间:
2015-06-16 10:49:01
阅读次数:
137
jquery中的ajax方法参数总是记不住,这里记录一下。1.url:要求为String类型的参数,(默认为当前页地址)发送请求的地址。2.type:要求为String类型的参数,请求方式(post或get)默认为get。注意其他http请求方法,例如put和delete也可以使用,但仅部分浏览器支...
分类:
Web程序 时间:
2015-06-16 10:42:31
阅读次数:
157
//调用的示例 private string fileName = "InStorageData.csv"; string filePath = parentPath + CommonHelper.UPLOAD + "\\" + fileName;/...