总结的几点:

  1、在jsp中注意<%! %>声明代码块中的变量只会在项目开始的时候第一次运行jsp的时候执行一遍,有点类似于java类中的static代码块,所以如果是会改变的值不应该声明在这里面。而是卸载<%%>代码块中

  2、使用js中的location.href有时候就是无法生效,也就是无法跳转到你想要的页面。你可以在location.href语句后面加上 event.returnValue=false即可

  3、进行编辑一条信息或者删除信息的时候id字段可以使用隐藏域或者直接使用el传递。这样就不需要通过js找到id列或者其他了

  4、在增加的时候注意在servlet或者对应的jsp进行对象的补全

  5、在修改的时候如果有那种类似于下拉列表或者单选按钮的东西,可以使用jstl中的<c:if>实现选择。

例子:

CREATE TABLE profile(
id NUMBER PRIMARY KEY,
name VARCHAR2(20),
birthday DATE,
gender VARCHAR2(10),
career VARCHAR2(20),
address VARCHAR2(50),
mobile VARCHAR2(11)
); CREATE SEQUENCE seq_profile; package com.dao; import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List; import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.ResultSetHandler;
import org.apache.commons.dbutils.handlers.BeanHandler;
import org.apache.commons.dbutils.handlers.BeanListHandler; import com.domain.Profile;
import com.jdbc.JdbcUtils; public class ProfileDao {
/**
* zeng
* @param p
* @throws SQLException
*/
public void addProfile(Profile p) throws SQLException{
String sql="INSERT INTO profile VALUES (seq_profile.NEXTVAL,?,?,?,?,?,?)";
QueryRunner qr=new QueryRunner();
Connection con=JdbcUtils.getConnection();
Object[] params={p.getName(),p.getBirthday(),p.getGender(),p.getCareer(),p.getAddress(),p.getMobile()};
qr.update(con, sql,params);
JdbcUtils.releaseConnection(con);
} public void deleteById(int id) throws SQLException{
String sql="DELETE FROM profile WHERE id=?";
QueryRunner qr=new QueryRunner();
Connection con=JdbcUtils.getConnection();
Object[] params={id};
qr.update(con,sql, params);
JdbcUtils.releaseConnection(con);
} public void update(Profile p) throws SQLException{
String sql="UPDATE profile SET name=?,birthday=?,gender=?,career=?,address=?,mobile=? WHERE id=?";
QueryRunner qr=new QueryRunner();
Connection con=JdbcUtils.getConnection();
Object[] params={p.getName(),p.getBirthday(),p.getGender(),p.getCareer(),p.getAddress(),p.getMobile(),p.getId()};
// System.out.println(Arrays.toString(params));
qr.update(con,sql, params);
JdbcUtils.releaseConnection(con);
} public ArrayList<Profile> findAll() throws SQLException{
String sql="SELECT * FROM profile";
QueryRunner qr=new QueryRunner();
Connection con=JdbcUtils.getConnection();
ResultSetHandler<List<Profile>> rsh=new BeanListHandler<Profile>(Profile.class);
ArrayList<Profile> profiles=(ArrayList<Profile>) qr.query(con, sql, rsh);
JdbcUtils.releaseConnection(con);
return profiles;
} public Profile load(int id) throws SQLException{
String sql="SELECT * FROM profile WHERE id=?";
QueryRunner qr=new QueryRunner();
Object[] params={id};
Connection con=JdbcUtils.getConnection();
ResultSetHandler<Profile> rsh=new BeanHandler<Profile>(Profile.class);
Profile profile= (Profile) qr.query(con, sql, rsh,params);
JdbcUtils.releaseConnection(con);
return profile;
} } package com.domain; import java.io.Serializable;
import java.sql.Date; public class Profile implements Serializable{ private static final long serialVersionUID = 1L;
private int id;
private String name;
private Date birthday;
private String gender;
private String career;
private String address;
private String mobile;
@Override
public String toString() {
return "Profile [id=" + id + ", name=" + name + ", birthday="
+ birthday + ", gender=" + gender + ", career=" + career
+ ", address=" + address + ", mobile=" + mobile + "]";
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getCareer() {
return career;
}
public void setCareer(String career) {
this.career = career;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public Profile() {
super();
// TODO Auto-generated constructor stub
}
public Profile(int id, String name, Date birthday, String gender,
String career, String address, String mobile) {
super();
this.id = id;
this.name = name;
this.birthday = birthday;
this.gender = gender;
this.career = career;
this.address = address;
this.mobile = mobile;
} } package com.jdbc; import java.sql.Connection;
import java.sql.SQLException; import javax.sql.DataSource; import com.mchange.v2.c3p0.ComboPooledDataSource; public class JdbcUtils {
/*
* 配置文件的恶魔人配置!要求你必须给出c3p0-config。xnl!
*/
private static ComboPooledDataSource dataSource=new ComboPooledDataSource("oracle-config");
/**
* 它是事务专用连接
*/
private static Connection con=null;
/**
* 使用连接池返回一个连接对象
* @return
* @throws SQLException
*/
public static Connection getConnection() throws SQLException{
//当con!=null,表示已经调用过beginTransaction方法了
if(con!=null) return con;
return dataSource.getConnection();
} /**
* 返回连接池对象
* @return
*/
public static DataSource getDataSource(){
return dataSource;
}
/**
* 1、开启一个Connection,设置它的setAutoCommit(false)
* 2、还要保证dao中使用的连接是我们刚刚创建的
* ------------------------
* 1、创建一个Connection,设置为手动提交
* 2、把这个Connection给dao用
* 3、还要让commitTransaction或rollbackTransaction可以获取到
* @throws SQLException
*/
public static void beignTransaction() throws SQLException{
if(con!=null) throw new SQLException("已经开始了事务,就不要继续开启事务了!");
con=getConnection();
con.setAutoCommit(false);
}
/**
* 提交事务
* 获取之前开启的Connection,兵提交
* @throws SQLException
*/
public static void commitTransaction() throws SQLException{
if(con==null) throw new SQLException("还没有开启事务,不能提交!");
con.commit();
con.close();
con=null;//因为前面的close()不会销毁连接而是放回连接池
}
/**
* 回滚事务
* 获取之前开启的Connection,兵回滚
* @throws SQLException
*/
public static void rollbackTransaction() throws SQLException{
if(con==null) throw new SQLException("还没有开启事务,不能提交!");
con.rollback();
con.close();
con=null;//因为前面的close()不会销毁连接而是放回连接池
} public static void releaseConnection(Connection connection) throws SQLException{
/*
*判斷它是不是中事務專用,如果是就不關閉
*如果不是就要關閉
*/
//如果con==null,說明沒有事務,那麼connection一定不是事務專用的
if(con==null) connection.close();
if(con!=connection) connection.close(); }
} package com.service; import java.sql.SQLException;
import java.util.ArrayList; import com.dao.ProfileDao;
import com.domain.Profile; public class ProfileService { private ProfileDao profileDao=new ProfileDao(); public void addProfile(Profile p){
try {
profileDao.addProfile(p);
} catch (SQLException e) {
e.printStackTrace();
}
} public void deleteProfile(int id){
try {
profileDao.deleteById(id);
} catch (SQLException e) {
e.printStackTrace();
}
} public void updateProfile(Profile p){
try {
profileDao.update(p);
} catch (SQLException e) {
e.printStackTrace();
}
} public ArrayList<Profile> findAll(){
try {
return profileDao.findAll();
} catch (SQLException e) {
throw new RuntimeException(e);
}
} public Profile findById(int id){
try {
return profileDao.load(id);
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
} package com.test; import java.sql.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat; import org.junit.Test; import com.domain.Profile;
import com.service.ProfileService; public class Test01 { @Test
public void fun1() throws ParseException{
ProfileService ps=new ProfileService();
Profile p=new Profile();
p.setName("liu"); p.setBirthday(geDate("1994-10-12"));
p.setAddress("江西");
p.setGender("女");
p.setMobile("8482973");
p.setCareer("学生");
ps.addProfile(p);
// p.setCareer("工人");
// p.setId(1);
// ps.updateProfile(p);
// System.out.println(ps.findAll());
// System.out.println(ps.findById(1));
} public Date geDate(String date) throws ParseException{
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
return new Date(sdf.parse(date).getTime());
}
} <?xml version="1.0" encoding="UTF-8" ?>
<c3p0-config>
<!-- 默认连接配置 -->
<default-config>
<!-- 连接四大参数配置 -->
<property name="jdbcUrl">jdbc:mysql://127.0.0.1:3306/demo</property>
<property name="driverClass">com.mysql.jdbc.Driver</property>
<property name="user">guodaxia</property>
<property name="password">961012gz</property>
<!-- 池参数配置 -->
<property name="acquireIncrement">3</property>
<property name="initialPoolSize">10</property>
<property name="minPoolSize">2</property>
<property name="maxPoolSize">10</property>
</default-config> <named-config name="oracle-config">
<!-- 连接四大参数配置 -->
<property name="jdbcUrl">jdbc:oracle:thin:@localhost:1521:db</property>
<property name="driverClass">oracle.jdbc.driver.OracleDriver</property>
<property name="user">scott</property>
<property name="password">961012gz</property>
<property name="acquireIncrement">3</property>
<property name="initialPoolSize">10</property>
<property name="minPoolSize">2</property>
<property name="maxPoolSize">10</property>
</named-config> </c3p0-config> $(function(){ $("button[name='show']").click(function(){
var id=$($(this).parents("tr").find("td")[0]).text();
//alert(id);
window.location.href="detail.jsp?id="+id;
}); $("button[name='alert']").click(function(){
var id=$($(this).parents("tr").find("td")[0]).text();
//alert(id);
window.location.href="update.jsp?id="+id;
}); $("button[name='delete']").click(function(){
var id=$($(this).parents("tr").find("td")[0]).text();
//alert(id);
window.location.href="delete.jsp?id="+id;
}); }); $(function(){ $("option").each(function(){
var v1=$("#hhh").val();
var v2=$(this).val();
//alert($("#hhh").val()+" "+$(this).val());
if(v1==v2){
$(this).attr("selected",true);
}
}); $("button[name='back'").click(function(){
//alert(1);
window.location.href="list.jsp?date="+new Date().getTime();
event.returnValue=false;
}); }); <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head> <body>
<%
response.sendRedirect(path+"/list.jsp");
%>
</body>
</html> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.domain.Profile,java.sql.Date,com.service.ProfileService,java.text.SimpleDateFormat" %> <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'list.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
td{
/* width:80px; */
border:1px solid;
}
table{
border:1px solid;
}
#tr1{
background-color: yellow;
}
</style>
<script type="text/javascript" src="js/jquery1.8.3.js"></script>
<script type="text/javascript" src="js/list.js"></script>
</head>
<%
ProfileService ps=new ProfileService();
ArrayList<Profile> profiles=ps.findAll();
%>
<%! String date2Str(Date d){
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
return sdf.format(d);
}
%>
<body>
<table>
<tr id="tr1">
<td>编号</td>
<td>姓名</td>
<td>生日</td>
<td>性别</td>
<td>职业</td>
<td>住所</td>
<td>电话</td>
<td>操作</td>
</tr>
<%for(Profile p:profiles){%>
<tr>
<td><%=p.getId() %></td>
<td><%=p.getName() %></td>
<td><%=date2Str(p.getBirthday()) %></td>
<td><%=p.getGender() %></td>
<td><%=p.getCareer() %></td>
<td><%=p.getAddress() %></td>
<td><%=p.getMobile() %></td>
<td>
<button name="show" >明细</button>
<button name="alert" >修改</button>
<button name="delete" >删除</button>
</td>
</tr>
<%
}
%> </table>
</body>
</html> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.domain.Profile,java.sql.Date,com.service.ProfileService,java.text.SimpleDateFormat" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'update.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> <style type="text/css">
table{
border:1px solid;
}
td{
border:1px solid;
}
</style>
<script type="text/javascript" src="js/jquery1.8.3.js"></script>
<script type="text/javascript" src="js/update.js"></script>
</head> <body>
<%!
Profile p=null;
String date2Str(Date d){
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
return sdf.format(d);
}
%>
<%
Integer i=Integer.valueOf(request.getParameter("id"));
ProfileService ps=new ProfileService();
p=ps.findById(i);
%>
<form action="utu.jsp" method="post">
<table>
<tr>
<td>编号</td>
<td><input name="id" type="text" value="<%=p.getId() %>" readonly></td>
</tr>
<tr>
<td>姓名</td>
<td><input name="name" type="text" value="<%=p.getName() %>" ></td>
</tr>
<tr>
<td>生日</td>
<td><input name="birthday" type="text" value="<%=p.getBirthday() %>" ></td>
</tr>
<tr>
<td>性别</td>
<td>
<select name="gender">
<option value="女">女</option>
<option value="男">男</option>
</select>
<input id="hhh" type="hidden" value="<%=p.getGender() %>">
</td>
</tr>
<tr>
<td>职业</td>
<td><input name="career" type="text" value="<%=p.getCareer() %>" ></td>
</tr>
<tr>
<td>住所</td>
<td><input name="address" type="text" value="<%=p.getAddress() %>" ></td>
</tr>
<tr>
<td>电话</td>
<td><input name="mobile" type="text" value="<%=p.getMobile() %>" ></td>
</tr>
</table>
<input type="submit" value="修改">
<button name="back">返回</button>
</form>
</body>
</html> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.domain.Profile,java.sql.Date,com.service.ProfileService,java.text.SimpleDateFormat,java.text.ParseException" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%!
Date str2Date(String str)throws ParseException{
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
return new Date(sdf.parse(str).getTime());
}
%> <%
request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("utf-8"); int id=Integer.parseInt(request.getParameter("id"));
String name=request.getParameter("name");
Date birthday=str2Date(request.getParameter("birthday"));
String gender=request.getParameter("gender");
String career=request.getParameter("career");
String address=request.getParameter("address");
String mobile=request.getParameter("mobile"); System.out.println(id+"---"+name+"--"+birthday+"--"+gender+"--"+career+"--"+address+"--"+mobile);
Profile p=new Profile();
p.setId(id);
p.setName(name);
p.setBirthday(birthday);
p.setGender(gender);
p.setCareer(career);
p.setAddress(address);
p.setMobile(mobile); ProfileService ps=new ProfileService();
ps.updateProfile(p); response.sendRedirect(path+"/update.jsp?id="+id); %> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.domain.Profile,java.sql.Date,com.service.ProfileService,java.text.SimpleDateFormat" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>My JSP 'detail.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
table{
border:1px solid;
}
td{
border:1px solid;
}
</style>
</head>
<%!
Profile p=null;
String date2Str(Date d){
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
return sdf.format(d);
}
%>
<%
Integer i=Integer.valueOf(request.getParameter("id"));
ProfileService ps=new ProfileService();
p=ps.findById(i);
%> <body>
<table>
<tr>
<td>编号</td>
<td><%=p.getId() %></td>
</tr>
<tr>
<td>姓名</td>
<td><%=p.getName() %></td>
</tr>
<tr>
<td>生日</td>
<td><%=p.getBirthday() %></td>
</tr>
<tr>
<td>性别</td>
<td><%=p.getGender() %></td>
</tr>
<tr>
<td>职业</td>
<td><%=p.getCareer() %></td>
</tr>
<tr>
<td>住所</td>
<td><%=p.getAddress() %></td>
</tr>
<tr>
<td>电话</td>
<td><%=p.getMobile() %></td>
</tr>
</table>
<button onclick="javascript:history.go(-1)">返回</button>
</body>
</html> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.domain.Profile,java.sql.Date,com.service.ProfileService,java.text.SimpleDateFormat" %>
<%
int id=Integer.parseInt(request.getParameter("id"));
ProfileService ps=new ProfileService();
ps.deleteProfile(id);
response.sendRedirect(request.getContextPath()+"/list.jsp?date="+System.currentTimeMillis());
%>

jar:

  

JSP的一个增删改查例子和总结的更多相关文章

  1. 最简单的jsp+servlet的增删改查代码

    package ceet.ac.cn.dao; import java.sql.Connection; import java.sql.PreparedStatement; import java.s ...

  2. 初次尝试PHP——一个简单的对数据库操作的增删改查例子

    第一次学习PHP,很多人说PHP是最好的语言,学习了一点点,还不敢说这样的话,不过确实蛮好用的. 做了一个简单的对数据库的增删改查的操作,主要是将四种操作写成了独立的函数,之后直接调用函数.以下是代码 ...

  3. spring boot2+jpa+thymeleaf增删改查例子

    参考这遍文章做了一个例子,稍微不同之处,原文是spring boot.mysql,这里改成了spring boot 2.Oracle. 一.pom.xml引入相关模块web.jpa.thymeleaf ...

  4. 用liferay实现的增删改查例子-book管理系统

    liferay 这个框架是一个开源的项目,大家可以修改源代码,来实现自己的需求.但是关于liferay的开发资料中文的很少关于liferay的基础知识,大家可以百度学习一下,再来看下边的例子 首先需要 ...

  5. DBUtils 增删改查例子

    sql CREATE TABLE [dbo].[Person] ( , ) NOT NULL , ) COLLATE Chinese_PRC_CI_AS NULL , [age] [int] NULL ...

  6. jsp+servlet+mysql增删改查

    用的IntelliJ IDEA开发的,jdk1.8 1 首先是项目结构,如下图所示 2看各层的代码 首先是web.xml <?xml version="1.0" encodi ...

  7. MVC增删改查例子

    一.显示用户列表1.新建UserInfoController控制器 public ActionResult Index() { DataTable table = SQLHelper.ExecuteR ...

  8. JS组件系列——又一款MVVM组件:Vue(一:30分钟搞定前端增删改查)

    前言:关于Vue框架,好几个月之前就听说过,了解一项新技术之后,总是处于观望状态,一直在犹豫要不要系统学习下.正好最近有点空,就去官网了解了下,看上去还不错的一个组件,就抽空研究了下.最近园子里vue ...

  9. Redis:五种数据类型的简单增删改查

    Redis简单增删改查例子 例一:字符串的增删改查 #增加一个key为ay_key的值 127.0.0.1:6379> set ay_key "ay" OK #查询ay_ke ...

随机推荐

  1. Android Studio导入eclipse工程(引用多个其它工程)

    eclipse工程向android studio 迁移过程中需要到编译错误: eclipse工程的结构比较复杂,引用了其它的工程,在迁移的过程中遇到了错误. @ViewInject(R.id.edit ...

  2. ubuntu 及 postgredql 安装配置小坑摘录

    ubuntu 16.04.1 安装 Ubuntu Server 16.04.1安装配置图解教程,按教程修改局域网static IP 开启sftp必须 解决SSH服务拒绝密码,之后才能欢乐地使用file ...

  3. STL源代码分析--萃取编程(traits)技术的实现

    1.为什么要出现? 依照默认认定.一个模板给出了一个单一的定义,能够用于用户能够想到的不论什么模板參数!可是对于写模板的人而言,这样的方式并不灵活.特别是遇到模板參数为指针时,若想实现与类型的參量不一 ...

  4. .Net 开发Windows Service

    1.首先创建一个Windows Service 2.创建完成后切换到代码视图,代码中默认有OnStart和OnStop方法执行服务开启和服务停止执行的操作,下面代码是详细解释: using Syste ...

  5. python基础: day4作业计算器

    作业:计算器开发 实现加减乘除及拓号优先级解析 用户输入 1 - 2 * ( (60-30 +(-40/5) * (9-2*5/3 + 7 /3*99/4*2998 +10 * 568/14 )) - ...

  6. 用象棋的思维趣说IT人的职业发展和钱途

    最近我花了不少功夫在学习象棋,也学习了王天一等高手的棋路,感觉IT人的职业和下棋一样,往好了讲,争主动权争实惠只争朝夕,往坏了讲,一步走错得用多步来弥补,如果错误太大未必能弥补回来.在本文里,就用下棋 ...

  7. 体验DNN演示平台《A Neural Network Playground》(一)

    0 本次博客内容简介 本次博客标(一),是因为我自知有些地方还是不理解.本篇博客仅暂时记录第一次玩 A Neural Network Playground的体验,如果后面有了进一步体会,会更新新的内容 ...

  8. Earth Hour(最短路)

    Earth Hour Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 125536/65536 K (Java/Others)Total ...

  9. 九度OJ 1336:液晶屏裁剪 (GCD)

    时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:983 解决:228 题目描述: 苏州某液晶厂一直生产a * b大小规格的液晶屏幕,由于该厂的加工工艺限制,液晶屏的边长都为整数.最近由于市场 ...

  10. 学习使用MarkDown

    文本采用CuteMarkEd软件编写后复制到博客园(这个软件可以实时观看html效果,也可以打印pdf,挺好使.测试比sublime装插件要简单方便) MarkDown格式文本 名称 ======== ...