2023年3月23日
摘要: git log 查看日志,找到commit id git reset --soft commit id 撤销本次commit git reset --soft HEAD^ 撤销最近一次commit git reset --soft HEAD~2 撤销最近2次commit 几个参数:–mixed意思是 阅读全文
posted @ 2023-03-23 11:35 木木-林 阅读(145) 评论(0) 推荐(0) 编辑
  2023年3月16日
摘要: 时间的转换: 时间戳转日期(datetime.date.fromtimestamp(1234567896)),返回日期年-月-日 时间戳转年月日时分秒(datetime.datetime.fromtimestamp(1234567896)),返回年-月-日 时:分:秒 年月日时分秒 转换为时间戳 i 阅读全文
posted @ 2023-03-16 17:02 木木-林 阅读(68) 评论(0) 推荐(0) 编辑
  2023年3月14日
摘要: namedtuple又名具名元组,因为普通元组的局限性,不能为元组的数据进行命名,所以我们并不知道一个元组所要表达的意义,所以在这里引入了collections.namedtuple这个工厂函数,来构造一个带字段名的元组。具名元组的实例和普通元组消耗的内存一样多,因为字段名都被存在对应的类里面。 n 阅读全文
posted @ 2023-03-14 10:28 木木-林 阅读(215) 评论(0) 推荐(0) 编辑
  2023年3月13日
摘要: 参考资料: https://zhuanlan.zhihu.com/p/467568306 global global语句是适用于当前整个代码块的声明,它是全局变量的标识符。如果某名字在局部名字空间中没有定义, 就自动使用相应的全局名字。 global 将变量定义为全局变量,可以通过定义为全局变量,实 阅读全文
posted @ 2023-03-13 18:10 木木-林 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 参考链接: Python中下划线的5种含义 - 知乎 (https://zhuanlan.zhihu.com/p/36173202) PEP 8 -- Style Guide for Python Code | Python.org(https://peps.python.org/pep-0008/ 阅读全文
posted @ 2023-03-13 15:41 木木-林 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 需要将分支A的文件1合入到分支B中 1、切换到分支B:gitcheckout 分支B 2、git checkout 分支A -- 文件1的路径 参考资料 https://www.freecodecamp.org/chinese/news/git-checkout-file-from-another- 阅读全文
posted @ 2023-03-13 14:21 木木-林 阅读(79) 评论(0) 推荐(0) 编辑
  2022年3月27日
摘要: //标签[contains(@属性,'属性值')] 阅读全文
posted @ 2022-03-27 21:53 木木-林 阅读(79) 评论(0) 推荐(0) 编辑
  2022年3月25日
摘要: https://playwright.dev/python/docs/inspector 设置PWDEBUG环境变量以在调试模式下运行脚本。这会配置 Playwright 以进行调试并打开检查器。 打开方式: 1、bash模式:PWDEBUG=1 pytest -s 2、powershell模式: 阅读全文
posted @ 2022-03-25 15:51 木木-林 阅读(1407) 评论(0) 推荐(0) 编辑
  2022年3月14日
摘要: https://www.postgresql.org/docs/9.3/functions-json.html https://www.cnblogs.com/VicLiu/p/11940524.html https://www.runoob.com/manual/PostgreSQL/index. 阅读全文
posted @ 2022-03-14 23:48 木木-林 阅读(392) 评论(0) 推荐(0) 编辑
摘要: 计算time1+time2<=3000的总个数 select countIf(time1+time2<=3000) from table 计算求a*b大于等于0的和 select sumIf(a*b,a*b>=0) from table 查找列表中包含某个id的数据 ['aa','bb'] sele 阅读全文
posted @ 2022-03-14 23:43 木木-林 阅读(1056) 评论(0) 推荐(0) 编辑