2024年9月2日

wpf 外部样式实现方式

摘要: 最近开发一个产品,打算把每个功能模块单独写一个DLL,来实现复用。那么问题 来了,每个DLL 样式都是类似的,每个DLL里面都搞样式,不利于后期的调整。所以呢把样式单独的放到一个DLL中。 实现大致如下: 1、新建自定义控件库 StyleLibrary 放样式Styles.xaml <Resourc 阅读全文

posted @ 2024-09-02 19:41 zhangjinbao66 阅读(17) 评论(0) 推荐(0) 编辑

2024年8月3日

C# CRC 校验实现

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u 阅读全文

posted @ 2024-08-03 09:59 zhangjinbao66 阅读(8) 评论(0) 推荐(0) 编辑

2024年6月29日

delphi mysql 将double 时间转换为 X天X时:X秒:X分:X秒 XXX毫秒格式

摘要: delphi mysql 将double 时间转换为 X天X时:X秒:X分:X秒 XXX毫秒格式 delphi XE10 代码 function TimeMStoStrTime(const iTimeInt:Double; out tempStr: AnsiString): Boolean;var 阅读全文

posted @ 2024-06-29 09:04 zhangjinbao66 阅读(5) 评论(0) 推荐(0) 编辑

2024年6月27日

C# Unix 时间与普通时间互转

摘要: //Unix 时间转普通时间 double dUnixTime=1719400633;//带毫秒格式 1719452042500 var timetmp= new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); var formateTime = t 阅读全文

posted @ 2024-06-27 09:38 zhangjinbao66 阅读(16) 评论(0) 推荐(0) 编辑

2024年6月26日

C# 网络接口中byte转int 结构体内存对齐解析效率的比较

摘要: 最近有个活 需要把网络数据进行解析转换,同时对性能有较高的要求。以前在delphi中 通过结构体 变体可以提高一些效率,代码如下: {$REGION '4位16进制与smallInt转换结构体'}TWordOfInt = array[0..1] of WORD; TByteOfInt = array 阅读全文

posted @ 2024-06-26 15:28 zhangjinbao66 阅读(10) 评论(0) 推荐(0) 编辑

2024年3月18日

windows解决端口占用问题

摘要: 1、查看当前端口占用情况 netstat -anno | findstr :502 上图 得知当前占用502 端口的程序ID是22816 2、查看程序 3、关闭程序(cmd需要管理员打开) taskkill /PID 22816 /F 阅读全文

posted @ 2024-03-18 19:21 zhangjinbao66 阅读(101) 评论(0) 推荐(0) 编辑

2024年1月9日

delphi XE10 连接mysql 对于 timestamp 类型字段查询的问题

摘要: 目前 使用 delphi XE10.1 连接mysql (版本 8.0.19) 提示: raised exception class EFDException with message '[FireDAC][Stan]-43. Value [000⎰̴] is out of [Cardinal] 阅读全文

posted @ 2024-01-09 13:49 zhangjinbao66 阅读(62) 评论(0) 推荐(0) 编辑

2023年12月6日

delphi 提示 Access violation at address 014CA924 in module 'EBD.exe'. Read of address 0D1A0000排查

摘要: 通过类似 Access violation at address 014CA924 in module 'EBD.exe'. Read of address 0D1A0000 提示查看代码出错的行。 1、开启map project -> options -> Linker -> Map file 选 阅读全文

posted @ 2023-12-06 10:01 zhangjinbao66 阅读(160) 评论(0) 推荐(0) 编辑

2023年11月3日

delphiXE7异步WebAPI

摘要: 废话不多说 直接上源码: unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, 阅读全文

posted @ 2023-11-03 14:51 zhangjinbao66 阅读(90) 评论(0) 推荐(0) 编辑

2023年9月8日

循环冗余校验(CRC)算法入门引导

摘要: 写给嵌入式程序员的循环冗余校验(CRC)算法入门引导前言CRC校验(循环冗余校验)是数据通讯中最常采用的校验方式。在嵌入式软件开发中,经常要用到CRC 算法对各种数据进行校验。因此,掌握基本的CRC算法应是嵌入式程序员的基本技能。可是,我认识的嵌入式程序员中能真正掌握CRC算法的人却很少,平常在项目 阅读全文

posted @ 2023-09-08 10:39 zhangjinbao66 阅读(34) 评论(0) 推荐(0) 编辑

导航