¸ÄÔìDelphiµÄTStringHash³É±È½ÏͨÓõĹþÏ£±í
ÓÐʱºòÎÒÃÇÐèÒª¿ÉÒÔ¸ßËÙ¼ìË÷µÄÁÐ±í£¬×ÔÈ»»áÏëµ½¹þÏ£±í£¬Æ½Ê±ÎÒÃÇ¿ÉÄÜÏëµ½ÓÃIniFilesµ¥ÔªÀïµÄTHashedStringList£¬µ« THashedStringListÿ´ÎÐÂÔöÒ»¸öItemºó¶¼ÐèҪˢÐÂÒ»±é£¬Êý¾Ý¶àÁË¿ÉÄÜ»áÓеãÂý£¬¸Ð¾õ²»Ì«ºÃ£¬¶øTStringHashÔòÖ»ÄÜ´æ IntegerÐ͵Ä(ËäÈ»ÎÒÃÇ¿ÉÒ԰ѱðµÄ¶«Î÷Ç¿ÖÆ×ª³ÉÕûÐÍ´æ½øÈ¥£¬µ«¸Ð¾õ²»Ì«ºÃ)¡£TStringHashÒѾʵÏÖÁ˹þÏ£±íµÄÈ«²¿¹¦ÄÜ£¬ÎÒÃÇÖ»ÐèÒª¸ÄһϠ¾Í¿ÉÒÔΪ×Ô¼ºËùÓÃÁË¡£
ÎÒÖ÷Òª×öÁËÏÂÃæÒ»Ð©Ð޸ģº
1.ΪÄܸüͨÓÃһЩ£¬°Ñ´æ´¢µÄÖµ¸ÄΪPointerÀàÐÍ;
2.ÐÂÔöÁËFindKey·½·¨ÓÃÓÚÅжϱíÖÐÊÇ·ñ´æÔÚij¸öKeyÁË;
3.ÐÂÔöÁËStartEnumºÍEnumValue·½·¨£¬ÓÃÓÚ±éÀúÕû¸ö¹þÏ£±í£¬±ÈÈ磺
var aItem:TIntfItem;
begin
FList.StartEnum;
while FList.EnumValue(Pointer(aItem)) do
begin
if aItem.Lifecycle=ilSys then
aItem.Free;
end;
end;
4.ÐÂÔöÁËOnDeletionʼþ£¬¹¦ÄܺÍTtreeViewµÄOnDeletionÒ»Ñù£¬É¾³ýItemʱ´¥·¢£¬¿ÉÒÔÔÚÕâÀïÊÍ·ÅЩ¶«Î÷£¬±ÈÈ磺
procedure TIntfFactory.OnDeletion(var Value: Pointer);
begin
if assigned(Value) then
begin
TIntfItem(Value).Free;
Value:=nil;
end;
end;
ÏÂÃæÊÇÐ޸ĺóµÄ´úÂ룺
unit HashList;
interface
Type
PPHashItem = ^PHashItem;
PHashItem = ^THashItem;
THashItem = record
Next: PHashItem;
Key: string;
Value: Pointer;
end;
TDeletionEvent=Procedure(var Value:Pointer) of Object;
THashList = class
private
FEnumIndex:Cardinal;
FCurrItem:PHashItem;
Buckets: array of PHashItem;
FOnDeletion: TDeletionEvent;
procedure DoDeletion(var Value:Pointer);
protected
function Find(const Key: string): PPHashItem;
function HashOf(const Key: string): Cardinal; virtual;
public
constructor Create(Size: Cardinal = 256);
destructor Destroy; override;
procedure Add(const Key: string; Value: Pointer);
procedure Clear;
 
Ïà¹ØÎĵµ£º
×î½üÐèÒª½«Magento(¹úÍâ±È½Ï³öÃûµÄ¿ªÔ´PHP+MySQLµç×ÓÉÌÎñÍøÕ¾)ÓëÒ»¸öERP½øÐÐÕûºÏ£¬¾ÍÐèÒªµ÷ÓÃMagentoµÄWebservice¡£
MagentoÌṩ2Ì×api¡£
×¢£ºÈç¹ûÐèҪͬ¹¹µ÷ÓÃÐèҪʹÓõÚ1¸öwsdl£¬ÈçÒì¹¹³ÌÐòµ÷ÓÃÐèʹÓõÚ2¸öwsdl¡£
1.http://xxx.xxxxxxx.xxx/magento/api/soap/?wsdl
2.http://xxx.xxxxxxx.xxx/magento/api/v2_soap/?ws ......
¸ù¾ÝDelphiÌṩµÄÓÐ¹Ø DLL±àдºÍµ÷ÓõİïÖúÐÅÏ¢£¬Äã¿ÉÒԺܿìÍê³ÉÒ»°ãµÄ DLL±àдºÍµ÷ÓÃµÄ Ó¦ÓóÌÐò¡£±¾ÎĽéÉܵÄÖ÷ÌâÊÇÈçºÎ±àдºÍµ÷ÓÃÄܹ»´«µÝ¸÷ÖÖ²ÎÊý£¨°üÀ¨¶ÔÏóʵÀý£©µÄ DLL¡£ÀýÈ磬 Ö÷½Ð³ÌÐò´«µÝ¸ø DLLÒ»¸öADOConnection ¶ÔÏóʾÀý×÷Ϊ²ÎÊý£¬ DLLÖеĺ¯ÊýºÍ¹ý³Ìµ÷ÓÃͨ¹ý¸Ã¶ÔÏó ʵÀý·ÃÎÊÊý¾Ý¿â¡£
ÐèÒªÃ÷ȷһЩ»ù±¾¸ÅÄî¡£¶ÔÓ ......
uses ShellAPI;
procedure TForm1.Button1Click(Sender: TObject);
begin
//ÓÃIE´ò¿ª
ShellExecute(Handle, 'open', 'IExplore.EXE', 'about:blank', nil, SW_SHOWNORMAL);
//Óûðºü´ò¿ª
ShellExecute(Handle, 'open', 'firefox.exe', 'about:blank', nil, SW_SHOWNORMAL);
//ÓÃĬÈÏä¯ÀÀÆ÷´ò¿ª
&nbs ......
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
&n ......
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
Button2: TButton;
procedure Butt ......