This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="tools"><embed width="14" height="15" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowscriptaccess="always" quality="high" flashvars="clipboard=grub%20rescue%3Els%20%3C--%20%E6%B3%A80%0Agrub%20rescue%3Eset%20root%3D(hdx%2C%20y)%20%3C--%20%E6%B3%A81%0Agrub%20rescue%3Einsmod%20%2Fboot%2Fgrub%2Flinux16.mod%0Agrub%20rescue%3Elinux16%20%2Fvmlinuz%20root%3D%2Fdev%2Fsda%20ro%20%3C--%20%E6%B3%A82%0Agrub%20rescue%3Einitrd16%20%2Finitrd.img%0Agrub%20rescue%3Eboot%0A" src="/javascripts/syntaxhighlighter/clipboard_new.swf" wmode="transparent"></div> | |
// swf文件可以在这里找到 http://vivisidea.iteye.com/javascripts/syntaxhighlighter/clipboard_new.swf | |
// 测试可以实现复制,但这里有个局限就是需要复制的文本是固定不变的 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SuppressWarnings("unchecked") | |
@Override | |
public Map<Integer, Integer> queryCountGroupByTargetId() { | |
Map<Integer, Integer> map = (Map<Integer, Integer>)getSqlMapClientTemplate().queryForMap( | |
"Keyword.queryCountGroupByTargetId", null, "TargetId", "Count"); // queryForMap就是指定哪一列为key,哪一列为value,即可 | |
return map; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private FTPClient ftpClient = new FTPClient(); | |
/** | |
* 传输文件到ftp服务器 | |
* @param file | |
* @return | |
*/ | |
private boolean uploadFile(File file) { | |
if(file == null || !file.exists()){ | |
logger.error("文件不存在! file="+file); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 遮掩指定的位置 | |
* @param array | |
* @param positions | |
* @return | |
*/ | |
private static String mask(char[] array, int[] positions){ | |
for(int position : positions){ | |
array[position] = '*'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.curved { | |
-moz-border-radius: 10px;/* Firefox */ | |
-webkit-border-radius: 10px;/* Safari and chrome **/ | |
-khtml-border-radius: 10px;/* Linux browsers */ | |
border-radius: 10px;/* CSS3 */ | |
behavior: url(border-radius.htc); | |
} | |
/* http://code.google.com/p/curved-corner/ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<artifactId>maven-assembly-plugin</artifactId> | |
<version>2.2-beta-5</version> | |
<configuration> | |
<descriptorRefs> | |
<descriptorRef>jar-with-dependencies</descriptorRef> | |
</descriptorRefs> | |
<archive> | |
<manifestEntries> | |
<Premain-Class>com.taobao.profile.Main</Premain-Class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.download = function(url, data, method){ | |
if( url && data ){ | |
data = typeof data == 'string' ? data : jQuery.param(data); | |
//split params into form inputs | |
var inputs = ''; | |
jQuery.each(data.split('&'), function(){ | |
var pair = this.split('='); | |
inputs+='<input type="hidden" name="'+ pair[0] +'" value="'+ pair[1] +'" />'; | |
}); | |
//send request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function HtmlEncode(s){ | |
var el = document.createElement("div"); | |
el.innerText = el.textContent = s; | |
s = el.innerHTML; | |
return s; | |
} | |
// Test run: | |
// alert(HtmlEncode('&;\'><"')); | |
// jquery: $('<div>').text(value.word).html() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 发送邮件. | |
* @param toAddrs | |
* @param subject | |
* @param content | |
* @param files | |
*/ | |
public static void sendMail(List<String> toAddrs, String subject, String content, List<String> files) { | |
if(CollectionUtils.isEmpty(toAddrs)){ | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# description : shell script to convert a project file from one encoding to another encoding | |
# usage : ./convert to generate output and confirm, then run ./convert --notest to take effect | |
# create by : scutweiqiang.yang[AT]gmail.com | |
# date : 2013-01-04 | |
files=$(find . -type f -regextype posix-extended -regex ".*\.java$|.*\.txt$") | |
from=gbk | |
to=utf8 |
OlderNewer