1.padStart/padEnd ES2017 引入了字符串补全长度的功能。如果某个字符串不够指定长度,会在头部或尾部补全。padStart()用于头部补全,padEnd()用于尾部补全 注意: 这是个string的API , 需要先将数字转为字符串 解决: 时间格式化 不满两位数添0 第一个参数 ...
python客户端代码,可直接使用 import websocket import json import time import threading class WebsocketClient(object): """docstring for WebsocketClient""" def __i ...
分类:
编程语言 时间:
2021-06-07 21:05:52
阅读次数:
0
最近发现一个能够任意生成各种数据的python库:faker,可以借助它来生成各种数据,例如姓名、地名、日期、电话号码等(各种有意义、无意义的假数据) git地址:https://github.com/joke2k/faker 文档:https://faker.readthedocs.io/en/s ...
分类:
其他好文 时间:
2021-06-07 20:58:38
阅读次数:
0
str.format() 作用:替换str中的替代变量。 “I am {}”.format("NIcklas") https://blog.csdn.net/jpch89/article/details/84099277 ...
分类:
编程语言 时间:
2021-06-07 20:58:05
阅读次数:
0
for link in driver.find_elements_by_css_selector("tr:nth-child(1) > td.taskStatus use"): assert_status = link.get_attribute('xlink:href') print(assert ...
分类:
编程语言 时间:
2021-06-07 20:49:35
阅读次数:
0
@staticmethoddef unzip_file(failed_file): zip_file = zipfile.ZipFile(failed_file) print(zip_file) if os.path.isdir(failed_file[0:-20]): pass else: os. ...
分类:
编程语言 时间:
2021-06-07 20:42:48
阅读次数:
0
rows = driver.find_elements_by_css_selector('div.wrapper>ul.list>li')logger.info(len(rows)) ...
分类:
编程语言 时间:
2021-06-07 20:41:35
阅读次数:
0
package operator;//逻辑运算符public class Demo05 { public static void main(String[] args) { // 与(and) 或(or) 非(取反) boolean a = true; boolean b = false; Syst ...
分类:
编程语言 时间:
2021-06-07 20:40:22
阅读次数:
0
所学语法整理: 占位符{0} 空格/t 换行/n 注释符: //单行注释 ///多行注释int n1=10;//声明变量,赋值,使用,int代表整数,string代表字符串,char代表字符,decimal一般代表金钱,double代表双整形整数,bool代表布尔类型,只有true跟false两种值 ...
分类:
其他好文 时间:
2021-06-07 20:36:49
阅读次数:
0
我有两个集合,文章和评论,评论中的文章是文章中_id的外键. db.collection('article').aggregate( [ { $lookup: { from: "comments", localField: "_id", foreignField: "articleId", as: ...
分类:
数据库 时间:
2021-06-07 20:35:52
阅读次数:
0