Programming C# C++ (7) Delphi (617) .NET (2) Database (71) Delphi IDE (89) Network (39) Printing (3) Strings (12) VCL (83) Windows with Delphi (280) Java (8) JavaScript (31) perl (9) php (4) VBScript (1) Visual Basic (1)
Exchange Links About this site Links to us 

|
General :: Programming :: Delphi
General Delphi related information.
Articles:
This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.
Featured Article
Credit Card ValidationAre you in need to validate a credit card? The following routine does some basic checking and returns the type of the credit card as a number - or use the const array to get the type of credit card by name. (E.g. 'Mastercard').
This code does not check that the credit card is actually valid, that it is good for a purchase or whether it belongs to a certain person. To accept any kind of orders, you need to do an address verification, combined with checking the expiration date.
The routine is still handy as an input validator on forms. You may download it here.  | |  | | program CardTest;
uses
Dialogs,
SysUtils;
const
CardType : array [0..4] of string = ('Invalid', 'Amex', 'Visa', 'Mastercard',
'Discover' );
function Vc(C: string) : Integer;
var
Card : string[21];
VCard : array [0..21] of Byte absolute Card;
XCard : Integer;
Cstr : string[21];
y,
x : Integer;
begin
Cstr := '';
FillChar(VCard, 22, #0);
Card := C;
for x := 1 to 20 do
if (VCard[x] in [48..57]) then
Cstr := Cstr+Chr(VCard[x]);
Card := '';
Card := Cstr;
XCard := 0;
if not odd(Length(Card)) then
for x := (Length(Card)-1) downto 1 do
begin
if odd(x) then
y := ((VCard[x]-48)*2)
else
y := (VCard[x]-48);
if (y>=10) then
y := ((y-10)+1);
XCard := (XCard+y)
end
else
for x := (Length(Card)-1) downto 1 do
begin
if odd(x) then
y := (VCard[x]-48)
else
y := ((VCard[x]-48)*2);
if (y>=10) then
y := ((y-10)+1);
XCard := (XCard+y)
end;
x := (10-(XCard mod 10));
if (x=10) then
x := 0;
if (x=(VCard[Length(Card)]-48)) then
Vc := Ord(Cstr[1])-Ord('2')
else
Vc := 0
end;
begin
ShowMessage(CardType[Vc('4479750100222862')]);
end. | |  | |  | You don't like the formatting? Check out SourceCoder then!
|
| Most recent comments
2009-11-07 07:59:25:
by trul5@hotmail.com
in Dating Scams
on Dating scam from Kazan, Russia - Part 1:
And here is one where the birthmark is easy to see
|
2009-11-07 07:51:42:
by trul5@hotmail.com
in Dating Scams
on Scammer Jane Mabou from Ivory Coast, Africa:
Here is same Elvira as darkhaired. She use a lot of other names as well
I have her mails if any want them to be posted.
Typcal russan scammer. Works with children, loves anmals, help poor and ... read more
|
|
2009-11-07 07:43:01:
by venezolano
in Dating Scams
on Dating scammer Anna Ogannisyan:
@magnus
I would like to see the new postings from lopitropi7777@yahoo.com. He is not a bright Boris. Discovered and still around. That is pathetic.
|
2009-11-07 07:00:49:
by Agent 86
in Male Dating Scammers
on Dating scammer Ken Anderson:
2009-11-01, 15:40:56
anonymous
Hello Adm,, and Maxwell
I can see no reason to remove any part of the original posting here.
Thank You Wanwan for posting the full infor ... read more
|
2009-11-07 06:33:15:
by Mangus
in Dating Scams
on Dating scammer Anna Ogannisyan:
Ton from Netherlands on stop scammers said there that he had been scammed of Lusine Mazmanyan from Gyumri in Armenia,on same type of sort which I been scammed on of Anna Ogannisyan from Sisian in Arme ... read more
|
2009-11-07 06:07:15:
by Magnus
in Dating Scams
on Dating scammer Ludmila from Volzhsk, Russia:
look at the thread of anna ogannisyan.see you soon.regards from sweden.
|
2009-11-07 06:05:25:
by Magnus
in Dating Scams
on Dating scammer Albina Aytakowa:
look at the thread of anna ogannisyan.regards from sweden.see you soon,mine friends.
|
2009-11-07 06:04:11:
by Magnus
in Dating Scams
on Dating scammer Alyona Podrez from Angarsk, Russia:
look at the thread of anna ogannisyan from sisian in armenia.she is one of the armenian scammers in the internet.the armenian scammergangs is big in the internet.see you soon.regards.
|
2009-11-07 06:01:54:
by Magnus
in Dating Scams
on Dating scammer Anna Petrovna Sotova:
look at the thread of anna ogannisyan from armenia.regards from stockholm.
|
2009-11-07 05:59:38:
by Magnus
in Dating Scams
on Dating scammer greenday564@gmail.com from Tomsk, Russia:
look at the thread of anna oganisyan from sisian in armenia.regards from stockholm.
|
|