$('.xcarcoin_tb').each(function(i){ var aika='爱卡币'; if(data[i]==0){ }else{ $(this).text(aika+data[i]); } })$.each(data.log, function(i,item) { str +='...
分类:
Web程序 时间:
2014-08-22 12:54:28
阅读次数:
247
html clearjs //去空白 function clearFun(str) { str = str.replace(/^\s+/, ''); for (var i = str.length - 1; i >= 0; i--) { ...
分类:
其他好文 时间:
2014-08-22 12:40:46
阅读次数:
136
@interface AppDelegate ()
{
UIView *_containerView;
UILabel *_lable;
CGFloat _fristNum;
CGFloat _secondNum;
NSInteger _tempNum;
NSMutableString *_str;
}
@end...
分类:
其他好文 时间:
2014-08-22 10:58:46
阅读次数:
270
先贴代码,总结以后再写,和5中内存分配方式密切相关PS:str 返回整个字符串,str[0],*str返回首字符hchar *strA(){ char str[]="hello!"; //局部数组,局部变量, str存在栈区 return str; //局部变量不...
分类:
编程语言 时间:
2014-08-22 00:15:05
阅读次数:
263
原理:程序是根据Locale来确定国际化资源文件,因此关键之处在于知道 Struts2 框架是如何确定 Local 对象的 !由于Struts2 使用 i18n 拦截器处理国际化,并且将其注册在默认的拦截器中,因此,可以通过阅读 I18N 拦截器知道。具体确定 Locale 对象的过程: > Str...
分类:
其他好文 时间:
2014-08-21 22:46:44
阅读次数:
217
一、用strtok函数进行字符串分割原型: char *strtok(char *str, const char *delim);功能:分解字符串为一组字符串。参数说明:str为要分解的字符串,delim为分隔符字符串。返回值:从str开头开始的一个个被分割的串。当没有被分割的串时则返回NULL。其...
分类:
编程语言 时间:
2014-08-21 21:10:04
阅读次数:
279
题解:将原来的串扩展为两倍,然后用KMP匹配。#include #include char str[200005],pat[100005];int next[100005],N,M;void getnext(){ int i=1,j=0;next[1]=0; while(iM)retur...
分类:
其他好文 时间:
2014-08-21 20:54:54
阅读次数:
197
Wintellect 的Power collections 库BigListstr=newBigList();str.Add("ddddddddddddd");str.Add("dddddddddd");foreach(variteminstr){Response.Write(item);}BigL...
分类:
其他好文 时间:
2014-08-21 18:56:34
阅读次数:
144
取随机数,举个例子:获取动态随机key值16位(key的范围是由"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"中随机取出,不需去重),代码如下:1 %随机生成16位Key值2 random() ->3 Str...
分类:
其他好文 时间:
2014-08-21 18:35:34
阅读次数:
145
JS:String.prototype.replaceAll=function(reallyDo, replaceWith) { return this.replace(new RegExp(reallyDo, "g" ), replaceWith);}使用方式:var str="addfgfdgf...
分类:
Web程序 时间:
2014-08-21 16:36:24
阅读次数:
201