2024年01月02日
<script>
var text = '5201314';
if (navigator.clipboard) {
// clipboard api 复制
navigator.clipboard.writeText(text);
} else {
var textarea = document.createElement('textarea');
document.body.appendChild(textarea);
// 隐藏此输入框
textarea.style.position = 'fixed';
textarea.style.clip = 'rect(0 0 0 0)';
textarea.style.top = '10px';
// 赋值
textarea.value = text;
// 选中
textarea.select();
// 复制
document.execCommand('copy', true);
// 移除输入框
document.body.removeChild(textarea);
}
</script>
2023年12月28日
import pdfplumber
from openpyxl import Workbook
wb = Workbook() # 创建文件对象
ws = wb.active # 获取第一个sheet
myfile = 'daima.pdf' # 把文件名改成自己的实际文件名即可
path = myfile
pdf = pdfplumber.open(path)
print('开始读取数据')
print(pdf.pages[0].extract_tables()[0][0])
ws.append(pdf.pages[0].extract_tables()[0][0])
for page in pdf.pages:
# 获取当前页面的全部文本信息,包括表格中的文字
# print(page.extract_text())
for table in page.extract_tables():
# print(table)
for row in table:
if "序号" not in row:
# print(type(row))
rowlist = str(row).replace("[", "",).replace("]", "").replace(
"'", "").replace("\\n", "").split(",")
print(rowlist)
ws.append(rowlist)
#print('---------- 分割线 ----------')
pdf.close()
# 保存Excel表
wb.save(myfile+'.xlsx')
print('\n')
print('写入excel成功')
2023年12月28日
在我们日常开发中需要遇到 我们要达到一个效果,访问127.0.0.1:9999,反向代理到我们的网站https://blog.jsyjy.com. 那么如何进行设置呢
首先 我们先了解一下几个参数的解释
2023年12月22日
CSS是前端开发中最重要的组成部分之一。在构建网页时,我们有时需要对元素进行样式更改,比如将元素向右移动。本文将介绍几种方法,以使您的元素向右移动。
2023年12月15日
公司的网站证书已经到期,阿里的公告说明随着上游厂商的要求,免费一年的ssl不再有,只有三个月的免费,到期之后需要付费使用
这是从来没有过的情况,因为这个证书网站我已经用了很多年了,我看了一下说明,原来是要割韭菜了,我本想着用了这么多年免费的,交个钱也行,一看会员费,我的乖乖,瞬间吓退了。身为程序员的我还没被这个困住,于是开始鼓捣 Let's Encrypt。
2023年12月11日
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
2023年12月11日
let time = new Date('2023-12-11 23:00:00').getTime();
或者
Powered By sydomain
Copyright Your WebSite.Some Rights Reserved.