`
斌强-朱
  • 浏览: 51377 次
社区版块
存档分类
最新评论
文章列表
Database 使用 Mysql , 建立User 表 CREATE TABLE `user` ( `id` int(11) NOT NULL, `firstName` varchar(20) DEFAULT NULL, `lastName` varchar(20) DEFAULT NULL, `age` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) 所需jar包 <?xml version="1.0" encoding="UTF-8"?> <classpat ...
建表sql create table customers( id bigint primary key, name varchar(20) not null, pass varchar(20) not null, email varchar(128) not null, image mediumblob, birthday date, registered_time timestamp );Customer package org.zbq.bean; import java.sql.Date; import java.sql.Timestamp; public cl ...
Service package org.zbq.authority; public interface Service { public void view(); public void modify(); }ServiceImpl package org.zbq.authority; public class ServiceImpl implements Service { @Override public void view() { System.out.println("用户查看数据"); } @Override public void ...
Person package org.zbq.aop; public interface Person { public void run(); public void info(); } PersonImpl package org.zbq.aop; public class PersonImpl implements Person { private int age; private String name; public int getAge() { return age; } public void setAge(int age) { ...
User package org.zbq.bean; public class User { private String name; private String pass; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPass() { return pass; } public void setPass(String pass) { this.pass = pass; } ...
Axe 接口 package org.zbq.spring; public interface Axe { public String chop(); } Axe实现类 SteelAxe package org.zbq.spring; public class SteelAxe implements Axe { @Override public String chop() { return "钢斧砍柴很快"; } } Axe实现类StoneAxe package org.zbq.spring; public class StoneAxe i ...
Person 接口 package org.zbq.ioc; public interface Person { public void work(); } Tool 接口 package org.zbq.ioc; public interface Tool { public void realWork(); } Tool 实现类ConcreteToolA package org.zbq.ioc; public class ConcreteToolA implements Tool { @Override public void realWork ...
1.U盘4GB以上容量(要装得下操作系统安装文件) 2.Diskpart命令行工具 具体操作如下:   C:\>diskpart   DISKPART> list disk   如果你的机器只有一块硬盘,那么U盘应该显示为Disk 1   DISKPART> select disk 1 选择U盘为当前磁盘   DISKPART> clean 清空磁盘   DISKPART> create partition primary 创建主分区   DISKPART> select partition 1 选择分 ...
Hanoi塔问题,这是一个古典的数学问题,是一个只有用递归方法解决的问题。问题是这样的:古代有一个梵塔,塔内有3个座A,B,C,开始时A座上有64个盘子,盘子大小不等,大的在下,小的在上。有一个老和尚想把这64个盘子从A座移到C座,但每次只允许移动一个盘,且在移动过程中在3个座上都始终保持大盘在上,小盘在下。在移动过程中可以利用B座 #include <stdio.h> void move(char x, char y){ static int i = 0; printf("%3d: %c --> %c\n",++i, x, y); } void ...

Ant

新建工程Ant Demo 建立一个src文件夹 和build.xml 文件 src中建立Hello.java文件 package org.zbq.ant; import javax.swing.*; import java.awt.event.*; import java.awt.*; import java.util.Date; public class Hello extends JFrame{ private JFrame frame; private JButton but; public Hello(){ this.frame = new JFrame(&quo ...
Calculator.java package org.zbq.test; public class Calculator { public int add(int a, int b){ return a + b; } public int subtract(int a, int b){ return a - b; } public int multiply(int a, int b){ return a * b; } public int division(int a, int b) throws Exception { if(0 == b){ ...
path路径下导入Hibernate/lib/required目录下所有的jar包。以及连接数据库的Jar包 层次结构 hibernate.cfg.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate. ...
由MyEclipse下导入的Hibernate的jar包 Struts2基本jar包和MySql驱动jar包 源代码文件 数据库脚本 create database hibernate; use hibernate; create table if not exists user ( id int primary key, name varchar(20), pass varchar(20) }; web.xml 配置文件 <?xml version="1.0" encoding=" ...
Component public interface Component { public void doSomething(); } ConcreteComponent public class ConcreteComponent implements Component { @Override public void doSomething() { System.out.println("Function "); } }Decorator public class Decorator implements Component { ...
接口 interface Subject{ public String say(String name,int age) ; // 定义抽象方法say } 真实主题类 class RealSubject implements Subject{ // 实现接口 public String say(String name,int age){ return "姓名:" + name + ",年龄:" + age ; } } 代理类 class MyInvocationHandler implements Invoc ...
Global site tag (gtag.js) - Google Analytics