• 语言:java、javascript
  • 软件:eclipse、mysql

  环境配置:下载jdk;配置jdk环境变量。相关教程:https://jingyan.baidu.com/article/db55b609fa946e4ba20a2f56.html

  配置Tomcat、以及mysql的安装,jdbc的下载。

  编写一个网页完成课程的增删改查,要求连接数据库并且实现增删改查。

  首先创建一个java web项目File->new->Other->Dynamic Web Project

创建名称->点击next

点击next,将选项打上对号:

点击完成:

jdbc的链接:下载jdbc。在项目文件位置创建lib文件夹将下载jdbc中的粘贴到lib文件夹下。

在项目上点击右键选择最后一个Properties(属性)选项。

选择java build path中的Libraries

点击右侧的ARR JARs...选择刚才粘贴的文件。最后点击Apply and Close

出现Referenced Libraries证明添加成功。

在WebContent上点击右键new->jsp文件:创建多个jsp文件实现网页的实现。在java Resources中创建java项目链接编写数据库的代码并封装成类。

源代码:

Shujuku.java:

package Class;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement; public class Shujuku {
public String[][] Getinformation() {
Connection con;
//驱动程序名
String driver = "com.mysql.jdbc.Driver";
//URL指向要访问的数据库名mydata
String url = "jdbc:mysql://localhost:3306/class?serverTimezone=UTC";
//MySQL配置时的用户名
String user = "root";
//MySQL配置时的密码
String password = "1234567";
//遍历查询结果集
String [][] st;
st=new String [20][3];
int i=0;
try {
//加载驱动程序
Class.forName(driver);
//1.getConnection()方法,连接MySQL数据库!!
con = DriverManager.getConnection(url,user,password);
//2.创建statement类对象,用来执行SQL语句!!
Statement statement = con.createStatement();
//要执行的SQL语句
String sql = "select * from class";
//3.ResultSet类,用来存放获取的结果集!!
ResultSet rs = statement.executeQuery(sql);
while(rs.next()){
st[i][0] = rs.getString("课程名称");
st[i][1] = rs.getString("任课教师");
st[i][2] = rs.getString("任课地点");
i++;
if(i==19)break;
}
rs.close();
con.close();
} catch(ClassNotFoundException e) {
System.out.println("Sorry,can`t find the Driver!");
e.printStackTrace();
} catch(SQLException e) {
//数据库连接失败异常处理
e.printStackTrace();
}catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
return st;
}
public void add(String id,String newname,String newpwd) {
Connection con;
//驱动程序名
String driver = "com.mysql.jdbc.Driver";
//URL指向要访问的数据库名mydata
String url = "jdbc:mysql://localhost:3306/class?serverTimezone=UTC";
//MySQL配置时的用户名
String user = "root";
//MySQL配置时的密码
String password = "1234567";
//遍历查询结果集
try {
//加载驱动程序
Class.forName(driver);
//1.getConnection()方法,连接MySQL数据库!!
con = DriverManager.getConnection(url,user,password);
//3.ResultSet类,用来存放获取的结果集!!
PreparedStatement psql;
//预处理添加数据,其中有两个参数--“?”
psql = con.prepareStatement("insert into class (课程名称,任课教师,任课地点) "
+ "values(?,?,?)");
psql.setString(1, id); //设置参数1,创建id为3212的数据
psql.setString(2, newname); //设置参数2,name 为王刚
psql.setString(3, newpwd);
psql.executeUpdate(); //执行更新
con.close();
} catch(ClassNotFoundException e) {
System.out.println("Sorry,can`t find the Driver!");
e.printStackTrace();
} catch(SQLException e) {
//数据库连接失败异常处理
e.printStackTrace();
}catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
}
public void update(String id,String newname,String newteachername,String newclassadd) {
Connection con;
//驱动程序名
String driver = "com.mysql.jdbc.Driver";
//URL指向要访问的数据库名mydata
String url = "jdbc:mysql://localhost:3306/class?serverTimezone=UTC";
//MySQL配置时的用户名
String user = "root";
//MySQL配置时的密码
String password = "1234567";
//遍历查询结果集
try {
//加载驱动程序
Class.forName(driver);
//1.getConnection()方法,连接MySQL数据库!!
con = DriverManager.getConnection(url,user,password);
PreparedStatement psql;
//预处理更新(修改)数据,将王刚的sal改为5000.0
psql = con.prepareStatement("update class set 课程名称 = ? , 任课教师=?, 任课地点=? where 课程名称 = ?");
psql.setString(1,newname);
psql.setString(2,newteachername);
psql.setString(3,newclassadd);
psql.setString(4,id);
psql.executeUpdate();
con.close();
} catch(ClassNotFoundException e) {
System.out.println("Sorry,can`t find the Driver!");
e.printStackTrace();
} catch(SQLException e) {
//数据库连接失败异常处理
e.printStackTrace();
}catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
}
public void delte(String id) {
Connection con;
//驱动程序名
String driver = "com.mysql.jdbc.Driver";
//URL指向要访问的数据库名mydata
String url = "jdbc:mysql://localhost:3306/class?serverTimezone=UTC";
//MySQL配置时的用户名
String user = "root";
//MySQL配置时的密码
String password = "1234567";
//遍历查询结果集
try {
//加载驱动程序
Class.forName(driver);
//1.getConnection()方法,连接MySQL数据库!!
con = DriverManager.getConnection(url,user,password);
//3.ResultSet类,用来存放获取的结果集!!
PreparedStatement psql;
//预处理删除数据
psql = con.prepareStatement("delete from class where 课程名称 =?");
psql.setString(1, id);
psql.executeUpdate();
psql.close();
con.close();
} catch(ClassNotFoundException e) {
System.out.println("Sorry,can`t find the Driver!");
e.printStackTrace();
} catch(SQLException e) {
//数据库连接失败异常处理
e.printStackTrace();
}catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
}
}

xuanke.jsp:

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>选课网站</title>
<style>
nav{ width:100%; height:20px; background:#DCDCDC ; text-align:center;}
a { text-decoation:none;}
</style>
</head>
<body>
<nav>
<p align="center">石家庄铁道大学课程管理系统</p>
</nav>
<div id=Layer1 style="position:absolute; ;z-index:1;left: 0px;top:50px;">
<table border="1" >
<tr bgcolor="#DCDCDC"><td></td></tr>
<tr><td align="center" bgcolor=Aqua>课程管理</td></tr>
<tr><td align="center"> <a href="Addclass.jsp">添加课程</a></td></tr>
<tr><td align="center"> <a href="Showclass.jsp">查看课程信息</a></td></tr>
<tr><td align="center"> <a href="Searchclass.jsp">查询课程信息</a></td></tr>
</table>
​</div>
</body>
</html>

addClass.jsp:

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>添加课程</title>
</head>
<body>
<nav>
<p align="center">石家庄铁道大学课程管理系统</p>
</nav>
<form action="Add.jsp" method="post">
<div>
<table style="margin:0 auto">
<tr><td style="width:120px"align="right">课程名称:</td>
<td> <input style="width:80px;height:17px;" type="text" name="classname"id="classname"/></td></tr>
<tr><td style="width:120px"align="right">任课教师:</td>
<td> <input style="width:80px;height:17px;" type="text" name="teachername"id="teachername"/></td>
<td style="width:120px"align="left"><small>从王建民、刘立嘉、刘丹、杨子光、王辉中选择。:</small></td></tr>
<tr><td style="width:120px"align="right">任课地点:</td>
<td> <input style="width:80px;height:17px;" type="text" name="classadd"id="classadd"/></td></tr>
<tr><td><button id="anniu" style="width:100px;height:30px;margin:0 auto" type="submit" >确认</button></td>
<td><button id="anniu" style="width:100px;height:30px;margin:0 auto" type="button" onclick="javascript:back();">取消</button></td></tr>
</table>
</div>
</form>
<script type="text/javascript">
function back(){
window.location.href="Xuanke.jsp?act=Xuanke"
}
</script>
</body>
</html>

add,jsp:

<%@ page import="javax.swing.*" %>
<%@page import="Class.Shujuku"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>添加课程</title>
<style>
nav{ width:100%; height:20px; background:#DCDCDC ; text-align:center;}
a { text-decoation:none;}
</style>
</head>
<body>
<nav>
<p align="center">石家庄铁道大学课程管理系统</p>
</nav>
<%
request.setCharacterEncoding("UTF-8");
Shujuku shu=new Shujuku();
String newname=request.getParameter("classname");
String newpassword=request.getParameter("teachername");
String classaddname=request.getParameter("classadd");
String st[][];
st=shu.Getinformation();
int i=0;
boolean m=true,n=false,q=true;
for(;st[i][0]!=null;i++){
if(newname.equals(st[i][0])){m=false;break;}
}
if(newpassword.equals("王建民")||newpassword.equals("刘丹")||newpassword.equals("刘立嘉")||newpassword.equals("王辉")||newpassword.equals("杨子光"))n=true;
if((classaddname.indexOf("基教")==-1)&&(classaddname.indexOf("一教")==-1)&&(classaddname.indexOf("二教")==-1)&&(classaddname.indexOf("三教")==-1))q=false;
if(m==true&&n==true&&q==true){
shu.add(newname, newpassword, classaddname);
%>
<script type="text/javascript">
alert("添加成功");
window.location.href="Xuanke.jsp?act=Xuanke"
</script>
<%}else{if(m==false){ %>
<script type="text/javascript">
alert("该课程已存在");
window.location.href="Xuanke.jsp?act=Xuanke"
</script>
<%} %>
<script type="text/javascript">
alert("输入格式不正确");
window.location.href="Addclass.jsp?act=Addclass"
</script>
<%} %>
</body>
</html>

ChangeClass.jsp:

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改课程信息</title>
<style>
nav{ width:100%; height:20px; background:#DCDCDC ; text-align:center;}
</style>
<script>
function back(){
window.location.href="Change.jsp?act=Change"
}
</script>
</head>
<body>
<nav>
<p align="center">石家庄铁道大学课程管理系统</p>
</nav>
<form action="Change.jsp">
<div>
<table align="center">
<tr><td style="width:200px"align="right">请输入课程名称:</td>
<td> <input style="width:100px;height:20px;" type="text" name="classname"id="classname"/></td>
</tr>
<tr>
<td style="width:200px"align="right">请输入新的课程名称:</td>
<td> <input style="width:100px;height:20px;" type="text" name="newclassname"id="newclassname"/></td>
</tr>
<tr>
<td style="width:200px"align="right">请输入新的任课教师:</td>
<td> <input style="width:100px;height:20px;" type="text" name="newteachername"id="newteachername"/></td>
</tr>
<tr>
<td style="width:200px"align="right">请输入新的任课地点:</td>
<td> <input style="width:100px;height:20px;" type="text" name="newclassaddname"id="newclassaddname"/></td>
</tr>
<tr>
<td><button id="anniu" style="width:100px;height:30px;margin:0 auto" type="submit" >确认</button></td>
<td><button id="anniu2" style="width:100px;height:30px;margin:0 auto" type="submit" onclick="jscripet:back();">取消</button></td>
</tr>
</table>
</div>
</form>
</body>
</html>

Change.jsp:

<%@ page import="javax.swing.*" %>
<%@page import="Class.Shujuku"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改课程信息</title>
<style>
nav{ width:100%; height:20px; background:#DCDCDC ; text-align:center;}
</style>
</head>
<body>
<nav>
<p align="center">石家庄铁道大学课程管理系统</p>
</nav>
<%
request.setCharacterEncoding("UTF-8");
Shujuku shu=new Shujuku();
String classname=request.getParameter("classname");
String newclassname=request.getParameter("newclassname");
String teachername=request.getParameter("newteachername");
String classaddname=request.getParameter("newclassaddname");
String st[][];
st=shu.Getinformation();
int i=0;
boolean m=true,n=false,q=true;
for(;st[i][0]!=null;i++){
if(!(classname.equals(st[i][0]))&&newclassname.equals(st[i][0])){m=false;break;}
}
if(teachername.equals("王建民")||teachername.equals("刘丹")||teachername.equals("刘立嘉")||teachername.equals("王辉")||teachername.equals("杨子光"))n=true;
if((classaddname.indexOf("基教")==-1)&&(classaddname.indexOf("一教")==-1)&&(classaddname.indexOf("二教")==-1)&&(classaddname.indexOf("三教")==-1))q=false;
if(m==true&&n==true&&q==true){
shu.update(classname, newclassname,teachername,classaddname);
%>
<script type="text/javascript">
alert("修改成功");
window.location.href="Showclass.jsp?act=Showclass"
</script>
<%}else{if(m==false){ %>
<script type="text/javascript">
alert("该课程已存在");
window.location.href="Changeclass.jsp?act=Changeclass"
</script>
<%} %>
<script type="text/javascript">
alert("输入格式不正确");
window.location.href="Changeclass.jsp?act=Changeclass"
</script>
<%} %>
</body>
</html>

DelteClass.jsp:

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>删除课程信息</title>
<style>
nav{ width:100%; height:20px; background:#DCDCDC ; text-align:center;}
</style>
<script>
function back(){
window.location.href="Change.jsp?act=Change"
}
</script>
</head>
<body>
<nav>
<p align="center">石家庄铁道大学课程管理系统</p>
</nav>
<form action="Delte.jsp">
<div>
<table align="center">
<tr><td style="width:200px"align="right">请输入要删除的课程名称:</td>
<td> <input style="width:100px;height:20px;" type="text" name="classname"id="classname"/></td>
</tr>
<tr>
<td><button id="anniu" style="width:100px;height:30px;margin:0 auto" type="submit" >确认</button></td>
<td><button id="anniu2" style="width:100px;height:30px;margin:0 auto" type="submit" onclick="jscripet:back();">取消</button></td>
</tr>
</table>
</div>
</form>
</body>
</html>

Delte.jsp:

<%@ page import="javax.swing.*" %>
<%@page import="Class.Shujuku"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改课程信息</title>
<style>
nav{ width:100%; height:20px; background:#DCDCDC ; text-align:center;}
</style>
</head>
<body>
<nav>
<p align="center">石家庄铁道大学课程管理系统</p>
</nav>
<%
request.setCharacterEncoding("UTF-8");
Shujuku shu=new Shujuku();
String classname=request.getParameter("classname");
shu.delte(classname);
%>
<script type="text/javascript">
alert("删除成功");
window.location.href="Showclass.jsp?act=Showclass"
</script>
</body>
</html>

Searchclass.jsp:

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>查询课程</title>
<style>
nav{ width:100%; height:20px; background:#DCDCDC ; text-align:center;}
a { text-decoation:none;}
</style>
</head>
<body>
<nav>
<p align="center">石家庄铁道大学课程管理系统</p>
</nav>
<div>
<form action="Sharch.jsp">
<table border="1" align="center">
<tr><td style="width:120px"align="right">要查询的内容:</td>
<td> <input style="width:80px;height:17px;" type="text" name="name" id="name"/></td></tr>
<tr><td align="center"><button id="anniu" style="width:100px;height:30px;margin:0 auto" type="submit" >确认</button></td>
<td align="center"><button id="anniu" style="width:100px;height:30px;margin:0 auto" type="button" onclick="javascript:back();">取消</button></td></tr>
</table>
</form>
</div>
<script>
function back(){
window.location.href="Xuanke.jsp?act=Xuanke"
}
</script>
</body>
</html>

Seacher.jsp:

<%@ page import="javax.swing.*" %>
<%@page import="Class.Shujuku"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>查询课程</title>
<style>
nav{ width:100%; height:20px; background:#DCDCDC ; text-align:center;}
a { text-decoation:none;}
</style>
</head>
<body>
<nav>
<p align="center">石家庄铁道大学课程管理系统</p>
</nav>
<%
request.setCharacterEncoding("UTF-8");
Shujuku shu=new Shujuku();
String newname=request.getParameter("name");
String [] []st;
st=shu.Getinformation();
String [][]str;
str=new String [20][3];
for(int i=0,j=0;st[i][0]!=null;i++){
if(st[i][0].indexOf(newname)!=-1){str[j]=st[i];j++;continue;}
if(st[i][1].indexOf(newname)!=-1){str[j]=st[i];j++;continue;}
if(st[i][2].indexOf(newname)!=-1){str[j]=st[i];j++;continue;}
}
%>
<div>
<table border="1" align="center">
<thead>
<tr>
<th align="center">课程名称</th>
<th align="center">任课教师</th>
<th align="center">任课地点</th>
</tr>
</thead> <%int i=0;
while(str[i][0]!=null){%>
<tr>
<td align="center"><%out.print(str[i][0]); %></td>
<td align="center"><%out.print(str[i][1]); %></td>
<td align="center"><%out.print(str[i][2]); %></td>
</tr>
<%i++;} %>
<tr align="center"><td></td>
<td><input id="anniu" style="width:100px;height:30px;margin:0 auto" type="button" onclick="javascript:back();"value="确认"></td>
<td></td></tr>
</table>
</div>
<script>
function back(){
window.location.href="Xuanke.jsp?act=Xuanke"
}
</script>
</body>
</html>

ShowClass.jsp:

<%@ page import="javax.swing.*" %>
<%@page import="Class.Shujuku"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>课程信息</title>
<%
request.setCharacterEncoding("UTF-8");
Shujuku shu=new Shujuku();
String [][] st;
int i=0;
st=shu.Getinformation();
%>
<script type="text/javascript">
function change(){
window.location.href="Changeclass.jsp?act=Change"
}
function delte(){
window.location.href="Delteclass.jsp?act=Delte"
}
</script>
<style>
nav{ width:100%; height:20px; background:#DCDCDC ; text-align:center;}
body{text-align:center}
</style>
</head>
<body>
<nav>
<p align="center">石家庄铁道大学课程管理系统</p>
</nav>
<div>
<table border="1" align="center">
<thead>
<tr>
<th align="center">课程名称</th>
<th align="center">任课教师</th>
<th align="center">任课地点</th>
</tr>
</thead> <%while(st[i][0]!=null){%>
<tr>
<td align="center"><%out.print(st[i][0]); %></td>
<td align="center"><%out.print(st[i][1]); %></td>
<td align="center"><%out.print(st[i][2]); %></td>
<td><input id="anniu[<%=i%>]" style="width:100px;height:30px;margin:0 auto" type="button" onclick="javascript:change();"value="修改"></td>
<td><input id="anniu[<%=i%>]" style="width:100px;height:30px;margin:0 auto" type="button" onclick="javascript:delte();"value="删除"></td> </tr>
<%i++;}%> </table>
</div>
</body>
</html>

java web实践的更多相关文章

  1. 根据实践经验,讲述些学习Java web能少走的弯路,内容摘自java web轻量级开发面试教程

    在和不少比较上进的初级程序员打交道的过程中,我们总结出了一些能帮到合格程序员尽快进阶的经验,从总体上来讲,多学.多实践不吃亏.本文来是从 java web轻量级开发面试教程从摘录的. 1  哪些知识点 ...

  2. Java Web前后端分离的思考与实践

    第一节 Java Web开发方式的变化 Web开发虽然是我们常说的B/S模式,其实本质上也是一种特殊的C/S模式,只不过C和S的选择余地相对要窄了不少,而且更标准化.不论是采用什么浏览器和后端框架,W ...

  3. 转:Java Web应用中调优线程池的重要性

    不论你是否关注,Java Web应用都或多或少的使用了线程池来处理请求.线程池的实现细节可能会被忽视,但是有关于线程池的使用和调优迟早是需要了解的.本文主要介绍Java线程池的使用和如何正确的配置线程 ...

  4. Java Web编程技术学习要点及方向

    学习编程技术要点及方向亮点: 传统学习编程技术落后,应跟著潮流,要对业务聚焦处理.要Jar, 不要War:以小为主,以简为宝,集堆而成.去繁取简 Spring Boot,明日之春(future of ...

  5. 初学 Java Web 开发,请远离各种框架,从 Servlet 开发

    Web框架是开发者在使用某种语言编写Web应用服务端时关于架构的最佳实践.很多Web框架是从实际的Web项目抽取出来的,仅和Web的请求和响应处 理有关,形成一个基础,在开发别的应用项目的时候则可以从 ...

  6. 【原创】三分钟教你学会MVC框架——基于java web开发(2)

    没想到我的上一篇博客有这么多人看,还有几位看完之后给我留言加油,不胜感激,备受鼓励,啥都别说了,继续系列文章之第二篇.(如果没看过我第一篇博客的朋友,可以到我的主页上先浏览完再看这篇文章,以免上下文对 ...

  7. 深入分析Java Web技术内幕(修订版)

    阿里巴巴集团技术丛书 深入分析Java Web技术内幕(修订版)(阿里巴巴集团技术丛书.技术大牛范禹.玉伯.毕玄联合力荐!大型互联网公司开发应用实践!) 许令波 著   ISBN 978-7-121- ...

  8. 大型网站系统与Java中间件实践

    大型网站系统与Java中间件实践(贯通分布式高并发高数据高访问量网站架构与实现之权威著作,九大一线互联网公司CTO联合推荐) 曾宪杰 著   ISBN 978-7-121-22761-5 2014年4 ...

  9. A candidate solution for Java Web Application - current session

    Motivation Do it once, resue for ever. Audience myself, Java Web developers Scope 应用案例 图书借阅系统 阶段1需求: ...

随机推荐

  1. 修改nginx日志格式为json

    Nginx 日志默认为普通文本的格式 /Oct/::: +] "https://boss.zbt.com/finance/partner/create-account-gateway?id= ...

  2. pta l2-28(秀恩爱分得快)

    题目链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805054698012672 题意:给n个人,m张照片,在同一张 ...

  3. HDFS之深入简出(一)

    分布式文件系统HDFS 一:概述 1.HDFS设计目标 2.HDFS核心组件 3.HDFS副本机制 4.HDFS环境搭建 5.HDFS shell命令  java api 6.HDFS读写流程 7.H ...

  4. vue 添加子路由,并对路由重定向

    // 用户信息首页 { path: '/user/index', name: 'userIndex', component: userIndex, redirect: '/user/index/sho ...

  5. f5源站获取http/https访问的真实源IP解决方案

    1.背景 F5负载均衡设备,很多场景下需要采用旁挂的方式部署.为了保证访问到源站的数据流的request和response的TCP路径一致,f5采用了snat机制.但是这样导致源站上看到的来源IP都是 ...

  6. python函数传入参数(默认参数、可变长度参数、关键字参数)

    1.python中默认缺省参数----定义默认参数要牢记一点:默认参数必须指向不变对象! 1 def foo(a,b=1): 2 print a,b 3 4 foo(2) #2 1 5 foo(3,1 ...

  7. AngularJS——第2章 模块化

    第2章 模块化 使用AngularJS构建应用时是以模块化的方式组织的,即将整个应用划分成多个小模块,各个模块有各自的职责,最终实现完整的应用. 2.1 定义应用 通过为任一HTML标签添加ng-ap ...

  8. windows核心编程

    第一章 函数返回值: void:不可能失败.极少数会返回VOID BOOL:失败返回0 HANDLE:失败会返回NULL 或INVALID_HANDLE_VALUE PVOID:失败返回NULL wa ...

  9. A Spectral Technique for Correspondence Problems Using Pairwise Constraints

    Abstract 我们提出了一种有效的谱方法来寻找两组特征之间的一致对应关系.我们建立了一个图的邻接矩阵M,它的节点代表了潜在的对应,而链接上的权重代表潜在的对应之间的成对协议.正确的分配可在彼此之间 ...

  10. hadoop 启动的时候datanode报错 Problem connecting to server

    刚配置好的hadoop,namenode可以正常开启,但是datanode却不停的报错,并且不能正常启动: 2014-05-04 10:43:33,970 WARNorg.apache.hadoop. ...