码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
js 字符串截取
substr方法:text.substr(start[,length]);text:要提取子字符串的字符串或String对象。必选start:子字符串的起始位置。以0开始索引。必选length:返回字符串的个数。可选如length为0或负数,将返回空字符串。如没指定,则返回以start开始到结尾的子...
分类:Web程序   时间:2015-01-05 20:16:10    阅读次数:158
根据变量获取变量名
获取变量名字符串: public static string GetVariableName(Expression> memberExpression) { var body = memberExpression.Body as MemberExpression;...
分类:其他好文   时间:2015-01-05 20:16:02    阅读次数:151
Matlab一个错误引发的血案:??? Error using ==> str2num Requires string or character array input.
Matlab总遇到一些神奇的问题,让人摸不着头脑。昨天编写程序的时候遇到一个让我十分火大的问题,也是自己的matlab基础不好吧。先描述一下问题,再GUI界面有个listbox,Tag属性是’listbox1’,里面是这样的数据,我的目的是要把这些数据转换成数值类型的矩阵:list_string =...
分类:其他好文   时间:2015-01-05 20:12:54    阅读次数:726
Java 可中断线程
PART.1无法中断的线程一个无法中断的线程的例子。publicclassUninterruptableThread{@SuppressWarnings("deprecation")publicstaticvoidmain(String[]args)throwsException{Threadth=...
分类:编程语言   时间:2015-01-05 20:07:15    阅读次数:259
对实体类的所有String类型的成员变量值trim
使用反射,可以对实体类中的所有String类型的成员变量的值执行trim操作(1)trim/*** *对object中的所有成员变量的值,执行trim操作<br> *即去掉首尾的空格 *@paramobj *@throwsSecurityException *@throwsNoSuchFieldException *@throwsIllegalArgumentException *@t..
分类:其他好文   时间:2015-01-05 19:00:41    阅读次数:282
[LeetCode]93 Restore IP Addresses
https://oj.leetcode.com/problems/restore-ip-addresses/http://blog.csdn.net/linhuanmars/article/details/24683699publicclassSolution{ publicList<String>restoreIpAddresses(Strings) { if(s==null||s.length()<4) returnCollections.emptyList();//invalidinp..
分类:其他好文   时间:2015-01-05 18:59:09    阅读次数:155
Cocos2dx学习笔记(2) string char* int类型数据转换
1、char*转stringchar*cp="char"; std::stringsp=cp;2、string转char*//1 std::stringstr="string"; constchar*cp=str.data(); //2 std::stringstr="string"; constchar*cp=str.c_str(); //3 std::stringstr="hello"; charp[10]; str.copy(p,4,1);//这里4,代表复制几个字符..
分类:其他好文   时间:2015-01-05 18:56:33    阅读次数:138
JNI由浅入深_6_简单对象的应用
1、声明native方法 public class ComplexObject { /** * 返回一个对象数组 * @param val * @return */ public native Person[] receiverBeanArray(String val); /** * 获取对象 * @return */ public native Pers...
分类:其他好文   时间:2015-01-05 18:49:21    阅读次数:190
对oracle数据库Blob字段的操作
java实体类 定义类型 byte[]private byte[]str_blobhibernate映射文件类型oracle.sql.BLOB 数据库类型BLOBbyte[] b = str.getBytes();String str = new String(...
分类:数据库   时间:2015-01-05 18:35:04    阅读次数:197
js数组操作
用 js有很久了,但都没有深究过js的数组形式。偶尔用用也就是简单的string.split(char)。这段时间做的一个项目,用到数组的地方很多, 自以为js高手的自己居然无从下手,一下狠心,我学!呵呵。学了之后才知道,js数组的功能强大很,远比VB,C#强多了,大家慢慢看吧1、数组的创建vara...
分类:编程语言   时间:2015-01-05 18:34:03    阅读次数:173
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!