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
public interface ICommentService { | |
void pagingComments(Paging<Comment> pager, YpwapTypes objType, | |
Object objUuid); | |
Comment get(Integer id); | |
void update(Comment comment); | |
void save(Comment comment); |
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
String.prototype.template=function(){ | |
var args=arguments; | |
return this.replace(/\{(\d+)\}/g, function(m, i){ | |
return args[i]; | |
}); | |
} | |
var html = '<div class="logDiv">' | |
+ '<div class="contentDiv">{0}</div>' | |
+ '<div class="tipDiv">last date : {1}</div>' | |
+ '<div class="clear"> </div>' |
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
/** | |
* 模拟Facebook BigPipe异步展现页面 | |
* @author yongboy | |
* @date 2011-2-21 | |
* @version 1.0 | |
*/ | |
@WebServlet(urlPatterns = "/bigPipeDemoServlet", asyncSupported = true) | |
public class BigPipeDemoServlet extends HttpServlet { | |
private static final long serialVersionUID = 14526556595656565L; | |
private static final Log log = LogFactory.getLog(BigPipeDemoServlet.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
/** | |
* 定义中文字符Unicode编码范围 | |
*/ | |
private static final String CN_PATTERN = "[\\u4e00-\\u9fbb]+"; | |
public static final String subCnString(String str, int targetLen) { | |
if (str == null || str.equals("")) | |
return str; | |
if (targetLen < 1) |
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
<%@ page language="java" contentType="text/html; charset=GBK" | |
pageEncoding="GBK"%> | |
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
<% | |
String date = "2011-05-21 18:20:32.0"; | |
request.setAttribute("dateStr", date); | |
request.setAttribute("nowDate", new java.util.Date()); | |
%> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
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
import java.io.BufferedWriter; | |
import java.io.File; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import java.io.UnsupportedEncodingException; | |
import java.net.URLEncoder; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.concurrent.ConcurrentLinkedQueue; | |
import java.util.concurrent.ExecutorService; |
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
import java.lang.reflect.InvocationTargetException; | |
import java.util.Date; | |
import net.sf.cglib.beans.BeanCopier; | |
import org.apache.commons.beanutils.BeanUtils; | |
/** | |
* 测试属性拷贝 | |
* @author nieyong |
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
package com.servlet3.demo; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.Future; | |
import java.util.concurrent.ThreadFactory; | |
import java.util.concurrent.ThreadPoolExecutor; |
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
package com.servlet3.demo; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.Writer; | |
import javax.servlet.ServletException; |
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
package com.servlet3.demo; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.Writer; | |
import java.nio.channels.Channels; | |
import java.nio.channels.FileChannel; |
OlderNewer