08 2022 档案
摘要:if __name__ == '__main__': str_time = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())) time_array = time.strptime(str_time, '%Y-%m-%d %
阅读全文
摘要:def show_txt(): file_lst = os.listdir(LOG_DIR) txt_lst = [x for x in file_lst if x.find('.txt') != -1] txt_lst.sort(reverse=True) print(txt_lst)
阅读全文
摘要:类的成员函数末尾加const的作用 结论: 1.非const对象可以访问const成员函数和非const成员函数 2.const对象不能访问非const成员函数,可以访问const成员函数 3.const成员函数不能修改成员属性 #include <iostream> using namespace
阅读全文
摘要:lst = [x for x in str.split(' ') if x]
阅读全文
摘要:参考文件:vscode使用Markdown文档编写 收藏每次不太好找, 把常用的收藏做个链接
阅读全文
摘要:find "$1" -type f -exec md5sum {} \;
阅读全文
摘要:在不同的平台如windows和ubuntu下ping返回的结果是不同的,包括操作系统语言不同,返回结果也不同,可根据实际情况添加条件 if "丢失 = 0" in output or "0% packet loss" in output or "0% loss" in output or "0% 包
阅读全文