码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
json字符串转换为JSONObject和JSONArray
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)
原文: VSTO 得到Office文档的选中内容(Word、Excel、PPT、Outlook) 目的:得到在Word、Excel、PPT、Outlook中选中的一段内容。 Word: private string GetSelectCont() { string w = ""; Word....
分类:其他好文   时间:2015-06-16 12:24:37    阅读次数:131
手把手教你:解决python UnicodeDecodeError: 'gb2312' codec can't decode问题
问题: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
Android设备唯一标识ID的获取
方法一:返回的是作为唯一64位十六进制字符串的Android设备ID。import android.provider.Settings.Secure;private String android_id = Secure.getString(getContext().getContentResolver(), S...
分类:移动开发   时间:2015-06-16 11:09:36    阅读次数:144
Javascript之typeof与instanceof
typeof:获取一个变量或表达式的类型,返回值只能是:number,boolean,string,function,Object(NULL,Array,object),undefined。使用typeof可以判断一个变量是否存在:if(typeof a === 'undefined') {'变量不...
分类:编程语言   时间:2015-06-16 10:57:16    阅读次数:175
DataContractJsonSerializer和JavaScriptSerializer内部实现差异
定义一个下面这样的类,此类有Serializable属性,并且有一个属性的定义没有使用自动属性来实现。[Serializable] public class Users { public int UserID { get; set; } public string UserName ...
分类:编程语言   时间:2015-06-16 10:50:54    阅读次数:137
Java去除掉HTML里面所有标签的两种方法——开源jar包和自己写正则表达式
Java去除掉HTML里面所有标签,主要就两种,要么用开源的jar处理,要么就自己写正则表达式。自己写的话,可能处理不全一些自定义的标签。企业应用基本都是能找开源就找开源,实在不行才自己写……1,开源的,我目前找到的就是Jsoup包: public static String getTextF...
分类:编程语言   时间:2015-06-16 10:49:01    阅读次数:137
$.ajax()方法详解
jquery中的ajax方法参数总是记不住,这里记录一下。1.url:要求为String类型的参数,(默认为当前页地址)发送请求的地址。2.type:要求为String类型的参数,请求方式(post或get)默认为get。注意其他http请求方法,例如put和delete也可以使用,但仅部分浏览器支...
分类:Web程序   时间:2015-06-16 10:42:31    阅读次数:157
Wince 6.0适用 .NET 使用HttpRequest的Post上传文件,服务端的Web API接收Post上传上来的文件 代码
//调用的示例 private string fileName = "InStorageData.csv"; string filePath = parentPath + CommonHelper.UPLOAD + "\\" + fileName;/...
分类:Windows程序   时间:2015-06-16 10:37:12    阅读次数:288
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!