没有亲自去看招聘会,但听同学说很多人,岗位&人数比例为2%,呵呵,可能由于:
1.刚开始,去看看的人多。
2.历来都是僧多粥少。
3.就业历来都很火爆。

       本人现在很忙,没有办法升级论坛和del调那个垃圾信息,也没有时间去找论坛版主来管理,但是等我考完研后可能会大刀阔斧的改变这一现状!
    再就是本站的访问量慢慢上升,可能会打一点小广告,等等。还有就是要定一个方向,可能就不会这么富含有个性了,呵呵,还望大家尽量,嘻嘻◎
                                                      站长:向东   #Email:xdy108@126.com

                                                                          2006-11-25

   有了爱,我很厉害,即使才疏学浅,也能获得成功。

           今天不知怎么的可能是昨天没有学习的缘故吧,今天好像都睡觉了一天了,打了会篮球,感觉很好,很久没有打了,但是感觉还是很有感觉得,以前是一个人打,现在我一有整体的观念了,嘻嘻嘻。比赛是五个人的,你被耍了,终于知道了。。。。主要是歇息一下罢了。。。希望状态快点来。。
       难道今天是有baidu和google在我网上爬?还是庆贺我生日呢?我很少更新访问量都过350人了,呵呵,截至2006-11-22 21:30已经有600人访问了,真好。

[p align=center]*************************************
本贴从网上搜索得来,是我初学jsp找到的最好的一篇配置指南了。原作者已无法确定,不过在此也略表感谢。当初,我遍历tomcat英文文档依然无法找到servlet的安装配置的方法(本人e文水平有限),后来看到这贴子一时豁然开朗。值得推介。
*************************************

j2sdk1.5下载地址:http://java.sun.com
tomcat5.5下载地址:http://jakarta.apache.org/site/binindex.cgi
j2sdk1.5安装目录:c:\j2sdk1.5.0
tomcat5.5安装目录:c:\tomcat

一.配置j2sdk1.5.0
1.windows 2000 server系列下配置
我的电脑->属性->高级->环境变量
追加变量名:java_home 变量值:c:\j2sdk1.5.0
追加变量名:path下变量值:%java_home%\bin;
追加变量名:classpath下变量值:.;%java_home%\lib;或.;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar
*注:“.;”代表当前目录下的所有引用,“%...%”变量宏替换。

2.windows 9x系列下配置
用记事本编辑autoexec.bat,加入下列语句:
set java_home=c:\j2sdk1.5.0;
set path=%path%;%java_home%\bin;
set classpath=.;%java_home%\lib;或.;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar

3.windows xp、2003 server 下配置
以上两种方法皆可

4.运行

a.用记事本编辑以下代码,并保存为helloworld.java:
public class helloworld{
public static void main(string[] args){
system.out.println("hello,world!");
}
}

b.开始->运行->cmd
在控制台中切换到当前目录:
javac helloworld.java
java helloworld
你就会在控制台上看见输出的hello,world!

*注:javac是编译命令,它把helloworld.java编译成helloworld.class
  java就是解释命令,jvm把helloworld.class解释执行
至此java运行环境配置、调试完成。

二.配置tomcat5.5
1.windows 2000 server系列下配置
我的电脑->属性->高级->环境变量
追加变量名:tomcat_home 变量值:c:\tomcat
追加变量名:classpath下变量值:%tomcat_home%\common\lib;

2.windows 9x系列下配置
用记事本编辑autoexec.bat,加入下列语句:
set tomcat_home=c:\tomcat;
set classpath=%classpath%;%tomcat_home%\common\lib;

3.windows xp、2003 server 下配置
以上两种方法皆可

4.运行
  在控制台中转到c:\tomcat\bin这个目录,运行startup.bat,然后会出现一个窗口,连跳一大串东西,最后表示server已经运行:
“server startup in ... ms”
打开ie浏览器并在地址栏中输入:http://localhost:8080
此时出现欢迎界面表示tomcat已经ok!
  在控制台中转到c:\tomcat\bin这个目录,运行shutdown.bat,关闭服务器。
至此tomcat运行环境配置、调试完成。

三.配置javabeans

1.用记事本编辑以下代码,并保存为circle.java:
package abc.def;
import java.io.*;
public class circle{
int radius;
public circle(){
radius=1;
}
public int getradius(){
return radius;
}
public void setradius(int newradius){
radius=newradius;
}
public double circlearea(){
return math.pi*radius*radius;
}
public double circlelength(){
return 2.0*math.pi*radius;
}
}

2.将circle.java保存在c:\tomcat\common\classes\abc\def目录下。

3.开始->运行->cmd
在控制台中切换到当前目录:
javac circle.java或直接输入javac c:\tomcat\common\classes\abc\def\circle.java

4.用记事本编辑以下代码,并保存为usebeans.jsp:
<%@ page contenttype="text/html;charset=gb2312" %>
<%@ page import="abc.def.circle" %>





<% girl.setradius(100);
%>

圆的半径是:
<%= girl.getradius() %>

圆的周长是:
<%= girl.circlelength() %>

圆的面积是:
<%= girl.circlearea() %>




5.将usebeans.jsp保存在c:\tomcat\webapps\root目录下。

6.启动服务器后,打开ie浏览器并在地址栏中输入:http://localhost:8080/usebeans.jsp
如出现预期值,表示javabeans配置成功!

圆的半径是: 100

圆的周长是: 628.3185307179587

圆的面积是: 31415.926535897932

至此javabeans运行环境配置、调试完成。

四.servlet配置
1.windows 2000 server系列下配置
我的电脑->属性->高级->环境变量
追加变量名:classpath下变量值:%tomcat_home%\common\lib\servlet-api.jar;

2.windows 9x系列下配置
用记事本编辑autoexec.bat,加入下列语句:
set classpath=%classpath%;%tomcat_home%\common\lib\servlet-api.jar;

3.windows xp、2003 server 下配置
以上两种方法皆可

4.运行
a.用记事本编辑以下代码,并保存为hello.java:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class hello extends httpservlet{
public void init(servletconfig config) throws servletexception{
super.init(config);
}
public void service(httpservletrequest request,httpservletresponse response) throws ioexception{
printwriter out=response.getwriter();
response.setcontenttype("text/html;charset=gb2312");
out.println("");
out.println("hello!");
out.println("");
}
}

b.将hello.java保存在c:\tomcat\common\classes目录下。

c.开始->运行->cmd
在控制台中切换到当前目录:
javac hello.java或直接输入javac c:\tomcat\common\classes\hello.java

d.注册servlet
用记事本打开c:\tomcat\webapps\root\web-inf\web.xml

-
welcome to tomcat
welcome to tomcat
-
.
.
.
-

之间相应位置追加以下两组数据:

hello
hello



hello
/servlet/hello


*注:...为servlet在服务器中的id
...为servlet-class类名
...为镜像路径亦虚拟路径
c:\tomcat\common\classes为类共享目录,亦可在:
c:\tomcat\webapps\你的应用目录\web-inf\web.xml
中注册,不过在应用servlet时须加入c:\tomcat\webapps\下的目录名,如:
http://localhost:8080/你的应用目录/servlet/hello
建议你自己应用所用的servlet类放置到 c:\tomcat\webapps\你的应用目录\web-inf\classes 中;在web.xml注册servlet类路径也是“/hello”即可。

e.重新启动服务器后,打开ie浏览器并在地址栏中输入:http://localhost:8080/servlet/hello
显示:“hello!”,则配置成功!
至此servlet运行环境配置、调试完成。

以上为j2sdk1.5.0+tomcat5.5(04.07.21)配置环境步骤。由于tomcat版本更新极快,所以各版本配置略有差异。希望大家能够灵活变通!

这里强调本版本几个注意事项:
1.javabeans强制引入包package *.*;
2.servlet类库为%tomcat_home%\common\lib\servlet-api.jar
而不是%tomcat_home%\lib\servlet.jar(不存在这个目录及类库)
3.引入第三方类库须加入classpath或加入%java_home%\lib\下,以正常加载。用tomcat5.5(04.07.21)引用该类库时须将该*.jar文件加入%tomcat_home%\common\lib\下。

本帖只作参考,jsp配置环境有许多组合,这里只提及j2sdk1.5.0+tomcat5.5,但足已供初、中级开发人员使用!帖中不足之处请大家不吝赐教,不盛感激!

[/p]

Servlet以及它的优越性  
  Servlet是用Java编写的Server端程序,它与协议和平台无关。Servlet运行于Java-enabled Web Server中。Java Servlet可以动态地扩展Server的能力,并采用请求-响应模式提供Web服务。
  最早支持Servlet技术的是JavaSoft的Java Web Server。此后,一些其它的基于Java的Web Server开始支持标准的Servlet API。Servlet的主要功能在于交互式地浏览和修改数据,生成动态Web内容。这个过程为:
  客户端发送请求至服务器端;
  服务器将请求信息发送至Servlet
  Servlet生成响应内容并将其传给Server。响应内容动态生成,通常取决于客户端的请求
  服务器将响应返回给客户端
  Servlet看起来像是通常的Java程序。Servlet导入特定的属于Java Servlet API的包。因为是对象字节码,可动态地从网络加载,可以说Servlet对Server就如同Applet对Client一样,但是,由于Servlet运行于Server中,它们并不需要一个图形用户界面。从这个角度讲,Servlet也被称为Faceless Object。
  JAVA Servlet的优势:
  Servlet可以和其他资源(文件、数据库、Applet、Java应用程序等)交互,以生成返回给客户端的响应内容。如果需要,还可以保存请求-响应过程中的信息。
  采用Servlet,服务器可以完全授权对本地资源的访问(如数据库),并且Servlet自身将会控制外部用户的访问数量及访问性质
  Servlet可以是其它服务的客户端程序,例如,它们可以用于分布式的应用系统中,可以从本地硬盘,或者通过网络从远端硬盘激活Servlet。
  Servlet可被链接(chain)。一个Servlet可以调用另一个或一系列Servlet,即成为它的客户端。
  采用Servlet Tag技术,可以在HTML页面中动态调用Servlet。
  Servlet API与协议无关。它并不对传递它的协议有任何假设。
  像所有的Java程序一样,Servlet拥有面向对象Java语言的所有优势
  Servlet提供了Java应用程序的所有优势——可移植、稳健、易开发。使用Servlet 的Tag技术,Servlet能够生成嵌于静态HTML页面中的动态内容。
  一个Servlet被客户端发送的第一个请求激活,然后它将继续运行于后台,等待以后的请求。每个请求将生成一个新的线程,而不是一个完整的进程。多个客户能够在同一个进程中同时得到服务。一般来说,Servlet进程只是在Web Server卸载时被卸载。
  Servlet生命周期:
  装载Servlet。这项操作一般是动态执行的。然而,Server通常会提供一个管理的选项,用于在Server启动时强制装载和初始化特定的Servlet。
  Server创建一个Servlet的实例
  Server调用Servlet的init()方法
  一个客户端的请求到达Server
  Server创建一个请求对象
  Server创建一个响应对象
  Server激活Servlet的service()方法,传递请求和响应对象作为参数
  service()方法获得关于请求对象的信息,处理请求,访问其他资源,获得需要的信息
  service()方法使用响应对象的方法,将响应传回Server,最终到达客户端。service()方法可能激活其它方法以处理请求,如doGet()或doPost()或程序员自己开发的新的方法
  对于更多的客户端请求,Server创建新的请求和响应对象,仍然激活此Servlet的service()方法,将这两个对象作为参数传递给它。如此重复以上的循环,但无需再次调用init()方法。一般Servlet只初始化一次 ,当Server不再需要Servlet时(一般当Server关闭时),Server调用Servlet的Destroy()方法。
  在美国,EJB+Servlet+JSP几乎成为电子商务的开发标准。本来 ASP 也很有希望,但微软最近可能把精力都集中在打官司和Win2000上, 因此电子商务发展得太少。PHP由于其模式和一些天生缺陷,毫无希望。 在美国,很少有商业站点用PHP的。  

   以前,在读小学的时候,家里状况不是很好,每当我生日,我父亲都给我煮一个鹅蛋,要不就是好几个鸡蛋,借以庆祝我生日,一般是带到学校去,当时感觉没有什么,现在想起来还是挺高兴的,感觉很温暖。
  读初中的时候,父亲和我通信提醒我没几天就是你生日,你整点想吃的好好过个生日,我那时脾气一直很倔强,一直影响到后来。
  高中的时候,那个时候好像201电话比较流行,老爸就会在我们那儿赶集街上给我打电话说今天是你生日,你就出去吃你平时想吃的东西吧,我其实没吃,但是这也许能感受到父母的一片苦心,这给我以后能够已一颗平常的心态面对世界以奠基。
  大学的的时候,老爸就直接发短信了,你就吃点你以前没有吃过的东西吧,以后工作了,以后你可以更同事们聊聊,你可以说那个我大学的时候吃过,免得没有话说,我觉得你还是很内向的,这样可能好些。
   由于某种原因,我很少跟家里通电话,我觉得这些年来很对不起妈妈,每次都是她打电话来给我,我们联系其实很不方便,于是我在交朋结友的时候按照实话说了,他们觉得我很异样,好像觉得不应该这样,我觉得很正常,让他们无法理解,比较要好点的,要我多打电话回去,我勉强承认我的不是,但是我试问那些根本不知道内情的朋友,你有什么资格来让我也和你用相同的方式来维护那份亲情,你不是强加于你的价值观和世界观与他人吗?和美国有什么差别,我不更家里打电话难道我们的亲情就淡化了吗?我可以很明确的告诉你,我们家是亲情最浓的,我父母都很疼爱我,我也很爱她们,尽管我们没有经常通行,难道就仅仅靠电话就能达到一切吗,一个方面是不能说明问题的,各个家里有各自的情况,你凭什么,你根本没有资格。。。。
 在这样一个不同的环境和家庭的人来到这个社会共同生活,我希望大家要包容才是,你就因为你根你家经常打电话就觉得你很热爱你父母,我就不热爱,我fuck。。。别拿黑与白的对立,来衡量你与我的距离。
 
   最后,重申今天是我生日,发点牢骚,希望以后会更好,也希望我父母平安,身体健康,朋友们事业有成。
      眼看就要毕业了,以后的动向不是太明显,几年下来什么都见过了,什么都做过了,基本没有遗憾,原本可以从民大带走点什么,事实上是什么也不能带走,除了思考方式的改观,但是还没有试用呢,我想现在要更加务实了,要显示出成熟于厚重,敏捷于和众。可能现实就是这样的要我们谦虚些吧,说年龄小也小,大也大,这个都需要好好考虑在内的,坚决两手都要抓的战略观念,不能赌注在一个方面,更全面的思考方式来适应这个纷繁的社会,完了。

James Gosling上周参加了纽约的Sun 全球教育研讨会(World Wide Education & Research Conference),在会上这位Java 之父进行了演讲,并就提问进行了回答。
  有些人问道当前Java 所面临的威胁时,Gosling给予了这样的回答,“PHP 和Ruby 是非常好的系统,但是它们作为脚本语言来发挥力量,只局限于网页这一领域内。”

  当Gosling谈到Microsoft 的C# 时,“曾经一度我们很担心他们会做出创造性的东西——现在看他们要专注于一个平台是希望渺茫。”

  “PHP 能够简化产品因为它是100%瞄准网页的,”然而对于Java,他说,“我们拥有平衡的艺术——简化与力量的双赢。”

  最后James Gosling 说:“任何关于Java 相对PHP、Ruby还是其他语言的讨论都是没有意义的,我们同样在使用其他语言,你可以应用PHP 或者Python,以及其他语言与Java一起工作。许多人这样做。”

<HTML>
<HEAD>
<TITLE>俄罗斯方块</TITLE>
<style>
body {margin:0;background:black;}
td {height:20;width:20;}
#block_div {position:absolute;z-index:1;width:80;}
#table_div {position:absolute;z-index:0;width:320;}
#nblock_div {position:absolute;z-index:2;font:48 system;color:red;}
#title_div {position:absolute;left:326;top:7;font-size:22px;color:white}
#infobar_div {position:absolute;left:396;top:416;}
#infobar2_div {position:absolute;left:396;top:480;font-size:14px;color:white}
#infobar2_div a{color:99ccff;font:system;text-decoration:none}
</style>

<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
if (document.all){
var n_width = 800;
var n_height = 600;
var n_left = Math.round( screen.width/2 ) - n_width/2;
var n_top = Math.round( screen.height/2 ) - n_height/2;
var n_IncStep = 20;
var curBlcok,nextBlock;
var arr_curBlock = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
var curX,curY;
var speed=1;
var maxspeed=9;
var clr_per_line=18;
var pause=0;
var gameover=0;
var colors = new Array("#999999","#0000FF","#80FFFF","#80FF80","#FFFF00","#FF8000","#FF00FF","#FF0000"
);
var cid;
var ncid;
var blocks = new Array("tt_O1","tt_T2","tt_Z1","tt_S1","tt_L1","tt_J1","tt_I2");
var bid;
var killedlines=0;

var tt_O1 = new Array(0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0);
var tt_O2 = new Array(0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0);
var tt_O3 = new Array(0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0);
var tt_O4 = new Array(0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0);

var tt_T1 = new Array(0,0,0,0,0,1,0,0,1,1,0,0,0,1,0,0);
var tt_T2 = new Array(0,0,0,0,0,0,0,0,1,1,1,0,0,1,0,0);
var tt_T3 = new Array(0,0,0,0,0,1,0,0,0,1,1,0,0,1,0,0);
var tt_T4 = new Array(0,0,0,0,0,1,0,0,1,1,1,0,0,0,0,0);

var tt_Z1 = new Array(0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,0);
var tt_Z2 = new Array(0,0,0,0,0,0,1,0,0,1,1,0,0,1,0,0);
var tt_Z3 = new Array(0,0,0,0,0,1,1,0,0,0,1,1,0,0,0,0);
var tt_Z4 = new Array(0,0,1,0,0,1,1,0,0,1,0,0,0,0,0,0);

var tt_S1 = new Array(0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0);
var tt_S2 = new Array(0,0,0,0,0,1,0,0,0,1,1,0,0,0,1,0);
var tt_S3 = new Array(0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0);
var tt_S4 = new Array(0,1,0,0,0,1,1,0,0,0,1,0,0,0,0,0);

var tt_L1 = new Array(0,1,0,0,0,1,0,0,0,1,1,0,0,0,0,0);
var tt_L2 = new Array(0,0,0,0,0,0,1,0,1,1,1,0,0,0,0,0);
var tt_L3 = new Array(0,0,0,0,0,1,1,0,0,0,1,0,0,0,1,0);
var tt_L4 = new Array(0,0,0,0,0,1,1,1,0,1,0,0,0,0,0,0);

var tt_J1 = new Array(0,0,1,0,0,0,1,0,0,1,1,0,0,0,0,0);
var tt_J2 = new Array(0,0,0,0,1,1,1,0,0,0,1,0,0,0,0,0);
var tt_J3 = new Array(0,0,0,0,0,1,1,0,0,1,0,0,0,1,0,0);
var tt_J4 = new Array(0,0,0,0,0,1,0,0,0,1,1,1,0,0,0,0);

var tt_I1 = new Array(0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0);
var tt_I2 = new Array(0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1);
var tt_I3 = new Array(0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0);
var tt_I4 = new Array(0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1);

var table = new Array(
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
       1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
               1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)

}
else
alert("You need IE4+ to play Tetris!")

function dimension2(row,col,num){
   var i = row * num + col;
   return (this[i]);
}
Array.prototype.getd = dimension2;

function ShowBlock(x,y,block_type,color){
   for (var i=0;i<block_tbl.rows.length;i++){
       for (var j=0;j<block_tbl.rows(i).cells.length;j++){        
           var d2 = i * 4 + j;
           if (block_type[d2]==1){
               block_tbl.rows(i).cells(j).style.background = color;
           }
           else{
               block_tbl.rows(i).cells(j).style.background = "";
           }
       }
   }
   block_div.style.pixelLeft=x;
   block_div.style.pixelTop=y;
}

function ShowBlock1(x,y,block_type,color,obj_tabID,obj_divID){
   for (var i=0;i<obj_tabID.rows.length;i++){
       for (var j=0;j<obj_tabID.rows(i).cells.length;j++){        
           var d2 = i * 4 + j;
           if (block_type[d2]==1){
               obj_tabID.rows(i).cells(j).style.background = color;
           }
           else{
               obj_tabID.rows(i).cells(j).style.background = "";
           }
       }
   }
   obj_divID.style.pixelLeft=x;
   obj_divID.style.pixelTop=y;
}

function Change(inc){
   var type = curBlock.substr(0,4);
   var num = curBlock.substr(curBlock.length-1);
   num = parseInt(num) + inc;
   if (num>4&#124;&#124;num<1) num -= 4*inc;
   type += num;
   eval("arr_tmp = " + type + ";");
   if (CanMove(curX,curY,arr_tmp)){
       curBlock = type;
       eval("arr_curBlock = " + curBlock + ";");
       eval("ShowBlock(block_div.style.pixelLeft,block_div.style.pixelTop," + curBlock + ",colors[" + cid + "]);");
   }
}

function CanMove(x,y,block){
   for (i=0;i<4;i++){
       for (j=0;j<4;j++){
           if (block.getd(i,j,4)&table.getd(y/n_IncStep+i,x/n_IncStep+j,16)) return false;
       }
   }
   return true;
}

function NewBlock(){
   curBlock = nextBlock;
   cid = ncid;
   bid = Math.round(Math.random()*(blocks.length-1));
   ncid = Math.round(Math.random()*(colors.length-1));
   nextBlock = blocks[bid];
   eval("arr_curBlock = " + curBlock + ";");
   eval("ShowBlock(120,0," + curBlock + ",colors[" + cid + "]);");
   eval("arr_curBlock = " + curBlock + ";");
   eval("ShowBlock1(466,116," + nextBlock + ",colors[" + ncid + "],nblock_tbl,nblock_div);");
}

function SaveBlock(){
   for (i=0;i<4;i++){
       for (j=0;j<4;j++){
           table[(curY/n_IncStep+i)*16+curX/n_IncStep+j]&#124;=arr_curBlock[i*4+j];
           if (arr_curBlock[i*4+j]==1)
               if ((curY/n_IncStep+i<21)&&(curX/n_IncStep+j>1)&&(curX/n_IncStep+j<14))
                   table_tbl.rows(curY/n_IncStep+i).cells(curX/n_IncStep+j).style.background = colors[cid];
           if (table[(curY/n_IncStep+i)*16+curX/n_IncStep+j]!=1)
                   table_tbl.rows(curY/n_IncStep+i).cells(curX/n_IncStep+j).style.background = "black";
       }
   }
}

function DelLine(line){
   for(i=line;i>0;i--){
       for(j=2;j<14;j++){
           table[i*16+j]=table[(i-1)*16+j];
       }
   }
   table_tbl.deleteRow(line);
   table_tbl.insertRow(0);
   for (i=0;i<16;i++){
       table_tbl.rows(0).insertCell();
       if (i<2&#124;&#124;i>13) table_tbl.rows(0).cells(i).style.background="navy";        
   }
   killedlines++;
   cll.innerText=parseInt(cll.innerText)+1;
}

function DelLines(){
   var c,d,i,j;
   d=0;
   curY=block_div.style.pixelTop;
   for(i=(curY/20+3);i>curY/20-1;i--){
       c=0;
       for(j=2;j<14;j++){
           if (isNaN(table[i*16+j])&#124;&#124;i==21) break;
           c+=table[i*16+j];
       }
       if(c==12){
           DelLine(i);
           i++;
           d++;
       }
   }
   if (d>0)
       sco.innerText=parseInt(sco.innerText)+d*d*36;
}

function Lucifer(){
   for(var i=2;i<14;i++){
       if (table[16+i]==1) return true;
   }
   return false;
}

function GameOver(){
   gameover=1;
   clearInterval(gameInterval);
   block_div.innerHTML="";
   for (i=0;i<21;i++){
       for (j=2;j<14;j++){
           setTimeout("table_tbl.rows(" + i + ").cells(" + j + ").style.background = colors[Math.round(Math.random()*7)];",16*i*j);
       }
   }
   nblock_div.innerHTML = "Game Over";
}



function document_onkeydown() {
   if (gameover==1) return;
   with (block_div.style){
   curX = pixelLeft;
   curY = pixelTop;
   switch (event.keyCode){
       case 37:
           if (CanMove(curX-n_IncStep,curY,arr_curBlock))
               pixelLeft-=n_IncStep;
           break;
       case 38:
           Change(1);
           break;
       case 39:
           if (CanMove(curX+n_IncStep,curY,arr_curBlock))
               pixelLeft+=n_IncStep;
           break;
       case 40:
           if (CanMove(curX,curY+n_IncStep,arr_curBlock)){
               pixelTop+=n_IncStep;
           }
           else{
               SaveBlock();
               DelLines();
               if (Lucifer()){
                   GameOver();
                   return;
               }
               sco.innerText=parseInt(sco.innerText)+2;
               NewBlock();
           }
           break;
       case 32:
           if (pause==0){
               clearInterval(gameInterval);
               pause=1;
           }
           else{
               gameInterval=window.setInterval("Handle_Interval()",(maxspeed-speed+1)*60);
               pause=0;
           }
           break;
       case 90:        
           Change(1);
           break;
       case 88:    
           Change(-1);
           break;
       default:
   }
   }
}

function Handle_Interval(){
   curX = block_div.style.pixelLeft;
   curY = block_div.style.pixelTop;
   if (CanMove(curX,curY+n_IncStep,arr_curBlock)){
       block_div.style.pixelTop+=n_IncStep;
   }
   else{
       SaveBlock();
       DelLines();
       if (Lucifer()){
           GameOver();
           return;
       }
       sco.innerText=parseInt(sco.innerText)+2
       NewBlock();
   }
   if (killedlines>=clr_per_line){
       killedlines-=clr_per_line;
       if (speed<maxspeed)
           speed++;
       else
           speed=maxspeed;
       spd.innerText=speed;
       clearInterval(gameInterval);
       gameInterval=window.setInterval("Handle_Interval()",(maxspeed-speed+1)*60);
   }
}
//-->
</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=document EVENT=onkeydown>
<!--
if (document.all)
document_onkeydown()
//-->
</SCRIPT>

</HEAD>

<BODY LANGUAGE=javascript>

<div id=block_div style="left:60;top:0">
<table id=block_tbl border=0 cellspacing=0 cellpadding=0>
<script>
if (document.all){
for (var i=0;i<4;i++){
   document.write("<tr>");
   for (var j=0;j<4;j++){
       document.write("<td style=\"border:1 solid black;\"></td>");
   }
   document.write("</tr>");
}
}
</script>
</table>
</div>

<div id=nblock_div>
<table id=nblock_tbl border=0 cellspacing=0 cellpadding=0>
<script>
if (document.all){
for (var i=0;i<4;i++){
   document.write("<tr>");
   for (var j=0;j<4;j++){
       document.write("<td style=\"height:40;width:40;border:1 outset black;\"></td>");
   }
   document.write("</tr>");
}
}
</script>
</table>
</div>

<div id=table_div>
<table id=table_tbl border=0 cellspacing=0 cellpadding=0>
<script>
if (document.all){
for (var i=0;i<22;i++){
   document.write("<tr>");
   for (var j=0;j<16;j++){
       var d2 = i * 16 + j;
       if (table[d2]==1)
       document.write("<td bgcolor=navy></td>");
       else
       document.write("<td style=\"background:black;\"></td>");
   }
   document.write("</tr>");
}
}
</script>
</table>
</div>

<div id=title_div nowrap>
<font size="3">请在文本框输入(1-9)并按开始键开始游戏: <input type="text" size=8 id="speedin"> <button onClick="begintet()" id="but">开始</button>
<br>
游戏结束后,按"新游戏"键重新开始游戏!<input type="button" value="新游戏" onclick="javascript:window.location.href='eluosi1.htm'">
<input type="button" value="不玩了" onclick="self.close()">
</font>
</div>


<div id=infobar_div>
<table border=1 bordercolor=navy cellspacing=0 cellpadding=0>
<tr align=center>
<td style="color:99ccff;font:12 system;width:56;">速度:</td>
<td style="color:red;font:12 system;" id=spd>1</td>
<td style="color:99ccff;font:12 system;width:86;">总成绩:</td>
<td style="color:red;font:12 system;" id=sco>0</td>
<td style="color:99ccff;font:12 system;width:96;">消减排数:</td>
<td style="color:red;font:12 system;" id=cll>0</td>
</tr>
</table>
</div>

<SCRIPT ID=MainSection LANGUAGE=javascript>
<!--
if (document.all){
ncid = Math.round(Math.random()*(colors.length-1));
bid = Math.round(Math.random()*(blocks.length-1));
nextBlock = blocks[bid];
NewBlock();
}
function begintet(){
document.all.speedin.disabled=true
document.all.but.disabled=true
speed=parseInt(document.all.speedin.value);
if (isNaN(speed)&#124;&#124;speed==null&#124;&#124;speed>maxspeed&#124;&#124;speed<1) speed=1;
spd.innerText=speed;
gameInterval=window.setInterval("Handle_Interval()",(maxspeed-speed+1)*60);
}
//-->
</SCRIPT>
<P>
</BODY>
</HTML>

#include
#include
#include
#include
#include
#include

#define LEFT 0x4b
#define RIGHT 0x4d
#define DOWN 0x50
#define CHANGE 0x20
#define ESC 0x1b
#define INTR 0x1C
#define DefaultX 5
#define DefaultY 1
#ifdef __cplusplus
#define __CPPARGS ...
#else
#define __CPPARGS
#endif

static unsigned counter=0;
static unsigned shape[7][4][4][4]={
{
{{0,1,1,0},{0,1,1,0},{0,0,0,0},{0,0,0,0}},
{{0,1,1,0},{0,1,1,0},{0,0,0,0},{0,0,0,0}},
{{0,1,1,0},{0,1,1,0},{0,0,0,0},{0,0,0,0}},
{{0,1,1,0},{0,1,1,0},{0,0,0,0},{0,0,0,0}},
},
{
{{0,0,0,0},{1,1,1,1},{0,0,0,0},{0,0,0,0}},
{{0,0,1,0},{0,0,1,0},{0,0,1,0},{0,0,1,0}},
{{0,0,0,0},{1,1,1,1},{0,0,0,0},{0,0,0,0}},
{{0,0,1,0},{0,0,1,0},{0,0,1,0},{0,0,1,0}},
},
{
{{0,1,0,0},{1,1,1,0},{0,0,0,0},{0,0,0,0}},
{{0,1,0,0},{0,1,1,0},{0,1,0,0},{0,0,0,0}},
{{0,0,0,0},{1,1,1,0},{0,1,0,0},{0,0,0,0}},
{{0,1,0,0},{1,1,0,0},{0,1,0,0},{0,0,0,0}},
},
{
{{1,0,0,0},{1,1,0,0},{0,1,0,0},{0,0,0,0}},
{{0,0,0,0},{0,1,1,0},{1,1,0,0},{0,0,0,0}},
{{1,0,0,0},{1,1,0,0},{0,1,0,0},{0,0,0,0}},
{{0,0,0,0},{0,1,1,0},{1,1,0,0},{0,0,0,0}},
},
{
{{0,1,0,0},{1,1,0,0},{1,0,0,0},{0,0,0,0}},
{{0,0,0,0},{1,1,0,0},{0,1,1,0},{0,0,0,0}},
{{0,1,0,0},{1,1,0,0},{1,0,0,0},{0,0,0,0}},
{{0,0,0,0},{1,1,0,0},{0,1,1,0},{0,0,0,0}},
},
{
{{1,0,0,0},{1,0,0,0},{1,1,0,0},{0,0,0,0}},
{{0,0,0,0},{1,1,1,0},{1,0,0,0},{0,0,0,0}},
{{1,1,0,0},{0,1,0,0},{0,1,0,0},{0,0,0,0}},
{{0,0,0,0},{0,0,1,0},{1,1,1,0},{0,0,0,0}},
},
{
{{0,1,0,0},{0,1,0,0},{1,1,0,0},{0,0,0,0}},
{{0,0,0,0},{1,0,0,0},{1,1,1,0},{0,0,0,0}},
{{1,1,0,0},{1,0,0,0},{1,0,0,0},{0,0,0,0}},
{{0,0,0,0},{1,1,1,0},{0,0,1,0},{0,0,0,0}},
},
};

unsigned back[22][14]={{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,0,0,0,0,0,0,0,0,0,0,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1}};

char ShapeColor[7]={8,10,11,12,13,14,15};
char DigitalShape[10]={128+119,3,62,31,128+75,128+93,128+125,19,128+127,128+95};
char ZodiacBack[11]={4,6,12,13,11,10,2,3,9,1,8};
char ZodiacSoft[18][14]={{0,0,0,0,96,0,0,0,0,0,0,0,60,0},
{255,248,0,0,96,0,0,0,0,248,0,0,124,0},
{255,248,0,0,97,128,0,0,3,248,0,0,192,0},
{0,112,0,0,97,128,0,0,7,0,0,1,128,48},
{0,224,0,0,96,0,0,0,14,0,0,1,128,48},
{1,192,0,0,96,0,0,0,12,0,0,1,128,48},
{3,128,120,15,97,128,240,60,12,0,15,15,249,255},
{7,0,252,31,225,131,248,127,14,0,31,143,249,255},
{7,1,142,48,225,135,24,227,7,240,49,193,128,48},
{14,3,134,96,97,142,24,192,3,252,112,193,128,48},
{28,3,6,96,97,140,25,192,0,28,96,193,128,48},
{56,3,6,96,97,140,25,128,0,6,96,193,128,48},
{56,3,6,96,97,140,25,128,0,6,96,193,128,48},
{120,3,6,96,97,140,25,128,0,6,96,193,128,48},
{224,1,140,48,225,142,25,195,24,14,49,129,128,48},
{255,249,252,63,225,135,252,255,28,28,63,129,128,48},
{255,248,240,15,97,131,236,60,15,248,30,1,128,48},
{0,0,0,0,0,0,0,0,7,224,0,1,128,0}};

unsigned long TotalMark=0;
unsigned int Erasered=0,ETimes=0;
int Speed=0;
int CEr=0;
int NumOfLev[5]={0,0,0,0,0};
int TimeDelay[10]={21,18,17,15,13,11,9,7,5,3};
char NewShape[2];
unsigned PerOnce[4];

void interrupt ( *oldhandler)(__CPPARGS);
void interrupt handler(__CPPARGS)
{
++counter;
oldhandler();
}

void DrawBackground()
{
//setlinestyle
}
void DrawDigital(int x,int y,int a)
{
int i=7;
setcolor(((DigitalShape[a]>>i)&1)*7+4);
//printf("%d",(DigitalShape[a]>>i)&1);
i--;
line(x,y+1,x,y+15);
line(x+1,y+2,x+1,y+14);
line(x+2,y+3,x+2,y+13);
setcolor(((DigitalShape[a]>>i)&1)*7+4);
i--;
line(x,y+17,x,y+31);
line(x+1,y+18,x+1,y+30);
line(x+2,y+19,x+2,y+29);
setcolor(((DigitalShape[a]>>i)&1)*7+4);
i--;
line(x,y+17,x,y+31);
line(x+1,y+18,x+1,y+30);
line(x+2,y+19,x+2,y+29);
setcolor(((DigitalShape[a]>>i)&1)*7+4);
i--;
line(x+1,y,x+16,y);
line(x+2,y+1,x+15,y+1);
line(x+3,y+2,x+14,y+2);
setcolor(((DigitalShape[a]>>i)&1)*7+4);
i--;
line(x+2,y+15,x+15,y+15);
line(x+1,y+16,x+16,y+16);
line(x+2,y+17,x+15,y+17);
setcolor(((DigitalShape[a]>>i)&1)*7+4);
i--;
line(x+3,y+30,x+14,y+30);
line(x+2,y+31,x+15,y+31);
line(x+1,y+32,x+16,y+32);
setcolor(((DigitalShape[a]>>i)&1)*7+4);
i--;
line(x+15,y+3,x+15,y+13);
line(x+16,y+2,x+16,y+14);
line(x+17,y+1,x+17,y+15);
setcolor(((DigitalShape[a]>>i)&1)*7+4);
line(x+15,y+19,x+15,y+29);
line(x+16,y+18,x+16,y+30);
line(x+17,y+17,x+17,y+31);
}

void ArtClear()
{
for(int i=480;i>=0;i-=2)
{
setcolor(3);
line(0,i-6,639,i-6);
setcolor(9);
line(0,i-4,639,i-4);
setcolor(1);
line(0,i-2,639,i-2);
setcolor(getbkcolor());
line(0,i,639,i);
delay(1);
}
for(i=1;i<480;i+=2)
{
setcolor(3);
line(0,i+6,639,i+6);
setcolor(9);
line(0,i+4,639,i+4);
setcolor(1);
line(0,i+2,639,i+2);
setcolor(getbkcolor());
line(0,i,639,i);
delay(1);
}
}

void end()
{
for(int j=0;j<4;j++)
{
for(int i=j;i<480;i+=4)
{
setcolor(3);
line(0,i+8,639,i+8);
setcolor(9);
line(0,i+4,639,i+4);
setcolor(1);
line(0,i,639,i);
setcolor(getbkcolor());
line(0,i,639,i);
delay(1);
}
delay(5);
}
setcolor(YELLOW);
outtextxy(260,200,"[ Game Over ]");
gotoxy(14,16);
printf("This freeware is written by Daniel.Qu ZodiacSoft 2000");
gotoxy(12,17);
printf("Please e-mail to swami@yeah.net or visit my homepage at");
gotoxy(12,18);
printf("http://grocery.2699.com if you have question.");
gotoxy(14,20);
printf("I will soon provide something new,please wait...");
gotoxy(14,22);
printf("We hold these truths to be self-evident,that all codes");
gotoxy(12,23);
printf("are created FREE.");
getch();
clrscr();
closegraph();
exit(0);
}

void ShowTitle()
{
int gdriver=DETECT,gmode,errorcode,i,j,k;
initgraph(&gdriver,&gmode,"");
errorcode=graphresult();
if (errorcode!=grOk)
{
printf("Graphics error: %s\n\007",grapherrormsg(errorcode));
exit(1);
}
setbkcolor(9);//This line needs to be changed
for(i=0;i<11;i++)
{
setcolor(ZodiacBack[i]);
line(200,i*8+100,440,i*8+100);
}
delay(1000);
for(j=0;j<17;j++)
for(i=0;i<11;i++)
{
setcolor(ZodiacBack[(i+j)%16]);
line(200,i*8+100,440,i*8+100);
delay(4);
}
for(j=0;j<18;j++)
{
for(i=0;i<14;i++)
{
for(k=7;k>=0;k--)
if((ZodiacSoft[j][i]>>k)&1)
{
putpixel(i*8-k+271,j+122,14);
}
}
delay(10);
}
for(j=17;j>=0;j--)
{
for(i=0;i<14;i++)
for(k=7;k>=0;k--)
{
if((ZodiacSoft[j][i]>>k)&1)
putpixel(i*8-k+271,158-j,5);
}
delay(10);
}
setcolor(15);
outtextxy(295,171,"Present");
getch();
ArtClear();
}

void DrawShape(int x,int y,int color)
{
//if(x<2||x>12||y>19)
// return;
setcolor(color);
/*line(x<<4,y<<4,x<<4,(y<<4)+14);
line(x<<4,(y<<4)+14,(x<<4)+14,(y<<4)+14);
line((x<<4)+14,(y<<4)+14,(x<<4)+14,y*16);
line((x<<4)+14,y<<4,x<<4,y*16);
line((x<<4)+1,y<<4,(x<<4)+1,(y<<4)+14);
line((x<<4)+1,(y<<4)+13,(x<<4)+14,(y<<4)+13);
line((x<<4)+13,(y<<4)+13,(x<<4)+13,(y<<4)+1);
line((x<<4)+13,(y<<4)+1,x<<4,(y<<4)+1); */
for(int i=0;i<15;i++)
line(x<<4,(y<<4)+i,(x<<4)+14,(y<<4)+i);
setcolor(8);
line((x<<4)+15,(y<<4)+1,(x<<4)+15,(y<<4)+15);
line((x<<4)+1,(y<<4)+15,(x<<4)+15,(y<<4)+15);
setcolor(color-8);
line((x<<4)+2,(y<<4)+2,(x<<4)+12,(y<<4)+2);
line((x<<4)+2,(y<<4)+2,(x<<4)+2,(y<<4)+12);
}

void DrawNull(int x,int y)
{
setcolor(getbkcolor());
for(int i=0;i<16;i++)
line(x<<4,(y<<4)+i,(x<<4)+15,(y<<4)+i);
}

void show(int x,int y,int CurrentShape,int Status)
{
int temp;
for(int i=0;i<20;i++)
for(int j=2;j<12;j++)
{
if(back[i][j]==1)
DrawShape(6+j,4+i,8);
else
DrawNull(6+j,4+i);
} //no matter what the status be,I will draw the background
for(int l=0;l<4;l++)
for(int p=0;p<4;p++)
{
if(l+x<2||x+l>11||p+y>19)
continue;
//if(shape[CurrentShape][Status][p][l]+back[y+p][x+l]==1)
// DrawShape(3+l+x,3+p+y,8+CurrentShape);
//else
//cout<<'O';
// DrawNull(3+j,3+i);
if(shape[CurrentShape][Status][p][l]==1)
DrawShape(6+l+x,4+p+y,ShapeColor[CurrentShape]);
if(back[y+p][x+l]==1)
DrawShape(6+l+x,4+p+y,8);
}
}
void DrawScore()
{
int temp=TotalMark;
for(int i=0;i<7;i++)
{
DrawDigital(477-i*20,65,temp%10);
temp/=10;
}
temp=Erasered;
for(i=0;i<4;i++)
{
DrawDigital(491-i*20,111,temp%10);
temp/=10;
}
if(Erasered==0)
return;
for(i=1;i<5;i++)
{
setfillstyle(1,8);
bar(378,163+i*14,508,170+i*14);
setfillstyle(1,5);
bar(378,163+i*14,378+130*NumOfLev[i]/ETimes,170+i*14);
}
DrawDigital(466,293,Speed);
return;
}

int CreateNewShape()
{
NewShape[1]=NewShape[0];
NewShape[0]=rand()%7;
setfillstyle(1,0);
bar(447,240,514,288);
for(int l=0;l<4;l++)
for(int p=0;p<4;p++)
if(shape[NewShape[0]][0][p][l]==1)
DrawShape(28+l,15+p,ShapeColor[7]);
return NewShape[1];
}

int Possible(int x,int y,int CurrentShape,int Status)
{
for(int i=0;i<4;i++)
{
for(int j=0;j<4;j++)
{
if(shape[CurrentShape][Status][i][j]+back[y+i][x+j]==2)
//this line can also write as the following type:
//if(shape[CurrentShape][Status][i][j]&&back[y+i][x+j])
return 0;
}
}
return 1;
}

void GoLeft(int&x,int&y,int&CurrentShape,int&Status)
{
if(Possible(x-1,y,CurrentShape,Status))
x--;
show(x,y,CurrentShape,Status);
}

void GoRight(int&x,int&y,int&CurrentShape,int&Status)
{
if(Possible(x+1,y,CurrentShape,Status))
x++;
show(x,y,CurrentShape,Status);
}

void GoDown(int&x,int&y,int&CurrentShape,int&Status)
{
int AllAreOne=1,temp=0;
if(Possible(x,y+1,CurrentShape,Status))
{
y++;
show(x,y,CurrentShape,Status);
return;
}
TotalMark+=3*CurrentShape;
for(int i=0;i<4;i++)
for(int j=0;j<4;j++)
back[i+y][j+x]+=shape[CurrentShape][Status][i][j];
for(int r=1;r<20;r++)
{
for(int l=2;l<13;l++)
{
if(back[r][l]==0)
AllAreOne=0;
}
if(AllAreOne==1)
{
for(int rr=r;rr>0;rr--)
for(int ll=2;ll<13;ll++)
back[rr][ll]=back[rr-1][ll];
Erasered++;
CEr++;
temp++;
}
AllAreOne=1;
}
CurrentShape=CreateNewShape();
x=DefaultX;y=DefaultY;Status=0;
NumOfLev[temp]++;
TotalMark+=5*temp;
show(x,y,CurrentShape,Status);
counter=0;
if(!Possible(x,y,CurrentShape,Status))
{
getch();
end();
}
if(CEr>=30)
{
Speed=(Speed+1)%10;
CEr/=30;
}
if(temp)
ETimes++;
DrawScore();
return;
}

void ChageShape(int&x,int&y,int&CurrentShape,int&Status)
{
if(Possible(x,y,CurrentShape,(Status+1)%4))
Status=(Status+1)%4;
show(x,y,CurrentShape,Status);
}

void DrawFace()
{
int temp;
setcolor(15);
line(351,59,519,59);
line(351,60,518,60);
line(351,59,351,156);
line(352,59,352,155);
setcolor(7);
line(518,61,518,154);
line(519,60,519,154);
line(353,155,519,155);
line(352,156,519,156);
setcolor(8);
for(int i=61;i<155;i++)
line(353,i,517,i);
setcolor(7);
line(427,106,512,106);
line(428,107,511,107);
line(427,106,427,147);
line(428,106,428,146);
setcolor(15);
line(512,106,512,147);
line(511,107,511,146);
line(428,146,511,146);
line(427,147,512,147);
settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
setcolor(14);
outtextxy(357,119,"Erasered");
outtextxy(370,130,"Level:");
setcolor(15);
line(352,167,519,167);
line(352,168,518,168);
line(352,169,352,407);
line(353,169,353,406);
setcolor(7);
line(519,167,519,407);
line(518,168,518,406);
line(352,407,519,407);
line(353,406,519,406);
line(524,55,89,55); //outter border 1st
line(524,55,524,411);
line(89,411,524,411);
line(89,55,89,411);
line(524,56,89,56); //outter border 2nd
line(525,55,525,411);
line(89,410,524,410);
line(88,55,88,411);
setfillstyle(8,7);
bar(94,59,336,406);
//setfillstyle(1,3);
//bar(128,78,296,386);
for(i=0;i<8;i++)
DrawDigital(357+i*20,65,0);
for(i=0;i<4;i++)
DrawDigital(431+i*20,111,0);
setfillstyle(1,8);
setcolor(12);
for(i=0;i<4;i++)
{
temp=i+'1';
outtextxy(364,177+14*i,(char*)&temp);
bar(378,177+i*14,508,184+i*14);
}
setcolor(14);
outtextxy(366,250,"Next Shape");
setcolor(10);
outtextxy(366,294,"Current");
outtextxy(382,309,"Level");
setcolor(6);
outtextxy(366,334,"Message:");
bar(362,348,509,398);
DrawDigital(466,293,Speed);
}

void WannaQuit()
{
int choise=0,temp;
setfillstyle(1,8);
bar(362,348,509,398);
setcolor(15);
outtextxy(378,355,"Are you sure to");
outtextxy(368,368,"quit game?");
outtextxy(410,388,"Yes");
outtextxy(470,388,"No");
setcolor(14);
circle(399,392,4);
while((temp=bioskey(0))!=7181)
{
if(temp==19200)
{
setcolor(8);
circle(459,392,4);
choise=0;
setcolor(14);
circle(399,392,4);
}
if(temp==19712)
{
setcolor(8);
circle(399,392,4);
choise=1;
setcolor(14);
circle(459,392,4);
}
}
if(choise==0)
{
end();
}
setfillstyle(1,8);
bar(362,348,509,398);
return;
}

void main()
{
ShowTitle();
unsigned c;
int CurrentShape,x=6,y=0,Status=0;
oldhandler=getvect(INTR);
setvect(INTR,handler);
randomize();
NewShape[0]=rand()%7;
DrawFace();
CurrentShape=CreateNewShape();
show(x,y,CurrentShape,Status);
while(1)
{
if(kbhit())
{
c=getch();
if(c==0)
c=getch();
switch(c)
{
case 's' :Speed=(Speed+1)%10;DrawDigital(466,293,Speed);break;
case DOWN :GoDown(x,y,CurrentShape,Status);break;
case LEFT :GoLeft(x,y,CurrentShape,Status);break;
case RIGHT :GoRight(x,y,CurrentShape,Status);break;
case CHANGE :ChageShape(x,y,CurrentShape,Status);break;
case ESC :WannaQuit();
}
}
if((counter%=TimeDelay[Speed])==(TimeDelay[Speed]-1))
{
GoDown(x,y,CurrentShape,Status);
counter=0;
}
}
}

[p align=center]    赚钱的方法多种多样,只有你想不到,没有你做不到的。当然,做生意也要掌握一些规则:

  1.做生意从小做起,不要因小而不为。

  2.从先挣几元钱开始,目标先定得低一点,增加成功的胜算。

  3.不断提升你的服务和技术,不断扩展你的生意渠道,不断增加你的潜在客户。

  4.要善于发散思维。
   5.要有坚定的信念,一件事只要有三个人认同,就值得去做,等十个人都认为可行时,就已经没有跟风的必要了。

  6.用人不疑,该放权时就放权。

  7.将成本控制到每一分钱,将盈利增加到极限。

  8.不屈不挠的战斗意志。阅读全文
[p align=center]一、jsp连接Oracle8/8i/9i数据库(用thin模式)
testoracle.jsp如下:

<%@ page contentType="text/html;charset=gb2312"%>

<%@ page import="java.sql.*"%>





<%Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();

String url="jdbc:oracle:thin:@localhost:1521:orcl";

//orcl为你的数据库的SID

String user="scott";

String password="tiger";

Connection conn= DriverManager.getConnection(url,user,password);

Statement stmt=conn.createStatement

(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);

String sql="select * from test";

ResultSet rs=stmt.executeQuery(sql);

while(rs.next()) {%>

您的第一个字段内容为:<%=rs.getString(1)%>

您的第二个字段内容为:<%=rs.getString(2)%>

<%}%>

<%out.print("数据库操作成功,恭喜你");%>

<%rs.close();

stmt.close();

conn.close();

%>





阅读全文

<%@ page contentType="text/html;charset=gb2312"%>

<%@ page import="java.sql.*"%>





<%Class.forName("org.gjt.mm.mysql.Driver").newInstance();

String url ="jdbc:mysql://localhost/softforum?user=soft&password=soft1234&useUnicode=true&characterEncoding=8859_1";

//testDB为你的数据库名

Connection conn= DriverManager.getConnection(url);

Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);

String sql="select * from test";

ResultSet rs=stmt.executeQuery(sql);

while(rs.next()) {%>

您的第一个字段内容为:<%=rs.getString(1)%>

您的第二个字段内容为:<%=rs.getString(2)%>

<%}%>

<%out.print("数据库操作成功,恭喜你");%>

<%rs.close();

stmt.close();

conn.close();

%>



分页: 317/335 第一页 上页 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 下页 最后页 [ 显示模式: 摘要 | 列表 ]