- 浏览: 47204 次
- 性别:
- 来自: 广州
最新评论
文章列表
1)前台四个文件
logon. jsp:
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head><%String path = request.getContextPath();String basePath = request.g ...
- 2008-12-25 17:46
- 浏览 454
- 评论(0)
1)添加两个jsp
index。jsp:
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %><%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %><%@page contentType="text/html;charset=Big5"%> <html><head><title>first ...
- 2008-12-24 18:00
- 浏览 514
- 评论(0)
首先,将dwr.jar放到web-inf/lib中
1)web.xml中:
<?xml version="1.0" encoding="UTF-8"?><web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/ ...
- 2008-12-23 14:11
- 浏览 461
- 评论(0)
一)客户端
using System;using System.Net;using System.Net.Sockets;using System.Text;using System.IO;using System.Threading;
namespace 鼠标控制_客户端{ //我们定义一个保存鼠标坐标的结构 public struct MousePosition { private int x; private int y; public int X { get { ...
- 2008-12-03 10:26
- 浏览 551
- 评论(0)
一)客户端开发
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Net;using System.Net.Sockets;using System.Threading;
namespace mys{ public partial class Form1 : Form { public delegat ...
- 2008-12-03 09:08
- 浏览 507
- 评论(0)
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Drawing.Imaging;using System.Text;using System.Windows.Forms;using System.Diagnostics;
namespace WindowsApplication4{ public partial class Form1 : Form { Image I; Graphics G; ...
- 2008-11-11 10:46
- 浏览 521
- 评论(0)
1)添加windows service项目
program.cs内容为:
using System.Collections.Generic;using System.ServiceProcess;using System.Text;
namespace WindowsService1{ static class Program { /// <summary> /// 应用程序的主入口点。 /// </summary> static void Main() { ServiceBase[] ServicesToRun;
// 同一进程中可以运行多个用户服务。若要将 ...
- 2008-11-11 09:01
- 浏览 507
- 评论(0)
容器负责维护实例的,jndi是从容器中主动寻找实例,而ioc则是由容器被动注入到系统中
AOP面向切面编程,能更大的使模块重用,如日志记录每个类中都需加入,可单独抽象出来形成一个公共模块切面,使每个类都要经过。
简单例子:
类SpeakerInterface
package practice;
public interface SpeakerInterface {public void sayHello();}
类SpeakerImpl1
package practice;
public class SpeakerImpl1 implements SpeakerInt ...
- 2008-09-22 11:54
- 浏览 516
- 评论(0)
http://www-128.ibm.com/developerworks/cn/linux/l-callback/?ca=dwcn-newsletter-linux
package test;interface ICallBack{void postExec();}
/*相当于副线程,执行时得到了主线程传入的地址*/class A{ private ICallBack callBack; public void setCallBack(ICallBack callBack){ //A拥有setCallBack() this.callBack=callBack; } ...
- 2008-09-18 16:44
- 浏览 636
- 评论(0)
覆写是方法或函数的的名称,返回值都相同,用其中的一个代替另一个方法。重载是方法或函数的名称相同,但是返回值和参数不同,根据不同的参数调用不同的方法。
C++ ,Java都是动态单分派,静态多分派语言 重载(overloading)是静态多分配,在编译器中执行; 覆写(overriding)是动态单分配,执行是转型
静态类型:变量被声明时的类型是静态类型动态类型:变量所引用的对象的真实类型
运行时,先是重载在编译是先执行,而后覆写执行
/***********重载静态分配,编译器中执行*************/ class Cat{} class WhiteCat ...
- 2008-09-18 14:23
- 浏览 705
- 评论(0)
1)在server.xml中配置数据源
<Context path="/jndi" docBase="D:/Documents and Settings/sunxf/workspace/jndi" > <Resource name="jdbc/myoracle" auth="Container" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/myoracle"> < ...
- 2008-09-18 13:09
- 浏览 581
- 评论(0)
一)需求分析:
系统总体功能分析: 包括: 每一项均有 input execute output (1)学生选课 input execute output (2)学生上课 (3)教师上课 (4)管理员维护系统
(二)系统用例模型(use case view)
建立用例视图分为以下步骤:
(1)确定角色 学生(students) 教师(teacher) 管理员(administrator) (2)创建用例 选课 上课 维护系统 (3)创建角色—用例关系图 学生-选课 学生-上课 教师-上课 管理员-维护系统
(三)系统动态模型 (活动框图、序列图、协作图) 针对某个用例add s ...
- 2008-09-10 16:10
- 浏览 533
- 评论(0)
public class test {public static void main(String args[]){String a="abc";String b="abc";String c=new String("abc");String d=new String("abc");System.out.println(a==b);//trueSystem.out.println(a==c);//falseSystem.out.println(c==d);//falseSystem.out.println(a==c. ...
- 2008-08-31 16:56
- 浏览 475
- 评论(0)
一)游标: 1)每次声明、打开、推进、关闭游标declarecursor c is select .........;--声明beginopen c;--打开loopexit when..........;fetch c into .........;--推进...........end loop;close c;--关闭end; 2)使用游标变量更加简洁declarecursor c is select..........;声明beginfor rec_c in c loop --打开、推进、关闭 全包括exit when......end loop;end;
3)动态游标;
decl ...
- 2008-08-27 10:38
- 浏览 258
- 评论(0)
Spring简单的例子:
1.interface:
package com.houyawei;
public interface Action { public String execute(String str);}
2.实现接口的类:LowerAction 和 UpperAction:
package com.houyawei;
public class UpperAction implements Action {
private String message; public String getMessage() { return message; } ...
- 2008-08-26 14:45
- 浏览 360
- 评论(0)