05 2022 档案

java 知识点
摘要:#1.Lambdas及函数式接口的例子 布尔表达式 (List<String> list) -> list.isEmpty() Predicate<List<String>> 创建对象 () -> new Apple(10) Supplier<Apple> 消费一个对象 (Apple a) -> S 阅读全文

posted @ 2022-05-14 16:03 caiusxin 阅读(24) 评论(0) 推荐(0)

java代码块
摘要:字符串当前日期 Date date=new Date(); String str=String.format("%tF %tT", date,date); 阅读全文

posted @ 2022-05-12 09:56 caiusxin 阅读(17) 评论(0) 推荐(0)

python装饰器简单介绍
摘要:装饰器的作用:在函数执行前或执行后执行一段代码做一些通用处理 与直接在函数中写代码相比,优点在于可复用 调用形式为函数前@名字 @dec def f(i): 装饰器运行逻辑: 系统看到装饰器,将不调用原函数 调用装饰器函数,将原函数作为参数传入 此函数返回一个函数,系统执行返回的函数(有意思的地方来 阅读全文

posted @ 2022-05-08 23:00 caiusxin 阅读(43) 评论(0) 推荐(0)

多线程下的线程数思考
摘要:多线程对一些任务的处理如io任务 网络请求任务有明显的加速 记录下改变线程数 对任务完成时间的影响 纯sleep 短视频批量剪辑 最终效果好的线程数目12 4 实验环境 python 多线程模块 进度显示模块 from progress.bar import IncrementalBar from 阅读全文

posted @ 2022-05-07 17:17 caiusxin 阅读(54) 评论(0) 推荐(0)

python多线程复制文件到一个文件夹 显示进度
摘要:模块导入 from progress.bar import IncrementalBar from concurrent.futures import ThreadPoolExecutor, as_completed from pathlib import Path from shutil impo 阅读全文

posted @ 2022-05-06 11:08 caiusxin 阅读(640) 评论(0) 推荐(1)

python模块快速使用
摘要:优化表格打印 prettytable from prettytable import PrettyTable as pt ta=pt(field_names=['a','b']) ta.add_rows([[1,2],[3,4]]) ta.add_column(fieldname='c',colum 阅读全文

posted @ 2022-05-03 22:30 caiusxin 阅读(228) 评论(0) 推荐(0)

// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css