1 2 3 4 5 ··· 21 下一页
摘要: 场景 访问仪表对象和传感器对象 实现代码 访问者接口 访问者实现 被访问对象接口 仪表对象 温度传感器对象 压力传感器对象 相关调用 Out: 阅读全文
posted @ 2016-08-04 21:49 4Thing 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 场景 解析不同协议 实现代码 协议解析抽象类 A协议解析类 B协议解析类 相关调用 Out: 阅读全文
posted @ 2016-08-03 20:29 4Thing 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 场景 使用不同策略封装命令 实现代码 命令封装接口 抽象命令封装类 命令A封装实现 cs namespace DesignPatterns.Strategy { /// /// A命令打包类 /// public class PacketA : AbstractPacket, IPacket { / 阅读全文
posted @ 2016-08-03 20:26 4Thing 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 场景 仪表状态上线、发送、离线状态切换 实现代码 上下文对象 阅读全文
posted @ 2016-08-01 21:41 4Thing 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 场景 实现仪表时间的同步 实现代码 时间同步器接口 时间同步器对象 仪表观察者接口 仪表A 仪表B 相关调用 Out: 阅读全文
posted @ 2016-08-01 21:38 4Thing 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 读取嵌套和可变长的二进制数据 python import struct import itertools polys = [ [(1.0, 2.5), (3.5, 4.0), (2.5, 1.5)], [(7.0, 1.2), (5.1, 3.0), (0.5, 7.5), (0.8, 9.0)], 阅读全文
posted @ 2016-07-29 22:09 4Thing 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 读写二进制数组数据 python from struct import Struct def write_records(records, format, f): record_struct = Struct(format) for r in records: f.write(record_stru 阅读全文
posted @ 2016-07-29 22:03 4Thing 阅读(108) 评论(0) 推荐(0) 编辑
摘要: BASE64的编码和解码 阅读全文
posted @ 2016-07-29 21:53 4Thing 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 十六进制的编码和解码 阅读全文
posted @ 2016-07-29 21:43 4Thing 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 关系数据库的使用 阅读全文
posted @ 2016-07-29 21:26 4Thing 阅读(75) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 21 下一页