文件名重新组织 原文件名实例 新文件名实例 公式 4 take first 3 chars abc1234.txt abc.txt ${BASE}{1,3}.${EXT} 5 take last 3 chars 1234abc.txt abc.txt ${BASE}{-3,-1}.${EXT} 6 take 3 ~ 6 chars ab1234c.txt 1234.txt ${BASE}{3,6}.${EXT} 7 take 1 ~ -3(3rd from end) chars abcde12.txt abcde.txt ${BASE}{1,-3}.${EXT} 8 take 3 ~ -3(3rd from end) chars ab1234cd.txt 1234.txt ${BASE}{3,-3}.${EXT} 9 first 3 and from the 8th char on abc1234def.txt abcdef.txt ${BASE}{1,3}${BASE}{8,-1}.${EXT} 10 exchange 1,2 and 3,4 chars abcd.txt cdab.txt ${BASE}{3,4}_${BASE}{1,2}.${EXT}
文件名加序号 原文件名实例 新文件名实例 公式 11 sequence number of 1,2,3 ... any.txt N.txt(N=1,2, ...) #.${EXT} 12 sequence number of 0001,0002,0003 ... any.txt N.txt(N=0001,0002,...) ####.${EXT} 13 sequence number of 3,4,5,... any.txt N.txt(N=3,4, ...) #{3}.${EXT} 14 sequence number of 5,7,9,...(start=5,step=2) any.txt N.txt(N=5,7,9,...) #{5,2}.${EXT} 15 sequence number of 100,99,98,...(start=100,step=-1) any.txt N.txt(N=100,99,98,...) ###{100,-1}.${EXT} 16 add sequence number 001,002,... before filename file.txt N_file.txt(N=001,002,...) ###_${FILENAME} 17 append sequence number 001,002,... after filename file.txt file_N.txt(N=001,002,...) ${BASE}_###.${EXT} 18 change the extension name to sequence 001,002,... file.txt file.N(N=001,002,...) ${BASE}.### 19 append sequence aaa,aab,...zzz to filename file.txt file.txt.X(X=aaa,aab,aac,...zzz) ${FILENAME}.@@@ 20 create sequence number of 01_01, 01_02, ... 01_10, 02_01, 02_02,... 02_10, 03_01,03_02,... any.txt M_N.txt(M:01,02,03,...,N:01~10) #_#${EXT}
字符串替换和正则表达式 原文件名实例 新文件名实例 公式 21 replace 'old' with 'new' in name old123.txt new123.txt ${FILENAME}{replace,'old','new'} 22 remove any digit in filename abc123def456.txt abcdef.txt ${BASE}{replace,'\d+',''}.${EXT} 23 remove digits that as surfix abc123def456.txt abc123def.txt ${BASE}{replace,'\d+$',''}.${EXT} 24 remove digits that as prefix 123abc456.txt abc456.txt ${BASE}{replace,'^\d+',''}.${EXT} 25 add parenthesis for any number abc123def456.txt abc(123)def(456).txt ${BASE}{replace,'(\d+)','(\1)'}.${EXT} 26 remove all parenthesis in filename abc(123).txt abc123.txt ${BASE}{replace,'\((.*?)\)','\1'}.${EXT} 27 change all parenthesis to bracket abc(123).txt abc[123].txt ${BASE}{replace,'\((.*?)\)','[\1]'}.${EXT} 28 exchange parts before and after dash abc-def.txt def-abc.txt ${BASE}{replace,'(.*?)-(.*)','\2-\1'}.${EXT} 29 change dash to parenthesis abc-def.txt abc(def).txt ${BASE}{replace,'(.*?)-(.*)','\1(\2)'}.${EXT} 30 change all spaces to underscore abc def.txt abc_def.txt ${BASE}{replace,'\s+','_'}.${EXT}
根据文件内容来替换文件名 原文件名实例 新文件名实例 公式 31 change filename to the first word of file content any.txt firstword ${FILENAME}{file_content,'(\S+)'} 32 change filename to the first 60 chars of 1st line of file content any.txt firstline(60 letter maximum) ${FIRSTLINE}{1,60} 33 change filename to the first 60 chars of 2nd line of file content any.txt secondline(60 letter maximum) ${FILENAME}{file_line,2}{1,60} 34 change filename to the title of html file any.html htmltitle.html ${FILENAME}{html_title}{1,20}.html 35 change filename to the content between and any.html strongcontent.html ###_${FILENAME}{file_content,'(.*?)<\/strong>',undef,10000}.${EXT} 36 change filename to the content followed by phase_name inside file any.html phase_name_content.html ${FILENAME}{file_content,'phase_name\s*"(.*?)"'}.${EXT}
根据文件时间替换文件名 原文件名实例 新文件名实例 公式 37 change filename to the date time of file any.jpg 2010-07-01_18:19:20.jpg ${FILENAME}{file_time, '%Y-%m-%d_%H:%M:%S'}.${EXT} 38 change filename to the date of file plus sequence number any.jpg 2010-07-01(N).jpg(N=01,02,03,...) ${FILENAME}{file_time, '%Y-%m-%d'}(##).${EXT} 39 append file date to original filename abc.jpg abc_2010-07-01.jpg ${BASE}_${FILENAME}{file_time, '%Y-%m-%d'}.${EXT}
根据mp3文件的内容重命名 原文件名实例 新文件名实例 公式 40 rename mp3 files to artist-album-track format abc.mp3 artist-album-track.mp3 ${FILENAME}{mp3_info,'%R-%A-%T'}.mp3 41 rename mp3 files to artist-album format with sequence number abc.mp3 artist-album_N.mp3(N=001,002,...) ${FILENAME}{mp3_info,'%R-%A'}_###.mp3 42 append artist and album after original filename abc.mp3 abc_arrist-album.mp3 ${BASE}_${FILENAME}{mp3_info,'%R-%A'}.mp3
根据图片文件的内容重命名 原文件名实例 新文件名实例 公式 43 rename jpg files by adding sequence and picture width, height abc.jpg N_W_H.jpg(N=001,002,... W=width, H=height) ###_${FILENAME}.${EXT} 44 rename gif files by appending width and height abc.gif abc_WxH.gif(W=width,H=height) ${BASE}_${FILENAME}.${EXT}
根据索引文件,对照文件来重命名 原文件名实例 新文件名实例 公式 45 change the Nth filename to the Nth line of indexfile file.jpg(sequence number=N) X_(lineN_of_indexfile).jpg(N=file sequence,X=001,002,...) ###_#.${EXT} 46 change the filename by looking up the mapping list in mapfile(1) old.txt new.txt(old
new is defined in mapfile) ${BASE}.${EXT} 47 change the filename by looking up the mapping list in mapfile(2) old.txt new.txt(old,new is defined in mapfile) ${BASE}.${EXT}
根据目录名来重命名 原文件名实例 新文件名实例 公式 48 add the pathname in the front of filename c:\test\abc\01.jpg abc_01.jpg #_${FILENAME} 49 add the pathname and related sequence no in the front of filename c:\a\x.jpg, y.jpg c:\b\x.jpg, y.jpg a_001.jpg, a_002.jpg, b_001.jpg, b_002.jpg #.${EXT} 50 create subfolder and move file in it c:\test\a.txt c:\test\old\a.txt #\${FILENAME}
按照大小写重命名 原文件名实例 新文件名实例 公式 51 change whole filename to lower case FILE.TXT file.txt ${FILENAME}{lc} 52 change whole filename to upper case file.txt FILE.TXT ${FILENAME}{uc} 53 change the first letter to upper case file.txt File.txt ${FILENAME}{ucfirst} 54 change the first letter of each word to upper case test file.txt Test File.txt ${BASE}{replace,'\b\w','\U$&'}.${EXT}
对数字作运算,改变数字格式 原文件名实例 新文件名实例 公式 55 change all number in filename to 4 digits format file123.txt file0123.txt ${BASE}.${EXT} 56 add all number in filename by 3, use 4 digits format file123.txt file0126.txt ${BASE}.${EXT} 57 multiply all number in filename by 2, use 4 digits format file123.txt file0246.txt ${BASE}.${EXT} 58 filename is pure number, add the number by the first number in file content 123.txt 133.txt(assume first number in file content is 10) ${FILENAME}.${EXT} 59 add leading zeros to make the filename has length of 10 12W.txt 00012W.txt(total length is 10) ${FILENAME}{calc,'010s'}
用随机字母和单词重命名 原文件名实例 新文件名实例 公式 60 append to filename random letters and digit with length of 5 abc.txt abc_xxxxx.txt(xxxxx is random letters/digits) ${BASE}_#.${EXT} 61 rename file to random word from candidate words abc.txt N_C.txt(N=001,002,..., C=random of 'RED', 'PURPLE',...) ###_#.${EXT}
字符映射法重命名 原文件名实例 新文件名实例 公式 62 change filename by mapping 0-9 to A-J correspondingly 0123.jpg ABCD.jpg ${BASE}.${EXT}
63 change filename by mapping 0-4 to 5-9, and 5-9 to 0-4 012348888.jpg 567893333.jpg ${BASE}.${EXT} 64 change filename by reverse upper and lower cases TELLme.txt tellME.txt ${BASE}.${EXT}
趣味重命名 原文件名实例 新文件名实例 公式 65 reverse letters of filename just for fun.txt nuf rof tsuj.txt ${BASE}{chars_r,1,-1}.${EXT} 66 double each letter in filename just for fun.txt jjuusstt ffoorr ffuunn.txt ${BASE}{replace,'(.)','\1\1'}.${EXT}
昨晚和朋友聊天,喝了点咖啡,由于我经常喝茶,很长时间没喝咖啡了,所以失眠了,于是起床读JVM规范,读完后在朋友圈发了一条信息:
JVM Run-Time Data Areas:The Java Virtual Machine defines various run-time data areas that are used during execution of a program. So
Spark SQL supports most commonly used features of HiveQL. However, different HiveQL statements are executed in different manners:
1. DDL statements (e.g. CREATE TABLE, DROP TABLE, etc.)
nginx在运行过程中是否稳定,是否有异常退出过?这里总结几项平时会用到的小技巧。
1. 在error.log中查看是否有signal项,如果有,看看signal是多少。
比如,这是一个异常退出的情况:
$grep signal error.log
2012/12/24 16:39:56 [alert] 13661#0: worker process 13666 exited on s
方法一:常用方法 关闭XML验证
工具栏:windows => preferences => xml => xml files => validation => Indicate when no grammar is specified:选择Ignore即可。
方法二:(个人推荐)
添加 内容如下
<?xml version=
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml&quo
最主要的是使用到了一个jquery的插件jquery.media.js,使用这个插件就很容易实现了。
核心代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.