- 博客(28)
- 收藏
- 关注
原创 python pycharm 调试(debug)快捷键
1.eclipse 配置的debug快捷键1.show execution point (alt+F10) 显示当前所有断点2.step over(F6) 单步调试。若函数A内存在子函数a时,不会进入子函数a内执行单步调试,而是把子函数a当作一个整体,一步执行3.step into(F5) 单步调试。若函数A内存在子函数a时,会进入子函数a内执行单步调试。4.step into my code(Alt + Shift +F7) 执行下一行但忽略libraries(导入库的语句)5.force
2022-02-02 13:41:15
2923
原创 在cmd运行python代码的时候把cmd自己最小化
importctypesctypes.windll.user32.ShowWindow(ctypes.windll.kernel32.GetConsoleWindow(),6)
2021-03-04 23:07:59
1600
4
原创 python selenium webdriver.chrome 获取属性的值(可以获取隐藏元素内的文本的一直方法)
driver = webdriver.Chrome(executable_path="chromedriver.exe")innerHTML = driver.find_elements_by_css_selector("#dologin")[0].get_attribute('innerText')
2020-11-29 00:14:10
1283
原创 python pywin32 windows判断窗口是否置顶、设置取消置顶
1.判断窗口是否置顶import win32gui, win32con# 这个是qq登录界面的窗口句柄hwnd = win32gui.FindWindow(None, "QQ")print(win32gui.GetWindowLong(hwnd, win32con.GWL_EXSTYLE))2.置顶或者取消置顶# 取消置顶win32gui.SetWindowPos(hwnd, win32con.HWND_NOTOPMOST, 0,0,800,600, win32con.S.
2020-08-02 16:57:11
14328
4
原创 pyttsx3 的基础教程
1.安装 pyttsx3pip installpyttsx32.使用方法import pyttsx3# 创建对象engine = pyttsx3.init()# 获取当前语音速率rate = engine.getProperty('rate')print(f'语音速率:{rate}')# 设置新的语音速率engine.setProperty('rate', 2...
2020-02-16 19:05:53
2381
原创 Ubuntu 下 输入 sudo Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
https://www.linuxidc.com/Linux/2014-06/103437.htmE:Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)出现这个问题的原因可能是有另外一个程序正在运行,导致资源被锁不可用。而导致资源被锁的原因,可能是上次安装时没正常完...
2019-10-10 11:35:46
109
原创 python 生成list的所有元素的组合
生成排列可以用product:from itertools import productl = [1, 2, 3]print (list(product(l, l)))print (list(product(l, repeat=4)))组合的话可以用combinations:from itertools import combinationsprint (list(comb...
2019-09-29 10:37:49
4268
原创 python 调用 chrome 打开指定网址
参考了这篇文章并修改了一下https://www.cnblogs.com/jiangjh5/p/7272478.htmlimport osurl = "https://www.baidu.com"cmd = "start /B \"\" \"%s\" -kiosk %s" % ("C:/Users/Administrator/AppData/Local/Google/Chrome/...
2019-08-30 16:28:32
3471
原创 python3 下载 并 保存 pdf
import requests# python requests 的pdf 文档requests_pdf_url = "https://buildmedia.readthedocs.org/media/pdf/requests/master/requests.pdf"r = requests.get(requests_pdf_url)filename = "requests.pdf"...
2019-08-20 15:21:24
8431
8
原创 python re 匹配 字符 出现的次数
# python3import re str_1 = "abca"matches = re.finditer(r'a',str_1)# 打印 a 字符出现的次数print (matches)
2019-08-18 09:30:46
7778
1
转载 js 获取页面鼠标行为轨迹并描绘
转载自https://zhidao.baidu.com/question/1176280230955939779.html<!doctype html><html lang="en"><head> <meta charset="UTF-8"> <title>Demo</title> <...
2019-08-05 10:56:59
3831
原创 selenium SyntaxError: Unexpected identifier 错误
在使用selenium 时触发该错误的原因selenium.common.exceptions.WebDriverException: Message: unknown error: Runtime.evaluate threw exception: SyntaxError: Unexpected identifier例子:css_a = '<input id="vehicle...
2019-06-13 18:09:01
1599
原创 selenium 怎样清除文本框中输入的内容 input
https://zhidao.baidu.com/question/1894783034561218380.html首先要定位到文本框这个元素,可以用(id,name,xpath,classname....等方法),定位到这个元素后,如:driver.clear(),使用clear()就可以了。例子:driver.find_elements_by_css_selector("这里是你...
2019-06-05 17:26:50
18021
原创 django @csrf_exempt
在views.py中from django.views.generic.base import Viewclass ueditor(View): @csrf_exempt def post(self, request): print(request.POST.get('abc', "")) return render(request, "...
2019-05-23 16:49:38
3153
原创 nuxt.js 路由
创建路由 server/interface/city.jsimport Router from "koa-router"//路由const router = new Router({ prefix: "/city"})router.get("/list", async (ctx) => { ctx.body = ['北京', "天津"]});expor...
2019-04-26 16:29:38
427
原创 nuxt.js 的一些配置例子
配置全局 根目录 nuxt.config.jsmodule.exports = { /* ** Headers of the page */ head: { //title:网站头部---------- title: 'starter', meta: [ {charset: 'utf-8'...
2019-04-26 16:00:27
388
原创 nuxt 的 父模版 子模版
子模版继承非默认父模板layouts/default.vue 是默认的父模版子模版 pages/server.vue<script> export default { //layout: 调用的父模版 layout: "servera", name: "server", }</script>...
2019-04-26 15:32:42
230
原创 phpstudy 2016版 搭建https站点
打开在根目录找到apache/conf/httpd.conf 文件找个这个把# 删除#LoadModule ssl_module modules/mod_ssl.so然后打开Apache/conf/vhosts.conf加入这段记得把里面的中文删除Listen 443<VirtualHost *:443> DocumentRoot "D:...
2019-04-21 14:53:36
1025
原创 html5 video getElementsByTagName() 和 getElementsByClassName() 与 getElementById() 获取实时播放时间的区别
<video class="a" id="b">下面通过 getElementsByTagName() 和 getElementsByClassName() 与 getElementById()取值的区别打印当前播放时间getElementsByTagName() 和 getElementsByClassName()的写法var vid = document.get...
2019-04-04 16:28:52
1042
原创 js判断一个图片是否已经存在于缓存
参考 https://breese.iteye.com/blog/1880611 $img = [ "/img/1.jpg", "/img/2.jpg"]var url = $img[this.mark];var img = new Image();img.src = url;if (img.complete) { //该图片已经存在于缓存之中,不会再去...
2019-02-01 15:15:45
1859
原创 setinterval只执行一次的原因
<script>a = function autoPlay (c) { console.log(c) // console.log(this.mark) this.mark++; if (this.mark == $img.length) { thi...
2019-02-01 02:01:41
682
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人