Time of Update: 2018-12-07
在以往的日子中,軟體技術的發展都是由作業系統或是資料庫的趨勢所主導,每一個開發工具的新版本大都是強調可以連結新的資料庫伺服器或是能夠撰寫出新版本作業系統提供的功能等。到了3、4年前當各種組件模型,例如C O R B A和D C O M等,越來越受到重視之後,開發工具的需求又加入了可以快速開發各種組件。但是自從I n t e r n e t / I n t r a n e t的應用快速興起和發展之後,軟體技術的發展趨勢就逐漸由We b 應用所主導。各種開發工具不但快速地加入支援I n t e
Time of Update: 2018-12-07
IdTCPClient屬性1 : IOHandler 如果有相應的輸入/輸出操作,那麼IOHandler相對應的組件或介面將提供一個虛擬/抽象的輸入/輸出介面給相應的網路連接2 : Intercept 如果有一個網路連接正在使用,那麼Intercept 提供的組件或接口將可以攔截相應的網路資料流中的資料3 : BoundIP
Time of Update: 2018-12-07
對靜態數組指標, 雖然在聲明之處並沒有分配記憶體, 但這個指標應該分配多少記憶體是有定數的.這種情況, 我們應該用 New 和 Dispose 來分配與釋放記憶體. 譬如: type TArr1 = array[0..255] of Char; TArr2 = array[0..255] of Integer;var arr1: ^TArr1; arr2: ^TArr2;begin New(arr1); New(arr2); arr1^ := '萬一的 Delphi 部落格';
Time of Update: 2018-12-07
delphi提供的web services控制項說明T H T T P R I O通過H T T P和S O A P封包調用遠程Web ServiceTO P To S o a p D o m C o n v e r t把Object Pascal調用的We bS e r v i c e服務轉換為S O A P形式的封包,並且把Web Service返回的S O A P結果封包轉換為Object Pascal的類型以便讓客戶端應用程式訪問結果T H T T P R e q R e s
Time of Update: 2018-12-07
function IsFileInUse(FName:string):Boolean; var HFileRes:HFILE; begin Result:=False; if not FileExists(FName) then Exit; HFileRes:=CreateFile(PChar(FName),GENERIC_READ or GENERIC_WRITE,0, nil,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0);
Time of Update: 2018-12-07
使用Tapplication的onmessage事件來處理訊息.指派一個過程給ONMESSAGE,當應用程式從訊息佇列中取出一條訊息,並準備處理該訊息時,就調用這個過程.應用在WINDOWS處理這條訊息前,調用這個事件處理過程.application.onmessage事件處理過得是TMessageEvent類型.procedure someobject.appmessagehandler(var msg:tmsg;var
Time of Update: 2018-12-07
移動平均演算法說明: 進行成本計算時,系統自動按照單據業務發生的先後順序進行出庫成本計算,對於入庫業務,系統自動計算結存金額、結存單價,結存數量,結存數量=上一筆結存數量+本次入庫數量 ,結存金額=上一筆結存金額+本次入庫金額,結存單價=結存金額/結存數量,對於出庫業務,系統自動取當前的結存單價作為出庫單價,並自動計算出庫成本。 例如: 數量
Time of Update: 2018-12-07
uses RegularExpressions;const pattern = '([A-Z]+)(\d+)'; //其三個子運算式分別是:[A-Z]+\d+ [A-Z]+ \d+ txt = 'AAA1 BBB2 AA11 BB22 A111 B222 AAAA'; //測試用的目標文本procedure TForm1.Button1Click(Sender: TObject);var match: TMatch; group: TGroup; groups:
Time of Update: 2018-12-07
procedure TFormMain.Timer1Timer(Sender: TObject);begin inherited; iPlot1.Channel[0].TitleText:='白石監測點'; iPlot1.Channel[1].TitleText:='芳村監測點'; iPlot1.Channel[0].AddYElapsedSeconds(Random(30)); iPlot1.Channel[1].AddYElapsedSeconds(Random(30));end;
Time of Update: 2018-12-07
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, RegularExpressions;type TForm1 = class(TForm) Memo1: TMemo; Button1: TButton; procedure Button1Click(Sender: TObject);
Time of Update: 2018-12-07
program FTPServer_console;(*Sample of the usage of the TIdFtpServer component.Also shows how to use Indy in console appsCreated by: Bas Gooijen (bas_gooijen@yahoo.com)Disclaimer: Use it at your own risk, it could contain bugs.Copyright: Freeware
Time of Update: 2018-12-07
TRegExOption = ( roNone, //無 roIgnoreCase, //不區分大小寫 roMultiLine, //多行模式; 可使 ^ 和 $ 匹配每個行首或行尾 roExplicitCapture, //只捕獲指定了名稱或編號的子運算式 roCompiled, //先行編譯運算式; 這在反覆使用更有效率 roSingleLine, //單行模式; 使 .
Time of Update: 2018-12-07
先看一個非多線程的例子, 代碼執行時不能進行其它操作(譬如拖動表單):{自訂方法: 在表單上繪製...}procedure MyMethod;var i: Integer;begin for i := 0 to 500000 do begin Form1.Canvas.Lock; Form1.Canvas.TextOut(10, 10, IntToStr(i)); Form1.Canvas.Unlock; end;end;{調用上面的自訂方法}procedure
Time of Update: 2018-12-07
這段時間一直在做工業自動控制方面的項目,PLC使用的是Siemens,當時上位機用的是Siemens的WinCC,其使用的改的不倫不類的C,讓我實在無法忍受,缺少事件驅動,簡直不能稱之為現代軟體。在Siemens的BBS上潛水多日以及跟北京的工程師浪費無數口水之後,終於找到了我認為是將來自控軟體應用的方向,OPC。 OPC分兩大部分,一是OPC Server,一是OPC Client。OPC
Time of Update: 2018-12-07
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Memo1: TMemo; Button1: TButton; procedure Button1Click(Sender: TObject); end;var Form1:
Time of Update: 2018-12-07
源碼:unit ServiceMainU;interfaceuses Windows, Messages, SysUtils, Classes, Graphics, Controls, SvcMgr, Dialogs, IdBaseComponent, IdComponent, IdTCPServer, IdFTPServer, Registry, forms, IdUserAccounts, IdThreadMgr, IdThreadMgrPool,
Time of Update: 2018-12-07
用了一周的時間解決了一個難題; 同時第一次真正開始使用泛型數組, 感覺太好了.如用 TArray<Word> 代替 array of Word, 還可以使用 TArray 類提供的演算法(就是少了點).uses Generics.Collections, Generics.Defaults;{測試 TArray 的 Sort 方法}procedure TForm1.Button1Click(Sender: TObject);var arr: TArray<string>
Time of Update: 2018-12-07
unit UDMPB;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdFTP, StdCtrls, idFTPList, ShellApi, RzPrgres, IniFiles, VCLUnZip, VCLZip;//
Time of Update: 2018-12-07
問題來源: http://www.cnblogs.com/del/archive/2008/03/06/1094289.html#2023057在 C:\Temp\ 下準備 1.bmp、2.bmp、3.bmp 三個圖片, 然後:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Grids;type TForm1 =
Time of Update: 2018-12-07
uses NativeXml;const xmlFile = 'C:\Temp\xml_test_files\basic.xml'; //測試檔案var xml: TNativeXml;procedure TForm1.FormCreate(Sender: TObject);begin xml := TNativeXml.Create(nil); xml.LoadFromFile(xmlFile);end;{擷取根節點的類名及類的繼承關係}procedure TForm1.Button1