- 浏览: 89638 次
- 性别:
- 来自: 深圳
最新评论
文章列表
下载、安装SqlServer 2000 for JDBC驱动程序:
引用页 http://www.microsoft.com/china/sql/downloads/2000/jdbc.asp
将目录:
C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib
下的三个jar包拷贝到目录:
K:\tomcat\shared\lib
创建数据库:
USE master
GO
CREATE DATABASE [mydata] ON (NAME = N'mydata_1', FILENAME = N'K:\sqlserver\myd ...
- 2005-03-16 17:40
- 浏览 756
- 评论(0)
K:\tomcat\conf\tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?><tomcat-users> <role rolename="tomcat"/> <role rolename="role1"/> <role rolename="manager"/> <user username="tomcat" password="tomcat" roles="t ...
- 2005-03-16 17:39
- 浏览 608
- 评论(0)
本文包括如下内容:
匿名访问test:修改root密码:创建一个新用户:限制用户权限到表和列:一个用户将自己所拥有的权限赋给另一个用户:取消用户权限:删除一个用户:使用mysqldump备份一个数据库:使用mysqldump备份一个或多个表:从备份文件恢复一个数据库:
匿名访问test:
C:\>mysql -h localhost testWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 6 to server version: 4.0.20a-debug
Typ ...
- 2005-03-16 17:38
- 浏览 720
- 评论(0)
ClassLoaderDemo.java:
package test;
class SuperLoader { int i = setI(); static int j = setJ(); int z; SuperLoader() { System.out.println("SuperLoader @ constructor @ z 2 initialized."); this.z = 5; } public int setI() { System.out.println("SuperLoader @ i @ initialized."); return ...
- 2005-03-16 17:34
- 浏览 621
- 评论(0)
package tigers;
import java.util.*;
public class Tiger13 {static interface TestListener extends EventListener {public void doEvent(TestEvent ev);}static class TestEvent extends EventObject {public TestEvent(Object source) {super(source);}}static class Test {private HashSet<TestListener> listene ...
- 2005-03-16 17:31
- 浏览 741
- 评论(0)
Test1.java:
package test;
import java.io.*;import java.lang.reflect.*;
class AClassLoader extends ClassLoader { public Class loadClass(String name, boolean resolve) throws ClassNotFoundException { Class klass = null; try { klass = findLoadedClass(name); //检查该类是否已经被装载。 if (klass != null) { return klas ...
- 2005-03-16 17:28
- 浏览 828
- 评论(0)
package tigers;
public class Tiger14 {
public static void main(String[] args) {int[] timesArray = {10, 100, 1000, 10000};execute("java.lang.StringBuffer", timesArray);execute("java.lang.String", timesArray);execute("java.lang.Object", timesArray);}private static void exe ...
- 2005-03-16 17:27
- 浏览 665
- 评论(0)
package tigers;
import java.io.*;
public class Tiger19 {
public static void main(String[] args) {try {for (char c = 'A'; c <= 'Z'; c++ ) {String dirName = c + ":\\";long freeSpace = getFreeDiskSpace(dirName);if (freeSpace != -1) {long number = Math.round(freeSpace / (1024.00 * 1024.00)); ...
- 2005-03-16 17:24
- 浏览 758
- 评论(0)
package tigers;
import java.text.*;import java.util.*;
public class Tiger25 {
public static void main(String[] args) { System.out.println(getDateTime(new Date(), Locale.CHINA)); System.out.println(getDateTime(new Date(), Locale.CHINESE)); System.out.println(getDateTime(new Date(), Locale.SIMPLIFIED_ ...
- 2005-03-16 17:23
- 浏览 483
- 评论(0)
package test;
import java.util.*;
public class Tiger9 {static class LinkedList {private Node header;private int size;public LinkedList() {header = new Node(null, null);size = 0;}public void add(Object o) {Node n = new Node(o, header); //关键步骤。创建一个新的Node对象,它的next变量将指向添加它之前的header对象。header = n; //使新创建的N ...
- 2005-03-16 17:21
- 浏览 617
- 评论(0)
/** 创建日期 2005-2-5** TODO 要更改此生成的文件的模板,请转至* 窗口 - 首选项 - Java - 代码样式 - 代码模板*/
/*** @author bitan** TODO 要更改此生成的类型注释的模板,请转至* 窗口 - 首选项 - Java - 代码样式 - 代码模板*/public class Test4 { class Digital { private final int initSize; private final int increase; private Object[] arrays; private int items; private i ...
- 2005-03-16 17:19
- 浏览 744
- 评论(0)
package tigers;
class Super{ protected String name; public Super(String name) { this.name = name; } public void append(int ch) {//do nothing } public String getName() { return this.name; }}public class Tiger35 { public Super getSuper(String name) {return new Super(name) { public void append(int ch) { ...
- 2005-03-16 17:18
- 浏览 614
- 评论(0)
package test;
public class Tiger6 {static class Inner {private static Inner instance = null;private Inner() { //每调用一次构造函数,打印一条消息。System.out.println("create a Inner object!");}public static Inner getInstance() {if (instance == null) {instance = new Inner();} ...
- 2005-03-16 17:17
- 浏览 724
- 评论(0)
package test;
public class Test2 { static class Inner1 { public void m1() {synchronized("aaaa") { for (char c = 'a'; c <= 'g'; c++) { System.out.println(Thread.currentThread().getName() + " m1() : " + c); try { Thread.sleep(100); } catch (InterruptedException e) { } } } } pu ...
- 2005-03-16 17:13
- 浏览 751
- 评论(0)
package test;
public class Tiger3 {static class Inner {private Thread thread = null;private int count = 0;public synchronized void getLock() {while(tryGetLock() == false) { //无限循环,如果没有其他线程通过释放锁来唤醒它,它永不会退出,因为它无法自己终止while循环。当别的线程调用notify()释放锁后,它会继续执行这次wait()以后的代码,也即会再一次调用tryGetLock()方法来尝试获得锁。System.out ...
- 2005-03-16 17:12
- 浏览 1014
- 评论(0)