摘要: def youdaocidian(): danciben_path=r"C:\Users\wx\Desktop\123.txt" with open(danciben_path,encoding='utf-8') as f: file=f.read() each=random.choice(file 阅读全文
posted @ 2023-02-10 19:04 uuxyz 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 使用replace(/[^0-9]/ig,"")将所有字符转换为空, 剩余只含数字的字符串, 然后再转换成数值类型就可以了,如下: let str = "jslfj560jasldf"; let newStr = +(str.replace(/[^0-9]/ig,"")); console.log( 阅读全文
posted @ 2022-11-15 20:44 uuxyz 阅读(490) 评论(0) 推荐(0) 编辑
摘要: 注意使用chrome.tabs.onUpdated.addListener需要在manifest.json声明tabs权限 permissions: [‘tabs’] function handleUpdated(tabId, changeInfo, tabInfo) { console.log(` 阅读全文
posted @ 2022-11-14 22:52 uuxyz 阅读(93) 评论(0) 推荐(0) 编辑
摘要: I have used hash urls for my website and made safari extension for the same. For login/logout my extension opens ourdmain.in in new tab and listens to 阅读全文
posted @ 2022-11-14 21:13 uuxyz 阅读(12) 评论(0) 推荐(0) 编辑
摘要: Javascript 是异步的,一个常见的痛点是在页面上的 DOM 元素加载之前运行脚本。 处理此问题的一种方法是向文档中添加一个侦听器来侦听该DOMEContentLoaded事件。 document.addEventListener("DOMContentLoaded", function(){ 阅读全文
posted @ 2022-11-06 20:43 uuxyz 阅读(1007) 评论(0) 推荐(1) 编辑
摘要: Swap two nodes The function below swaps two given nodes, nodeA and nodeB: const swap = function (nodeA, nodeB) { const parentA = nodeA.parentNode; con 阅读全文
posted @ 2022-11-04 01:09 uuxyz 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 直接setvalue 不行的; 保存后就消失了; 可以使用此方法: const input = document.querySelector('#wtbusername') function setInputValue(input, value){ if(!input.disabled){ inpu 阅读全文
posted @ 2022-09-16 12:11 uuxyz 阅读(49) 评论(0) 推荐(0) 编辑
摘要: import os import os.path from PyPDF2 import PdfFileReader, PdfFileWriter import time ##########################找到 filepath 下的所有pdf,将地址返回############## 阅读全文
posted @ 2022-08-03 10:00 uuxyz 阅读(324) 评论(0) 推荐(0) 编辑
摘要: os enumerate枚举,主要是同时得到索引和对应的值 enumerate是Python的一个内置函数。 索引值默认从0开始,但也可以将其设置为任何整数。 枚举 字符串¶ In [ ]: word = "Speed" for index, char in enumerate(word): pri 阅读全文
posted @ 2022-07-28 18:38 uuxyz 阅读(65) 评论(0) 推荐(0) 编辑
摘要: App Store 纪念碑谷纪念碑谷App 内购买项目报告问题 ¥25.00 阅读全文
posted @ 2022-07-24 21:31 uuxyz 阅读(34) 评论(0) 推荐(0) 编辑
联系我
点击右上角即可分享
微信分享提示