234234234
摘要: 思路:n为数组的长度(利用线性代数的思路) 1.左移:把第1到第p个看成集合A,把第p+1到第n个看成集合B,则需要推导AB->BA, 过程(A-1)*(B-1)-> ( (A-1)*(B-1))-1 = BA 2.右移:把第1到第n-p个看成集合A,把第n-p+1到第n个看成集合B,则需要推导AB 阅读全文
posted @ 2024-05-10 16:45 你若愿意,我一定去 阅读(7) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { // 有序列表的去重 int arr[] = {1,2,2,3,3,3,5,6,7,7,7,7,8,8,9,9,9}; int len = sizeof(arr)/4; int mark[len] = {0,0,0,0,0,0,0,0, 阅读全文
posted @ 2024-05-10 14:40 你若愿意,我一定去 阅读(2) 评论(0) 推荐(0) 编辑
摘要: location.search .replace('?', '') .split('&') .reduce((ret, item) => { const [key, value] = `${item}`.split('='); ret[key] = value; return ret; }, {}) 阅读全文
posted @ 2024-04-26 13:14 你若愿意,我一定去 阅读(3) 评论(0) 推荐(0) 编辑
摘要: import * as fs from 'fs'; // 读取HTML文件 const t1 = fs.readFileSync('./txt1.txt').toString(); const t2 = fs.readFileSync('./txt2.txt').toString() // cons 阅读全文
posted @ 2024-04-15 11:08 你若愿意,我一定去 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 效果: const drawFlag = () => { const viewBox = 1024; const poleHeight = 1000; const poleWidth = 60; const poleX = 10; const poleY = 10; const x = poleX 阅读全文
posted @ 2023-12-18 11:47 你若愿意,我一定去 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 、、 <template> <div> <div> <input type="text" @keyup.enter="mark"> </div> <div ref="text" style="height: 200px; overflow: auto" v-html="html"> </div> < 阅读全文
posted @ 2023-08-11 17:24 你若愿意,我一定去 阅读(103) 评论(0) 推荐(0) 编辑
摘要: #如果文件夹不存在,创建文件夹 if [ ! -d "/www/backup/data" ]; then mkdir /www/backup/ant-data fi # 切换目录 cd /usr/ # 开始打包备份 tar -zcvf /www/backup/data/data-$(date +%Y 阅读全文
posted @ 2023-07-24 16:13 你若愿意,我一定去 阅读(222) 评论(0) 推荐(0) 编辑
摘要: <template> <div @mousemove="onHandleMousemove" @mouseup="onHandleMouseend" @mouseleave="onHandleMouseend" class="block" ></div> </template> <script se 阅读全文
posted @ 2023-07-05 16:55 你若愿意,我一定去 阅读(105) 评论(0) 推荐(0) 编辑
摘要: calc(val = new Date()) { const m = moment(val).startOf('month'); const format = 'yyyy-MM-DD'; // 获取1号是星期几, 星期日的值为7 const wd = m.weekday() > 0 ? m.week 阅读全文
posted @ 2023-05-18 14:44 你若愿意,我一定去 阅读(37) 评论(0) 推荐(0) 编辑
摘要: pip install pdfplumber -i https://pypi.tuna.tsinghua.edu.cn/simple pip install tqdm -i https://pypi.tuna.tsinghua.edu.cn/simple import pdfplumber from 阅读全文
posted @ 2023-04-20 15:09 你若愿意,我一定去 阅读(174) 评论(0) 推荐(0) 编辑
23423423423