2006年04月18日

http://www.myfootballforum.com/World_Cup_2006_Electronic_Chart.xls

以前的方法好像不可以用了

直接点下面的地址

https://accountservices.passport.net/reg.srf?ns=msn.com&sl=1&lc

https://accountservices.passport.net/reg.srf?id=963&sl=1&lc=2052

2006年04月12日

来自孙卫琴老师的 精通Struts

请求转发
请求转发允许把请求转发给同一应用程序中的其他Web组件。这种技术通常用于Web应用控制层的Servlet的流程控制器,他检查Http请求数据,并将请求转发到合适的目标组件,目标组件执行具体的请求处理操作,并生成响应结果。
Servlet类使用javax.servlet.RequestDispatcher.forward()方法来转发他所收到的HTTP请求。转发目标组件将处理该请求并生成响应结果,或者将请求继续转发到另外一个组件。最初请求的ServletRequest和ServletResponse对象被传递给转发目标组件,这使得目标组件可以访问整个请求的上下文。

RequestDispatcher rd=request.getRequestDispatcher("hello.jsp");
rd.forward(request,response);

JSP页面中

<jsp:forward page="hello.jsp">

请求重定向
Web组件可以将请求重定向到任何一个URL,而不仅仅是在同一应用中的URL
重定向的源组件和目标组件之间不共用同一个HttpServletRequest对象,因此不能共享request
范围内的共享数据

Servlet中的处理
response.sendRedirect("http://www.sina.com.cn");

2006年04月06日



点击下载

2006年04月04日


http://2006.sina.com.cn/history/

2006年03月27日

本报专稿据英国《每日明星报》26日报道,俄罗斯日前开办了全世界第一家“外星人学校”,专门教学员在遇到外星人时如何与之打交道,并成为其朋友。

据报道,这家“外星人学校”的正式名称叫做“UFO和超自然现象学院”,由俄罗斯陶里亚蒂市一个名为“不明飞行物学会”的组织创办。

“不明飞行物学会”主席塔提安娜·马科娃说:“我们的课程包括———如何侦察飞碟,以及应该到哪里观看飞碟;当你遇到外星人时,你应当做出怎样的反应。”

当学员们在课堂上学习完关于 UFO的理论知识后,他们还将被老师带到郊外“实习”。但马科娃称:“我们不会仅仅为了满足学员们的好奇心,就带领一大帮人到UFO出没的地点去实习。每次只会带2到3人,因为人如果太多的话,很可能会把 外星人吓坏。”

2006年03月16日

MyEclipse Enterprise Workbench Release Notes

Release 4.1.1 GA – March 2, 2006

Version 4.1.1 is the first maintenance release of the MyEclipse Enterprise Workbench 4.1 series.   This release fixes many of the issues in the former 4.1.0 version as well as introduces a few new features.

New Features In MyEclipse 4.1.1

The MyEclipse 4.1.1 maitenance release contains mostly fixes, but it also has introduced a few new features.

  • View source capability added to MyEclipse Web 2.0 Browser.
  • New JavaScript Console view added to Web 2.0 Workbench.
  • New customizations available in Hibernate Reverse Engineering Mapping wizard.
  • New Desktop Feature that includes 2 desktop-related actions.  (Windows Only)

下载地址

www.mofile.com

提取码为6506494040713102

Rapidshare.de 的下载地址

http://rapidshare.de/files/15628270/MyEclipseKeyGen_for_4.1.rar.html

2006年03月09日

Addison Wesley – Professional.Java.Puzzlers.Traps.Pitfalls.And.Corner.Cases.Jun.2005.Ebook-Ddu.chm

下载地址

http://rapidshare.de/files/15057785/Addison_Wesley_-_Professional.Java.Puzzlers.Traps.Pitfalls.And.Corner.Cases.Jun.2005.Ebook-Ddu.rar.html

public class AnimalFarm {

    public static void main(String[] args) {

        final String pig = "length: 10";

        final String dog = "length: "+pig.length(); 

        System.out.println("Animals are equal: "

                           + pig == dog);

    }

}

结果输出 Animals are equal: false

因为+的优先级别要高于 ==的优先级
所以相当于 ("Animals are equal:"+pig)==dog 

修改后

public class AnimalFarm {

    public static void main(String[] args) {

        final String pig = "length: 10";

        final String dog = "length: "+pig.length(); 

        System.out.println("Animals are equal: "

                           + (pig == dog));

    }

}

运行还是false..

问题就回到了对象的比较上来了

如果改成
public class AnimalFarm {

    public static void main(String[] args) {

        final String pig = "length: 10";

        final String dog = "length: 10"; 

        System.out.println("Animals are equal: "

                           + (pig == dog));

        //或者
         final String dog1="length: "+pig.length();
         System.out.println("Animals are equal: "

                           + (pig.equals(dog1)));

    }

}

那么结果就是true了.
今天在
Addison Wesley - Professional.Java.Puzzlers.Traps.Pitfalls.And.Corner.Cases.Jun.2005.Ebook-Ddu.chm

看到了一个小程序如下
/**

 * Generated by the IBM IDL-to-Java compiler, version 1.0

 * from F:\TestRoot\apps\a1\units\include\PolicyHome.idl

 * Wednesday, June 17, 1998 6:44:40 o'clock AM GMT+00:00

 */

public class Test {

    public static void main(String[] args) {

        System.out.print("Hell");

        System.out.println("o world");

    }

}

本来会输出Hello World

可是编译的时候都不通过

错误在哪呢?

拷贝到eclipse之后发现原来在程序开头的注释里面有这样一句
* from F:\TestRoot\apps\a1\units\include\PolicyHome.idl Java中\u后面需要接unicode 

原文解释 These characters begin with a backslash (\) followed by the
letter u, which denotes the start of a Unicode escape. Unfortunately,
these characters are not followed by four hexadecimal digits, so the
Unicode escape is ill-formed。

如果程序里面有如下注释也需要注意

// Note: \u000A is Unicode representation of linefeed (LF)

因为\u000A是 换行的unicode,所以这样的话
is Unicode representation of linefeed (LF) 就在一个新行了,
前面需要加上注释符合,否则就会提示出错

修改为
// Note: \u000A  //is Unicode representation of linefeed (LF)