??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲日本一区二区三区在线,国产精品无码亚洲精品2021,久久丫精品国产亚洲av不卡http://www.tkk7.com/flyffa/zh-cnSat, 10 May 2025 23:09:50 GMTSat, 10 May 2025 23:09:50 GMT60【工兗powerdesigner自定义DDL生成http://www.tkk7.com/flyffa/archive/2008/06/21/209665.htmlflyffaflyffaSat, 21 Jun 2008 03:22:00 GMThttp://www.tkk7.com/flyffa/archive/2008/06/21/209665.htmlhttp://www.tkk7.com/flyffa/comments/209665.htmlhttp://www.tkk7.com/flyffa/archive/2008/06/21/209665.html#Feedback0http://www.tkk7.com/flyffa/comments/commentRss/209665.htmlhttp://www.tkk7.com/flyffa/services/trackbacks/209665.html 在主界面菜单中选择Tools-->Resources-->DBMS.
再弹出的菜单中选择需要扩展的数据库类型?br /> 点击左上角Property图标Q弹出模板设|窗口?br /> 在窗口中讄相应的Sql生成模板?

flyffa 2008-06-21 11:22 发表评论
]]>
【web】面向对象的javascripthttp://www.tkk7.com/flyffa/archive/2006/12/28/90493.htmlflyffaflyffaThu, 28 Dec 2006 06:39:00 GMThttp://www.tkk7.com/flyffa/archive/2006/12/28/90493.htmlhttp://www.tkk7.com/flyffa/comments/90493.htmlhttp://www.tkk7.com/flyffa/archive/2006/12/28/90493.html#Feedback1http://www.tkk7.com/flyffa/comments/commentRss/90493.htmlhttp://www.tkk7.com/flyffa/services/trackbacks/90493.html 1.1. l承

今天遇到了需要在 javascript 中承的问题Q?/span>

查了一些帖子,自己又写了几个例子测试了一下,ȝ如下Q?/span>

1.1.1.     三种Ҏ

js 中实现承有三种ҎQ?/span>

假设父类?/span> Parent, 子类?/span> Child,

 

W一U,子类强制调用父类构?/span>

function Child(){

       Parent.call(this);

}

 

W二U,子类间接调用父类构?/span>

function Child(){

       this.base = Parent;

       this.base();

}

 

W三U:讄原型

function Child(){}

Child.prototype = new Parent();

q种方式虽然不够直观Q却应该是最有效率的方式?/span>

 

1.1.2.     ȝQ?/font>

其实 js 本n是没有什么承之cȝ概念的,只是Z使用利用 js 的一些特性而加的?/span>

 

js 的原型方?/span> prototype, 使得许多的工作变得容易?/span>

 

一?/span> function 对象和根?/span> function 构造出来的对象是不同的?/span>

 

一?/span> function 对象的原型其实就是一个根?/span> function 对象构徏出来的对象?/span>

CQ这个对象可?/span> new 出来的对象不一栗在 function 内部的代码ƈ不会被执行,如:

this.funcName = function() q样的代码。?/span> new 出来的对象则不然Q他h执行后的对象Ҏ?/span>

 

function 的局部变量相当于 class 里的U有变量Q无法在子类中获取和操作。但 this. 的部分是可以的?/span>

 

1.1.3.     猜测和假?/font>

Q这是我推断的,没有M的根据,当然也是可以试的)Q?/span>

当一?/span> Child ?/span> new ӞW一二种Ҏ中, js 执行?/span>

1 、先分配一个空_Q相当于 this = new Object() Q?/span> (msdn 中有具体的描q?/span> )

2 、拷贝原型:

3 、执行构造:也就?/span> Child.call(this) Q相当于 child(), 此时 this 对象有|Q?/span> msdn 中有描述Q?/span>

然后执行 Parent(); q个时?/span> parent 的构造函数执行以下几步:

1 、将 parent ?/span> prototype 拯?/span> object 区域Q这时覆盖了前面的区?/span> ( 好像试证明 parent 的原型ƈ不会被拷贝,此步不会被执?/span> )

2 、对q个区域执行初始化,也就是正常的 function 调用的过E。(相当?/span> Parent(),this 变量有|

 

而普通的 function 调用应该是这个样子:׃没有 new 操作W,所以没有ؓ其分配当前的 this( 也没有空?/span> ),

this 被放C window 对象上。但?/span> new 的时候显然不是这栗?/span>

 

obj.func() 的调用和 func() 调用是完全不一LQ?/span> obj.func ?/span> this 对象?/span> obj 对象Q?/span> func() 调用 this 对象?/span> window 对象Q这个应该和 jvm 中静态方法和cd例方法调用的区别的原理一栗?/span>

 

1.2. Ҏ重蝲

在实C对象l承之后Q我开始面临到W二个问题,重蝲?/span>

1.1.4.     两种Ҏ

js 怎样实现重蝲?/span>

1 、简单的重蝲Q?/span>

在这U重载中Q子cȝҎ无需调用父类的方法,直接在执行父cL造之后,再执行子cȝ重蝲ҎQ如 Parent ?/span> toString() ҎQ这时只需执行 this.toString = function(){....} 可以了?/span>

 

2 、调用父cL法的重蝲Q?/span>

׃ js 实际q行时ƈ没有父类、子cM个实例空_所?/span> super.toString() 肯定是不行的Q而在子类?/span> toString Ҏ中进?/span> this.toString() 调用只能引v内存溢出Q其实这U也可以惛_法做到?/span>

 

this.super_toString = this.toString();

this.toString=function(){

       ..............

       this.super_toString();

       ..............

}



flyffa 2006-12-28 14:39 发表评论
]]>
得到准确的在Uh数统计-减少搜烦引擎的干?/title><link>http://www.tkk7.com/flyffa/archive/2006/12/14/87722.html</link><dc:creator>flyffa</dc:creator><author>flyffa</author><pubDate>Thu, 14 Dec 2006 07:10:00 GMT</pubDate><guid>http://www.tkk7.com/flyffa/archive/2006/12/14/87722.html</guid><wfw:comment>http://www.tkk7.com/flyffa/comments/87722.html</wfw:comment><comments>http://www.tkk7.com/flyffa/archive/2006/12/14/87722.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.tkk7.com/flyffa/comments/commentRss/87722.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/flyffa/services/trackbacks/87722.html</trackback:ping><description><![CDATA[ <h2 style="MARGIN: 13pt 0cm"> <span style="FONT-FAMILY: 黑体; mso-ascii-font-family: Arial">基本ҎQ?/span> </h2> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">基本的方法,|上到处都是Q在</span> <span lang="EN-US">java</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中就是在</span> <span lang="EN-US">web.xml</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">注册一?/span> <span lang="EN-US">Listener</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q如下:</span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"><listener><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?><o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span><listener-class>xp.web.SessionCounter</listener-class><o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"></listener></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US">SessionCounter.java</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实现</span> <span lang="EN-US">javax.servlet.http.HttpSessionListener</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">接口Q分别在</span> <span lang="EN-US">sessionCreated</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Ҏ?/span> <span lang="EN-US">sessionDestroyed</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Ҏ中处?/span> <span lang="EN-US">session</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数目?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q样的方法有一定的问题Q?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US">1</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、对于真正从|页讉K的和搜烦引擎?/span> <span lang="EN-US">spider</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">无法区分?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US">2</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、当</span> <span lang="EN-US">Tomcat</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">重启Ӟ加蝲了上ơ持久化?/span> <span lang="EN-US">session</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Ӟ无法准确计算在线数?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">W二个问题我们可以不予考虑Q这?/span> <span lang="EN-US">tomcat</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">容器实现不标准的问题Q我们要解决的是的第一个问题,如何知道你的讉K的是真实的?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <strong> <span id="oy08myk" class="2Char"> <span style="FONT-SIZE: 16pt; FONT-FAMILY: 黑体; mso-ascii-font-family: Arial; mso-bidi-font-family: 'Times New Roman'">?/span> </span> <span id="my80qow" class="2Char"> <span lang="EN-US" style="FONT-SIZE: 16pt; mso-bidi-font-family: 'Times New Roman'"> <font face="Arial">js</font> </span> </span> <span id="8q0gyya" class="2Char"> <span style="FONT-SIZE: 16pt; FONT-FAMILY: 黑体; mso-ascii-font-family: Arial; mso-bidi-font-family: 'Times New Roman'">l过搜烦引擎</span> </span> </strong> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">做过</span> <span lang="EN-US">pv</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">l计的都知道Q可以用</span> <span lang="EN-US">script</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的方式得C真实?/span> <span lang="EN-US">pageView</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数目Q我们现在要做的是q样的一件事情,我们在所有的面都加入一D话Q?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"><script type="text/javascript"><o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver">document.write ("<iframe src='/sessionCountServlet' width=0 height=0 frameborder=no border=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=no></iframe>");<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"></script></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">然后我们写上一?/span> <span lang="EN-US">servlet</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来记录这些真正的讉K者?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver">import java.io.*;<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver">import javax.servlet.*;<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver">import javax.servlet.http.*;</span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver">public class SessionCounterServlet extends HttpServlet {<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>public SessionCounterServlet() {<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">        </span>super();<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>}<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>public void doGet(HttpServletRequest request,<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">                      </span>HttpServletResponse response) throws IOException,<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">            </span>ServletException {<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">        </span>process(request, response);<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>}<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>public void doPost(HttpServletRequest request,<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">                       </span>HttpServletResponse response) throws IOException,<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">            </span>ServletException {<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">        </span>process(request, response);<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>}<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>public void process(HttpServletRequest request,<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">                        </span>HttpServletResponse response) throws IOException,<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">            </span>ServletException {<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">        </span>SessionCounter.put(request.getSession().getId());<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver">}<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver">}</span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们可以看到q个</span> <span lang="EN-US">servlet</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">只是做了一件事情,?/span> <span lang="EN-US">process</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">里面做了</span> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver">SessionCounter.put(request.getSession().getId());</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q个动作?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们来看看我们的</span> <span lang="EN-US">SessionCounter</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">做了些什么:</span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver">import javax.servlet.http.*;<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver">import java.util.Hashtable;<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver">public class SessionCounter implements HttpSessionListener {<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>public SessionCounter() {<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>}<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>public static Hashtable m_real = new Hashtable();<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>private static long count = 0;<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>public void sessionCreated(HttpSessionEvent e) {<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">        </span>count++;<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>}<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>public void sessionDestroyed(HttpSessionEvent e) {<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">        </span>if (count > 0) {<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">            </span>count--;<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">        </span>}<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">        </span>m_real.remove(e.getSession().getId());<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>}<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>public static long getSessionCount() {<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">        </span>return count;<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>}<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>public static void put(String sessionId){<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">        </span>m_real.put(sessionId,"1");<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>}<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>public static int getRealCount(){<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">        </span>return m_real.size();<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver"> <span style="mso-spacerun: yes">    </span>}<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span lang="EN-US" style="BACKGROUND: silver; mso-highlight: silver">}</span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们记录了一个静态的</span> <span lang="EN-US">hash</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表来记录Ȁzȝ态的</span> <span lang="EN-US">sessionid</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Qƈ?/span> <span lang="EN-US">session</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">销毁的时候将q个</span> <span lang="EN-US">sessionid</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">|ؓI?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">怎么?/span> <span lang="EN-US">servlet</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置?/span> <span lang="EN-US">web</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应用中我׃|唆了?/span> </p> <img src ="http://www.tkk7.com/flyffa/aggbug/87722.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/flyffa/" target="_blank">flyffa</a> 2006-12-14 15:10 <a href="http://www.tkk7.com/flyffa/archive/2006/12/14/87722.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>【服务配|】apache+tomcat配置负蝲均衡的网?/title><link>http://www.tkk7.com/flyffa/archive/2006/11/06/79356.html</link><dc:creator>flyffa</dc:creator><author>flyffa</author><pubDate>Mon, 06 Nov 2006 03:49:00 GMT</pubDate><guid>http://www.tkk7.com/flyffa/archive/2006/11/06/79356.html</guid><wfw:comment>http://www.tkk7.com/flyffa/comments/79356.html</wfw:comment><comments>http://www.tkk7.com/flyffa/archive/2006/11/06/79356.html#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://www.tkk7.com/flyffa/comments/commentRss/79356.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/flyffa/services/trackbacks/79356.html</trackback:ping><description><![CDATA[     摘要: 在网上找了一些文,q是觉得不是很清楚,自己C些弯路,才把q个配置好,q是写下来吧Q以备后查? 1.   目标 使用 apache ? tomcat 配置一个可以应用的 web |站Q要辑ֈ以下要求Q? ...  <a href='http://www.tkk7.com/flyffa/archive/2006/11/06/79356.html'>阅读全文</a><img src ="http://www.tkk7.com/flyffa/aggbug/79356.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/flyffa/" target="_blank">flyffa</a> 2006-11-06 11:49 <a href="http://www.tkk7.com/flyffa/archive/2006/11/06/79356.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>【CSS】样式表中的cd?/title><link>http://www.tkk7.com/flyffa/archive/2006/11/02/78653.html</link><dc:creator>flyffa</dc:creator><author>flyffa</author><pubDate>Thu, 02 Nov 2006 05:14:00 GMT</pubDate><guid>http://www.tkk7.com/flyffa/archive/2006/11/02/78653.html</guid><wfw:comment>http://www.tkk7.com/flyffa/comments/78653.html</wfw:comment><comments>http://www.tkk7.com/flyffa/archive/2006/11/02/78653.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.tkk7.com/flyffa/comments/commentRss/78653.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/flyffa/services/trackbacks/78653.html</trackback:ping><description><![CDATA[ <p align="left">   最q做|页的时候无意中发现一个有意思的问题Q只在Ie中测试过Q不知道在firefox中有什么现象?br /><font style="BACKGROUND-COLOR: #d3d3d3" size="2"><font style="BACKGROUND-COLOR: #ffffff"><font size="3">先定义样式表Q?/font><br /><font style="BACKGROUND-COLOR: #d3d3d3"><STYLE><br />DIV .head1<br />{<br /> background-color: yellow;<br />}</font></font></font></p> <p> <font style="BACKGROUND-COLOR: #d3d3d3" size="2">DIV.head2<br />{<br /> background-color: red;<br />}</font> </p> <p> <font style="BACKGROUND-COLOR: #d3d3d3" size="2"></STYLE> <style><![CDATA[ DIV .head1 { background-color: yellow; } DIV.head2 { background-color: red; } >]]></style><br /><br /><br /><font style="BACKGROUND-COLOR: #ffffff">展现样式Q?/font></font> </p> <p> <font style="BACKGROUND-COLOR: #d3d3d3"><div class="head1">div1</div><br /><span class="head1">span1</span><br /><div class="head2">div1</div><br /><span class="head2">span1</span><br /></font> </p> <div id="qc08igw" class="head1">div1</div> <span id="8a0mqme" class="head1">span1</span> <div id="ywmio8m" class="head2">div1</div> <span id="80c8g0w" class="head2">span1</span> <br /> <br />试head1 与head2的区?<br /><p><font style="BACKGROUND-COLOR: #d3d3d3" size="2"><div><br /><div class="head1">div2</div><br /><span class="head1">span2</span><br /></div></font></p><div><div id="k8yw0ww" class="head1"><font style="BACKGROUND-COLOR: #ffff00">div2</font></div><span id="86i0ak0" class="head1"><font style="BACKGROUND-COLOR: #ffff00">span2</font></span></div><p><font style="BACKGROUND-COLOR: #d3d3d3" size="2"><p><br /><div class="head1">div2</div><br /><span class="head1">span2</span><br /></p></font><br /></p><p></p><div id="88am0i8" class="head1">div2</div><span id="60000uw" class="head1">span2</span><p></p><br /><br /><br />ȝQ?br /> head1样式和head2样式的主要区别就是中间多了一个空根{?font color="#ff0000">感觉像是head1样式是指在div内部适用的样式;</font> head2样式是应用于div元素上的样式Q?br /><br />另:׃博客上的~辑器自动在style之间增加了cdata角标Q导致我的效果无法显C,head1的效果我是通过讄背景色完成的Q有兴趣的朋友可以把那几D代码拷出来存成一个文Ӟ可以看到效果?br /><br />请高手指教? <p></p><img src ="http://www.tkk7.com/flyffa/aggbug/78653.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/flyffa/" target="_blank">flyffa</a> 2006-11-02 13:14 <a href="http://www.tkk7.com/flyffa/archive/2006/11/02/78653.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Proxoolq接池的单配|?/title><link>http://www.tkk7.com/flyffa/archive/2006/11/02/78639.html</link><dc:creator>flyffa</dc:creator><author>flyffa</author><pubDate>Thu, 02 Nov 2006 04:00:00 GMT</pubDate><guid>http://www.tkk7.com/flyffa/archive/2006/11/02/78639.html</guid><wfw:comment>http://www.tkk7.com/flyffa/comments/78639.html</wfw:comment><comments>http://www.tkk7.com/flyffa/archive/2006/11/02/78639.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.tkk7.com/flyffa/comments/commentRss/78639.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/flyffa/services/trackbacks/78639.html</trackback:ping><description><![CDATA[      自己以前做程序都是自己写q接池,那个时候项目大Q环境各异,Z便于实施QLpp行连接池的管理,{到自己惛_一些小东西的时候,才发现这个连接池成了一个专用的东西Q和pȝ做了太多的绑定,只能找连接池用,用过resin自带的连接池Q再用tomcatq接池的时候就很不爽,没有监控的功能,在网上选来选去Q最后选择了Proxool?br /><br />      Proxoolq接池是sourceforge下的一个开源项?q个目提供一个健壮、易用的q接池,最为关键的是这个连接池提供监控的功能,方便易用Q便于发现连接泄漏的情况。开源项目地址是:<a ><br />http://proxool.sourceforge.net/</a><br /><br />配置q接池比较的单:<br />1、将下蝲的包解开Q从包中的lib目录下将proxool-xxx.jar(xxx随着不同的版本号变化)加入你的工程中?br />2、配|数据源Q?br />      在web-info下徏立文Ӟproxool.xmlQ文件内容如下:<br /><font style="BACKGROUND-COLOR: #d3d3d3"><font size="2"><?xml version="1.0" encoding="UTF-8"?><br /><something-else-entirely><br />  <proxool><br />    <alias>Develop</alias><br />    <driver-url>jdbc:mysql://localhost/kuanxue</driver-url><br />    <driver-class>com.mysql.jdbc.Driver</driver-class><br />    <driver-properties><br />      <property name="user" value="root"/><br />      <property name="password" value=""/><br />      <property name="useUnicode" value="true"/><br />      <property name="characterEncoding" value="GBK"/><br />    </driver-properties><br />    <maximum-connection-count>500</maximum-connection-count><br />    <house-keeping-test-sql>select CURRENT_DATE</house-keeping-test-sql><br />  </proxool><br /> </something-else-entirely><br /></font><br /><font style="BACKGROUND-COLOR: #ffffff">3、配|web.xml<br />在web.xml中增加:<br /><font style="BACKGROUND-COLOR: #d3d3d3" size="2"><!-- 配置初始化servlet,在web容器加蝲的时候自动加载配|文Ӟ如果不是webE序Q这个部分就需要通过开发接口来初始化了 --><br /><servlet><br />     <servlet-name>proxoolInitialServlet</servlet-name><br /> <servlet-class>org.logicalcobwebs.proxool.configuration.ServletConfigurator</servlet-class><br />     <init-param><br />       <param-name>xmlFile</param-name><br />       <param-value>WEB-INF/proxool.xml</param-value><br />     </init-param><br />     <load-on-startup>1</load-on-startup><br />   </servlet><br /><!--配置监控servlet,其实如果不想监控的话Q可以不?-><br />   <servlet><br />    <servlet-name>dbpoolAdmin</servlet-name><br />    <servlet-class>org.logicalcobwebs.proxool.admin.servlet.AdminServlet</servlet-class><br />  </servlet><br />   <servlet-mapping><br />    <servlet-name>dbpoolAdmin</servlet-name><br />    <url-pattern>/dbpool</url-pattern><br />  </servlet-mapping><br /></font><br /></font></font><font style="BACKGROUND-COLOR: #ffffff">4、在E序中调?br />一般我获取connection的行为封装ؓ一个工厂模式,便于多种情况的切换,以下是其中proxool数据源的getConnectionҎ的实玎ͼ<br /><br /></font><font style="BACKGROUND-COLOR: #d3d3d3" size="2">public Connection getConnection() {<br />        try{<br />            Class.forName("org.logicalcobwebs.proxool.ProxoolDriver");<br />            return DriverManager.getConnection("proxool.Develop");<br />        }catch(Exception ex){<br />            ex.printStackTrace();<br />        }<br />        return null;<br />    }<br /><br /><font style="BACKGROUND-COLOR: #ffffff">5、应用开发:<br />      在实际的应用中,我们可能需要更多的功能Q比如监控功能不够强大,权限不好控制Q我们希望能够编写出更强大的功能Q比如杀M些大的查询语句等Q记录各U查询语句占用的旉Q这需要对开发接口进行进一步的研究了?br /></font></font><img src ="http://www.tkk7.com/flyffa/aggbug/78639.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/flyffa/" target="_blank">flyffa</a> 2006-11-02 12:00 <a href="http://www.tkk7.com/flyffa/archive/2006/11/02/78639.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>【CSS】DIV内嵌动DIV时的问题http://www.tkk7.com/flyffa/archive/2006/11/01/78449.htmlflyffaflyffaWed, 01 Nov 2006 04:43:00 GMThttp://www.tkk7.com/flyffa/archive/2006/11/01/78449.htmlhttp://www.tkk7.com/flyffa/comments/78449.htmlhttp://www.tkk7.com/flyffa/archive/2006/11/01/78449.html#Feedback2http://www.tkk7.com/flyffa/comments/commentRss/78449.htmlhttp://www.tkk7.com/flyffa/services/trackbacks/78449.html
<div style="border-style:solid">
   <div style = "float:right;border-style:solid">dsfsdfsd<div>
</div>

发现内层div会越界,在网上找了一下:
<div style="border-style:solid">
   <div style = "float:right;border-style:solid">dsfsdfsd<div>
   <div style="font: 0px/0px sans-serif;clear: both;display: block">
</div>
加这么一句就好了Q顺便查C一个在firefox中解决的ҎQ?br /><div style="border-style:solid">
   <div style = "float:right;border-style:solid">dsfsdfsd<div>
   <br clear="alll">
</div>


flyffa 2006-11-01 12:43 发表评论
]]>
【搜索】步入全文检索第一?/title><link>http://www.tkk7.com/flyffa/archive/2006/10/12/74773.html</link><dc:creator>flyffa</dc:creator><author>flyffa</author><pubDate>Thu, 12 Oct 2006 05:28:00 GMT</pubDate><guid>http://www.tkk7.com/flyffa/archive/2006/10/12/74773.html</guid><wfw:comment>http://www.tkk7.com/flyffa/comments/74773.html</wfw:comment><comments>http://www.tkk7.com/flyffa/archive/2006/10/12/74773.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/flyffa/comments/commentRss/74773.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/flyffa/services/trackbacks/74773.html</trackback:ping><description><![CDATA[最q由于项目需要,开始对全文索做些了解,刚刚开始,׃目人力的严重不I我没有太多的旉q行l致的研IӞ不知道能走到如何的一个深度,C步,看一步吧?br /><br />我用java做的开发,׃数据库表q不多,我没有采用hibernate或者其他的持久层,而是直接使用了jdbcq行数据库操作。数据库使用的是Mysql?br /><br />做搜索,W一惛_的就是like了,后来发现条g可能比较复杂Q效率可能低下,于是准备d全文索的搜烦模式?br /><br /><strong>W一c:数据库内嵌全文检?/strong><br /><br />W一U方案:毫无疑问Q最为省事的q是数据库直接帮我搞定,我无d装新的东西,也不用花太多的时间做新的研究?br />      我用的是Mysql5.1。查官方文档Q用全文检索技术很单:<br />      把表建成MyIsam的,<br />      然后导入数据Q?br />      然后建立fulltext索引Q?br />      然后Q调整什么最词长(q个部分我还没做发现问题了Q节U了一部分工作量)Q?br />      然后写一个select * from tbl where match (col1,col2) against ("关键?","关键?")的sql,<br />      于是发现没有M的返回记录。上|google了一下,才知道mysql不支持中文的全文Q在Mysql5.1参考手?2.7.4中有q么一D话Q?br />      <strong><em><span>诸如汉语和日语这L表意语言没有自定界符。因?/span><span>Q?span> FULLTEXT</span>分析E序不能定在这些或其它的这c语a中词的v始和l束的位|。其隐含操作及该问题的一些工作区?/span></em></strong><a title="12.7. Full-Text Search Functions" href="mk:@MSITStore:E:\专业知识\2数据~1\mySql\MYSQL5~1.CHM::/functions.html#fulltext-search"><strong><em>12.7节,“全文搜索功能?/em></strong></a><span><strong><em>有详l论q?br /></em></strong>      但我没有扑ֈM关于q个部分的描qͼ所以我暂时认ؓMysql直到现在对中文的全文索依然没有支持?br /><br />W二U方案:修改版的mysqlQ因为mysql是开源的软gQ那么mysql本n不支持,有没有中文版的能支持呢,在google中顺手搜C一个,量公司研发了一个,|址Q?a >http://www.hylanda.com/</a>Q由于不是开源的Q公司是商业化运作,加上|上应用的h好像也不多,故而这个方案也被搁|了?br /><br />W三U方案:插gQ网上能够google到的是q样一个:<a >http://myft.twomice.net/</a>Q目前好像是开源运作,我还没有试Q粗略看了一下,怎么q要自己~译mysqlQ好像和插g的概忉|些出入,不过ȝ来说Q这个方式还是值得试的?br /><br />W四U方案:更换数据库,目前q有oracle,ms-sql可以选择Q这两个的中文搜索不知道做的如何Q如果不错的Q而mysql又不能解决的话,换数据库吧Q我想用oracle应该好一些?br /><br /><strong>W二c:开源全文检索引?br /></strong>目前最火的是lucene吧,可以研究研究?br /><br />在搜索中发现了这样一博客文章,加上Q以备查?br /><a >http://blog.csdn.net/jeafyezheng/archive/2006/09/29/1306463.aspx</a></span><img src ="http://www.tkk7.com/flyffa/aggbug/74773.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/flyffa/" target="_blank">flyffa</a> 2006-10-12 13:28 <a href="http://www.tkk7.com/flyffa/archive/2006/10/12/74773.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>【读书】jsp高~程-jsptaglibhttp://www.tkk7.com/flyffa/archive/2006/08/24/65580.htmlflyffaflyffaThu, 24 Aug 2006 09:15:00 GMThttp://www.tkk7.com/flyffa/archive/2006/08/24/65580.htmlhttp://www.tkk7.com/flyffa/comments/65580.htmlhttp://www.tkk7.com/flyffa/archive/2006/08/24/65580.html#Feedback0http://www.tkk7.com/flyffa/comments/commentRss/65580.htmlhttp://www.tkk7.com/flyffa/services/trackbacks/65580.html阅读全文

flyffa 2006-08-24 17:15 发表评论
]]>
【读书】jsp高~程-j2eehttp://www.tkk7.com/flyffa/archive/2006/08/24/65579.htmlflyffaflyffaThu, 24 Aug 2006 09:13:00 GMThttp://www.tkk7.com/flyffa/archive/2006/08/24/65579.htmlhttp://www.tkk7.com/flyffa/comments/65579.htmlhttp://www.tkk7.com/flyffa/archive/2006/08/24/65579.html#Feedback0http://www.tkk7.com/flyffa/comments/commentRss/65579.htmlhttp://www.tkk7.com/flyffa/services/trackbacks/65579.html2004-12-03

W一部分QJSP和J2EE
1?什么是javabean
javabean的属性分为四c:
1、simpleQ简单属?br />propName
getter:getpropName()
setter:setpropName()

2、IndexQ烦引属?br />propName
getter:[] getpropName()
setter:setpropName()
getterI: obj getpropName(int i)
setterI: setpropName(int i,obj)

3、boundQ触发propertychange事g的属?br />接口和普通属性没有什么不同,只是在setter里支持触发事件propertychange.

4、constrainedQ限制类属?br />接口和普通属性一_setter支持bound,另外Q?br />在setter中支持触发事件让相关监听lg来判断是否可以设|,如果不行Q其他组件会抛出propertyvetoException

事g模型Q?br />Z源和listener的的事g模型。observer模式?br />事gQjava.util.EventObject及其子类?br />监听者:java.util.EventListener及其子类?br />源对象:接口必须标准
public void add< ListenerType>(< ListenerType> listener)
public void remove< ListenerType>(< ListenerType> listener)

事g适配器:
可以用作定会做出反映的事g响应者的用途?/p>

2、在jsp中?br />

3、jsp中javabean的scope
application scope:应用E序U别的?br />session scope:会话U别
request scope:hU别
page scopeQ页面?/p>

1? ejb
Ҏ的面向服务器端的javabeans.
包含sessionbean和entitybean两种
home
Home 接口定义了创建查扑ֈ除EJB q程接口对象或者EJB 服务的方法客L
应用E序通过使用JNDI 技术定位Home 接口的位|一旦获得Home 接口的实例就可以
利用它的create()Ҏ创徏EJB q程接口的实例对?br />remote接口
q程调用接口 (或者简UCؓq程接口Remote Interface)是对EJB 对象Ҏ的d?br />在远E调用接口中声明了EJB 对象的方法但是ƈ没有具体实现q些Ҏ?setproperty id="Name" property="*">

3、jsp中javabean的scope
application scope:应用E序U别的?br />session scope:会话U别
request scope:hU别
page scopeQ页面?/p>

1? ejb
Ҏ的面向服务器端的javabeans.
包含sessionbean和entitybean两种
home
Home 接口定义了创建查扑ֈ除EJB q程接口对象或者EJB 服务的方法客L
应用E序通过使用JNDI 技术定位Home 接口的位|一旦获得Home 接口的实例就可以
利用它的create()Ҏ创徏EJB q程接口的实例对?br />remote接口
q程调用接口 (或者简UCؓq程接口Remote Interface)是对EJB 对象Ҏ的d?br />在远E调用接口中声明了EJB 对象的方法但是ƈ没有具体实现q些Ҏ?/p>



flyffa 2006-08-24 17:13 发表评论
]]>
վ֩ģ壺 AV뾫Ʒ| AҹƬƷվ| Ʒާѡ벥鶹| hƵѹۿ| ձѹۿ| ëƬ߹ۿ| þùѹۿƷ3| ˳ɵӰ˳9999| ޿һ | ޹ɫƵ| ˾ƷƵȫ鶹| Ļһȥ̨| èwww˳| Ƶ߹ۿַ| ޹˾Ʒþþþþۺ| avһ| Ļվ| һˮëƬѿ| 99þ޾ƷëƬ| þþƷѿ| Ŀַ| վС˵| ڵһ | ƵƷ| һŮȫƾþƬ| ŷղվ| ɫƵۿһ| ۺɫ߹ۿ| ۺ| ҹþþþþþþõӰ| 99þѿƷ| ޹һ| ߿ѹۿAVҹӰԺ| þþþavרˮ| 18վڵ| ޹˾þ99Ʒ| ڴƬѿ| һһëѻƬ| ޾Ʒ˾þþþ| ˳AVվ| v߹ۿ|