摘要:1 #include <stdio.h> 2 #include <string.h> 3 4 typedef volatile unsigned int vuint32_t; 5 6 struct 7 { 8 union 9 { 10 vuint32_t R ; 11 struct 12 { 13
阅读全文
摘要:pthon--ctypes包装C语言数据类型 一. ctypes使用介绍 ctypes 是 Python 的外部函数库。它提供了与 C 兼容的数据类型,并允许调用 DLL 或共享库中的函数。可使用该模块以纯 Python 形式对这些库进行封装。这篇文章主要是介绍如何使用ctypes模块对C语言编译的
阅读全文
摘要:替换tk默认图标 如果文件内采用自定义的图标替换tk默认图标,使用说明文档的方法root.iconbitmap(icon.ico)替换tk图标后,打包的exe执行失败。原因是图标没有打进去,解决方法是打包成文件夹,或者把图标转化成base64数据。 1 这段程序可将图标gen.ico转换成icon.
阅读全文
摘要:1 快速开始 确保已安装要求,然后从 PyPI 安装 PyInstaller: pip3.8 install -U pyinstaller 验证安装 在所有平台上,该命令pyinstaller现在应该存在于执行路径上。要验证这一点,请输入命令: pyinstaller --version 对于绝大多
阅读全文
摘要:二、python打包成exe文件(附带图标打包) 本次打包有两种方法,根据自己勤快程度选择吧! 2.1 第一种:cd到指定文件夹打包存放 第一步:移动到指定存放exe文件的文件夹 1 2 cd 文件夹路径 例子:cd C:\FILE2\python_file 第二步:打包就完事了(看代码) 1 2
阅读全文
摘要:Data = (1,2,3,4,5,6,7,8) set_data = (c_byte * 8)(0, 0, 0, 0, 0, 0, 0, 0) for i in range(len(Data)): set_data[i] = Data[i] 只能先初始化成全0,然后再轮询赋值
阅读全文
摘要:登录root用户,用vim /etc/resolv.conf ,打开rsolv.conf,添加DNS地址 nameserver 8.8.8.8nameserver 8.8.4.4nameserver 223.5.5.5nameserver 223.6.6.6
阅读全文
摘要:CentOS6 yum设置腾讯源 1、备份系统旧配置文件 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup2、下载源配置 CentOS6 wget -O /etc/yum.repos.d/Cen
阅读全文
摘要:typedef struct { U16 w_LifeCnt ; /* 0~1 ALL */ U8 c_Year ; /* 2 ALL */ U8 c_Month ; /* 3 ALL */ U8 c_Day ; /* 4 ALL */ U8 c_Hour ; /* 5 ALL */ U8 c_Mi
阅读全文
摘要:使用aptitude包依赖管理工具代替apt来处理,aptitude软件包管理工具在解决依赖性问题上更有优势,具体使用方法如下:sudo apt-get install aptitude ,sudo aptitude install gcc g++终端中输入后会提示aptitude给出的解决方案,可
阅读全文