草庐IT

【linux】NVIDIA驱动失效简单解决方案:NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver

AI学习目录汇总1、问题描述之前在ubuntu20.04安装过NVIDIA驱动可以正常使用,突然一天发现外扩显示器无法识别,使用NVIDIA-SMI查看时报错:NVIDIA-SMIhasfailedbecauseitcouldn'tcommunicatewiththeNVIDIAdriver.MakesurethatthelatestNVIDIAdriverisinstalledandrunning.2、解决方法2.1使用DKMS维护驱动DKMS全称是DynamicKernelModuleSupport,它可以帮我们维护内核外的驱动程序,在内核版本变动之后可以自动重新生成新的模块。1)安装DK

Unexpected token ‘‘‘, “‘{“type“:““... is not valid JSON

尝试低代码schema解析JSON时报错,奇怪的是控制台解析正常,项目js执行JSON.parse()报错,简直无语了,,,只能挨个检查了,首先温习了下JSON的标准格式:JSON的合法符号:{(左大括号)}(右大括号)"(双引号):(冒号),(逗号)[(左中括号)](右中括号)JSON字符串:特殊字符可在字符前面加\或使用\u加4位16进制数来处理{"name":"jobs"}JSON布尔:必须小写的true和false{"bool":true}JSON空:必须小写的null{"object":null}JSON数值:不能使用8/16进制{"num":60}{"num":-60}{"num"

leetcode链表题报错 runtime error: member access within null pointer of type ‘ListNode‘

今天在做leetcode203:移除链表元素时,反复遇到了报错:runtimeerror:memberaccesswithinnullpointeroftype‘ListNode’(solution.cpp),报错提示的意思是试图访问’ListNode空指针类型的成员,就浅浅记录一下修复bug的过程吧。。。。刚开始的代码是这样的,逻辑是先建立一个头结点放到链表头部,这样就可以统一链表结点删除的操作了,然后创建ListNode类型指针cur,初始化其指向头结点的下一个结点,利用while循环遍历链表,当cur指针指向Null时停止遍历。然后就报错了…classSolution{public:Li

【Ubuntu git clone命令报错】fatal: unable to access ‘https://github.com/XXX‘: gnutls_handshake() failed:

Ubuntugitclone命令报错执行下面命令行:gitclonehttps://github.com/XXX报错:Cloninginto'XXX'...fatal:unabletoaccess'https://github.com/XXX':gnutls_handshake()failed:TheTLSconnectionwasnon-properlyterminated.解决办法:将命令中的https改为git如下:gitclonegit://github.com/XXX若出现以下错误:Cloninginto'XXX'...fatal:unabletoconnecttogithub.co

如何解决使用npm出现Cannot find module ‘XXX\node_modules\npm\bin\npm-cli.js’错误

遇到问题:用npm下载组件时出现Cannotfindmodule‘D:software\node_modules\npm\bin\npm-cli.js’问题,导致下载组件不能完成。解决方法:下载缺少的npm文件即可解决放到指定node_modules目录下即可解决。分析问题:我们找到提示路径去看发现,在node_modules下没有npm目录可以看到,存在的问题在于,无法找到npm-cli.js文件。解决方法:重装node.js,这个比较麻烦;下载npm压缩包:访问Download|Node.js(nodejs.org)https://nodejs.org/en/download下载符合自己计

【MySQL】mysqld Can‘t read dir of ‘etcmysqlconf.d‘ (Errcode 2 - No such file or directory)

有时候我们在使用Docker启动MySQL的时候会遇到启动失败,使用dockerlogs命令查看的时候发现了如下的错误日志.[ERROR][Entrypoint]:mysqldfailedwhileattemptingtocheckconfigcommandwas:mysqld--verbose--help--log-bin-index=/tmp/tmp.WHijR591XAmysqld:Can'treaddirof'/etc/mysql/conf.d/'(Errcode:2-Nosuchfileordirectory)mysqld:[ERROR]Fatalerrorindefaultshan

Added non-passive event listener to a scroll-blocking ‘touchmove‘ event....

1、问题描述 在用Chrome开发项目时,当用到滚动事件scroll、滚轮事件wheel或者移端touchstart/touchmove/touchend等事件时,Chrome可能会报以下警告2、原因        项目没有添加事件管理者’passive’,而在谷歌浏览器里面Chrome51版本以后,Chrome增加了新的事件捕获机制PassiveEventListeners,当前仅支持mousewheel/touch相关事件,目前Chrome主要利用该特性来优化页面的滑动性能3、解决办法    在项目中安装default-passice-events插件来解决//安装插件npminstall

vue3 Error on Cannot read properties of null (reading ‘insertBefore‘)报错无法正常显示,解决办法。

vue3报错Cannotreadpropertiesofnull(reading‘insertBefore’)本地启动时,页面所有操作正常,显示正常;部署到生产环境后,数据驱动DOM变化的操作会导致如下报错。Cannotreadpropertiesofnull(reading'insertBefore')这个错误,导致页面显示出现异常,无法正常显示。猜测原因模板渲染导致无法找到,可能的原因有以下三个:v-if导致:(使用v-show替换了v-if)v-for导致:数据初始化为undefined,但是在模板中有调用或者渲染。解决办法可以通过逐步排查页面的代码,注释代码,发布生产查看。试出看问题出

The ‘kotlin-android-extensions‘ Gradle plugin is no longer supported.

Android使用kotlin开发,运行报错The'kotlin-android-extensions'Gradlepluginisnolongersupported.Pleaseusethismigrationguide(https://goo.gle/kotlin-android-extensions-deprecation)tostartworkingwithViewBinding(https://developer.android.com/topic/libraries/view-binding)andthe'kotlin-parcelize'plugin.出现这个提示是因为’kotl

解决报错We‘re sorry but XXXXX doesn‘t work properly without JavaScript enable it to continue

创建前端页面,vue打包到线上热更新时经常遇到的问题:We’resorrybutXXXXXdoesn’tworkproperlywithoutJavaScriptenableittocontinue解决办法:一般是配置Vue的路由Router里的index.js有引入代码编写错误导致。修改即可。如果功能没有受到影响,那么这个语句不用管他,因为这是个noscript标签,而这个原因是在控制台的response里,通过preview查看,这个功能里是不具备js的功能的,因为这里还没有渲染,仅仅只是response返回的信息的预览,这只是另一种参考方式。