摘要:工具列表: 1,delphi 10.2.3 + PAServer19.0。 2,配置好一些的 PC 一台,建议至少 4 代 intel i5 + 16G + 256GSSD,低于此配置将产生拖延症。 3,VMWARE14 + Unlocker。 4,MAC 10.12.6 5,Xcode 9.2 +
阅读全文
摘要:真TMD的爽,快抛弃 EDIT/POST 这么落后的玩意吧。
阅读全文
摘要:Delphi X10.2 + FireDAC 使用 SQL 语句 INSERT
阅读全文
摘要:delphi 10.1 Berlin 中使用自带的 Base64 编码
阅读全文
摘要:delphi 10.1 Berlin 中使用自带的 MD5 校验
阅读全文
摘要:效果如图所示,比 bass 官方自带的例子效果要好那么一点点(峰值有滞留)。。。
阅读全文
摘要:更换一个 EXE 的字符串表?先有这样的字符资源:STRINGTABLE{ 1, "abcdefghijklmnopqrstuvwxyz"}function ChangeString(const FileName;NewString: string): Boolean;var hUpdate: Cardinal; s:string;begin Result:= False; hUpdate:= BeginUpdateResource('C:\Project1.exe', false); if hUpdate = 0 then Exit; try s:=New
阅读全文
摘要:需要加入 StrUtils 单元1 var2 s:string;3 i:integer;4 begin5 s:='abcdefg12345';6 for i:=1 to length(s) do7 showmessage(StuffString(s,i,1,''));8 end;
阅读全文
摘要:{使用 Lazarus + Bass 来测试跨平台,在 Ubuntu 中很正常,在 Windows 中只能播放英文名的 MP3,看了一下官方例子,应该是以下的问题。}var f: PChar; s: string;begin if not OpenDialog2.Execute then Exit; s := OpenDialog2.FileName; //f := Pchar(s); f:= Pchar(Utf8ToAnsi(s)); //修改为这个,该死的编码。。。 strs[strc] := BASS_StreamCreateFile(False, f ,0, 0, 0); if str
阅读全文
摘要:(* This can be used for Streams OR files. Set AStream parameter to nil if passing a FileName. Usage: Scan a Stream: ScanIt('texttofind', False, MyMemoryStream); Scan a File: ScanIt('texttofind', False...
阅读全文
摘要:begin AddFontResource(Pchar(ExtractFilePath(ParamStr(0))+'NAME DER SCHRIFFT')); //打开你的字体文件 SendMessage(HWND_BROADCAST,WM_FONTCHANGE,0,0); //通知系统更新字体消息 Application....//使用之 RemoveFontResource(pchar(E...
阅读全文
摘要:type ShopCat = record cid: Integer; parent_cid: Integer; name: string[30]; is_parent: boolean; end; PShopCat = ^ShopCat; TShopCat = Array of ShopCat; PTShopCat = ^TShopCat;procedure TForm1.Button...
阅读全文
摘要:type TArr = array[0..MaxListSize] of Char; PArr = ^TArr;var arr: PArr; i: Integer;begin arr := GetMemory(5); for i := 0 to 4 do arr[i] := Chr(65+i); ShowMessage(PChar(arr)); {ABCDE} arr := Rea...
阅读全文
摘要:function SplitStr(pSource: string; OldStr: string; SpliChar: Char): string;var s: string; strList: TStrings; i: Integer; iPos: Integer; sPos: string;begin Result := ''; strList := TStringList.C...
阅读全文
摘要:function MyStr(ASource: string; Index: Integer): string; var st: TStrings; i: Integer; begin Result := ''; st := TStringList.Create; i := ExtractStrings([';'], [], PChar(ASource), st); if (i > 0)...
阅读全文
摘要:将将以上代码放在工程文件 DPR 的 USER 前。重新 Build 你的工程。来自:http://www.zipplet.co.uk/index.php/content/articles_programming_delphi2010rtti
阅读全文
摘要:function Calc(s: string): string;var vScript: Variant;begin vScript := CreateOleObject('ScriptControl'); vScript.Language := 'VBScript'; Result := vScript.Eval(s);end;//调用var s:string;begin s:=C...
阅读全文
摘要:var st: TStrings;begin st := TStringList.Create; st.StrictDelimiter := True;//这个多少人用过? st.Delimiter := ' '; st.DelimitedText := '0 1 2';//用语言描述就是 [0][空格][1][TAB键][2] ShowMessage(st.Text); st.Fr...
阅读全文