码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
比较简单的Web请求(get/post)方法封装,调用网络接口时能用到
发送Web请求 ,GET请求和POST请求    ///         /// 发送GET请求         ///         ///         ///         public static string Webrequest(string url)         {             WebRequest wr = WebRequest.Cr...
分类:Web程序   时间:2015-01-06 13:54:07    阅读次数:142
JAVA SE学习小结
比较两个字符串的值是否相等不能用等号“==”,需要使用equals方法。在String类中已对equals方法进行了重写,使其比较两个字符串的值是否相等。...
分类:编程语言   时间:2015-01-06 13:52:56    阅读次数:149
Oracle 常用函数之字符函数
1、字符串截取substr(string,start_position,[length])例:select substr('Hello World', 1, 2) from dual; --返回结果为 'He' 注:从字符串第一个字符开始截取长度为2的字符串select substr('Hell.....
分类:数据库   时间:2015-01-06 13:33:48    阅读次数:244
java操作Excel处理数字类型的精度损失问题验证
java操作Excel处理数字类型的精度损失问题验证:场景:CELL_TYPE_NUMERIC-->CELL_TYPE_STRING--->CELL_TYPE_NUMERICPOI版本:poi-3.10.1poi-3.9Code:package poi;import java.io.FileInpu...
分类:编程语言   时间:2015-01-06 13:33:20    阅读次数:444
spring mvc绑定对象String转Date(來自http://blog.csdn.net/whumr1/article/details/8056285)
使用spring的mvc,直接将页面参数绑定到对象中,对象中有属性为Date时会报错,此时需要处理下。同样的,其他的需要处理的类型也可以用这种方法。(其他类型沒有時間研究,歡迎技術牛人補充)1、在controller中加入代码@InitBinderprotected void initBinder(...
分类:编程语言   时间:2015-01-06 13:30:51    阅读次数:200
正则表达常用18种
1.纯数字检测:public string A = “^[0-9]+$”;2.11位手机号码(1开头):public string B = "^1\d{10}$"';3.数字或英文:public string C = "^[A-Za-z0-9]+$";4.纯汉字:public string D = ...
分类:其他好文   时间:2015-01-06 13:22:22    阅读次数:125
JAVA连接SQLSERVER代码片段
最近需要做一个验证“ANDROID终端”下载数据的效率问题,其中需要到向sqlserver2008数据库中添加测试数据step1:定义相关数据库信息static final String DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";...
分类:数据库   时间:2015-01-06 13:20:07    阅读次数:193
[LeetCode]87 Scramble String
https://oj.leetcode.com/problems/scramble-string/http://blog.csdn.net/linhuanmars/article/details/24506703publicclassSolution{ publicbooleanisScramble(Strings1,Strings2) { if(s1==null||s2==null||s1.length()!=s2.length()) returnfalse; if(s1.isEmpty()&&am..
分类:其他好文   时间:2015-01-06 12:09:05    阅读次数:134
leetcode 166: Fraction to Recurring Decimal
Fraction to Recurring Decimal Total Accepted: 3168 Total Submissions: 27432 Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. ...
分类:其他好文   时间:2015-01-06 12:06:50    阅读次数:174
LeetCode:Longest Common Prefix
题目描述: Write a function to find the longest common prefix string amongst an array of strings. 代码: string Solution::longestCommonPrefix(vector &strs) { string result = ""; if(strs.size(...
分类:其他好文   时间:2015-01-06 12:03:24    阅读次数:137
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!