上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 87 下一页
摘要: 1.搜索当前目录 1.1 搜索当前目录下所有文件,-P文件Perl正则模式,是最强正则模式 grep -Prn "\d{3}" ./ grep -Prn "\d{3}" * grep -rn "\d{3}" * #不支持强正则 1.2 搜索指定目录下所有文件 grep -rnP "\d{3}" ./ 阅读全文
posted @ 2022-06-22 14:37 全玉 阅读(1417) 评论(0) 推荐(0) 编辑
摘要: 1. 简单排除 [^a]* 排除a [^abc]* 排除a,b,c \D 排除数字 \S 排除空格 [^\u4E00-\u9FA5] 排除汉字 2. 排除某个单词 /^((?!hello).)+$/ 排除 hello ((?!天空).)* 排除 天空 \b(?!cat\b)\w+ 排除 cat 3. 阅读全文
posted @ 2022-06-19 13:27 全玉 阅读(3881) 评论(0) 推荐(0) 编辑
摘要: rewrite支持使用 if,set,正则,文件和目录判断 正则表达式匹配: 符号 说明 = 等值的比较 ~ 与指定正则表达式模式匹配,区分字符大小写 ~* 与指定正则表达式模式匹配,不区分字符大小写 !~ 与指定正则表达式模式不匹配,区分字符大小写 !~* 与指定正则表达式模式不匹配,不区分字符大 阅读全文
posted @ 2022-06-17 13:42 全玉 阅读(2936) 评论(0) 推荐(0) 编辑
摘要: 1. 直接对指定路由配置重写 location ~* html { rewrite .* /index.html break; } location /login { rewrite .* /index.html break; } location /admin { rewrite .* /inde 阅读全文
posted @ 2022-06-17 09:55 全玉 阅读(527) 评论(0) 推荐(0) 编辑
摘要: 1. root和alias区别 location /img/ { root /var/www/image; } location /img/ { alias /var/www/image/; } 使用alias, /img -> /var/www/image/ 使用root, /img -> /va 阅读全文
posted @ 2022-06-16 17:15 全玉 阅读(122) 评论(0) 推荐(0) 编辑
摘要: linear-gradient linear-gradient(45deg, red 0%, orange 25%, yellow 50%, green 75%, blue 100%); 渐变角是容器垂直线顺时针旋转的角度 1. 多段百分比值,规则 /* 百分比 */ linear-gradient 阅读全文
posted @ 2022-05-20 09:57 全玉 阅读(126) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-05-20 09:41 全玉 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 1. 元素的transform使用自己的坐标系 2. 元素rotate,坐标系会同时旋转 transform: translate(200px,0) rotate(45deg); //平移200px, 旋转45deg transform: rotate(45deg) translate(200px, 阅读全文
posted @ 2022-05-18 20:06 全玉 阅读(406) 评论(0) 推荐(0) 编辑
摘要: 1. 原生xhr取消请求 var xhr = new XMLHttpRequest(); xhr.abort(); 2. jquery需求请求 var jq = $.ajax({ }) jp.abort(); 3. axios取消请求 3.1 使用 CancelToken.source 工厂方法创建 阅读全文
posted @ 2022-05-12 16:45 全玉 阅读(757) 评论(0) 推荐(0) 编辑
摘要: 1. 模拟生命周期 1.1 仅初始化执行,模拟 componentDidMount 依赖空数组,由于依赖为空,不会变化,只执行一次 useEffect(() => { console.log('hello world') }, []) 1.2 仅更新执行,模拟 componentDidUpdate 阅读全文
posted @ 2022-04-25 14:43 全玉 阅读(2076) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 87 下一页