自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 解决私服jar包[WARNING] The POM for xxx is missing, no dependency information available

The POM for xxx is missing, no dependency information available

2022-07-12 16:25:42 5742 2

原创 Java二叉树的遍历、查找、删除

/** * 二叉树 * **/public class BinaryTreeDemo { /** * 前序遍历计数 */ public static int countPreOrderSearch = 0; /** * 中序遍历计数 */ public static int countInfixOrderSearch = 0; /** * 后序遍历计数 */ public static in

2022-02-26 20:11:30 372 1

原创 Java哈希表

哈希表的基本介绍散列表(Hash table,也叫哈希表),是根据关键码值(Key value)而直接进行访问的数据结构。也就是说,它通过把关键码值映射到表中一个位置来访问记录,以加快查找的速度。这个映射函数叫做散列函数,存放记录的数组叫做散列表。哈希表(散列)- Google 上机题有一个公司,当有新的员工员工来报道时,要求将该员工的信息加入(id,性别,年龄,住址),当输入该员工的id时,要求查找到该员工的所有信息要求:不使用数据库,速度越快越好 -> 哈希表(散列)添加时,保证按

2022-01-06 23:05:18 873

原创 Java斐波那契查找

斐波那契(黄金分割法)查找介绍黄金分割点是值把一条线段分割为两部分,使其中一部分与全长之比等于另一部分与这部分之比。取其前三位数字的近似值是0.618。由于按此比例设计的造型十分美丽,因此称为黄金分割,也称为中外比。这是一个神奇的数字,会带来意想不到的效果。斐波那契数列{1, 1, 2, 3, 5, 8, 13, 21, 34, 55},发现斐波那契数列的两个相邻数的比例无限接近黄金分割值0.618原理斐波那契查找原理与二分、插值查找相似,仅仅改变了中间节点mid的位置,mid不再是中间或插值

2021-12-28 23:35:38 294

原创 Java插值查找

插值查找算法介绍插值查找算法类似于二分查找,不同的是插值查找每次从自适应mid处开始查找。将二分查找中的mid索引的公式,low表示左边索引left,hight表示右边索引right,key就是findValint mid = low + (hight - low) * (key - arr[low]) / (arr[hight] - arr[low]);对应前面的代码公式:int mid = left + (right - left) * (findVal - arr[left]) / (arr

2021-12-27 23:46:11 149

原创 Java二分查找

二分查找算法请对一个有序数组进行二分查找,{1, 8, 10, 89, 1000, 1024},输入一个数看看该数组是否存在次数,并且求出下标,如果没有就提示没有这个数{1, 8, 10, 89, 89, 89, 1000, 1024}当一个有序数组中,有多个相同的数值时,如何将所有的数值都查找到,比如 89二分算法的思路分析首先确定该数组的中间的下标mid = (left + right) / 2然后让需要查找的数 findVal 和 arr[mid] 比较findVal > ar

2021-12-19 23:13:08 343

原创 Java线性查找

线性查找又称顺序查找,是一种最简单的查找方法,它的基本思想是从第一个记录开始,逐个比较记录的关键字,直到和给定的K值相等,则查找成功;若比较结果与文件中n个记录的关键字都不等,则查找失败。来源–百度百科public static void main(String[] args) { // 没有顺序的数组 int[] arr = {1, 9, 11, -11, 34, 89}; int index = seqSearch(arr, 2); if (index == -1) { .

2021-12-12 16:39:42 662

原创 Java基数排序

public static void main(String[] args) { int[] array = {53, 3, 542, 748, 14, 214}; redisSort(array); System.out.println(Arrays.toString(array));}/** * 基数排序,空间换时间 * * @param array */public static void redisSort(int[] array) { // 得到数组

2021-10-09 22:57:58 64

原创 Java归并排序

public static void main(String[] args) { int[] arr = {8, 4, 5, 7, 1, 3, 6, 2}; mergeSort(arr, 0, arr.length - 1); System.out.println(Arrays.toString(arr));}/** * 归并排序 * * @param arr * @param low * @param high */public static void merg

2021-10-09 21:51:44 71

原创 Java快速排序

public static void main(String[] args) { int[] array = {3, 4, 6, 7, 2, 7, 2, 8, 0}; quickSort(array, 0, array.length - 1); System.out.println(Arrays.toString(array));}/** * 快速排序 * * @param array * @param start * @param end */public st

2021-10-09 17:30:40 83

原创 Java希尔排序

交换法希尔排序public static void main(String[] args) { int[] array = {8, 9, 1, 7, 2, 3, 5, 4, 6, 0}; shellSort2(array); System.out.println(Arrays.toString(array));}/** * 交换法希尔排序,8000000数据 21ms * * @param array */public static void shellSort(i

2021-10-09 15:35:12 74

原创 Java插入排序

public static void main(String[] args) { int[] array = {101, 34, 119, 1}; insertSort(array); System.out.println(Arrays.toString(array));}/** * 插入排序 * * @param array */public static void insertSort(int[] array) { int insertVal = 0;

2021-10-08 16:58:06 75

原创 Java选择排序

public static void main(String[] args) { int[] array = {101, 34, 119, 1, 136, 185}; selectSort(array); System.out.println("排序后:" + Arrays.toString(array));}/** * 选择排序,时间复杂度 O(n²) * * @param array */public static void selectSort(int[] ar

2021-10-08 15:56:50 67

原创 Java冒泡排序

public static void main(String[] args) { int[] array = {3, 9, -1, 10, 20}; bubbleSort(array); System.out.println("排序后:" + Arrays.toString(array));}/** * 冒泡排序,时间复杂度 O(n²) * * @param array */public static void bubbleSort(int[] array) {

2021-10-08 15:55:15 75

原创 Spring Cloud Alibaba 组件版本选择

下表为按时间顺序发布的 Spring Cloud Alibaba 以及对应的适配 Spring Cloud 和 Spring Boot 版本关系(由于 Spring Cloud 版本命名有调整,所以对应的 Spring Cloud Alibaba 版本号也做了对应变化)如果需要使用 Spring Cloud Greenwich 版本,请在 dependencyManagement 中添加如下内容。Spring Cloud Alibaba BOM 包含了它所使用的所有依赖的版本。

2021-09-09 10:33:33 4737

原创 笔记:路由下一跳计算,路由表中Destination、Gateway、Genmask之间的关系

现有路由表DestinationGatewayGenmask192.168.150.00.0.0.0255.255.255.0169.254.0.00.0.0.0255.255.0.00.0.0.0192.168.150.20.0.0.0假设目标IP地址:14.215.177.38取当前IP地址与路由表第一条记录中子网掩码255.255.255.0做与运算,得到14.215.177.0,再与目标地址做匹配,匹配不上,淘汰;再与第二条子网掩码做与运

2021-09-02 17:29:29 2563

原创 初始化 Kubernetes 主节点 failed to pull image registry.aliyuncs.com/google_containers/coredns:v1.8.0

运行 kubeadm init --config=kubeadm.yml --upload-certs | tee kubeadm-init.log 命令报错: failed to pull image registry.aliyuncs.com/google_containers/coredns:v1.8.0完整错误如下kubeadm init --config=kubeadm.yml --upload-certs | tee kubeadm-init.log[init] Using Kubern

2021-07-14 17:33:21 16221 2

原创 Ubuntu 20.04 远程连接失败

Ubuntu 20.04 远程连接失败新安装的 Ubuntu 20.04 远程连接失败,多次验证 IP 账号密码确认都是正确,尝试修复一下 OpenSSH 服务,运行命令sudo apt-get install openssh-server等待运行完成,再次连接,成功...

2021-07-14 15:28:20 3039

原创 Ubuntu网络图标消失,并且ens33网卡不显示IP

问题:左上角没有显示网络图标,并且使用 ifconfig -a 命令查询IP,ens33网卡不显示IP地址,无法上网百度找了诸多解决方法,比如:sudo dhclient ens33sudo service network-manager stopsudo rm /var/lib/NetworkManager/NetworkManager.statesudo service network-manager start试了下确实成功显示网络图标,但是每次重启之后又恢复原样,又试了下重置虚拟

2021-06-29 10:05:18 1778 1

原创 Spring Cloud Hoxton.SR9 gateway 与reactor-netty 0.9.0.RELEASE不兼容

Spring Cloud Hoxton.SR9 gateway 与reactor-netty 0.9.0.RELEASE不兼容启动Spring Cloud Gateway项目时报错运行环境Spring Boot 版本为:2.2.0.RELEASESpring Cloud版本为:Hoxton.SR9Spring Cloud Alibaba版本为:2.2.1.RELEASE***************************APPLICATION FAILED TO START******

2021-06-22 12:04:47 1273

原创 Feign整合Sentinel 开启 feign.sentinel.enabled=true 启动报错

Feign整合Sentinel 开启 feign.sentinel.enabled=true 启动报错 Requested bean is currently in creation: Is there an unresolvable circular reference?Spring Boot 版本为:2.2.0.RELEASESpring Cloud版本为:Hoxton.SR11Spring Cloud Alibaba版本为:2.2.1.RELEASE报错org.springframewo

2021-06-21 15:20:26 5274 8

原创 执行 docker-compose down 时报错,无法删除容器

Found orphan containers (myshop-service-user-provider) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.Removing network docker_defaulterror while removi

2021-05-28 15:03:49 3767 2

原创 持续集成与持续交付

持续集成与持续交付GitLab 持续集成构建 GitLab Runner 镜像DockerfileFROM gitlab/gitlab-runnerMAINTAINER ke <[email protected]># 修改软件源RUN echo 'deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse' > /etc/apt/sources.list &&

2021-05-28 11:48:12 52

原创 docker-compose.yml 备份

docker-compose.yml 文件备份平时用过的各种 docker-compose.yml 文件备份Tomcat9 & MySQL5version: '3'services: web: restart: always image: tomcat:9-jre8 container_name: web ports:

2021-05-28 11:29:56 297

原创 Got permission denied while trying to connect to the Docker.

使用 gitlab runner 运行 gitlab-ci 文件,执行到 docker build 时出现权限问题:Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post 执行 sudo chmod a+rw /var/run/docker.sock 修改权限解决...

2021-05-28 10:05:13 260

空空如也

空空如也

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

TA关注的人

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