预览模式: 普通 | 列表
08-03
05

过滤信息模块简单完成!

简单的来说就是一个数据库表,把相应黑名单关键字一一遍历出来与信息中的关键字做匹配,匹配上的就返回不予发布。下面我们来看下:
Action中的代码:

         /**
         * 过滤不良信息
         */
        FilterWordsService s1 = new FilterWordsService();
        List list = s1.getQueryList("from FilterWordVO as f order by f.id desc");
        Iterator i = list.iterator();

查看更多...

Tags: 过滤

分类:Java&Jsp | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 632
08-03
04

JSP中计算页面执行(处理)时间

在CJWBlog的用户日志首页最下方,会显示页面执行时间 Processed in 4 ms ,实现如下:

1. TimerFilter源码如下(或请下载附件):
package com.chinajavaworld.util;

import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;

查看更多...

Tags: 处理时间 时间 计算

分类:Java&Jsp | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 626
08-03
04

网页访问十秒极限 - Ten second limit

According to usability guru Jakob Nielsen,
user satisfaction begins to seriously degrade
after 10 seconds of waiting.

Try to minimize the size of generated pages. For a slow connection
at 28.8-56K, this 10 second limit corresponds to a file size of about 34K.

Keep graphics to a minimum. Consider compressing (zipping) content as well.

One simple optimization is to remove unnecessary white space in generated html (去掉html中多余的空格):

  • it is easy to implement - 容易实现
  • it translates directly into reduced download times - 减少数据传输
  • it can produce significant savings in file size, typically in the range of 10-25% - 文件大小通常可以减少10-25%

Most of the gains from removing white space are related to indentation,
especially that occurring within loops. This indentation can be left in

place during development, and then removed after testing is complete.

Tags: Ten second limit

分类:Seo&Hacker | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 559
08-03
03

下拉表单的添加删除

<html>
<head><title>添加删除选中下拉表单</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<table width="80%" border="1">
   <form action="" method="`post" name="myform">
    <tr>
     <td>

查看更多...

Tags: 下拉列表 下拉表单

分类:Ajax/Js | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 625
08-03
01

无限分类

package com.tree.model;

/**
* @author wolf
*
*/
public class TreeModel {

    private int classid;

查看更多...

Tags: 无限 分类

分类:学习 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 597