import requests from bs4 import BeautifulSoup import bs4 ulist=[]#定义一个空列表 def getHTMLText(url): try: headers = { 'User-Agent': '5498'} r = requests.ge ...
分类:
其他好文 时间:
2020-03-21 15:06:55
阅读次数:
89
单例模式有:饿汉,懒汉,静态内部类,枚举,双检锁(最优的就是枚举:没有为什么) 1)饿汉:jvm加载类时,就加载了单例对象,造成了资源的浪费 public class A{ private A(){ } private static A a = new A(); public static A ge ...
分类:
其他好文 时间:
2020-03-21 14:56:57
阅读次数:
55
一 ,第一种解决方法和问题现象前一篇随笔有说到:https://www.cnblogs.com/KdeS/p/11805914.html 二. 另一种解决方式 因为公司重新申请的新服务器,代码迁移到这台服务器上时发现本台服务器也没有微软雅黑字体和仿宋字体,按照上一篇的配置操作一遍之后发现并没有生效, ...
分类:
其他好文 时间:
2020-03-20 12:21:49
阅读次数:
56
一.序列化定义 Wike中对序列化的定义如下: In computing, serialization (or serialisation) is the process of translating data structures or object state into a format tha ...
分类:
编程语言 时间:
2020-03-17 16:52:36
阅读次数:
83
较常用的 < < < 小于号 > > > 大于号 ≤ ≤ ≤ 小于等于号 ≥ ≥ ≥ 大于等于号 × × × 乘号 ÷ ÷ ÷ 除号 ? − ? 减号 ± ± ± 加/减 号 ≠ ≠ ≠ 不等于号 ¹ ¹ ¹ ...
分类:
Web程序 时间:
2020-03-16 23:53:38
阅读次数:
131
Date.prototype.format = function(fmt){ var o = { "M+" : this.getMonth()+1, //月份 "d+" : this.getDate(), //日 "h+" : this.getHours(), //小时 "m+" : this.ge ...
分类:
其他好文 时间:
2020-03-16 12:51:31
阅读次数:
62
| zhe li shi biaoge | shi zhe yang me | zhe ge ne | | : : | : : | : : | | | | | | | | | | | | | | | | | This is an H1 This is an H2 This is an H3 This ...
分类:
其他好文 时间:
2020-03-16 12:33:58
阅读次数:
86
题目描述 面试题05:替换空格链接地址 https://leetcode-cn.com/problems/ti-huan-kong-ge-lcof/ 请实现一个函数,把字符串 s 中的每个空格替换成"%20"。 输入:s = "We are happy." 输出:"We%20are%20happy. ...
分类:
编程语言 时间:
2020-03-15 22:00:35
阅读次数:
77
参考文章: https://jingyan.baidu.com/article/ab69b2709a7e0b2ca6189f10.html ...
分类:
其他好文 时间:
2020-03-15 15:07:48
阅读次数:
43
http://poj.org/problem?id=1952 题目 你想买股票,方法是每次买的价格都比上一次的低(第一次不受限制)。你预先知道了每天的价格(= =),问最多能买几次,买这么多次产生的价格序列有多少种。 题解 难在价格序列的计数上面 如 \[5\quad3\quad1\quad4\qu ...
分类:
其他好文 时间:
2020-03-14 19:58:12
阅读次数:
51