xpath 定位节点 表达式 说明 nodename 选中该元素 / 从根节点选取、或者是元素和元素间的过渡 // 从匹配选择的当前节点选择文档中的节点,而不考虑它们的位置 . 当前节点 .. 父节点 @ 属性 text() 选取文本节点 * 通配符 [@attr] 选取具有给定属性的所有元素 案例 https://i.hacking8.com/ //nav/ul/li/a/@href 节点的修饰语法 修饰语法 说明 ...

阅读全文>>

报错信息1 Config value ‘plugins’: The “blog” plugin is not installed 处理方式 pip install mkdocs-blog-plugin 报错信息2 Config value ‘plugins’: The “minify” plugin is not installed 处理方式 pip install mkdocs-minify-plugin 总结在测试python写包, 报错之后,我直接安装了 blog, 结果没有正确, 然后看到一篇文章地址 :参考地址 自己想了下,换了个plugs名字,运...

阅读全文>>

git clone https://username:password@remote-git-repository-url # 例如 git clone https://roc:123456@e.coding.net/roc/example.git 如果用户名使用的是邮箱,那么 @ 符号需要转义成 %40,否则会无法识别邮箱,与 Git 仓库地址前面的 @ 造成冲突: # 例如 git clone https://roc@qq.com:123456@e.coding.net/roc/example.git # 需要写成 git clone https://roc%40qq.c...

阅读全文>>

# 文件更名操作 import os import shutil # 1.获取当前目录 current_path = os.getcwd() # 2.获取当前目录下的所有文件 file_list = os.listdir(current_path) # 需要替换的字符 replace_str = "2022年网络安全项目技术" # replace_str = " " # 3.遍历文件列表 for file in file_list: # 4.判断是否为文件 if os.path.isfile(file): # 5.判断...

阅读全文>>

前端环境搭建nvm的使用nodejs的配置 查看本机的 node版本 安装最新版的 nodejs 安装指定版本nvm install 16.18.1 使用指定的版本 记得使用管理员权限 基于 Node.js 安装cnpm(淘宝镜像) npm install -g cnpm —registry=https://registry.npmmirror.com前端vue环境的安装安装Vuenpm install vue@2.x.xnpm install vue 安装vue命令行工具,即vue-cli 脚手架cnpm install vue-cli -g报错处理遇到一种情况,就是使用vue -V 查看版...

阅读全文>>

更换为淘宝镜像 npm config set registry https://registry.npm.taobao.org 查看更换镜像 npm config get registry 切换会原来的镜像 npm config set registry https://registry.npmjs.org 安装 cnpm npm install -g cnpm —registry=https://registry.npm.taobao.org 使用cnpm 安装module cnpm install xxxx -g webpack执行失败 无法...

阅读全文>>

安装 django-cors-headerspip install django-cors-headers 将corsheaders添加到全局配置文件的INSTALLED_APPS中,尽量放在前面INSTALLED_APPS = [ 'corsheaders', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', ...

阅读全文>>

服务器的配置 2核4G内存的使用量到了2.8GB, 随着项目的增多, 内存的使用会越来越大 修改配置在使用Gitlab时,随着项目的增多,内存会不断的飙升,只需要修改一个参数,服务器内存迅速降低。 编辑gitlab配置文件/etc/gitlab/gitlab.rb 取消注释修改一下 unicorn[‘worker_processes’] = 2 保存退出执行 gitlab-ctl restart #重启Gitlab所有组件 注意:此值最小值是2,如果设置成1,服务器可能会卡死。 重启后, gitlab启动失败检查原因: nginx启动失败了 解决办法: # 修改启动脚本 ...

阅读全文>>

背景因为数据库在本地,代码同步一直有些问题,想把自己数据库放在ecs上,所以在ecs上建立数据库,但是本地连接的时候,一直连接不上 基本设置 测试连接提示 报错 2003 解决方法# 1 检查端口的配置 iptables -L -n ; # 如果只有一个DROP,执行: iptables -I INPUT -p tcp --dport 3306 -j ACCEPT

阅读全文>>

报错信息 cannot import name RegexUrlResolve ‘URLResolver’ object has no attribute ‘regex’ 处理方式Django版本2.0以上不支持 from django.urls import RegexURLResolver, RegexURLPattern 应改为 from django.urls.resolvers import URLResolver, URLPattern 然后把 item._regex 和 item.regex 改成item.pattern.regex.pattern   把 ...

阅读全文>>

—– BEGIN LICENSE —– Mifeng User Single User License EA7E-1184812 C0DAA9CD 6BE825B5 FF935692 1750523A EDF59D3F A3BD6C96 F8D33866 3F1CCCEA 1C25BE4D 25B1C4CC 5110C20E 5246CC42 D232C83B C99CCC42 0E32890C B6CBF018 B1D4C178 2F9DDB16 ABAA74E5 95304BEF 9D0CCFA9 8AF8F8E2 1E0A955E 4...

阅读全文>>