博文
SQL数据库上机语言集合(2006-10-16 15:12:00)
摘要:游标:
use teaching
go
declare student_cursor1 cursor
for select *
from student
go
declare student_cursor2 cursor
for select suo,sname
from student
where dept='324'
order by sno
for read only
go
打开游标等操作:
use teaching
go
declare student_cursor4 cursor
for select ok,ko
from sword
where do='1'
order by ok
for read only
go
open student_cursor4
use teaching
go
declare @ko varchar(7),@ok varchar(20)
fetch next from student_cursor4
into @ok,@ko
while @@fetch_status=0
begin
print @ok+@ko
fetch next from student_cursor401
into @ko,@ok
end
close student_cursor4
deallocate student_cursor4
go
存储过程:
CREATE PROCEDURE student_info @ok varchar(20)
AS select ok,ko,do
from sword
where ok=@ok
GO
......
J2ME 打包JAR文件的一些菜鸟问题(2006-10-08 10:14:00)
摘要:
_BAT_姜维(14923349) 09:58:21
太好了今天人都在
_BAT_姜维(14923349) 09:58:25
人肉小炒(418138484) 09:57:08
嗯,都开工了
_BAT_姜维(14923349) 09:58:42
怎么打成JAR包?
人肉小炒(418138484) 09:57:38
你用的什么?
_BAT_姜维(14923349) 09:59:17
WTK
人肉小炒(418138484) 09:58:06
这个不会
_BAT_姜维(14923349) 09:59:57
你用的是什么?
人肉小炒(418138484) 09:58:36
JB
_BAT_姜维(14923349) 10:00:22
他可以直接生成JAR?
人肉小炒(418138484) 09:59:24
嗯
_BAT_姜维(14923349) 10:01:09
唉
_BAT_姜维(14923349) 10:01:35
wtk也有个打包功能
生成了JAD
不知道有什么用的
人肉小炒(418138484) 10:01:32
没有JAR?
_BAT_姜维(14923349) 10:03:13
好象没有
我记得有JAD
人肉小炒(418138484) 10:02:23
.....
jar 跟jad应该是同时存在的
_BAT_姜维(14923349) 10:04:10
那上传到手机上是哪个文件?
人肉小炒(418138484) 10:03:11
有些手机只要jar有些两个都要
_BAT_姜维(14923349) 10:04:59
哦
_BAT_姜维(14923349) 10:05:24
JAR里面要求有什么内容?
好象有个什么清单之类的,是必要的吗
您刚才发送的消息:"JAR里面要求有什么内容?
好象有个什么清单之类的,是必要的吗 "没有发送成功(服务器超时).
人肉小炒(418138484) ......
J2ME 动画和背景制作程序(2006-09-12 08:22:00)
摘要:
import javax.microedition.midlet.MIDlet;
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;
//import java.unit.*;
import java.io.*;
//简单的动画canvas by sword2008@程序之巢
public class test2 extends MIDlet{
private Display display;
public test2(){
}
public void startApp(){
new test(Display.getDisplay(this)).start();}
public void pauseApp(){ }
public void destroyApp(boolean unkowmn){ }
class test extends GameCanvas implements Runnable
{
//////////////////////////////////////
private Display display;
private long frameDelay;
private boolean sleeping;
// private Random rand;
private Sprite ken;
private int XSpeed,YSpeed;
private TiledLayer backgroundLayer;
//////////////////////////////////////
int layerMap[]={1,2,3,4,
5,6,7,8,
9,10,11,12,
13,14,15,16};
//////......
服务器 客户端 聊天室(2006-06-23 18:13:00)
摘要://
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import javax.swing.*;
public class charroomserver {
//----------------------------------------------------------****************定义变量
//JFrame
JFrame charFrame;
JTextArea charText;
JTextField charField2;
JButton charButton2;
ScrollPane sPanel;
//JPanel
JPanel jPanel1,jPanel2;
//端口号and net
public final static int DEFAULT_PORT=6666;//默认端口号
ServerSocket serverSock;
Socket clientSock;
//index记录当前对象
int index=0;
//线程,对象
ChatAcceptThread chatAcceptThread[]=new ChatAcceptThread[50];//对象数组
//_________________________________________________________________________________
//------------------------------------------------------------***************方法
//服务端图形
void gUi(){
//new
charFrame=new JFrame("聊天室服务端");
jPanel2=new JPanel();
charButton2=new JButton("退出");
charText=new JTextArea(20,20);
s......
数据库课程设计(2006-06-23 16:18:00)
摘要:/*数据库课程设计
*JAVA程序处理前端连接等操作
*使用:
*1,打开数据库管理器,打开查询编辑器,在查询编辑器输入附加SQL语言,创建将要使用的目标数据库
*2,进行JDBC-ODBC连接
*过程:打开管理工具,选择数据源ODBC,在系统DSN添加:名称:studyDSN,连接到(local),选择网络ID选项,默认数据库为study,连接!
*3,使用JCreator之类的工具编译程序.
*4,用户名:admin 密码:123456
*@2006.6.23 */
/*附加SQL语言
create database study
go
use study
go
create table student(sno char(5) not null UNIQUE,
sname char(10),
ssex char(2),
sage int,
sdept char(20)
PRIMARY KEY(sno))
*/
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.sql.*;
import javax.swing.bo......
数据库总外观(2006-06-20 11:06:00)
摘要:import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.sql.*;
import javax.swing.border.*;
import java.util.*;
public class Allmain{
//---------------------------------------------------------变量定义
//swing
JLabel conLabel,addLabel,modLabel,droLabel,aboLabel;
JButton conButton,addButton,modButton,droButton;
JTextField conField;
JFrame mainFrame;
//string
static final String JDBC="sun.jdbc.odbc.JdbcOdbcDriver";
static final String DATEBASE="jdbc:odbc:studyDSN";
//数据库API变量
public Connection connection;
public Statement statement;
String sqlString;
//----------------------------------------------------------------------
Allmain(){
mainFrame=new JFrame("数据库课程设计");
JPanel mainPanel=new JPanel();
mainPanel.setBackground(new Color(255,192,192));
mainPanel.setLayout(new GridLayout(5,2,5,5));
//------------------------------------------------------外观值
a......
charroom客户端2(2006-06-14 09:49:00)
摘要:import java.net.*;
import java.io.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class charroom implements Runnable{
//----------------------------------------------------------****************定义变量
//JFrame
JFrame charFrame;
JTextArea charText;
JTextField charField1,charField2,charField3,charField4;
JButton charButton1,charButton2,charButton3;
ScrollPane sPanel;
JLabel charLabel;
//JPanel
JPanel jPanel1,jPanel2;
//Socket变量
Socket server,socket;
//文件,io
BufferedReader in;
PrintWriter out;
BufferedReader wt;
//Thread
Thread charThread=new Thread(this);
//_________________________________________________________________________________
public charroom(){
gUi();
}
//------------------------------------------------------------***************方法
//客服端图形
void gUi(){
//new
charFrame=new JFrame("聊天室客户端");
jPanel1=new JPanel();
jPa......
服务器2有群发功能(2006-06-13 09:43:00)
摘要:import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import javax.swing.*;
public class charroomserver {
//----------------------------------------------------------****************定义变量
//JFrame
JFrame charFrame;
JTextArea charText;
JTextField charField2;
JButton charButton2;
ScrollPane sPanel;
//JPanel
JPanel jPanel1,jPanel2;
//端口号and net
public final static int DEFAULT_PORT=6666;//默认端口号
ServerSocket serverSock;
Socket clientSock;
//index记录当前对象
int index=0;
//线程,对象
ChatAcceptThread chatAcceptThread[]=new ChatAcceptThread[50];//对象数组
//_________________________________________________________________________________
//------------------------------------------------------------***************方法
//服务端图形
void gUi(){
//new
charFrame=new JFrame("聊天室服务端");
jPanel2=new JPanel();
charButton2=new JButton("退出");
charText=new JTextArea(20,20);
sPane......
服务器端charroomserver(2006-06-07 10:30:00)
摘要:import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import javax.swing.*;
public class charroomserver {
//----------------------------------------------------------****************定义变量
//JFrame
JFrame charFrame;
JTextArea charText;
JTextField charField2;
JButton charButton2;
ScrollPane sPanel;
//JPanel
JPanel jPanel1,jPanel2;
//端口号and net
public final static int DEFAULT_PORT=6666;//默认端口号
ServerSocket serverSock;
Socket clientSock;
//Thread
//Thread chatAcceptThread;//启动接受连接的线程
ChatAcceptThread chatAcceptThread;
//_________________________________________________________________________________
//------------------------------------------------------------***************方法
//服务端图形
void gUi(){
//new
charFrame=new JFrame("聊天室服务端");
jPanel2=new JPanel();
charButton2=new JButton("退出");
charText=new JTextArea(20,20);
sPanel=new ScrollPane();
......
客服端 charroom(2006-06-07 09:07:00)
摘要:import java.net.*;
import java.io.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class charroom implements Runnable{
//----------------------------------------------------------****************定义变量
//JFrame
JFrame charFrame;
JTextArea charText;
JTextField charField1,charField2,charField3,charField4;
JButton charButton1,charButton2;
ScrollPane sPanel;
JLabel charLabel;
//JPanel
JPanel jPanel1,jPanel2;
//Socket变量
Socket server,socket;
//文件,io
BufferedReader in;
PrintWriter out;
BufferedReader wt;
//Thread
Thread charThread=new Thread(this);;
//_________________________________________________________________________________
public charroom(){
gUi();
}
//------------------------------------------------------------***************方法
//客服端图形
void gUi(){
//new
charFrame=new JFrame("聊天室客户端");
jPanel1=new JPanel();
jPanel2=new JPanel......