Monday, February 26, 2007

FarCry,the daydream will be come true




帖2张在老弟的GF7600机器上的FarCry的截图,用他的机器耍非常的顺畅,真的期待FarCry的next-gen引擎,加上目前的多核肯定会让游戏的整体可玩性大大提升,画面,音效,AI,物理,etc...昨天看到条新闻说玩FPS游戏会让人的视力提升,老美是用UT2004做的实验,但我想既然UT和QUAKE都能提升视力,那FarCry这种在青山绿水下战斗的更应该对眼镜起到休息作用,下次朋友们玩FPS游戏时如果老爸老妈或者gf/bf说你会破坏眼镜你可以拿这份最新的实验报告给他们看看^_^不过玩韩国游戏的家伙就惨了,越玩越笨的可怜虫!!!

Sunday, February 18, 2007

Happy Chinese New Year!!!

Im proud of Im a Chinese.Im proud of I was born in China.Not cause of Genghis khan's army beat European and Moslemism about 1000 years ago.Cause of our fathers keep a good relationship with God about 2600 years ago.Nowadays,Chinese dont give a shit about what is truth or where is essence.Thank God gave this opportunity that designed which put me to here born 20 years ago.Dont forget the gift which God given to you.

愉快的一天!早上12点起床,下午和家人耍到5点过出去找老弟和朋友,去bar喝了杯烈性cocktail,晚上K了几个小时的歌吓倒了一帮家伙,回家的路上到处是放炮的人,虽然是很喜庆的表现但毕竟对环境保护不太好,所以Shawn还是不怎么喜欢放炮^_^喝着老妈搞的鱼汤听着Jar的歌写着blog感觉棒极了!

祝大家在新的一年里努力尝试自己的梦想!!!
God be with you!!!God bless China!!!

Wednesday, February 14, 2007

Happy Valentine's Day!!!

情人节到了,先祝有bf/gf的在新的一年里关系更近,再祝没有gf/bf的朋友们可以在2007年里找到(包括Shawn).

Shawn这次是在programming中进入情人节的,难道是稣哥把Servlet的学习当成礼物送我了?张这么大从来没和gf一起过这个节日,记得上一个和上上一个gf都是在这天之前就separate,当然那是N久以前的事情,那时候还没信稣哥^_^

最近都睡的比较晚今天打算早些睡,明天到处逛逛用羡慕的眼光看看一对对情侣,或许是Shawn信稣哥后更加认清楚了自己,现在对MM做偶gf的要求可能太过于理想化,毕竟身边还没有找到一个热衷于id文化和自由文化运动的MM,不过相信上帝会帮Shawn预备的.

既然是情人节那就多放几个屁:
1,跟Shawn一样经常熬夜的朋友可以看看一位网友的blog.
2,昨天早上起床后得到了一条可以把developers激动来睡不着觉的新闻: Teraflops Research Chip不敢想象80核62W的功耗,这样的芯片应用于商业的话会推动无数的行业(当然包括非IT),游戏的AI问题可以很大程度上得到解决,Wireless Trans-Machine以及很多需要海量数据处理的分布式计算可以得到有效的方案,这简直是不敢想象的一场变革.

PS:最近天天在PS2上玩<实况足球10>,如果有朋友选瑞典队打的特别好的请指教一下,今天和朋友瑞典VS阿根廷 4:3赢了,但感觉不爽.

Sunday, February 11, 2007

Why dont you forget your first-love(girl)?

I saw my FL at afternoon.I really wanna say "hello" when saw her but I did not. Why?This is a frenk'in pretty question.

If JZY's boy friend has to step down from her for whatever reason, I am ready to take on the position. Why am I the perfect candidate (in my own mind)?

When I was a mid-school fresh I told my self that I wanted to make a pickupline to Jzy(My first-L).Advisedly,I made a decision that cause of she given 3 rejection to my honest heart of invite which to be my girl firend,I thought becase my fail to plan and my plan to fail.All of my problem was EQ it's not good enough at that time.My soul told myself,"There are 6 billion people in this world,if one-tenth of 1% of them wanted to get beauties like JZY,that would still be 6 million people.Do you really think you're pretter than 6 million people?"

Why dont you forget your fist-love?
Shawn:Because I missing the feeling when I though this is my first love.

OK, dream over. Back to work.

Saturday, February 10, 2007

Eclipse下开发Servlet

网上找了篇文章在eclipse里面配置tomcat来开发servlet,加了点Shawn具体遇到的过程,以下可供大家参考.

Eclipse是open source的集成开发环境,它得到了IBM的大力支持,而Tomcat我们就更熟悉了,它是apache组织的JSP/
Servlet容器,下面将讲述如何集成:

准备:

1. Tomcat5.5

2. Jdk1.6

3. Eclipse3.2

4. Eclipse的Tomcat插件在http://www.sysdeo.com/eclipse/tomcatPluginV2.zip下

安装:

1. 安装jdk1.6

2. 安装Tomcat5.5

3. 安装Eclipse3.2,解压缩就可以了

4. 将tomcatPluginV2.zip解压缩,把其中的com.sysdeo.eclipse.tomcat文件夹拷贝到,Eclipse安装
目录下的plugins目录中。

配置:

1. 启动Eclipse

2. 打开菜单Windows->Preferences

3. 在左侧选择Tomcat,可以看到右侧出现一些表单

4. Tomcat Version选择Version 5.x,Tomcat Home选择Tomcat的安装路径,Configuration
File中会自动填入Tomcat的配置文件server.xml

5. 展开左侧的Tomcat菜单,选择JVM Settings,JRE选择JDK1.6,

6. 按下Apply

7. 按下OK

8. 看你的工具栏中是不是多了几个小猫的图标,如果没有的话,选择菜单Windows ->Custmize Perspective,展开
other选项,在Tomcat上打勾,好了,看到小猫的图标没有。

9. 试下Start Tomcat按钮,好了,Tomcat在console中启动了。

例子:

下面做个Hello World的例子

1. 选择File->New->Project

2. 在对话框中选择Tomcat Project,然后next

3. 输入Project Name,这里可以写HelloWorld,继续next

4. 勾上can update server.xml file选项,finish,好了,一个Poject已经创建好了。

5. 打开new class 向导,在Name中填入HelloWorld,在Superclass中填入
javax.servlet.http.HttpServlet,按下finish,好了,一个servlet就创建好了

6. 在HelloWorld.java中重载doGet方法,代码如下:

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import java.io.IOException;

import java.io.PrintWriter;

import javax.servlet.ServletException;

public class HelloWorld extends HttpServlet {

public void doGet(HttpServletRequest request,HttpServletResponse
response)

throws IOException, ServletException {

response.setContentType("text/html");

PrintWriter writer = response.getWriter();

writer.println("Hello World!");

}
}

8.新建一个文件Web.xml:

http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://
java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">


invoker
/cayla/*


9,把%TOMCAT_HOME%/conf/web.xml里面的以下这段注释去掉.

invoker

org.apache.catalina.servlets.InvokerServlet


debug
0

2

10.Ctrl+S保存,右键HelloWorld project,选择Tomcat Project->update context to
server.xml

11.在Eclipse中重启Tomcat

12.在用浏览器访问http://localhost:8080/HelloWorld/cayla/HelloWorld

13.怎么样,看到HelloWorld了没有

Friday, February 09, 2007

Shawn's recent situation

回家也快一个星期了,感觉还不错,只是一个人座在黑暗下看着电脑没有在成黑爽,成黑的兄弟们还有几个没回家~最近搞JAVA也是比较郁闷,学习Servlet也比较苦闷,tomcat的配置很烦心毕竟对于像Shawn这样的newbie以前没有接触的东东.前2天和朋友们在河边喝茶聊天真的比较爽,希望稣哥再安排一次这样的机会放松放松~老弟最近买了台新PC是GF7600的显卡,听到这个消息后Shawn马上把上Far Cry的顶级渲染在他机器上跑了一下简直爽到极点,终于有点明白什么才叫Next-Gen的画质,或许国内的游戏开发真的只能在AI方面赶超老美了.

最近每天都自己打AJ和OJ比较爽,Shawn的桌子摆满了coke,JAVA的书,Marlboro,Ark Royal和ligter,etc....享受黑暗是一件不错的事情~今天放屁到此睡觉去了....

PS:今天搞了半天的Tomcat配置还是没有达到想要的效果,Shawn想把Tomcat的主机名从localhost改成tomcat55,虽然加入了新的host之后是可以解析,但如果用tomcat55来运行JSP和Servlet却不能成功,不知道哪位朋友可以帮Shawn解决一下,thx anyway~

Monday, February 05, 2007

BEA Chengdu UserGroup(The 3rd party)

I've been to the BEA UG party last weekend.BEAThank BEA provided so many food for us.

Between these two streams(In Java's stuff) -- the JCP and open source .BEA straddle the line between open source and closed tools. Although many IBM tools are proprietary, it has been a major contributor to Java itself and to the open source community. BEA has become very active of late with its “blended” strategy, in which its proprietary tools actively support open source products. In addition, BEA also has donated code and bodies to several open source projects.I like the style of BEA which stick to donate src to OpenSource community.





PS:Ned was come to my hood and we are talk about that TRANS-MACHINE will be replaced the stutters in the future.It's really a great news and Im looking forward to see how capersome's happend throughout the world.God be with stutters.

Thursday, February 01, 2007

Tomcat配置总结

最近Tomcat配置也搞了很多,现在基本上都搞定了.但有几点是需要注意的:
1,由于TOMCAT5.X以后没有提供admin package,所以安装admin package除了把文件复制到相应的目录还要注意确保设置了CATALINA_HOME这个系统环境变量,变量的值为你的tomcat的安装目录.不然就把admin.xml文件相应的部分改成自己的TOMCAT安装目录.

2,修改主机名时需要编辑C:\WINDOWS\system32\drivers\etc下的host文件,在最后一行加上自己的IP和主机名.

至于其他的很多网上都有资料,问一下google就搞定^_^

PS:回家2天感觉还不错,上午睡觉白天搞搞JAVA晚上和妹妹吃点snacks.昨天晚上妹妹吃东西完后居然把lighter忘换我了回家到处找,结果家里又每人抽烟的,幸好还有个好朋友送的Bruce Lee的30周年记念ligher,平时都舍不得用现在排上用场了.