09 2024 档案
摘要:vscode 配置 c/c++ [!CAUTION] 使用本文的配置需要预装cmake,msvc,拥有cmake、CMake Tools插件 工程目录 D:. │ CMakeLists.txt │ ├─.vscode │ CMakePresets.json │ c_cpp_properties.js
阅读全文
摘要:def binary_to_decimal(binary_str): return int(binary_str, 2) def octal_to_decimal(octal_str): return int(octal_str, 8) def decimal_to_decimal(decimal_
阅读全文
摘要:python 使用 pyinstaller 打包 1、下载pyinstaller pip install pyinstaller 2、在当前目录下生成 .spec 文件 注意,这行命令在生成文件的时候,也打包了输出物 pyinstaller --name=pytasker main.py --one
阅读全文
摘要:Windows 使用 tree 命令 基本语法 tree [drive:][path] [/F] [/A] 参数说明 [drive:][path]:指定要显示树结构的驱动器和目录。如果未指定路径,则使用当前目录。 /F:显示每个文件夹中的文件名。 /A:使用ASCII字符而不是扩展字符来显示链接子目
阅读全文
摘要:读取文本十六进制,保存为图片 目录结构 D:\SFW\PY_TOOLS\PNGPY main.py mhex.txt output.png main.py def hex_to_png(hex_file, output_file): # 从文件中读取十六进制数据 with open(hex_file
阅读全文
摘要:在 Python 中,json.dumps() 函数会将 Python 对象序列化为 JSON 字符串,并默认使用 UTF-8 编码来处理非 ASCII 字符。虽然在 Python 3 中,字符串是默认以 Unicode 形式存储的,但是当 json.dumps() 将 Python 字符串转换为
阅读全文