1、模式介绍 1.1. 模式动机 考虑一个简单的软件应用场景,一个软件系统可以提供多个外观不同的按钮(如圆形按钮、矩形按钮、菱形按钮等), 这些按钮都源自同一个基类,不过在继承基类后不同的子类修改了部分属性从而使得它们可以呈现不同的外观,如果我们希望在使用这些按钮时,不需要知道这些具体按钮类的名字, ...
分类:
其他好文 时间:
2020-04-13 00:16:52
阅读次数:
93
scrapy请求传参 提高爬取效率的方式 fake useragent ...
分类:
其他好文 时间:
2020-04-12 22:50:46
阅读次数:
76
1、控制浏览器大小 set_window_size() 设置浏览器大小 该方法有两个参数,第一个参数是宽,第二个是高 maximize_window() 设置浏览器全屏显示,无参数 chrome谷歌浏览器在控制浏览器大小时,报错 : unknown error: cannot get automat ...
分类:
编程语言 时间:
2020-04-12 20:44:39
阅读次数:
99
快速搭建以下的环境: [toc] VirtualBox VM环境 Vagrant 成品镜像 修改端口 管理员 入门案例: "https://www.cnblogs.com/lawsssscat/p/12676477.html" 修改语言: "https://blog.csdn.net/liupeif ...
分类:
其他好文 时间:
2020-04-12 20:35:45
阅读次数:
84
ylbtech-Code-Helper:OracleHelper.cs 1.返回顶部 1、 using System; using System.Configuration; using System.Data; using System.Data.OracleClient; using Syste ...
分类:
数据库 时间:
2020-04-12 18:37:17
阅读次数:
68
Error Handling 一旦序列里面产出了一个 error 事件,整个序列将被终止。RxSwift 主要有两种错误处理机制: retry - 重试 catch - 恢复 retry - 重试 retry 可以让序列在发生错误后重试: // 请求 JSON 失败时,立即重试, // 重试 3 次 ...
分类:
其他好文 时间:
2020-04-12 14:34:07
阅读次数:
68
1.with open("文件路径","模式") as fp: 操作 进入时 调用 __enter__ 方法 def __enter__(self): print("开始执行 with 方法") 退出时 调用 __exit__ 方法 def __exit__(self,type,value,trac ...
分类:
其他好文 时间:
2020-04-12 14:20:55
阅读次数:
59
python基础 1. 列举你了解的python2和python3的区别 2. 如何实现字符串的反转?如:name="张全蛋"请反转为name= "蛋全张" 3. 文件操作时:xreadlines和readlines的区别? 4. is和==的区别 is比较的是id,==比较的是值 5. 现有字典 ...
分类:
编程语言 时间:
2020-04-12 12:25:40
阅读次数:
70
近日有同事遇到在编译Maven项目时出现[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?的问题, 原以为这是个个例, 源于同事粗心, 配置环 ...
分类:
系统相关 时间:
2020-04-12 10:33:54
阅读次数:
88
异常信息 异常解读 异常处理 nginx: [alert] could not open error log file: open() "/usr/local/nginx/logs/error.log" failed (13: Permission denied)2020/04/12 09:46:2 ...
分类:
Web程序 时间:
2020-04-12 10:32:17
阅读次数:
73