自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

giaming的博客日志

记录&思考&学习

  • 博客(128)
  • 资源 (4)
  • 收藏
  • 关注

转载 Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist

原文:https://www.tecmint.com/error-failed-to-download-metadata-for-repo-appstream/

2022-12-03 08:35:16 259

转载 m1芯片的macbook ubuntu apt换源失败的解决方法

mac m1 ubuntu 镜像源

2022-10-01 08:28:44 337

转载 使用homebrew安装openResty遇到问题 Failed to connect to raw.githubusercontent.com port 443: Connection refuse

使用homebrew安装openResty,出现以下报错curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refusedError: Failed to download resource “openresty-openssl111–patch”Download failed: https://raw.githubusercontent.com/openresty/openresty/master

2022-04-11 01:10:05 3119

转载 ssh错误: Permission denied (publickey)

2022-03-28 15:41:00 2724 1

转载 Rabbitmq 报错:reply-code=503, reply-text=COMMAND_INVALID - unknown exchange type ‘x-delayed-message‘

https://blog.csdn.net/qq_37495786/article/details/101279491

2022-02-24 14:50:47 771

原创 Spring Boot整合WebSocket时运行测试类会报错Caused by: org.springframework.beans.factory.BeanCreationException

问题当运行Test的时候会报错,报错信息如下:解决办法修改@SpringBootTest,其中DemoApplication为启动类@SpringBootTest(classes = DemoApplication.class, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)结果:参考博客:https://blog.csdn.net/Lee_01/article/details/103604463...

2022-02-24 10:30:01 455

转载 ubuntu安装和操作MySQL

在Ubuntu 20.04上安装MySQL教程apt-get updatesudo apt-get install mysql-server mysql-client如何从命令行管理MySQL数据库和用户创建一个新的MySQL数据库CREATE DATABASE IF NOT EXISTS database_name;列出所有MySQL数据库SHOW DATABASES;在information_schema,mysql,performance_schema,和sys数据库是在安装时创

2022-02-18 15:25:58 122

转载 如何在 Ubuntu 20.04 上安装 OpenCV

如何在 Ubuntu 20.04 上安装 OpenCVOpenCV(Open Source Computer Vision Library) 是一个开源的计算机视觉库,支持所有主流操作系统上的 C++ , Python,和 Java。它可以发挥多核进程和 GPU 加速,用于实时操作。OpenCV 应用广泛,包括医疗图片分析,街景图片处理,监视视频,探测和识别面部,追踪移动物体,提取3D 模型,等等。这篇文章描述如何在 Ubuntu 20.04 上安装 OpenCV。 想要从源码安装最新版的 OpenC

2022-02-18 00:55:53 15285 5

原创 Java算法面试题

数组加一class Solution { public int[] plusOne(int[] digits) { int len = digits.length; int carry = 1; // 进位1 for (int i=len-1;i>=0;i--){ int digit = digits[i] + carry; digits[i] = digit % 10;

2022-02-17 18:44:21 263

原创 报错:When allowCredentials is true, allowedOrigins cannot contain the special value

报错内容如下:msg中的信息表示:当allowCredentials为真时,allowedorigin不能包含特殊值"*",因为不能在"访问-控制-起源“响应头中设置该值。要允许凭证到一组起源,显示地列出它们,或者考虑使用"allowedOriginPatterns”代替。解决办法:将红框中的.allowedOrigins("*")替换为.allowedOriginPatterns("*")即可。参考文章:https://blog.csdn.net/jxysgzs/article/detail

2022-02-12 16:38:52 41262 9

原创 阿里巴巴Java开发手册笔记

代码中的命名均不能以下划线或美元符号开始,也不能以下划线或美元符号结束;类名使用UpperCamelCase风格,方法名、参数名、成员变量、局部变量都统一使用lowerCamelCase风格,必须遵从驼峰形式;常量命名全部大写,用下划线隔开;抽象类命名使用Abstract或Base开头;异常类命名使用Exception结尾;测试类命名以它要测试的类名开始,以Test结尾;POJO类中布尔类型的变量都不要加is前缀,否则部分框架会引起序列化错误;如果模块、类、方法使用了设计模式,应在命名时体现出具.

2022-01-12 23:51:40 248

原创 Java SQL异常:java.sql.SQLException: Incorrect DATE value: ‘2021.02.31‘

报错信息: Cause: java.sql.SQLException: Incorrect DATE value: '2021.02.31'; uncategorized SQLException; SQL state [HY000]; error code [1525]; Incorrect DATE value: '2021.02.31'; nested exception is java.sql.SQLException: Incorrect DATE value: '2021.02.31'代

2022-01-06 10:19:26 4566 7

原创 启动JavaWeb项目时出现A child container failed during start错误,与Tomcat中的servlet-api相关

错误描述项目中使用到HttpServletRequest和HttpServletResponse,项目的pom文件中导入servlet-api依赖,由于没有在导入依赖是没有加入<scope>provided</scope>,如下所示: <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId&

2022-01-04 19:04:23 363

原创 linux挂载大于2T的磁盘

在linux中对于大于2T的硬盘,需要使用parted进行分区。分区的具体步骤如下:一、查看硬盘所属分区情况二、fdisk分区最大只能2T,这里使用parted来分区也可以使用命令格式: $ parted /dev/sdd mklabel gpt # 标志位GPT $ parted /dev/sdd mkpart primary 0 100% # 使用parted分区 $ mkfs.ext4 /dev/sdd1 # 分区格式化 $ mkdir /data2 $ mount /de

2021-12-30 13:44:53 3231

原创 eclipse报错解决方案

eclipse maven POM 第一行提示异常Could not initialize class org.apache.maven.plugin.war.util.WebappStructureSerializer和Project configuration is not up-to-date with pom.xmleclipse从2021-03版本更新为2021-06版本后,有些项目的POM文件第一行有Could not initialize class org.apache.maven.pl

2021-12-24 08:31:20 731

原创 SQLyog连接远程服务器中的mysql

远程服务器安装mysql,这里使用CentOS7.0服务器系统查看是否安装过MySQL(mariadb版本,如果安装过,先卸载,再安装)rpm –qa | grep -i mariadb -i忽略大小写卸载MySQL;–nodeps 排除依赖,否则别的软件依赖mysql,无法删除安装MySQL将安装程序拷贝到/opt目录下MySQL-server-5.5.54-1.linux2.6.x86_64.rpmMySQL-client-5.5.54-1.linux2.6.

2021-12-23 19:33:14 877

原创 Spring Boot 启动:No active profile set, falling back to default profiles: default

启动 Spring Boot 失败,但是没有出现多余的异常信息,显示内容如下:解决办法:将pom.xml文件中的spring-boot-starter依赖修改为spring-boot-starter-web:从上图中可以看出,spring-boot-starter-web包含spring-boot-starter。...

2021-12-22 20:56:57 503

原创 IDEA报错:Cannot resolve class or package ‘mysql’

当我在SpringBoot中的application.properties中对数据库进行配置的时候出现如下错误:引起的原因是:没有导入Mysql的jar包,我搜索jdk中的jar包发现mysql-connector-java这个jar包不存在,如下图解决方案:在项目的pom.xml文件下加入mysql依赖即可<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector

2021-12-22 19:37:28 4600

原创 Idea报错:@Override is not allowed when implementing interface method

在IntelliJ IDEA使用时报错:@Override is not allowed when implementing interface method这是由于module的language level是6以下,我们需要修改module的language的level为6或6以上:解决办法:Project Settings > Modules > 选择所在的module > 修改Language level为6或6以上,有时候还需要重启项目。...

2021-12-14 16:03:00 347

转载 VMware配置网络

主要参考这篇文章的配置:VMware虚拟机NAT模式网络配置图文教程不过在配置ubuntu静态IP的时候不同,我是针对ubuntu20来配置静态IP地址,朱啊哟参考这篇文章:Ubuntu20.04.2配置静态固定IP地址

2021-12-13 20:37:56 95

原创 zookeeper启动时出现错误:Error contacting service. It is probably not running

问题如下图:当查看zookeeper状态时,出现没有运行成功。使netstat -nltup命令 查看端口使用状态的时候发现8080端口被nginx占用。通过查阅Zookeeper3.5的官方文档,发现这是Zookeeper3.5的新特性:这是Zookeeper AdminServer,默认使用8080端口,它的配置属性如下:我们可以修改在zoo.cfg中修改AdminServer的端口:admin.serverPort=8888保存后,再次启动,Zookeeper启动成功。参考:

2021-12-13 16:27:49 2141

转载 连接mysql报错java.sql.SQLException: The server time zone value ‘�й���׼ʱ��‘ is unrecognized...解决方法

报错内容:java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone v

2021-12-07 10:18:16 797 1

原创 Typora+PicGo+坚果云实现个人云笔记

第一步:下载Typorahttps://typora.io/第二步:配置Typora打开坚果云在设置->通用->启动选项,将打开固定文件修改为打开指定目录。第三步:配置PicGo选择Typora设置中的图像选项,选择上传服务设定,选择上传服务为PicGo(app)。下载PicGo,如下图所示。第四步:设置PicGo1. 安装gitee插件2. 在gitee中创建repository3. 生成私人令牌将生成的令牌保存下来。4. 配置PicGo中的Gitee图床

2021-12-06 17:15:57 248

原创 opencv实现视频和图像的转换

将视频保存为图像import cv2import globimport osfrom datetime import datetimedef video_to_frames(path): videoCapture = cv2.VideoCapture() videoCapture.open(path) # 帧率 fps = videoCapture.get(cv2.CAP_PROP_FPS) # 总帧数 frames = videoCapture

2021-07-31 20:25:49 507

原创 Mac使用matplotlib画图出现“NSInternalInconsistencyException“错误

解决方案:https://www.jianshu.com/p/f9e821074c47https://www.cnblogs.com/wanghui-garcia/p/10560018.htmlhttps://github.com/PAHdb/AmesPAHdbPythonSuite/issues/1$ mkdir -p ~/.matplotlib$ echo "backend: TkAgg" > ~/.matplotlib/matplotlibrc

2021-06-17 19:43:47 177

原创 C++ Basics

文章目录chapter1 Overview of C++Computer ProgrammingComputer ComponentsC++ HistoryProgram ConstructionCompilation and Execution Processeschapter2 Numeric Type and ExpressionsOverview of C++ Data TypesC++ IdentifiersDeclarations for Numeric TypesArithmetic Exp

2021-04-04 19:25:43 486

原创 AppImage应用如何安装

以wolai.AppImage应用为例:首先创建一个用于存放软件的文件夹:mkdir -p ~/Application/wolaicd ~/Application/wolai将wolai.AppImage文件放在 ~/Application/wolai目录下,从网上下载一张wolai的软件图标命名为wolai.png,并存放于 ~/Application/wolai目录下。在~/.local/share/applications/目录下创建wolai.desktop文件,并在里面写入内容:[D

2021-04-04 13:08:15 5861

原创 【使用TensorFlowGPU报错】CUDA runtime implicit initialization on GPU:0

我在CPU上能够正常运行,但是当我把自己的程序部署到服务器上面的时候,发现出现错误:tensorflow.python.framework.errors_impl.InternalError: CUDA runtime implicit initialization on GPU:0 failed. Status: out of memory参考了这篇文章,报错的原因是我将pytorch和TensorFlow都装在了一个虚拟环境当中了,导致pytorch和TensorFlow冲突。解决办法就是将py

2021-03-29 10:35:18 4947

原创 ModuleNotFoundError: No module named ‘apt_pkg‘

由于我的Ubuntu中直接将Python3更改为python3.7,而Ubuntu18中默认的是python3.6,所以当我重启系统之后报错。解决的方法:https://blog.csdn.net/StillOnMyWay/article/details/114492675

2021-03-24 19:52:08 125

原创 ImportError: attempted relative import with no known parent package

在.前面加上顶级模块名称就可以了。或者在模块外面创建一个main.py来调用。

2021-03-18 16:31:26 129

原创 python环境配置

目录安装miniconda安装卸载conda的使用Ubuntu中多版本Python切换pip更改默认的pip镜像源pip安装包手动添加镜像源地址python uWSGI安装配置Jupyter Notebook常用的快捷键jupyter 环境中使用虚拟环境nvcc --version找不到的问题安装miniconda安装# 使用命令行安装wget -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-L

2021-03-11 09:33:40 82

原创 WSL中Docker的安装以及遇到的问题

文章目录WSL安装安装启动Docker报错及问题解决WSL安装安装sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common# 信任 Docker 的 GPG 公钥:curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -# 安装dockersudo apt-get u

2021-03-07 15:10:28 296

原创 OpenCV Error:(mtype == CV_8U || mtype == CV_8S) && _mask.sameSize(*psrc1) in function ‘binary_op‘

程序如下:import cv2import numpy as np# 按位运算# Load two imagesimg1 = cv2.imread('../data/messi5.jpg')img2 = cv2.imread('../data/opencv_logo.png')# I want to put logo on top-left corner, So I create a ROIrows, cols, channels = img2.shaperoi = img1[0:r

2020-11-12 16:25:06 3952

转载 vscode运行python-opencv程序时出现错误:(-215:Assertion failed) size.width>0 && size.height>0 in function

解决: 这种问题一般是因为图片/视频的路径有问题,路径做好不能有中文,注意不同系统之间路径可能表示不一样,可以在路径字符串前面加一个字符r

2020-10-30 13:05:48 818

转载 解决windows10和Ubuntu双系统中windows系统时间不对的问题

在Ubuntu系统中,输入如下命令:sudo apt-get install ntpdate // 在ubuntu下更新本地时间sudo ntpdate time.windows.com sudo hwclock --localtime --systohc //将本地时间更新到硬件上重启进入windows10就可以了。...

2020-10-30 08:11:45 613

转载 ubuntu安装搜狗输入法

安装Fcitx输入框架sudo apt install fcitx-binsudo apt-get install fcitx-table下载linux版本搜狗输入法链接sudo dpkg -i sougou的文件名.deb如果出现错误,运行下述命令sudo apt-get install -f安装完成重启系统进行相关设置settings–>Region&Language–>Manage Installed Languages更改输入框架为fcitx.

2020-10-17 09:26:23 346

转载 linux中PDF阅读器okular

安装:sudo apt-get install okular汉化:sudo apt-get install kde-l10n-zhcn

2020-10-12 21:43:43 476

原创 ubuntu系统安装chrome浏览器

第一步:使用如下命令下载安装包wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 第二步:运行如下命令进行安装sudo dpkg -i google-chrome*; sudo apt-get -f install 参考:Ubuntu下安装Chrome浏览器的两个方法...

2020-10-12 21:26:32 322

原创 常用的相似性度量算法

Minkowski距离Minkowski距离是基于LpL_pLp​范数定义的,即Lp(A,B)=∣∑i=1n∣ai−bi∣p∣1pL_p (A,B) = \left| \sum_{i=1}^n |a_i - b_i|^p \right|^\frac{1}{p}Lp​(A,B)=∣∣∣∣∣​i=1∑n​∣ai​−bi​∣p∣∣∣∣∣​p1​如果p=1,那么L1(A,B)L_1(A,B)L1​(A,B)称为街区距离,表达如下:L1(A,B)=∑i=1n∣ai−bi∣L_1(A,B) =

2020-10-10 18:21:13 661

转载 mysql-connector-java下载地址

地址:https://mvnrepository.com/artifact/mysql/mysql-connector-java

2020-09-22 10:59:46 268

win10去掉快捷方式小箭头

这个文件是我自己写的bat命令,作用是去掉windows系统的快捷方式的小箭头,右击鼠标,点击以管理员方式运行,运行完成后就可以看到小箭头消失了。这个文件是我自己写的bat命令,作用是去掉windows系统的快捷方式的小箭头,右击鼠标,点击以管理员方式运行,运行完成后就可以看到小箭头消失了。这个文件是我自己写的bat命令,作用是去掉windows系统的快捷方式的小箭头,右击鼠标,点击以管理员方式运行,运行完成后就可以看到小箭头消失了。

2019-03-21

数据恢复实验

实验一:使用WINHEX查看MBR及虚拟MBR 实验二:FAT32BPB参数解析 实验三:NTFS属性解析

2018-04-25

MATLAB语言常用算法程序集

《MATLAB语言常用算法程序集》适用于初、中、高级MATLAB用户,既可以作为使用MATLAB的高等院校师生的教学用书或参考书,又可以供广大科研人员和工程技术人员参考。

2017-07-16

MySQL必知必会

《MySQL必知必会》MySQL是世界上最受欢迎的数据库管理系统之一。书中从介绍简单的数据检索开始,逐步深入一些复杂的内容,包括联结的使用、子查询、正则表达式和基于全文本的搜索、存储过程、游标、触发器、表约束,等等。通过重点突出的章节,条理清晰、系统而扼要地讲述了读者应该掌握的知识,使他们不经意间立刻功力大增。

2017-06-14

空空如也

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

TA关注的人

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