SSH未成熟版

本实验采用Spring中配置Action,Spring代理生成Struts的类

-->Dept.java

package
cn.itcast.domain;

 

public
class Dept {

  
private Integer id;

 

  
private String deptno;

  
private String deptname;

 

  
public String getDeptno() {

     
return deptno;

  
}

 

  
public void setDeptno(String deptno) {

     
this.deptno = deptno;

  
}

 

  
public String getDeptname() {

     
return deptname;

  
}

 

  
public void setDeptname(String deptname) {

     
this.deptname = deptname;

  
}

 

  
public Integer getId() {

     
return id;

  
}

 

  
public void setId(Integer id) {

     
this.id = id;

  
}

}

-->Dept.hbm.xml

<?xml
version="1.0" encoding="UTF-8"?>

<!DOCTYPE
hibernate-mapping PUBLIC

   
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"

   
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">

<!--
完成实体类 和 数据表 映射 -->

<hibernate-mapping>

  
<class name="cn.itcast.domain.Dept"
table="dept">

     
<id name="id"
column="dept_id">

       
<generator
class="native"></generator>

     
</id>

     
<!-- 普通属性 -->

     
<property
name="deptno"></property>

     
<property
name="deptname"></property>

  
</class>

</hibernate-mapping>

 

-->
Student

package
cn.itcast.domain;

 

import
java.util.Date;

 

public
class Student {

  
private Integer id;

  
private String number;// 学生学号

  
private String name;// 姓名

  
private String deptno;// 所在院系编号

  
private String sex;// 学生性别

  
private Date birthday;// 学生出生日期

 

  
public Integer getId() {

     
return id;

  
}

 

  
public void setId(Integer id) {

     
this.id = id;

  
}

 

  
public String getName() {

     
return name;

  
}

 

  
public void setName(String name) {

     
this.name = name;

  
}

 

  
public String getDeptno() {

     
return deptno;

  
}

 

  
public void setDeptno(String deptno) {

     
this.deptno = deptno;

  
}

 

  
public String getNumber() {

     
return number;

  
}

 

  
public void setNumber(String number) {

     
this.number = number;

  
}

 

  
public String getSex() {

     
return sex;

  
}

 

  
public void setSex(String sex) {

     
this.sex = sex;

  
}

 

  
public Date getBirthday() {

     
return birthday;

  
}

 

  
public void setBirthday(Date birthday) {

     
this.birthday = birthday;

  
}

 

  
@Override

  
public String toString() {

     
return "Student [id=" + id + ", number=" + number + ", name=" +
name

          
+ ", deptno=" + deptno + ", sex=" + sex + ",
birthday="

          
+ birthday + "]";

  
}

  

}

-->
Student.hbm.xml

<?xml
version="1.0" encoding="UTF-8"?>

<!DOCTYPE
hibernate-mapping PUBLIC

   
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"

   
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">

<!--
完成实体类 和 数据表 映射 -->

<hibernate-mapping>

  
<class name="cn.itcast.domain.Student"
table="Student">

     
<id name="id"
column="student_id">

       
<generator
class="native"></generator>

     
</id>

     
<!-- 普通属性 -->

     
<property name="number"
length="32"/>

     
<property name="name"
length="32"/>

     
<property name="deptno"
length="32"/>

     
<property name="sex"
length="2"/>

     
<property name="birthday"/>

  
</class>

</hibernate-mapping>

-->StudentDao.java

package
cn.itcast.dao;

 

import
java.util.ArrayList;

import
java.util.Iterator;

import
java.util.List;

import
org.hibernate.Criteria;

import
org.hibernate.Query;

import
org.hibernate.Session;

import
org.hibernate.criterion.Restrictions;

 

import
cn.itcast.domain.Student;

import
cn.itcast.util.HibernateUtil;

 

public
class StudentDao {

  
private int pageSize;

  
private int page;

 

  
public int getPageSize() {

     
return pageSize;

  
}

 

  
public void setPageSize(int pageSize) {

     
this.pageSize = pageSize;

  
}

 

  
public int getPage() {

     
return page;

  
}

 

  
public void setPage(int page) {

     
this.page = page;

  
}

 

  
public List<Student> selectStudentByXing(String
name){

     
Session session =
HibernateUtil.getSession();

     
Criteria  criteria
=session.createCriteria(Student.class);

       
criteria.add(Restrictions.like("name",name+"%"));

     
return criteria.list();

  
}

  
public List<Student> selectStudent(Student student)
{

     
Session session =
HibernateUtil.getSession();

     
Query query = session

     
      .createQuery("from Student as student where
student.name = :name");

     
query.setParameter("name", student.getName());

 

     
List s = query.list();

     
return s;

  
}

 

  
public List<Student> selectStudentIterate() {

     
Session session =
HibernateUtil.getSession();

     
Query query = session.createQuery("from Student");

 

     
query.setFirstResult((page - 1) * pageSize);

     
query.setMaxResults(pageSize);

 

     
List<Student> list = new
ArrayList<Student>();

     
Iterator students = query.iterate();

     
while (students.hasNext()) {

     
   Student student = (Student)
students.next();

       
list.add(student);

     
}

     
return list;

  
}

 

  
public List<Student> selectStudentList() {

     
Session session =
HibernateUtil.getSession();

     
Query query = session.createQuery("from Student");

 

     
query.setFirstResult((page - 1) * pageSize);

     
query.setMaxResults(pageSize);

 

     
return query.list();

  
}

}

-->
StudentDeptDao.java

package
cn.itcast.dao;

 

/*

 *
可加pagesize

 *
pageCount控制每页显示的多少

 */

import
java.util.List;

import
org.hibernate.Query;

import
org.hibernate.Session;

import
cn.itcast.util.HibernateUtil;

 

public
class StudentDeptDao {

  
public List selectStudentDept() {

     
Session session =
HibernateUtil.getSession();

 

     
Query q = session

          
.createQuery("from Student s , Dept d where s.deptno =
d.deptno");

     
List l = q.list();

     
return l;

  
}

}

-->StudentService

package
cn.itcast.service;

 

import
java.util.List;

import
cn.itcast.dao.StudentDao;

import
cn.itcast.domain.Student;

 

public
class StudentService {

  
private StudentDao studentDao;

 

  
public List<Student> selectStudent(Student student)
{

     
studentDao=new StudentDao();

     
return studentDao.selectStudent(student);

  
}

 

  
public List<Student> selectStudentIterate() {

     
studentDao=new StudentDao();

     
return studentDao.selectStudentIterate();

  
}

 

  
public List<Student> selectStudentList() {

     
studentDao=new StudentDao();

     
return studentDao.selectStudentList();

  
}

  
public List<Student> selectStudentListByXing(String name)
{

     
studentDao=new StudentDao();

     
return studentDao.selectStudentByXing(name);

  
}

 

  
public StudentDao getStudentDao() {

     
return studentDao;

  
}

 

  
public void setStudentDao(StudentDao studentDao) {

     
this.studentDao = studentDao;

  
}

  

}

-->StudentDeptService

package
cn.itcast.service;

 

import
java.util.List;

import
cn.itcast.dao.StudentDeptDao;

 

public
class StudentDeptService {

  
private StudentDeptDao studentDeptDao;

  

  
public StudentDeptDao getStudentDeptDao() {

     
return studentDeptDao;

  
}

 

  
public void setStudentDeptDao(StudentDeptDao studentDeptDao)
{

     
this.studentDeptDao = studentDeptDao;

  
}

  
public List selectStudentDept() {

     
return studentDeptDao.selectStudentDept();

  
}

}

 -->StudentAction

package
cn.itcast.action;

àStudentAction

import
java.util.List;

import
cn.itcast.domain.Student;

import
cn.itcast.service.StudentService;

import
com.opensymphony.xwork2.ActionContext;

import
com.opensymphony.xwork2.ActionSupport;

 

public
class StudentAction extends ActionSupport {

  
private static final long serialVersionUID =
1L;

  
private StudentService studentService;

  
private String name;

 

  
public StudentService getStudentService() {

     
return studentService;

  
}

 

  
public void setStudentService(StudentService studentService)
{

     
this.studentService = studentService;

  
}

 

  
public String getName() {

     
return name;

  
}

 

  
public void setName(String name) {

     
this.name = name;

  
}

 

  
@Override

  
public String execute() throws Exception {

     
System.out.println(name);

     
List<Student> sdlistxing =
studentService.selectStudentListByXing(name);

     
if (sdlistxing.size() > 0) {

       
ActionContext.getContext().put("sdlistxing",
sdlistxing);

       
return SUCCESS;

     
} else {

       
return ERROR;

     
}

  
}

}

 

-->StudentDeptAction

package
cn.itcast.action;

 

import
java.util.List;

import
cn.itcast.service.StudentDeptService;

import
com.opensymphony.xwork2.ActionContext;

import
com.opensymphony.xwork2.ActionSupport;

 

public
class StudentDeptAction extends ActionSupport {

  
private static final long serialVersionUID =
1L;

  
private StudentDeptService studentDeptService;

 

  
public StudentDeptService getStudentDeptService() {

     
return studentDeptService;

  
}

 

  
public void setStudentDeptService(StudentDeptService studentDeptService)
{

     
this.studentDeptService = studentDeptService;

  
}

 

  
@Override

  
public String execute() throws Exception {

     
List sdlist = studentDeptService.selectStudentDept();

     
if (sdlist.size() > 0) {

       
ActionContext.getContext().put("sdlist",
sdlist);

       
return SUCCESS;

     
} else {

       
return ERROR;

     
}

  
}

 

}

 

-->showAllStudentDept.jsp

<%@
page language="java"
import="java.util.*,cn.itcast.domain.*"

  
pageEncoding="utf-8"%>

<%@
taglib prefix="s"
uri="/struts-tags"%>

<%

  
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>

<title>show
all student</title>

</head>

<body>

  
<form action=""
method="post">

     
<table border="1" bordercolor="green"
cellspacing="0" width="500px">

       
<tr>

          
<td colspan="6"
align="center"><b>所有学生信息</b></td>

       
</tr>

       
<tr>

          
<th>学 号</th>

          
<th>姓 名</th>

          
<th>性 别</th>

          
<th>生 日</th>

          
<th>系编号</th>

          
<th>系名称</th>

       
</tr>

       
<s:iterator value="sdlist"
var="sd">

          
<tr>

        <!--输出List<Object[]>
-->

             
<td><s:property value="#sd[0].number"
/></td>

             
<td><s:property value="#sd[0].name"
/></td>

             
<td><s:property value="#sd[0].sex"
/></td>

             
<td><s:property value="#sd[0].birthday"
/></td>

             
<td><s:property value="#sd[1].deptno"
/></td>

     
        <td><s:property
value="#sd[1].deptname" /></td>

             
<td>

          
</tr>

       
</s:iterator>

     
</table>

  
</form>

  
<a
href="<%=basePath%>/welcome.jsp">返回主界面</a>

</body>

</html>

-->showAllStudentByXing.jsp

<%@
page language="java"
import="java.util.*,cn.itcast.domain.*"

  
pageEncoding="utf-8"%>

<%@
taglib prefix="s"
uri="/struts-tags"%>

<%

  
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>

<title>show
all student</title>

</head>

<body>

  
<form action=""
method="post">

     
<table border="1" bordercolor="green"
cellspacing="0" width="500px">

       
<tr>

       
   <td colspan="6"
align="center"><b>所有学生信息</b></td>

       
</tr>

       
<tr>

          
<th>id</th>

          
<th>姓 名</th>

          
<th>学 号</th>

          
<th>性 别</th>

          
<th>生日</th>

       
</tr>

       
<s:iterator value="sdlistxing"
var="sdx">

          
<tr>

             
<td><s:property value="#sdx.id"
/></td>

             
<td><s:property value="#sdx.number"
/></td>

             
<td><s:property value="#sdx.name"
/></td>

             
<td><s:property value="#sdx.deptno"
/></td>

             
<td><s:property value="#sdx.sex"
/></td>

             
<td><s:property value="#sdx.birthday"
/></td>

             
<td>

          
</tr>

       
</s:iterator>

     
</table>

  
</form>

  
<a
href="<%=basePath%>/welcome.jsp">返回主界面</a>

</body>

</html>

 

-->
hibernate.cfg.xml

<?xml
version="1.0" encoding="UTF-8"?>

<!DOCTYPE
hibernate-configuration PUBLIC

  
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"

  
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

  
<session-factory>

     
<!-- Database connection settings -->

     
<!-- 配置驱动 -->

     
<property
name="connection.driver_class">com.mysql.jdbc.Driver</property>

     
<property
name="connection.url">jdbc:mysql://127.0.0.1:3306/hibe1</property>

     
<property
name="connection.username">root</property>

     
<property
name="connection.password">root</property>

     
<!-- 是否根据hbm文件生成数据库 -->

     
<property
name="hibernate.hbm2ddl.auto">update</property>

     
<!-- 是否打印sql语句 -->

     
<property
name="show_sql">true</property>

     
<!-- C3P0连接池设定 -->

     
<!-- 使用c3po连接池 配置连接池提供的供应商 -->

     
<property
name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider                                                                                                                                                    
</property>

     
<!-- 配置方言. -->

     
<property
name="dialect">org.hibernate.dialect.MySQLDialect</property>

     
<mapping resource="cn/itcast/domain/Dept.hbm.xml"
/>

     
<mapping resource="cn/itcast/domain/Student.hbm.xml"
/>

  
</session-factory>

</hibernate-configuration>

 

-->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="false"
/>

  
<constant name="struts.i18n.encoding" value="utf-8"
/>

  
<constant name="struts.objectFactory" value="spring"
/>

  
<package name="test" namespace="/"
extends="struts-default">

     
<action name="sddall"
class="cn.itcast.action.StudentDeptAction">

       
<result>/showAllStudentDept.jsp</result>

       
<result
name="error">/showAllStudentDeptError.jsp</result>

     
</action>

  
</package>

  
<package name="test2" namespace="/"
extends="struts-default">

     
<action name="showbyxing"
class="cn.itcast.action.StudentAction">

       
<result>/showAllStudentByXing.jsp</result>

       
<result
name="error">/showAllStudentByXingError.jsp</result>

     
</action>

  

à
applicationContext.xml

<?xml
version="1.0" encoding="UTF-8"?>

<beans
xmlns="http://www.springframework.org/schema/beans"

  
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"

  
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"

  
xmlns:context="http://www.springframework.org/schema/context"

  
xsi:schemaLocation="http://www.springframework.org/schema/beans

  
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd

  
http://www.springframework.org/schema/context

  
http://www.springframework.org/schema/context/spring-context-4.0.xsd

  
http://www.springframework.org/schema/tx

  
http://www.springframework.org/schema/tx/spring-tx-4.0.xsd

  
http://www.springframework.org/schema/aop

  
http://www.springframework.org/schema/aop/spring-aop-4.0.xsd"
>

  
<!-- 配置Action -->

  
<bean id="StudentDeptAction"
class="cn.itcast.action.StudentDeptAction"

     
scope="prototype">

     
<property name="studentDeptService"
ref="studentDeptService" />

  
</bean>

  
<bean id="studentDeptService"
class="cn.itcast.service.StudentDeptService">

     
<property name="studentDeptDao"
ref="studentDeptDao"></property>

  
</bean>

  
<bean id="studentDeptDao"
class="cn.itcast.dao.StudentDeptDao"></bean>

 

  
<!-- 配置Action -->

  
<bean id="StudentAction"
class="cn.itcast.action.StudentAction"

     
scope="prototype">

     
<property name="studentService" ref="studentService"
/>

  
</bean>

  
<bean id="studentService"
class="cn.itcast.service.StudentService">

     
<property name="studentDao"
ref="studentDao"></property>

  
</bean>

  
<bean id="studentDao"
class="cn.itcast.dao.StudentDao"></bean>

</beans>

 

数据库脚本:

后台数据库:

数据库脚本:

--
--------------------------------------------------------

--
主机:                          
127.0.0.1

--
服务器版本:                       
5.5.36-MariaDB - mariadb.org binary distribution

--
服务器操作系统:                     
Win32

-- HeidiSQL
版本:         
        8.0.0.4396

--
--------------------------------------------------------

 

/*!40101 SET
@[email protected]@CHARACTER_SET_CLIENT */;

/*!40101 SET
NAMES utf8 */;

/*!40014 SET
@[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0
*/;

/*!40101 SET
@[email protected]@SQL_MODE, SQL_MODE=‘NO_AUTO_VALUE_ON_ZERO‘
*/;

 

-- 导出 hibe1
的数据库结构

CREATE DATABASE
IF NOT EXISTS `hibe1` /*!40100 DEFAULT CHARACTER SET utf8
*/;

USE
`hibe1`;

 

 

-- 导出  表
hibe1.dept 结构

CREATE TABLE IF
NOT EXISTS `dept` (

  `dept_id`
int(11) NOT NULL AUTO_INCREMENT,

  `deptno`
varchar(255) DEFAULT NULL,

 
`deptname` varchar(255) DEFAULT NULL,

  PRIMARY
KEY (`dept_id`)

) ENGINE=InnoDB
AUTO_INCREMENT=65 DEFAULT CHARSET=utf8;

 

-- 正在导出表 
hibe1.dept 的数据:~2 rows (大约)

DELETE FROM
`dept`;

/*!40000 ALTER
TABLE `dept` DISABLE KEYS */;

INSERT INTO
`dept` (`dept_id`, `deptno`, `deptname`) VALUES

      
(1, ‘d01‘, ‘计算机‘),

      
(2, ‘d02‘, ‘数学‘);

/*!40000 ALTER
TABLE `dept` ENABLE KEYS */;

 

 

-- 导出  表
hibe1.student 结构

CREATE TABLE IF
NOT EXISTS `student` (

 
`student_id` int(11) NOT NULL AUTO_INCREMENT,

  `number`
varchar(32) DEFAULT NULL,

  `name`
varchar(32) DEFAULT NULL,

  `deptno`
varchar(32) DEFAULT NULL,

  `sex`
varchar(2) DEFAULT NULL,

 
`birthday` datetime DEFAULT NULL,

  PRIMARY
KEY (`student_id`)

) ENGINE=InnoDB
AUTO_INCREMENT=1134110143 DEFAULT CHARSET=utf8;

 

-- 正在导出表 
hibe1.student 的数据:~3 rows (大约)

DELETE FROM
`student`;

/*!40000 ALTER
TABLE `student` DISABLE KEYS */;

INSERT INTO
`student` (`student_id`, `number`, `name`, `deptno`, `sex`, `birthday`)
VALUES

      
(1134110140, ‘s001‘, ‘陈新卫‘, ‘d01‘, ‘男‘, ‘2014-04-23
15:20:02‘),

      
(1134110141, ‘s002‘, ‘张三‘, ‘d02‘, ‘男‘, ‘1992-03-13
15:19:41‘),

      
(1134110142, ‘s003‘, ‘张三‘, ‘d02‘, ‘男‘, ‘1992-03-13
15:19:41‘);

/*!40000 ALTER
TABLE `student` ENABLE KEYS */;

/*!40101 SET
SQL_MODE=IFNULL(@OLD_SQL_MODE, ‘‘) */;

/*!40014 SET
FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1,
@OLD_FOREIGN_KEY_CHECKS) */;

/*!40101 SET
[email protected]_CHARACTER_SET_CLIENT */;

SSH未成熟版

时间: 2024-10-24 00:54:46

SSH未成熟版的相关文章

LAMP搭建--未整理版

[[email protected] ~]#yum search  关键字   //安装过程中提示少哪个程序就搜关键字找包名 [[email protected] httpd-2.2.25]# ./configure --prefix=/usr/local/httpd --enable-so --enable-rewrite --enable-cgi --enable-charrset-lite --enable-ssl [[email protected] ~]#useradd -M -s /

OD调试学习笔记7—去除未注册版软件的使用次数限制

OD调试学习笔记7—去除未注册版软件的使用次数限制 本节使用的软件链接 (想自己试验下的可以下载) 一:破解的思路 仔细观察一个程序,我们会发现,无论在怎么加密,无论加密哪里,这个程序加密的目的就是需要你掏腰包来获得更多的功能或者解除限制.那么我们就可以逆向的来思考,如果该程序成功的注册后,那么程序的行为必将发生变化,如NAG去除了,如功能限制没有了等等.也就是说,程序的代码的走法也会跟未注册的时候截然不同.因为程序的行为改变了,那么决定它所有行为的代码走法也会发生变化. 二:认识OD的两种断点

OD调试6—使未注册版软件的功能得以实现

OD调试6—使未注册版软件的功能得以实现 继续开始我OD调试教程的学习笔记. 本次试验对真正的程序进行逆向.(之前的都是为破解而专门设计的小程序) 这次试图对一个“太监版”的程序进行完整化,也就是把限制的功能恢复,把阉割的功能添加等等.用到的知识也是之前提到的,但是会有不同的地方. 试验软件:PixtopianBook.exe(一个通讯录软件) 打开原始程序运行,观察界面: 这是一个通讯录软件,老外写的,很显然,当前是未注册版,试验后发现有功能限制,限制是只能有三个分组,每组不能超过4个人.也就

九度OJ 1016 火星A + B 未AC版,整型存储不下

#include <iostream> #include <string.h> #include <sstream> #include <math.h> #include <vector> #include <algorithm> using namespace std; int susuTable[28]={1}; bool isLear(int num) { if(num==2) return true; else { int i

windows下,python基于SocketServer模拟实现SSH(多线程版)

这两天,学习了python的套接字编程(linux版),我发现好多的资料都是linux的,然而python这个利器显然是跨平台的,所以,我根据linux版的资料来写一点windows的东西,希望对大家有点帮助,另外:本人小菜菜一枚,要是哪里有问题,欢迎指正,谢谢合作. 首先分析一下大概过程: 一.建立连接后,(多个或者一个)客户端将命令行发给服务器: 二.服务器收到命令行后,执行命令: 三.服务器将执行的结果反馈给客户端: 四.多次执行上述过程: 那么,python是怎么解决这几个问题的呢? 一

java处理大数据量任务时的可用思路--未验证版,具体实现方法有待实践

1.Bloom filter 适用范围:可以用来实现数据字典,进行数据的判重,或者集合求交集 基本原理及要点:对于原理来说很简单,位数组+k个独立hash函数.将hash函数对应的值的位数组置1,查找时如果发现所有hash函数对应位都是1说明存在,很明显这个过程并不保证查找的结果是100%正确的.同时也不支持删除一个已经插入的关键字,因为该关键字对应的位会牵动到其他的关键字.所以一个简单的改进就是 counting Bloom filter,用一个counter数组代替位数组,就可以支持删除了.

Linux-四剑客-find-awk-grep-sed解释----未完结版

Linux的四剑客作者:张首富2018/07/15[TOC] find 查找文件或目录 说明 find - search for files in a directory hierarchy 搜索目录层次结构中的文件用来在指定目录下面查找文件或目录,任何位于参数之前的字符串都被视为想在那个目录下面查找 命令格式: `find 目录 选项 参数` 命令选项 -type指定要查找的文件类型. d 目录f 文件l 链接文件实例: [[email protected] tmp]# touch 1.txt

js基础例子购物车升级版(未优化版)

<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>购物车升级版</title> <style> table{border-collapse: collapse} tr td{ border: 1px solid black; text-align: center; } li{list-style:

Linux基础命令及快捷方式(未完版)

命令总结:100个 mkdir 创建目录的命令 mkdir directory ls    -l(long)d(directory)显示目录或者文件 全称list cd    切换目录的层次change directory echo  打印输出内容(printf) vi/vim记事本编辑器 命令模式(:wq :q :q! :wq!)<===>插入模式(esc切换命令模式) w write  q quit   !强制 cat   查看文件内容 cp    -apr拷贝文件或者目录 mv    移