- 博客(28)
- 收藏
- 关注
原创 二分查找
public class Demo { public static void main(String[] args) { int[] arr={1,5,22,22,22,88,2032,5823}; List<Integer> sort = sort(arr, 0, arr.length, 22); System.out.println(sort); } public static List<Integer>.
2020-07-17 08:21:25 124 1
原创 模拟简单的哈希表
import java.util.Scanner;public class Demo { public static void main(String[] args) { HashTab hashTab = new HashTab(7); Scanner scanner = new Scanner(System.in); String key=""; while (true){ System.out.pr.
2020-07-08 18:12:06 208
原创 后端传入时间前端时间格式为yyyy-MM-dd
<!--empc为后端返回的的对象--> <el-table-column prop="ecdate" width="95" align="left" label="奖罚日期"> <template slot-scope="scope">.
2020-06-28 18:30:02 1469
原创 快速排序
public class Demo { public static void main(String[] args) { int[] arr1=new int[8000000]; for (int i = 0; i <arr1.length ; i++) { arr1[i]=(int)(Math.random()*8000000); } long timeMillis = System.currentTime.
2020-06-13 10:58:32 111
原创 基数排序
package com.itguigu.jishupaixu;public class Demo { public static void main(String[] args) { int[] arr1=new int[5000000]; for (int i = 0; i <arr1.length ; i++) { arr1[i]=(int)(Math.random()*8000000); } l.
2020-05-23 16:12:14 91
原创 地图显示坐标
<!DOCTYPE html><html><head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Baidu Map </title> .
2020-05-10 15:42:52 460
原创 希尔排序
public class Demo { public static void main(String[] args) { int[] arr={8,9,1,7,2,3,5,4,6,0}; int[] arr1=new int[80000]; for (int i = 0; i <arr1.length ; i++) { ...
2020-05-07 10:04:31 101
原创 选择排序
public class Demo { public static void main(String[] args) { int[] arr1=new int[80000]; for (int i = 0; i <arr1.length ; i++) { arr1[i]=(int)(Math.random()*80000);...
2020-05-04 09:06:13 77
原创 冒泡排序
public class Demo { //冒泡算法是对相邻元素进行交换 public static void main(String[] args) { int[] arr1=new int[80000]; for (int i = 0; i <arr1.length ; i++) { arr1[i]=(int)(...
2020-05-04 09:05:39 76
原创 对递归的简单应用
public class Demo { public static void main(String[] args) { int[][] map = new int[7][7]; for (int i = 0; i < 7; i++) { map[0][i] = 1; map[6][i] = 1;...
2020-05-03 16:56:29 102
原创 springsecurity简单配置应用
导入依赖 <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> <version&g...
2020-04-26 16:53:08 212
原创 数组模拟栈的实现
package com.itguigu.stack;public class Demo { public static void main(String[] args) { StackDemo stackDemo = new StackDemo(5); stackDemo.add(1); stackDemo.add(2); s...
2020-04-25 17:47:30 148
原创 环形链表的实现和出队列的实现
public class Demo { public static void main(String[] args) { CirccleSingleLinkList linkList=new CirccleSingleLinkList(); linkList.add(10); // linkList.list(); link...
2020-04-22 22:32:57 207
原创 获取指定的URL参数值
//获取指定的URL参数值 http://localhost/pages/setmeal_detail.html?id=3&name=jackfunction getUrlParam(paraName) { var url = document.location.toString(); //alert(url); var arrObj = url.split("...
2020-04-22 16:22:44 234
原创 freemarker的简单测试
导入依赖 <dependencies> <dependency> <groupId>org.freemarker</groupId> <artifactId>freemarker</artifactId> <version&g...
2020-04-21 17:15:00 183
原创 freemarker在spring中简单应用
配置文件freemarker.properties#在消费者存放页面的地方的地址out_print_path=E:/java/IdeaProjects/CZJK/health_parent/health_mobile/src/main/webapp/pagesspring配置文件<?xml version="1.0" encoding="UTF-8"?><be...
2020-04-21 16:55:11 214
原创 spring中redis配置
redis.properties文件#最大分配的对象数redis.pool.maxActive=200#最大能够保持idel状态的对象数redis.pool.maxIdle=50redis.pool.minIdle=10redis.pool.maxWaitMillis=20000#当池内没有返回对象时,最大等待时间redis.pool.maxWait=300#格式:redi...
2020-04-21 16:43:46 1407
原创 定时删除七牛云的垃圾图片
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:aop="http...
2020-04-21 09:19:59 754
原创 单链表的添加,顺序添加,修改和删除
package com.itguigu.LinkArray;//单链表public class Demo { public static void main(String[] args) { HeroNode heroNode=new HeroNode(1,"001"); HeroNode heroNode1=new HeroNode(2,"002")...
2020-04-19 17:36:14 240
原创 短信发送工具类
package com.itheima.utils;import com.aliyuncs.DefaultAcsClient;import com.aliyuncs.IAcsClient;import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;import com.aliyuncs.dysmsapi.model.v2017...
2020-04-19 16:31:39 625
原创 使用mybatis-generator插件生成pojo、接口和简单的sql语句
<!--导入依赖和插件--> <dependencies> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> ...
2020-04-19 15:56:02 218
原创 设置文件下载
@RequestMapping("/download") public void download(HttpServletRequest request, HttpServletResponse response) throws Exception { //获取上下文对象 ServletContext servletContext = request....
2020-04-17 19:10:02 485
原创 dubbo简单应用
依赖jar包 <dependency> <groupId>com.alibaba</groupId> <artifactId>dubbo</artifactId> <version>${dubbo.ver...
2020-04-17 18:59:48 141
原创 java对excel的读和写
专门操作Excelmaven坐标:<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>3.14</version> </dependency> <dependen...
2020-04-17 17:38:06 196
原创 过滤器动态代理实现过滤敏感词汇
package web.itcast.filter;import javax.servlet.*;import javax.servlet.annotation.WebFilter;import java.io.BufferedReader;import java.io.FileNotFoundException;import java.io.FileReader;im...
2020-04-16 14:22:50 191
原创 稀疏数组的实现
package com.itguigu.xishuarray;import java.io.*;public class Demo { public static void main(String[] args) throws IOException { //定义一个数组 int[][] arrs=new int[11][11]; ...
2020-04-16 14:18:00 120
原创 循环队列-预留一位法
对环形队列的一种方法实现package com.itguigu.moniduilie;import java.util.Scanner;public class Demo { public static void main(String[] args) { System.out.println("测试数组环形队列"); HXArray hxA...
2020-04-16 14:14:24 299
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人