会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
华小电
新随笔
管理
上一页
1
···
7
8
9
10
11
12
13
14
15
···
24
下一页
2023年2月4日
PyQT调用ui界面文件
摘要: 通过QtDesigner将ui文件转存为py文件 不继承Ui_Form import sys from PySide6 import QtCore,QtWidgets from PySide6.QtWidgets import * from ui_test import Ui_Form class
阅读全文
posted @ 2023-02-04 10:52 华小电
阅读(255)
评论(0)
推荐(0)
2023年1月19日
ProcessPoolExecutor in concurrent
摘要: Simple example import time import concurrent.futures start = time.perf_counter() def do_something(seconds): print(f'sleeping {seconds} second(s)...')
阅读全文
posted @ 2023-01-19 17:44 华小电
阅读(42)
评论(0)
推荐(0)
多进程 multiprocessing in Python
摘要: Simple example import time import multiprocessing start = time.perf_counter() def do_something(): print('sleeping 1 second...') time.sleep(1) print('D
阅读全文
posted @ 2023-01-19 16:57 华小电
阅读(48)
评论(0)
推荐(0)
多线程threading in Python
摘要: Simple Example 1 import time import threading start = time.perf_counter() def do_something(): print('sleeping 1 second...') time.sleep(1) print('Done
阅读全文
posted @ 2023-01-19 16:40 华小电
阅读(44)
评论(0)
推荐(0)
2023年1月15日
Modbus TCP
摘要: ModbusTCP数据帧 ModbusTCP的数据帧可分为两部分:MBAP+PDU。 报文头MBAP MBAP为报文头,长度为7字节 | 事务处理标识 | 协议标识 | 长度 | 单元标识符 | | | | | | | 2字节 | 2字节 | 2字节 | 1字节 | | 内容 | 解释 | | |
阅读全文
posted @ 2023-01-15 20:16 华小电
阅读(629)
评论(0)
推荐(0)
2023年1月14日
Debian 安装、卸载、初次登录MySQL
摘要: 安装 1、到Mysql官网 选择需要的版本,下载DEB Bundle打包tar文件 2、解压后,依次安装DEB文件 卸载 1、查看系统上所有mysql相关的软件包 dpkg --get-selections | grep mysql libmysqlclient-dev install libmys
阅读全文
posted @ 2023-01-14 17:57 华小电
阅读(378)
评论(0)
推荐(0)
Modbus常用功能码协议
摘要: 01H-读线圈状态 Coil Status 1)描述:读从机线圈寄存器,位操作,可读单个或者多个; 2)发送指令: 假设从机地址位0x01,寄存器开始地址0x0023,寄存器结束抵制0x0038,总共读取21个线圈。协议图如下: | 从机地址 | 功能码 | 寄存器起始地址高八位 | 寄存器起始地址
阅读全文
posted @ 2023-01-14 09:50 华小电
阅读(1230)
评论(0)
推荐(0)
2023年1月13日
[Debian]网卡重命名
摘要: 将网卡重命名为eth0...,将无线网卡重命名为wlan0... 方法1:直接修改grub,可以在网上搜索具体的操作方法 方法2:修改文件75-net-description.rules 文件75-net-description.rules(没有就新建)所在的目录为:/etc/udev/rules.
阅读全文
posted @ 2023-01-13 21:18 华小电
阅读(925)
评论(0)
推荐(0)
2023年1月11日
struct --- 将字节串解读为打包的二进制数据
摘要: 面对网络协议,在组包拆包时,python提供了struct模块,可以在python值和C语言的结构体之间相互转换。 格式字符串 格式字符串的第一个字符可用于指示打包数据的字节顺序,大小和对齐方式: | 字符 | 字节顺序 | 大小 | 对齐方式 | | | | | | | @ | 按原字节 | 按原
阅读全文
posted @ 2023-01-11 06:54 华小电
阅读(91)
评论(0)
推荐(0)
2022年12月18日
Mysql 中的升序、降序以及随机查询
摘要: 1. 升序 select time,A from table1 order by time asc limit 10; + + +| time | A |+ + +| 2022-12-14 20:40:32 | 294.368 || 2022-12-14 20:41:02 | 293.819 ||
阅读全文
posted @ 2022-12-18 16:01 华小电
阅读(326)
评论(0)
推荐(0)
上一页
1
···
7
8
9
10
11
12
13
14
15
···
24
下一页