杂项
xpath怎么过滤元素
穆琪 发表于2024-01-05 浏览300 评论0
要使用XPath过滤掉属性不等于某种名称的元素,可以使用not()函数和@class属性来实现。
//div[not(@class='aaa')] // XPath表达式,过滤掉class不等于aaa的div元素它将匹配具有class属性不等于aaa的div元素。not()函数用于否定条件,@class表示class属性。
杂项
xpath获取元素属性
穆琪 发表于2024-01-05 浏览297 评论0
要使用XPath获取元素的属性,可以使用@符号后跟属性名称。
//div[@class='example']/@data-id // XPath表达式,@data-id是属性名称
它将匹配具有class属性为example的div元素。@data-id部分表示要获取的属性名称。
杂项
正则表达式校验网站
穆琪 发表于2024-01-05 浏览299 评论0
https://regex101.com/
提供py java php等多种语言的正则表达式和匹配结果展示
杂项
xpath中contains的用法
穆琪 发表于2023-12-15 浏览322 评论0
在XPath中,contains() 函数用于在文本节点中检查是否包含指定的子字符串。它的语法如下:
contains(string, substring)
其中:
杂项
vim配置备份
穆琪 发表于2023-08-30 浏览538 评论0
" vundle config set nocompatible " required filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " alternatively, pass a path where Vundle should install plugins "call vundle#begin('~/some/path/here') " let Vundle manage Vundle, required Plugin 'gmarik/Vundle.vim' Plugin 'https://github.com/scrooloose/nerdtree' Plugin 'kien/rainbow_parentheses.vim' Plugin 'https://github.com/bling/vim-airline' " add all your plugins here (note older versions of Vundle " used Bundle instead of Plugin) " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required " user config " 通用配置 syntax on set ic set hlsearch set encoding=utf-8 set fileencodings=utf-8,ucs-bom,GB2312,big5 set cursorline set autoindent set smartindent set scrolloff=4 set showmatch set nu " python文件配置 let python_highlight_all=1 au Filetype python set tabstop=4 au Filetype python set softtabstop=4 au Filetype python set shiftwidth=4 au Filetype python set textwidth=79 au Filetype python set expandtab au Filetype python set autoindent au Filetype python set fileformat=unix autocmd Filetype python set foldmethod=indent autocmd Filetype python set foldlevel=99 " 分割窗口配置 set splitbelow set splitright " split navigations nnoremap <C-J> <C-W><C-J> nnoremap <C-K> <C-W><C-K> nnoremap <C-L> <C-W><C-L> nnoremap <C-H> <C-W><C-H> " 代码折叠 set foldmethod=indent set foldlevel=99 nnoremap <space> za " 文件树配置 nnoremap <F3> :NERDTreeToggle<CR> autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif " 括号匹配颜色配置 let g:rbpt_colorpairs = [ \ ['brown', 'RoyalBlue3'], \ ['Darkblue', 'SeaGreen3'], \ ['darkgray', 'DarkOrchid3'], \ ['darkgreen', 'firebrick3'], \ ['darkcyan', 'RoyalBlue3'], \ ['darkred', 'SeaGreen3'], \ ['darkmagenta', 'DarkOrchid3'], \ ['brown', 'firebrick3'], \ ['gray', 'RoyalBlue3'], \ ['darkmagenta', 'DarkOrchid3'], \ ['Darkblue', 'firebrick3'], \ ['darkgreen', 'RoyalBlue3'], \ ['darkcyan', 'SeaGreen3'], \ ['darkred', 'DarkOrchid3'], \ ['red', 'firebrick3'], \ ] let g:rbpt_max = 16 let g:rbpt_loadcmd_toggle = 0 au VimEnter * RainbowParenthesesToggle au Syntax * RainbowParenthesesLoadRound au Syntax * RainbowParenthesesLoadSquare au Syntax * RainbowParenthesesLoadBraces
杂项
kafka查看topic的偏移量
穆琪 发表于2023-05-12 浏览159 评论0
1. 列举消费者 ./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list 2. 查看偏移量 ./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group consumer --describe 3. 移动至最新 ./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group multi-alarms-pro --topic Alarms --reset-offsets --to-latest -execute
杂项
CI/CD简述
穆琪 发表于2023-04-28 浏览131 评论0
1.背景
杂项
Git Merge 与 Git Rebase的区别
穆琪 发表于2023-04-28 浏览122 评论0
1.背景
merge和rebase都是用于分支合并,但实现机制不同。
git merge是将两个分支的修改合并成一个新的提交,并保留两个分支的历史记录;
git rebase是将一个分支的修改应用到另一个分支上,使得两个分支的修改看起来像是顺序提交的。
接下来,通过图形的方式直观地介绍git merge和git rebase的工作过程。
2.合并(Merge)
git merge是将一个分支的修改融入到另一个分支的一种方式,可执行两种类型的合并:fast-forward 和 no-fast-forward,现在你可能分不清,不过没关系,我们马上来看看它们的差异所在。
杂项
Protobuf 教程
穆琪 发表于2022-06-21 浏览238 评论0
杂项
解决 Crossover 微信 输入框无法显示文字问题
穆琪 发表于2019-10-18 浏览1635 评论0
我的系统Linux mint19基于Ubuntu18.04.安装完微信后无法在输入框里面显示输入的文字,经过搜索,发现需要替换一个dll:替换 微信 容器下 c:/windows/system32/riched20.dll 文件riched20.dll.zip下载解压后替换重启微信即可。