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总遇到一些神奇的问题,让人摸不着头脑。昨天编写程序的时候遇到一个让我十分火大的问题,也是自己的matlab基础不好吧。先描述一下问题,再GUI界面有个listbox,Tag属性是’listbox1’,里面是这样的数据,我的目的是要把这些数据转换成数值类型的矩阵:list_string =...
分类:
其他好文 时间:
2015-01-05 20:12:54
阅读次数:
726
PART.1无法中断的线程一个无法中断的线程的例子。publicclassUninterruptableThread{@SuppressWarnings("deprecation")publicstaticvoidmain(String[]args)throwsException{Threadth=...
分类:
编程语言 时间:
2015-01-05 20:07:15
阅读次数:
259
使用反射,可以对实体类中的所有String类型的成员变量的值执行trim操作(1)trim/***
*对object中的所有成员变量的值,执行trim操作<br>
*即去掉首尾的空格
*@paramobj
*@throwsSecurityException
*@throwsNoSuchFieldException
*@throwsIllegalArgumentException
*@t..
分类:
其他好文 时间:
2015-01-05 19:00:41
阅读次数:
282
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
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
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
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的数组形式。偶尔用用也就是简单的string.split(char)。这段时间做的一个项目,用到数组的地方很多, 自以为js高手的自己居然无从下手,一下狠心,我学!呵呵。学了之后才知道,js数组的功能强大很,远比VB,C#强多了,大家慢慢看吧1、数组的创建vara...
分类:
编程语言 时间:
2015-01-05 18:34:03
阅读次数:
173