自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

原创 Maven项目settings文件配置

1.本地配置 <localRepository>E:\Java\apache-maven-3.6.1\repository</localRepository>2.阿里云镜像配置 <mirrors> <mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name&gt.

2021-08-20 09:09:18 257

原创 table表格隔行换色

<%-- 表格隔行换色--%>1. <style> table tr:nth-child(even){ background : #F4F4F4 ;} table tr:nth-child(odd){ background : #73B1E0 ;} </style>2. // $("tr:odd").css("background-color","gray") 隔行换色

2021-07-01 09:49:35 358

原创 MySql数据库——定时删除过期数据

1.创建表 //创建一个表 CREATE TABLE accountno( id INT(10) PRIMARY KEY NOT NULL auto_increment, account_number VARCHAR(20) NOT NULL, date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); //查看定时器是否开启, show variables like 'event_sche.

2021-07-01 09:12:33 898

原创 MySql工具类——jdbc

public class JdbcUtil { static String driver= "com.mysql.jdbc.Driver"; static String url = "jdbc:mysql://localhost:3306/kj_01?useUnicode=true&characterEncoding=UTF-8"; static String username = "root"; static String password = "3333";.

2021-07-01 08:57:47 173

原创 jsp:打开index.jsp,直接加载servlet显示数据

window.onload的意思是:事件会在页面加载完成后触发。 <script> window.onload =function () { window.location="http://localhost:8080/路径" } </script> <c:if test="${empty student}"><c:redirect url="xml请求"/> ...

2021-06-30 20:06:25 861

原创 java基础:数组冒泡排序

public static void main(String[] args) { int[] arr = { 3, 4, 2, 1, 5, 8, 7, 6, 9 }; for (int i = 0; i < arr.length - 1; i++) { for (int j = 0; j < arr.length - 1 - i; j++) { if (arr[j] > arr[j + 1]) { int temp; temp ..

2021-05-25 19:47:59 72

原创 java基础:打印九九乘法表

public static void main(String[] args) { // 第一个特点:共9行。 // 第二个特点:第1行1个。第2行2个。第n行n个。 // 9行,循环9次。 for (int i = 1; i < 10; i++) { // 输出行 for (int j = 1; j <= i; j++) { System.out.print(j + "*" + i + "=" + i * j + " "); } ...

2021-05-25 18:32:02 49

原创 java基础:打印菱形

int G = 5;// 打印菱形 for (int i = 1; i <= G - 1; i++) { // 正三角 行数 -1 for (int j = 1; j <= G - i; j++) { // 每一行空格数 System.out.print(" "); } for (int n = 0; n < 2 * i - 1; n++) { // 每一行 * 数 System.out.print("*"); } System..

2021-05-25 10:14:32 52

原创 java基础:打印等腰三角形

// 假设num1 的值是6,第一个for要循环6次, // i=1, j=5, k=1,j循环5次输出5个空格 ,k循环1次输出1个* // i=2, j=4, k=2,j循环4次输出4个空格 ,k循环2次输出2个*...... // i=6, j=0, k=6,j停止循环,k循环6次输出6个*for (int i = 1; i <= 5; i++) { // 确认行数,三角高度 // 空格分布 for (int j = 5 - i; j > 0; j--) ..

2021-05-25 09:57:53 984 2

原创 java基础:Map集合遍历

// 创建map集合,特点:双列集合,用来保存具有一定对应关系的数据 Map map = new HashMap(); // map集合存储元素,user是一个对象 map.put("1", new User("东邪", "53")); map.put("2", new User("西毒", "54")); map.put("3", new User("南帝", "55")); map.put("4", new User("北丐", "56")); map.put("5...

2021-05-21 09:23:58 65

原创 java基础:打印字符串中,各字符出现的次数

// 创建字符串s,打印字符串中各字符出现的次数 String s = "abcabassdasasaf"; // 创建set集合 Set set = new HashSet(); // for 循环,遍历字符串,存进set集合,set集合元素唯一 for (int i = 0; i < s.length(); i++) { set.add(s.substring(i, i + 1)); } // foreach ,遍历set循环 for (Object o :.

2021-05-21 08:45:11 877 1

原创 java基础:字符串去重

// Set集合遍历字符串 public void stringSet(String s) { Set set = new HashSet(); for (int i = 0; i < s.length(); i++) { set.add(s.substring(i, i + 1)); } String ss = ""; for (Object o : set) { ss += o; } System.out.println(ss); } /.

2021-05-20 22:42:17 456

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除