
解bug
黄其才_
正在学习......
展开
-
ubuntu16.04安装`Qt5`出现错误:qt.qpa.plugin: Could not load the Qt platform plugin “xcb“... it was found
ubuntu16.04系统安装Qt5出现错误:qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.系统环境:Ubuntu16.041、安装Qt时出现如下错误:qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.This application原创 2021-11-11 16:48:12 · 1394 阅读 · 1 评论 -
ubuntu终端出现错误:subprocess installed post-installation script returned error exit status 1
ubuntu终端出现错误:subprocess installed post-installation script returned error exit status 1ubuntu终端出现错误:subprocess installed post-installation script returned error exit status 1ubuntu终端出现错误:subprocess installed post-installation script returned error exit st原创 2021-11-05 16:40:52 · 2780 阅读 · 2 评论 -
Qt中TabWidget控件获取tab索引遇到的问题
Qt中TabWidget控件获取tab索引遇到的问题在Qt中常用的两个槽函数是:currentChanged(int index)和tabBarClicked(int index),这两个函数的意思是当当前tab改变时触发和当tab被点击时触发。但是在上面这两个槽函数中使用currentIndex()函数获取索引时会出现两种不同的结果,这个结果非常容易导致程序有bug,下面简单记录一下。在currentChanged(int index)函数中添加如下代码:int cnt = ui->ta原创 2021-10-05 21:57:14 · 6103 阅读 · 1 评论 -
两个浮点类型不可以直接判断相等以及解决方案
两个浮点类型不可以直接判断相等以及解决方案在计算机中,浮点数在内存的存储方式和int型不同,浮点数在存储的时候会有舍入误差,所以不能直接在程序中直接比较两个浮点数相等,如果需要判断相等,则需要使用精度这个方式。示例代码:#include <iostream>int main(int argc, char *argv[]){ double a = 1.0 - 0.2; // 0.8 double b = 0.7 + 0.1; // 0.8 if(a ==原创 2021-10-05 21:29:14 · 1266 阅读 · 0 评论 -
使用git克隆gitee项目账号密码输入错误之后克隆出现错误解决方法
使用git克隆gitee项目账号密码输入错误之后克隆出现错误解决方法使用git克隆gitee项目的时候,由于其他原因输入错了账号和密码,使用git进行克隆的时候一直出现之前的错误,无法进行操作。错误如下图所示:解决方法:使用win+R键打开运行窗口,在窗口中输入control 回车。然后找到用户账号,点击进入。点击管理Windows凭据。点击Windows凭据。找到gitee网址,点击打开,然后点击编辑。然后将正确的账号和密码输入进去,点击保存即可。原创 2021-10-03 22:45:43 · 3014 阅读 · 1 评论 -
python3中OpenCV库导入错误解决
python3中OpenCV库导入错误解决:操作环境:操作系统:CentOS 7.9软件环境:python 3.6错误问题描述:在使用OpenCV库的时候在导入库时出现错误:File "\<stdin>", line 1, in \<module>File "/home/summer/.local/lib/python3.6/site-packages/cv2/\__init__.py", line 5, in \<module> from .c原创 2021-06-29 10:29:05 · 625 阅读 · 0 评论 -
CentOS7系统下载安装python3,并且安装OpenCV库方法
CentOS7系统下载安装python3,并且安装OpenCV库方法操作环境:系统:CentOS 7.91. 打开终端直接在终端中输入sudo yum install python3 -y 进行下载。2. 查看是否安装成功,在终端中输入命令python3 --version。3. 下载安装pandas、numpy、matplotlib库。注:如果安装matplotlib库时出现错误:PermissionError: [Errno 13] Permission denied: ‘/usr原创 2021-06-27 23:47:37 · 814 阅读 · 2 评论 -
安装matplotlib库时错误:PermissionError: [Errno 13] Permission denied: ‘/usr/local/lib/python3.6‘ 的解决方法
python3下载安装matplotlib库时出现错误:PermissionError: [Errno 13] Permission denied: ‘/usr/local/lib/python3.6’ 的解决方法。操作环境:操作系统:CentOS 7.9软件环境:python 3.6错误描述:使用命令pip3 install matplotlib下载matplotlib库是出现错误。解决方法:...原创 2021-06-27 23:39:17 · 3624 阅读 · 0 评论 -
使用python3安装OpenCV时遇到错误的解决方法
使用python3安装OpenCV时遇到错误:Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-qqhjf9_8/opencv-python/ 的解决方法。操作环境:操作系统:CentOS 7.9软件环境:python 3.6问题描述:使用命令pip3 install opencv-python下载安装OpenCV库是出现错误。解决方法:最后再使用命令pip3 install ope原创 2021-06-27 23:37:44 · 936 阅读 · 0 评论 -
解决使用Cmake构建VTK工程出现错误问题
解决使用Cmake构建VTK工程出现:CMake Error at Rendering/OpenGL2/CMakeLists.txt:202 (message): X11_Xt_LIB could not be found. Required for VTK X lib.问题环境:系统:ubuntu 18.04代码:VTK 源码问题:原因:需要下载libxt-dev解决方法:在终端中输入命令sudo apt-get install libxt-dev 等待安装结束然后再使用Cm原创 2021-03-22 09:55:23 · 3191 阅读 · 0 评论 -
Word出现“内存或磁盘空间不足,保存失败”解决方法
Word出现“内存或磁盘空间不足,保存失败”解决方法环境:系统:Windows 10Word:Word 2019图片示例:解决办法: 出现这种情况的原因是因为旧版的doc文件与新版的Word出现不兼容的情况,只需要将旧版的doc文件转化为新版的docx文件即可。具体操作办法:文件->另存为->(选择合适的位置)->点击保存类型,将原来的文件保存为.docx类型即可。示例:...原创 2020-10-15 00:37:02 · 21420 阅读 · 3 评论 -
python中Keras下载mnist数据集
python中Keras下载mnist数据集方法一:直接写代码进行加载数据集,如果没有下载数据集,它会自动进行下载。示例:from keras.datasets import mnist(X_train, y_train), (X_test, y_test) = mnist.load_data()等待下载完成即可。示例:注:如果上面的方法下载失败,则可以使用手动下载的方法。方法二:(基于方法一失败,使用手动下载)首先我们直接访问链接进行下载,官方下载地址 ,将下载好的文件,复制到…ker原创 2020-06-27 10:57:38 · 3143 阅读 · 0 评论 -
解决python中OpenCV库读取图像函数不支持中文路径问题
解决python中OpenCV库读取图像函数不支持中文路径问题问题描述: 在使用cv2.imread()函数进行读取图片的时候发现读取失败,首先需要确保路径有没有写错(如:\需要写成\),如果路径没有写错,但是报下面的错误。则表明是中文编码的问题。如:error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'解决方法: 在cv2中有另外一个函数可以帮助我们原创 2020-06-23 11:52:01 · 1746 阅读 · 1 评论 -
解决AttributeError: module keras.backend has no attribute image_dim_ordering 错误的问题
解决if K.image_dim_ordering() == “th”:AttributeError: module ‘keras.backend’ has no attribute ‘image_dim_ordering’ 问题错误示例: 这个问题是由于Keras的版本不同造成的,代码if K.image_dim_ordering() == "th": 是Keras旧版本使用的代码,如果你使用的是新版本,那么将 K.image_dim_ordering() == "th" 代码改为 K.image原创 2020-06-22 15:34:10 · 10286 阅读 · 6 评论 -
编写python代码时出现SyntaxError: invalid character in identifier的解决方法
编写python代码时出现SyntaxError: invalid character in identifier的解决方法 这个错误一般情况下是出现了非法的空格,一些高级的编辑器会直接出现红色的波浪线提示错误,但是如果像jupyter notebook这些环境下是不会提示的,所以这个错误是由于出现了非法空格造成的。解决方法: 将原来的空格删除掉,然后再用tab键重新生成空格。拓展: 其他使用jupyter notebook类似的错误,如:IndentationError: unindent原创 2020-05-09 08:31:43 · 4892 阅读 · 0 评论