senior exam is coming next
Jsp,Servlet,C#,Winform编程these were all i had learned this term~[@more@]
the differents among SQL Oracle mysql
http://www.ad0.cn/netfetch/article.asp?id=735[@more@]
C# Code Summary
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.IO;namespace prjCodeCount{ /// <summary> /// Form1 的摘要说明。 /// </summary> public class frmMain : System.Windows.Forms.Form { private System.Windows.Forms.TextBox txtPath; private System.Windows.Forms.Button button1; private System.Windows.Forms.CheckBox chkFolder; private System.Windows.Forms.TextBox txtResult; /// <summary>
C# Resource Management (资源管理器)
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.IO;namespace prjResourceManagement{ public partial class frmMain : Form { public frmMain() { InitializeComponent(); } private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { TreeNode node = e.Node; Object obj = node.Tag; Direct
C# Main point of a NotePad
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.IO;namespace prjNotePad{ /// <summary> /// Form1 的摘要说明。 /// </summary> public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.MainMenu mainMenu1; private System.Windows.Forms.MenuItem menuItem1; private System.Windows.Forms.MenuItem menuItem2; private System.Windows.Forms.MenuItem menuItem3; private System.W
C# Mines(布雷)
using System.Collections;using System.IO;using System;namespace com.Mines{ class SearchingMines { public ArrayList list = new ArrayList(); public int[,] mines = new int[10, 10]; static void Main(string[] args) { SearchingMines sm = new SearchingMines(); sm.initMines(); sm.HidenMines(); sm.FillInOtherNumber(); sm.display(); // sm.SaveTxt(); } public void initMines() { for (int i = 0; i < this.mines.GetLength(0); i++) { for (int j = 0; j < this.mines.GetLength(1); j+
SQL Server Attention
ResultSet can not re-read row data for column- - 今天在写程序的时候发现了一个很奇怪的问题“ResultSet can not re-read row data for column”,用google一搜,原来是微软公司的驱动的兼容性不太好。有热心人总结了微软驱动的缺点:(1)如果采用jdbc-odbc驱动,那么就必须按照查询顺序来一次读取(不论有没有image或text类型)(2)如果采用微软提供的ms sql server jdbc driver,如果查询语句中,不存在image或text类型字段,那么可以按照无序获取(3)如果采用微软提供的ms sql server jdb
Thread2(C#)
using System;using System.Collections.Generic;using System.Text;using System.Threading;namespace ThreadTest{ class Program { static void Main(string[] args) { Thread.CurrentThread.Name = "主线程"; Thread f = new Thread(new ThreadStart(Work)); f.Start(); int i = 0; while (i < 50) { Console.WriteLine(Thread.CurrentThread.Name+"t"+i.ToString()); i++;
Thread(C#)
using System;using System.Collections.Generic;using System.Text;using System.Threading;namespace RailWayStation{ class Program { static void Main(string[] args) { Station NewYorkCity = new Station(); Thread t1=new Thread(new ThreadStart(NewYorkCity.SellTicket));//新实例化了个线程的对象然后再new了个线程开始,再把方法加进去 Thread t2=new Thread(new ThreadStart(NewYorkCity.SellTicket)); Thread t3 = new Thread(new ThreadStart(NewYorkCit
Timer(C#)
using System;using System.Collections.Generic;using System.Text;using System.Threading;namespace TimerPRJ{class Timer {static void Main(string[] args){Mytimer t = new Mytimer();//实例化t.Interval = 1000;//间隔时间t.Enable = true;//是否开始t.TickEvent += new TickHandler(t_TickEvent);//订阅该事件t.Start();//引发该动作}static void t_TickEvent()//具体的时间处理{Console.WriteLine(DateTime.Now.ToString() );//打印当前时间}}delegate void TickHandler();//委托class Mytimer{public event TickHandler TickEve
JSP for shopping box
============T-SQL============if exists ( select * from sysdatabases where name = 'shop')drop database shopgocreate database shopuse shopgoif exists(select * from sysobjects where name ='product')drop table productgocreate table product( prodId varchar(15) not null primary key, prodName varchar(20) not null , prodPrice money not null, prodNumber int )goselect * from productinsert into product values('XSQ001','sumsang显示器',2000,null)insert into product values('XSQ002','sharp显示器',4000,nul
chat room
主要用到技术servlet==================control servlet===============================package chatroom;import javax.servlet.*;import javax.servlet.http.*;import java.io.*;import java.util.*;public class ControlServlet extends HttpServlet { private static final String CONTENT_TYPE = "text/html; charset=GBK"; //Initialize global variables public void init() throws ServletException { } //Process the HTTP Get request public void doGet(HttpServletRequest req
Now the first servlet about C.R.U.D
Connecting with DataBase//import javax.servlet.*;//导包import javax.servlet.http.*;import java.io.*;import java.util.*;import com.xaccp.vo.Student;//服务层public class AddStudentServ extends HttpServlet { private static final String CONTENT_TYPE = "text/html; charset=GBK";//统一编码 //Initialize global variables public void init() throws ServletException { } //Process the HTTP Get request public void doGet(HttpServletRequest request, HttpServletResponse response) thro
Classic original DBManager
import java.sql.*;//连接管理者public class DBManager { public DBManager() { } public static Connection getConnection() { Connection con = null; try { Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); con = DriverManager.getConnection( "jdbc:microsoft:sqlserver://localhost:1433;dataBaseName=pubs", "sa", ""); } catch (ClassNotFoundException ex) {
sql primary key procedure
--------主键生成器-----------制作人:孔凡吉--制作日期:2007年8月14日----------------------------判断是否存在这个数据库表if exists(select name from sysobjects where name='primarykey_table') drop table primarykey_tablego--创建表create table primarykey_table( pkID int not null primary key identity(1000,1), tablename varchar(50) not null , producedate smalldatetime not null, pkNumber int not null, wordtrack varchar(3) not null)go--判断存储过程是否存在,如果存在删除,如果不存在创建一个新的if ex
sql trigger
create database mydbgouse mydbgodrop table stuinfodrop table stumarksif exists(select * from sysobjects where name ='bank')drop table bankgocreate table bank( cardid varchar(20) not null primary key, customname varchar(10) not null , currentmoney money not null check(currentmoney>=1) )if exists (select * from sysobjects where name='transinfo')drop table transinfogocreate table transinfo( cardid varchar(20) not null foreign key references bank(cardid), chargetype varchar(4) not null , tmoney
SQL server#1
=============================数据库建立=============================create database mydbon primary(name='mydb',filename='D:projectmydb_mdf.mdf',size=10mb,maxsize=200mb,filegrowth=10%)log on(name='mydb1',filename='D:projectmydb_log.ldf',size=10mb,maxsize=200mb,filegrowth=10%)use mydbgocreate table student(stuid int not null primary key identity(1,1),stuname varchar(10) not null unique,stuage smalldatetime not null check(stuage>'1980-1-1'and stuage<'1988-1-1')stuaddress varchar(20) default '
M V C princple
M V C principleJava Swing JTable Usefull=======================Object Class User=======================/** * <p>Title: </p> * * <p>Description: </p> * * <p>Copyright: Copyright (c) 2007</p> * * <p>Company: </p> * * @author not attributable * @version 1.0 */public class User { private int userID; private String userName; private String userSex; private int userAge; public User() { } public void setUserID(int userID) { thi
数据库连接==odbc
DataBase Connection Java==================================import java.sql.*;/** * <p>Title: </p> * * <p>Description: </p> * * <p>Copyright: Copyright (c) 2007</p> * * <p>Company: </p> * * @author not attributable * @version 1.0 */public class DB { public DB() { } public static Connection getConnection() { String Resource = "sun.jdbc.odbc.JdbcOdbcDriver"; try { Class.forName(Resource); } catch (Clas
July 19 2007
Today's topic is about HTML time display ,created a javascript==================================<html><title>noname</title><head></head><script language="javascript" type="text/javascript"> function showTime(){ var today=new Date(); var year=today.getYear(); var month=today.getMonth()+1; var date=now.getDate();//是now还是today? var hours=today.getHours(); var mins=today.getMinutes(); var secs=today.getSeconds(); var ampm=&qu