下载地址:http://download.csdn.net/detail/qq_33599520/9790629

项目结构:

UserAction

package com.mstf.action;

import com.mstf.entity.Detail;
import com.mstf.entity.User; import com.mstf.service.UserService; import com.opensymphony.xwork2.ActionContext; import java.sql.Timestamp; import java.util.List;
import java.util.Map; public class UserAction {
private String msg; // 登录失败提示信息
private User user;
private Detail detail;
private String sheng;
private String shi;
private List<User> userList;
// 获得Session
Map<String, Object> session = ActionContext.getContext().getSession(); public User getUser() {
return user;
} public void setUser(User user) {
this.user = user;
} public String getMsg() {
return msg;
} public void setMsg(String msg) {
this.msg = msg;
} public List<User> getUserList() {
return userList;
} public void setUserList(List<User> userList) {
this.userList = userList;
} public Detail getDetail() {
return detail;
} public void setDetail(Detail detail) {
this.detail = detail;
} public String getSheng() {
return sheng;
} public void setSheng(String sheng) {
this.sheng = sheng;
} public String getShi() {
return shi;
} public void setShi(String shi) {
this.shi = shi;
} // 根据账号查询用户基本信息
public String userInfo() throws Exception {
Map<String, Object> session = ActionContext.getContext().getSession();
userList = UserService.userInfo((String) session.get("u_no")); return "infoSucc";
} // 登录
public String login() throws Exception {
String u_no = user.getU_no();
String u_pwd = user.getU_pwd(); if (UserService.userLogin(u_no, u_pwd)) {
session.put("u_no", u_no);
userInfo(); return "loginSucc";
} else {
msg = "您输入的账号或密码有误,请稍后重试!"; return "fail";
}
} // 退出登录
public String outLogin() {
session.remove("u_no");
msg = "退出成功"; return "outSucc";
} // 添加详情
public String add() throws Exception {
// 获得Request
String u_no = (String) session.get("u_no");
String[] d_city = detail.getD_city();
String d_whither = sheng + shi + ",";
String[] d_whithers = d_whither.split(",");
String[] d_type = detail.getD_type();
String[] d_intent = detail.getD_intent();
Timestamp[] d_start_date = detail.getD_start_date();
Timestamp[] d_stop_date = detail.getD_stop_date();
int[] d_business_number = detail.getD_business_number(); if ((null == d_city) || (null == d_whithers) || (null == d_intent) ||
(null == d_business_number)) {
session.put("addMsg", "带有*号的是必填项!"); return "addFail";
} int result = UserService.add(d_city, d_whithers, d_type, d_intent,
d_start_date, d_stop_date, d_business_number, u_no); if (result > 0) {
session.put("addMsg", "添加成功!"); return "addSucc";
} else {
session.put("addMsg", "添加失败!"); return "addFail";
}
}
}

  BaseDao

package com.mstf.dao;

import com.mstf.db.DbHelper;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet; /**
* 增删改查公共方法
* @author wangzheng
*
*/
public class BaseDao {
private static ResultSet ret;
private static int result; // 查询通用方法
public static ResultSet query(String sql, Connection conn,
PreparedStatement pst) throws Exception {
conn = DbHelper.getConnection();
pst = conn.prepareStatement(sql);
ret = pst.executeQuery(); return ret;
} // 添加,删除,修改公共方法
public static int add_update_del(Connection conn, PreparedStatement pst,
String sql) throws Exception {
conn = DbHelper.getConnection();
pst = conn.prepareStatement(sql);
result = pst.executeUpdate(); return result;
}
}

  UserDao

package com.mstf.dao;

import com.mstf.entity.Detail;
import com.mstf.entity.User; import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.util.ArrayList;
import java.util.List; public class UserDao extends BaseDao {
private static List<User> users;
private static List<Detail> details;
private static User user;
private static Detail detail;
private static Connection conn;
private static String sql;
private static PreparedStatement pst;
private static ResultSet ret;
private static int result; // 登录查询
public static boolean queryLogin(User user) throws Exception {
sql = "SELECT * FROM `user` WHERE `u_no` = '" + user.getU_no() +
"' AND `u_pwd` = '" + user.getU_pwd() + "'";
ret = BaseDao.query(sql, conn, pst); if (ret.next()) {
return true;
} return false;
} // 查询对应用户基本信息
public static List<User> queryUserInfo(User user) throws Exception {
users = new ArrayList<User>();
sql = "SELECT * FROM `user` WHERE `u_no` = '" + user.getU_no() + "'";
ret = BaseDao.query(sql, conn, pst); while (ret.next()) {
user = new User();
user.setU_name(ret.getString("u_name"));
user.setU_number(ret.getString("u_number"));
user.setU_post(ret.getString("u_post"));
user.setU_lv(ret.getString("u_lv"));
user.setU_position(ret.getString("u_position"));
user.setU_company(ret.getString("u_company"));
users.add(user);
} return users;
} // 添加出差详情
public static int add(Detail detail) throws Exception {
if ((detail != null) && !detail.equals("")) {
for (int i = 0; i < detail.getD_city().length; i++) {
sql = "INSERT INTO `detail` VALUES(NULL,'" +
detail.getD_city()[i] + "','" + detail.getD_whither()[i] +
"','" + detail.getD_type()[i] + "','" +
detail.getD_intent()[i] + "','" +
detail.getD_start_date()[i] + "','" +
detail.getD_stop_date()[i] + "'," +
detail.getD_business_number()[i] +
",(SELECT `u_id` FROM `user` WHERE `u_no` = '" +
detail.getUser().getU_no() + "'))";
result = BaseDao.add_update_del(conn, pst, sql);
}
} return result;
}
}

  DbHelper

package com.mstf.db;

import java.sql.Connection;
import java.sql.DriverManager; public class DbHelper {
private static String url = "jdbc:mysql://127.0.0.1:3306/list_hotel"; // 数据库地址
private static String userName = "root"; // 数据库用户名
private static String passWord = "root"; // 数据库密码
private static Connection conn; private DbHelper() {
} public static Connection getConnection() {
if (null == conn) {
try {
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection(url, userName, passWord);
} catch (Exception e) {
e.printStackTrace();
}
} return conn;
} public static void main(String[] args) { // 测试数据库是否连通
System.out.println(getConnection());
}
}

  Detail

package com.mstf.entity;

import java.sql.Timestamp;

public class Detail { // 模型类

    private int d_id;
private String[] d_city;
private String[] d_whither;
private String[] d_type;
private String[] d_intent;
private Timestamp[] d_start_date;
private Timestamp[] d_stop_date;
private int[] d_business_number;
private User user; public int getD_id() {
return d_id;
} public void setD_id(int d_id) {
this.d_id = d_id;
} public String[] getD_city() {
return d_city;
} public void setD_city(String[] d_city) {
this.d_city = d_city;
} public String[] getD_whither() {
return d_whither;
} public void setD_whither(String[] d_whither) {
this.d_whither = d_whither;
} public String[] getD_type() {
return d_type;
} public void setD_type(String[] d_type) {
this.d_type = d_type;
} public String[] getD_intent() {
return d_intent;
} public void setD_intent(String[] d_intent) {
this.d_intent = d_intent;
} public Timestamp[] getD_start_date() {
return d_start_date;
} public void setD_start_date(Timestamp[] d_start_date) {
this.d_start_date = d_start_date;
} public Timestamp[] getD_stop_date() {
return d_stop_date;
} public void setD_stop_date(Timestamp[] d_stop_date) {
this.d_stop_date = d_stop_date;
} public int[] getD_business_number() {
return d_business_number;
} public void setD_business_number(int[] d_business_number) {
this.d_business_number = d_business_number;
} public User getUser() {
return user;
} public void setUser(User user) {
this.user = user;
}
}

  User

package com.mstf.entity;

public class User { // 模型类

    private int u_id;
private String u_no;
private String u_pwd;
private String u_name;
private String u_number;
private String u_post;
private String u_lv;
private String u_position;
private String u_company; public int getU_id() {
return u_id;
} public void setU_id(int u_id) {
this.u_id = u_id;
} public String getU_no() {
return u_no;
} public void setU_no(String u_no) {
this.u_no = u_no;
} public String getU_pwd() {
return u_pwd;
} public void setU_pwd(String u_pwd) {
this.u_pwd = u_pwd;
} public String getU_name() {
return u_name;
} public void setU_name(String u_name) {
this.u_name = u_name;
} public String getU_number() {
return u_number;
} public void setU_number(String u_number) {
this.u_number = u_number;
} public String getU_post() {
return u_post;
} public void setU_post(String u_post) {
this.u_post = u_post;
} public String getU_lv() {
return u_lv;
} public void setU_lv(String u_lv) {
this.u_lv = u_lv;
} public String getU_position() {
return u_position;
} public void setU_position(String u_position) {
this.u_position = u_position;
} public String getU_company() {
return u_company;
} public void setU_company(String u_company) {
this.u_company = u_company;
}
}

  UserService

package com.mstf.service;

import com.mstf.dao.UserDao;

import com.mstf.entity.Detail;
import com.mstf.entity.User; import java.sql.Timestamp; import java.util.List; public class UserService {
private static User user;
private static Detail detail; // 登录
public static boolean userLogin(String u_no, String u_pwd)
throws Exception {
user = new User();
user.setU_no(u_no);
user.setU_pwd(u_pwd); return UserDao.queryLogin(user);
} // 查询用户基本信息
public static List<User> userInfo(String u_no) throws Exception {
user = new User();
user.setU_no(u_no); return UserDao.queryUserInfo(user);
} // 添加详情
public static int add(String[] d_city, String[] d_whither, String[] d_type,
String[] d_intent, Timestamp[] d_start_date, Timestamp[] d_stop_date,
int[] d_business_number, String u_no) throws Exception {
user = new User();
user.setU_no(u_no);
detail = new Detail();
detail.setD_city(d_city);
detail.setD_whither(d_whither);
detail.setD_type(d_type);
detail.setD_intent(d_intent);
detail.setD_start_date(d_start_date);
detail.setD_stop_date(d_stop_date);
detail.setD_business_number(d_business_number);
detail.setUser(user); return UserDao.add(detail);
}
}

  struts.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd"> <struts>
<!-- 热部署 -->
<constant name="struts.devMode" value="true"></constant>
<!-- 指定语言 -->
<constant name="struts.locale" value="zh_CN"></constant>
<!-- 指定编码 -->
<constant name="struts.i18n.encoding" value="utf-8"></constant>
<!-- 是否支持动态方法调用 -->
<constant name="struts.enable.DynamicMethodInvocation" value="true"/> <package name="mstf" extends="struts-default" namespace="/">
<!-- 默认界面 -->
<!--<default-action-ref name="login"></default-action-ref>-->
<action name="login">
<result>/login.jsp</result>
</action> <action name="UserAction" class="com.mstf.action.UserAction">
<!-- 登录 -->
<result name="loginSucc">/index.jsp</result>
<result name="fail">/login.jsp</result>
<!-- 退出登录 -->
<result name="outSucc">/login.jsp</result>
<!-- 用户信息 -->
<result name="infoSucc">/index.jsp</result>
<!-- 添加出差详情 -->
<result name="addSucc" type="redirectAction">
<param name="actionName">UserAction!userInfo</param>
</result>
<result name="addFail" type="redirectAction">
<param name="actionName">UserAction!userInfo</param>
</result>
</action>
</package> </struts>

  web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> <!-- 过滤器 用于初始化struts2 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter> <!-- 用于struts2 的过滤器映射 -->
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> </web-app>

  index.css

.center{text-align: center;}
.login-page {
width: 360px;
padding: 8% 0 0;
margin: auto;
}
.form {
position: relative;
z-index: 1;
background: #FFFFFF;
max-width: 360px;
margin: 0 auto 100px;
padding: 45px;
text-align: center;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
}
.form input {
font-family: "Roboto", sans-serif;
outline: 0;
background: #f2f2f2;
width: 100%;
border: 0;
margin: 0 0 15px;
padding: 15px;
box-sizing: border-box;
font-size: 14px;
}
.form button {
font-family: "Microsoft YaHei","Roboto", sans-serif;
text-transform: uppercase;
outline: 0;
background: #4CAF50;
width: 100%;
border: 0;
padding: 15px;
color: #FFFFFF;
font-size: 14px;
-webkit-transition: all 0.3 ease;
transition: all 0.3 ease;
cursor: pointer;
}
.form button:hover,.form button:active,.form button:focus {
background: #43A047;
}
.form .message {
margin: 15px 0 0;
color: #b3b3b3;
font-size: 12px;
}
.form .message a {
color: #4CAF50;
text-decoration: none;
}
.form .register-form {
display: none;
}
.container {
position: relative;
z-index: 1;
max-width: 300px;
margin: 0 auto;
}
.container:before, .container:after {
content: "";
display: block;
clear: both;
}
.container .info {
margin: 50px auto;
text-align: center;
}
.container .info h1 {
margin: 0 0 15px;
padding: 0;
font-size: 36px;
font-weight: 300;
color: #1a1a1a;
}
.container .info span {
color: #4d4d4d;
font-size: 12px;
}
.container .info span a {
color: #000000;
text-decoration: none;
}
.container .info span .fa {
color: #EF3B3A;
}
body {
background: #76b852; /* fallback for old browsers */
background: -webkit-linear-gradient(right, #76b852, #8DC26F);
background: -moz-linear-gradient(right, #76b852, #8DC26F);
background: -o-linear-gradient(right, #76b852, #8DC26F);
background: linear-gradient(to left, #76b852, #8DC26F);
font-family: "Roboto", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.shake_effect{
-webkit-animation-name: shake;
animation-name: shake;
-webkit-animation-duration: 1s;
animation-duration: 1s;
}
@-webkit-keyframes shake {
from, to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
} 10%, 30%, 50%, 70%, 90% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
} 20%, 40%, 60%, 80% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
} @keyframes shake {
from, to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
} 10%, 30%, 50%, 70%, 90% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
} 20%, 40%, 60%, 80% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
}
p.center{
color: #fff;font-family: "Microsoft YaHei";
}

  index.js

var index=0;
function del_detail(val){
if(index==0){
alert("最后一个不能删");
}else{
if(index>0){
$(val).parent().parent().parent().parent().parent().remove();
index--;
}
}
}
function add_detail(){
if(index==1){
alert("最多只能添加2个");
}else{
if(index<1){
$("#business_detail").clone().insertAfter("#business_detail_new");
index++;
}
}
} /* 以下为省市级联 */
var array = new Array();
array["湖北省"] = ["潜江","荆门","荆州","武汉","孝感","十堰","襄阳","黄冈","恩施","天门"];
array["湖南省"] = ["海南","海口"];
function a(){
for (var index in array) {
var opt = document.createElement("option");
opt.value = index;
opt.text = index;
document.getElementById("sel").appendChild(opt);
}
c();
} function b(){
document.getElementById("selone").innerHTML="";
var sheng = document.getElementById("sel").value;
for (var i=1;i<sheng.length;i++) {
var opt = document.createElement("option");
opt.value = array[sheng][i-1];
opt.text = array[sheng][i-1];
document.getElementById("selone").appendChild(opt);
} } function c(){
document.getElementById("selone").innerHTML="";
var sheng = document.getElementById("sel").value;
var shi=array[sheng];
for (var i=0;i<shi.length;i++) {
var opt=document.createElement("option");
opt.value=shi[i];
opt.text=shi[i];
document.getElementById("selone").appendChild(opt);
}
}

  index.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>出差申请表</title>
<script src="js/jquery-2.1.1.min.js" type="text/javascript"></script>
<script src="js/index.js" type="text/javascript"></script>
<style type="text/css">
.showText{
border: none;
margin-left: 5px;
margin-bottom: 2px;
}
</style>
</head>
<body onload="a()">
<center>
<h1>出差申请表</h1>
<h4>
<font color="red">当前登录用户:${sessionScope.u_no}</font>
<a href="UserAction!outLogin">退出登录</a>
</h4> <fieldset style="width: 600px">
<legend>
<h2>申请人信息</h2>
</legend> <table>
<tr>
<td> </td>
</tr>
<!--个人信息-->
<c:forEach items="${userList}" var="user">
<tr>
<td>申请人:
<input value="${user.u_name}" class="showText" readonly="readonly">
</td>
<td>工号:
<input value="${user.u_number}" class="showText" readonly="readonly">
</td>
</tr>
<tr>
<td>部门:
<input value="${user.u_post}" class="showText" readonly="readonly">
</td>
<td>等级:
<input value="${user.u_lv}" class="showText" readonly="readonly">
</td>
</tr>
<tr>
<td>职位:
<input name="user_post_name" value="${user.u_position}" class="showText" readonly="readonly">
</td>
<td>所属公司:
<input name="user_company" value="${user.u_company}" class="showText" readonly="readonly">
</td>
</tr>
</c:forEach>
</table>
</fieldset>
<br />
<!--出差明细-->
<form action="UserAction!add" method="post">
<fieldset style="width: 600px" id="business_detail">
<legend>
<h2>出差明细</h2>
</legend>
<table>
<tr>
<td>
<font color="red">*</font>
出发城市:
<input name="detail.d_city">
</td>
<td>
<input type="button" onclick="del_detail(this)" value="删除">
</td>
</tr>
<tr> <td>
<font color="red">*</font>出差地点:
省份:<select id="sel" onchange="c()" name="sheng"></select>
城市:<select id="selone" name="shi"></select>
</td>
</tr>
<tr>
<td>
<font color="red">*</font>
出差类型:
<select name="detail.d_type">
<option value="出差">出差</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<font color="red">*</font>
出差目的:
<textarea name="detail.d_intent" placeholder="目的" style="width: 500px; height: 100px;"></textarea>
</td>
</tr> <tr>
<td>
<font color="red">*</font>
预计时间:
<input type="datetime-local" value="2015-09-24T13:00:00" name="detail.d_start_date"/>
</td>
<td>
<input type="datetime-local" value="2015-09-24T13:00:00" name="detail.d_stop_date"/>
</td>
</tr>
<tr>
<td>
预计出差天数 :<input name="detail.d_business_number" placeholder="预计出差天数" />
</td>
</tr>
</table>
</fieldset> <div id="business_detail_new"></div> <br>
<input type="button" onclick="add_detail()" value="增加"/>
<input type="submit" value="提交" />
<font color="red">${sessionScope.addMsg}</font>
</form>
</center>
</body>
</html>

  login.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>登录•</title>
<link href="css/index.css" rel="stylesheet" type="text/css"/>
<script src="js/jquery-2.1.1.min.js" type="text/javascript"></script>
<script src="js/index.js" type="text/javascript"></script>
</head>
<body>
<div class="htmleaf-container">
<div id="wrapper" class="login-page">
<div id="login_form" class="form">
<form class="login-form" action="UserAction!login" method="post">
<input type="text" placeholder="帐号" id="user_name" name="user.u_no"/>
<input type="password" placeholder="密码" id="password" name="user.u_pwd"/>
<input type="submit" value="登录" id="login">
<p class="message">
还没账号?
<a href="#">立即注册</a>
</p>
<p>
<font color="red">${requestScope.msg}</font>
</p>
</form>
</div>
</div>
</div>
</body>
</html>

  

基于Struts2+MySQL的多表出差明细表单的更多相关文章

  1. 再学ajax--第二天 | 基于php+mysql+ajax的表单注册、登录、注销

    写在前面 ajax学习到了第二天,这次是用第一天封装的ajax函数,后端使用了php+mysql实现基本的注册,登录,注销. php是我前几个月get到的技能,我已经学习到了面向对象,知道各修饰符的含 ...

  2. 基于Struts2框架实现登录案例 之 使用Struts2标签库简化表单+继承ActionSupport完成输入交验

    一,使用Struts2标签库简化表单 在文章[基于Struts2框架实现登录案例]的基础上,通过使用Struts标签库可以简化登录页面login2.jsp <%@ page language=& ...

  3. Java互联网架构-Mysql分库分表订单生成系统实战分析

    概述 分库分表的必要性 首先我们来了解一下为什么要做分库分表.在我们的业务(web应用)中,关系型数据库本身比较容易成为系统性能瓶颈,单机存储容量.连接数.处理能力等都很有限,数据库本身的“有状态性” ...

  4. 基于struts2的学生报道管理系统(附github源码地址)

    本项目参考了<java web轻量级开发全体验>,加入了对mysql的支持. 一.基本业务功能 通过struts2框架,结合mysql数据库构建一个学生报到管理系统,来模拟学生报到登记的过 ...

  5. mydumper 快速高效备份mysql,按照表生成备份文件,快速恢复

    Mydumper是一个针对MySQL和Drizzle的高性能多线程备份和恢复工具.开发人员主要来自MySQL,Facebook,SkySQL公司.目前已经在一些线上使用了Mydumper. Mydum ...

  6. MYSQL分库分表和不停机更改表结构

    在MYSQL分库分表中我们一般是基于数据量比较大的时间对mysql数据库一种优化的做法,下面我简单的介绍一下mysql分表与分库的简单做法. .分库分表 很明显,一个主表(也就是很重要的表,例如用户表 ...

  7. mysql的内存表和临时表

    内存表: session $ mysql -uroot root@(none) ::>use test Database changed root::>CREATE TABLE tmp_m ...

  8. MYSQL的全表扫描,主键索引(聚集索引、第一索引),非主键索引(非聚集索引、第二索引),覆盖索引四种不同查询的分析

    文章出处:http://inter12.iteye.com/blog/1430144 MYSQL的全表扫描,主键索引(聚集索引.第一索引),非主键索引(非聚集索引.第二索引),覆盖索引四种不同查询的分 ...

  9. MySQL 行锁 表锁机制

    MySQL 表锁和行锁机制 行锁变表锁,是福还是坑?如果你不清楚MySQL加锁的原理,你会被它整的很惨!不知坑在何方?没事,我来给你们标记几个坑.遇到了可别乱踩.通过本章内容,带你学习MySQL的行锁 ...

随机推荐

  1. 第二次phython作业

    第一题:编写程序,生成一个包含50个随机整数的列表,然后删除其中所有奇数.(注意保证删除操作的效率) import random x=[random.randint(0,100)for i in ra ...

  2. _00017 Kafka的体系结构介绍以及Kafka入门案例(0基础案例+Java API的使用)

    博文作者:妳那伊抹微笑 itdog8 地址链接 : http://www.itdog8.com(个人链接) 博客地址:http://blog.csdn.net/u012185296 博文标题:_000 ...

  3. Cocos2d-x 常见宏

    1)NS_CC_BEGIN cocos2d命名空间開始 2) NS_CC_END  cocos2d命名空间结束 3)USING_NS_CC 声明cocos2d命名空间 4)CC_SYNTHESIZE_ ...

  4. hdu2546 饭卡 01-背包问题

    转载请注明出处:http://blog.csdn.net/u012860063 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2546 Problem ...

  5. Android程序全然退出的三种方法

    1. Dalvik VM的本地方法 android.os.Process.killProcess(android.os.Process.myPid())    //获取PID,眼下获取自己的也仅仅有该 ...

  6. 在GitHub上使用Hexo搭建静态博客

    搭建静态博客须要一个前提是电脑上有安装git而且有github帐号,这个不懂能够看廖雪峰先生的git教程 1.下载nodejs.在官网上能够下载 2.使用git进入你新建的一个目录,输入命令 npm ...

  7. 微信重排版 URL

    http://qbview.url.cn/getResourceInfo?appid=62&url=https%3A%2F%2Fcodepen.io%2Fbenjamminf%2Ffull%2 ...

  8. 07:清泉-改(prime+堆)

    时间限制:  10000ms 单个测试点时间限制:  1000ms 内存限制:  512000kB 描述 华北电力大学可以抽象为一张有n个点m条边的无向图. 现在所有的边都断了. 修复每条边都有个不同 ...

  9. 中文版 ImageNet Classification with Deep Convolutional Neural Networks

    ImageNet Classification with Deep Convolutional Neural Networks 摘要 我们训练了一个大型深度卷积神经网络来将ImageNet LSVRC ...

  10. RabbitMq笔记()

    RabbitMq 就是类似于一个数据库样式的操作工具. rabbit解释 有用户名登录密码之类的,还可以创建用户名,创建作用文件之类的. 2. 3.