[js] Create an alert funtion by javascript

2025-1-10 写技术

document.addEventListener('DOMContentLoaded', function() { (function() { // 创建模态对话框的 HTML 结构 var modalHTML = ` <div id="myModal" class="modal"> <div class="modal-content"> <p id="modal-message"></p> <bu...

阅读全文>>

标签: JS

评论(0) 浏览(191)

不要慌太阳下山有月光

2024-10-31 写生活

工作之后十多年了,再也没有专门听过新歌,长期以来脑海里回荡的只有回忆。最近不经意地被一首从没听过的旋律打动,是心动的感觉。晚上专门翻了一个多小时的抖音,总算找到了出处: 不要迷茫,不要慌张; 太阳下山,还有月光, 它会把人生路照亮, 陪你到想去的地方。 不要彷徨,不要沮丧; 月亮睡了,还有朝阳...

阅读全文>>

评论(0) 浏览(362)

[python]Replace key words of all documents in a directory

2024-9-27 写技术

from docx import Document def replace_text_in_word(file_path, new_path, old_texts, new_text): doc = Document(file_path) for old_text in old_texts: for paragraph in doc.paragraphs: if old_text in paragraph.text: paragraph.text = paragraph.text.repl...

阅读全文>>

标签: python

评论(0) 浏览(456)

加班文化的出路

2024-9-10 写生活

资本是逐利的,有的工厂为了吸引更高级的人才,不得不提高薪资待遇。另外一些工厂为了不落于人后不得不跟着提高薪资水平,最后所有的工厂形成一种薪资竞争状态。导致行业人工成本增加。 然后,老板眼见工人工资偏高,于是心理又不平衡,想着法子让工人多做点事,理所当然地延长了工人的劳动时间。“大小周”,“九九六”等工作制度成了业内普遍存在的现象。稍微有一点法律意识的公司通过口头传达、领导带头的方式形成“自愿”加班的工作氛围。 尽管有的加班制度已经违反了劳动法,受到法律制裁的公司却凤毛麟角。一方面,工人担心不加班就会失去工作。另一方面,国家处于一个经济敏感的时期,内部竞争的同时也是全世界范围内的竞争。工厂不...

阅读全文>>

评论(0) 浏览(363)

[linux]Copy text between host and vmware machine.

2024-8-29 写技术

If there are troubles while coping text between host and vmware machine. Try to install vmware tool by vmware menus. After failed in this way, try to run the command: ./vmware-user If the command not exists, you can install it by command: sudo apt install ...

阅读全文>>

标签: linux

评论(0) 浏览(394)

[linux] ping 127.0.0.1 failed

2024-8-12 写技术

If ping 127.0.0.1 failed. Maybe the localohst network is not available. Use the command ifconfig -a to find if the lo is available. Use the command ifocnfig lo 127.0.0.1 to enable it.

阅读全文>>

标签: linux

评论(0) 浏览(399)

[python]Affine Transform

2023-11-3 写技术

import cv2 import numpy as np img = cv2.imread("book.png",1) img_org = img.copy() h,w = img.shape[:2] p1 = np.float32([[81,30],[378,80],[13,425]]) p2 = np.float32([[0,0],[300,0],[0,400]]) M = cv2.getAffineTransform(p1,p2) img = cv2.warpAffine(img,M,(w, h)) cv2.imshow("org",img_org) cv2.i...

阅读全文>>

标签: linux python

评论(0) 浏览(1169)

[linux]Running sftp automatically by expect tools

2023-8-27 写技术

#!/usr/bin/expect -f send "mv ./models/weights/FCRNet.weights.h5 ./models/weights/FCRNet.weights.h5.back\r" expect "*python39*" spawn sftp -P 3222 root@log.anycle.com expect "*assword" send "dppppppppppasdas\r" expect "sftp>" set timeout -1 send "get /hy-tmp/FCRN/models/weights/FCRNet.wei...

阅读全文>>

标签: linux

评论(0) 浏览(771)

[linux] 文件分包压缩

2023-8-19 写技术

tar zvf data.tar.gz data #使用split命令 #-b 3G 表示设置每个分割包的大小,单位还是可以M、k #-d 参数指定生成的分割包后缀为数字的形式 #-a x来设定序列的长度(默认值是2),这里设定序列的长度为1 split -b 3G -d -a 1 data.tar.gz data.tar.gz.  #拆分文件执行命令后,生成压缩包如下,通过ll命令查看: -rw-r--r--  1 root     root      4194304000 May 20 1...

阅读全文>>

标签: linux

评论(0) 浏览(747)

copy files in windows

2023-6-20 写技术

D: cd D:\workspace\ for /D %%i in (*) do copy D:\workspace\%%i\*.mp4 D:\workspace\

阅读全文>>

评论(0) 浏览(923)

Powered by anycle 湘ICP备15001973号-1