- 博客(12)
- 收藏
- 关注
原创 layui框架编写动态表格以及添加按钮
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <meta name="renderer" content="webkit"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> &
2021-01-08 20:06:38
2444
2
原创 javaScript对html的添加和删除操作
<style> html{ width: 100%; height: 100%; position: relative; } div{ border: 1px solid blue; } .box{ position: absolute; top: 50%;
2020-12-27 19:01:52
348
原创 文档流
<div class="div1">我是块状元素1</div><div class="div2">我是块状元素2</div><div class="div3">我是块状元素3</div><style>.div1{float:left}.div1{float:left}</style>当第一个div和第二个div都添加浮动后,两个div会排列在一行,但是第三个div会覆盖到前两个里面去,因为前两个绝对
2020-12-20 21:24:24
73
1
原创 JDBC对数据库增删改的封装
private static final String CLASS_FORNAME = "com.mysql.jdbc.Driver";private static final String URL = "jdbc:mysql://127.0.0.1:3306/test";private static final String USER = "ROOT";private static final String PASSWORD = "123456";static{ try {
2020-12-13 20:09:08
110
原创 数据库
CREATE PROCEDURE pro3(empName VARCHAR(30)) BEGIN DECLARE empJob VARCHAR(30); SELECT job into empJob FROM emp WHERE ename = empName; if empJob is null then set empJob = '普通员工'; END IF; UPDATE emp set job = empJob where ename = empName; SELE.
2020-12-06 21:13:54
54
原创 目录遍历子文件
List<File> list = new ArrayList(); public void show(File file){ File[] f = file.listFiles(); for(File file2:f){ if(file2.isDirectory()){ show(file2); }else{ list.add(file2); } }}主方法Test1 t = new Test1(); File file = new
2020-11-29 21:11:32
81
原创 动态日历
Calendar c = Calendar.getInstance(); Scanner sc = new Scanner(System.in); System.out.println("请输入年份"); int year = sc.nextInt(); System.out.println("请输入月份"); int month = sc.nextInt(); System.out.println("===================日历:【"+year +"】年【" .
2020-11-22 21:46:08
124
原创 2020-11-22
Calendar a = Calendar.getInstance(); long x = a.getTimeInMillis(); System.out.println(x); a.set(2000, 10, 20); long y = a.getTimeInMillis(); System.out.println(y); long day = ((x-y)/(1000*60*60*24)); System.out.println(day);这是一个比较好玩的一个代码块,比
2020-11-22 20:41:20
62
原创 2020-11-15
给大家带来一个java中的增删改查吧,首先要定义一个增删查改的对象的属性类,还有一个增删查改类,再加上一个测试类,这是基本组成.private int sno; private String name; private String sex; private int age; private String major; private double score;这几个是最基本的属性然后,后面的方法Alt+Shift+s快捷方式生成get和set方法,在定义两个构造器出来,一个是空构造器再加上一
2020-11-15 21:06:02
66
原创 equals重写
属性private int id; private String name; private String sex; private int age;构造方法public Student(int id, String name, String sex, int age) { super(); this.id = id; this.name = name; this.sex = sex; this.age = age; }封装public boolean equals(O
2020-11-15 20:50:17
139
原创 递归
封装double h = 100; double s = 100; public double hight(int a) { if(a == 1) { return h / 2; }else { return hight(--a)/2; } } public double allHight(int a) { if(a == 1) { return 100; }else { s += allHight(--a)/2 + h/2; return s
2020-11-07 22:24:49
69
原创 JAVA使用二维数组表示任意矩阵的转置
Scanner sc = new Scanner(System.in); System.out.println("请输入矩阵的规格:"); int m = sc.nextInt(); int n = sc.nextInt(); int[][] buf = new int[m][n]; int[][] buf1 = new int[n][m]; for(int a = 0; a < m; a++) { for(int b = 0; b < n; b++) { .
2020-11-01 20:54:26
1340
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人