如何把一个file:///的url地址转成本地文件地址
在 Delphi 中,file:/// 是一种 URL 格式,用于表示本地文件路径。例如,file:///C:/Documents/MyFile.txt 表示本地文件 C:\Documents\MyFile.txt。如果你需要将这种 URL 格式转换为本地文件...
TListView 判断是否是鼠标左击,点击了Item
1. 使用 OnMouseDown 事件在 OnMouseDown 事件中,Button 参数会告诉你当前按下的是哪个鼠标键(左键、右键或中键)。我们可以在代码中检查 Button 是否为 mbLeft(左键)。procedure T...
Delphi 12.2 Fmx Edit 大字的时候显示不全处理
//变形处理 edit_my_android.ControlType:= Platform; /变形处理 edit_my_android.ControlType:= Platform
【Delphi 12】FMX 如何设置 TVertScrollBox的滚动位置,使其回到顶部原点
在手机APP开发中, 纵向的滚动框非常实用,可以说是必不可少的控件,甚至为了自适应不同手机屏幕大小,使用滚动框是非常方便的懒人方法。 当我们使用TVertScrollBox控件时,发现除了控件...
Delphi 12 之API怎样获得百度网盘列表
1、获取授权code获取百度appkey和appID在之前我文章有介绍,自己查找http://openapi.baidu.com/oauth/2.0/authorize?response_type=code&client_id=【你的appkey】redirect_uri=【你的回调...
delphi实现post请求
delphi实现post请求,前提头部先引用IDHttp组件ContentType := ‘application/x-www-form-urlencoded’;var fhttpRequest: TIdHTTP; PostData : TStringStream; tmpStr : String; begin fhttpRe...
Delphi中提取某个日期中的年、季、月、日
function DateYear(const ADate: TDateTime): Word; var Month, Day: Word; begin DecodeDate(ADate, Result, Month, Day); end; function DateQuarter(const D: TDateTime): Byte; var Year, M...
fdmemtable 变更转sql脚本
fdmemtable 变更记录 转 sqlfdmemtable.cachedupdates = true然后才能获取{ 转载的 做了细微修改,网址忘了 引用 System.JSON; 函数名称:DBToJSON(TFDMemTable 数据转成SQL脚本更新) 参数:...
FDMemTable 数据保存本地和从本地加载
//保存 procedure TFrm_xxcha.Button4Click(Sender: TObject); var filename:string; begin if SaveDialog2.Execute then begin filename := SaveDialog2.FileName; FDMemTable1.SaveToFile(fil...
DeepSeek 介绍及对外国的影响
DeepSeek 简介DeepSeek(深度求索)是一家专注实现 AGI(人工通用智能)的中国科技公司,2023 年成立,总部位于杭州,在北京设有研发中心。与多数聚焦具体应用(如人脸识别、语音助手)的 AI 公...
Delphi医保接口 【1318】医保目录限价信息查
这个限价不停的更新就需要不停的下载,怎么保证最新呢,只能下载后在sql上想办法。分组取最新日期,其他条件可以自己加。Select * FROM ( SELECT t.*, ROW_NUMBER() OVER (PARTITION BY HILIST_...
合并两个TDateTime的日期和时间为一个新的时间
function CombineDateTime(const dateSource, timeSource: TDateTime): TDateTime; var datePart: TDateTime; timePart: TDateTime; begin datePart := DateOf(dateSource); // 提取日期部分 ti...
Delphi下的HMACSHA1编码及Base64转换
unit jmu1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, sLabe...
Base64 URL Safe Url 安全的编码 函数
function Base64Encode(const Input: TIdBytes): string; begin Result := TIdEncoderMIME.EncodeBytes(Input); Result := StringReplace(Result, '+', '-', [rfReplaceAll]); Result := String...
HMAC-SHA1 算法 加密字符串函数
function EncryptHMACSha1(Input, AKey: AnsiString): TIdBytes; var Key: TIdBytes; begin with TIdHMACSHA1.Create do try Key := ToBytes(AKey); Result := HashValue(ToBytes(Input)); fina...
Windows系统 获取当前程序的版本号 函数
procedure GetBuildInfo(var V1, V2, V3, V4: word); var VerInfoSize, VerValueSize, Dummy: DWORD; VerInfo: Pointer; VerValue: PVSFixedFileInfo; begin VerInfoSize := GetFileVersionInfo...
Delphi FMX 获取程序版本
在 Delphi FMX 中,可以通过以下方法获取当前应用程序的版本号:使用 IFMXApplicationService 接口delphi复制uses FMX.Platform; procedure GetAppVersion; var AppVersion: string; begin AppV...
DELPHI窗口分割用SPLITTER分割2个PANEL
在Delphi中放置两个Panel和一个Splitter组件,可以按照以下步骤操作:添加第一个Panel:在Form上添加一个Panel组件。设置第一个Panel的Align属性为alLeft(如果你希望垂直分割)或alTop(如果你...
key.val.pas
unit key.val; // cxg 2024-12-19 key-value list // fit (fpc+delphi) {$ifdef fpc} {$mode delphi}{$H+} {$endif} { example: procedure TForm1.Button2Click(Sender: TObject); var kv, kv2:...
Delphi 11 HMACSha512 函数
备用,是否正确待测其一 需要opensll ,其二不需要uses IdHMACSHA1, System.Hash,IdCoderMIME, IdGlobal; function EncryptHMACSha512(Input, AKey: String): String; var SHA512 : TIdHMACSHA51...