一、replace函数replace函数的作用是将源目标中指定字符串替换为相应字符,举例如下:(1)将“jisuanji”字符串中的ji替换为1;SQL>selectreplace(‘jisuanji‘,‘ji‘,1)fromdual;REPLACE(‘JISUANJI‘,‘JI‘,1)--------------------------1suan1说明:首先在‘jisuanji’字符串..
分类:
数据库 时间:
2014-10-27 07:04:33
阅读次数:
186
importtab#支持tab补全importfileinput#支持基于文件的字符串替换forlineinfileinput.input(‘filepath‘,inplace=1):#1表示完成后回到行首line=line.replace(oldstr,newstr)importos得到当前的工作目录,即当前python脚本工作的目录路径:os.getcwd()返回制指定目录下的所有文件..
分类:
编程语言 时间:
2014-10-27 07:01:12
阅读次数:
191
接收json数据,日期格式为:"\/Date(1414078309687)\/"var value = "/Date(1414078309687)/";var da = eval('new ' + value.replace('/', '', 'g'));da.toLocaleDateString(...
分类:
编程语言 时间:
2014-10-26 22:49:39
阅读次数:
229
function(str,num){ var len=str.length if(str.replace(/[\u4e00-\u9fbf]/g,'**').length num){ str = str.slice(0,len--) } re...
分类:
其他好文 时间:
2014-10-26 22:45:06
阅读次数:
159
Unable to mount a ntfs partition after replace windows after Linux install?Unable to mount a ntfs partition after replace windows after Linux install?...
eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(...
分类:
移动开发 时间:
2014-10-26 18:15:32
阅读次数:
383
Mac OS Yosemite disabled ipfw command, we need use pf rule to work around it. This article is a manual to describe how to address this issue....
分类:
其他好文 时间:
2014-10-25 07:06:51
阅读次数:
234
将字段全清空: UPDATE 表名 SET字段 =''将字段内的特定内容改掉: update 表名 set 字段=replace(字段,'要改的','改成这个')update 表名 set 字段=replace(字段,'要改的','改成这个') where ID=7
分类:
数据库 时间:
2014-10-24 18:29:10
阅读次数:
227
/***替换img标签src属性*@paramcontent*@parampath*/functionimgsSrc(content,path){ varimgreg=/<img.*?>/gi; content=content.replace(imgreg,function(imgsrc){ imgsrc=imgsrc.replace(/src=(?:"\s*([^"]*)\s*"|‘\s*([^‘]*)\s*‘|(\S+))/i,"src=\""+path+"$1\""); re..
分类:
微信 时间:
2014-10-24 16:48:26
阅读次数:
363
CREATE OR REPLACE FUNCTION F_PINYIN(P_NAME IN VARCHAR2) RETURN VARCHAR2 AS V_COMPARE VARCHAR2(100); V_RETURN VARCHAR2(4000); FUNCTION F_NL...
分类:
数据库 时间:
2014-10-24 09:12:47
阅读次数:
229