Générateur de fichiers aléatoires : client du site : http://www.random.org/

Description

Ce logiciel sert a créer des fichiers aléatoires à partir du site http://www.random.org/
Le prog. télécharge d'abord les fichiers de 16384 octets pour en reformer un unique.
Niveau source ce soft n'apprend rien qu'il n'y ai pas sur ce forum...
Cette source est intéressante par l'utilité de l'aléatoire et la difficulté a en fabriquer...

En ce qui concerne la fabriquation tout est expliquée sur http://www.random.org/

Executable téléchargeable :
http://poulphunter1.free.fr/Download/Mesprogs/Random.exe

This software is useful to create random files from the http://www.random.org/ site
The soft. download initially the files of 16384 bytes to make one.
This source is interesting by the utility of random and the difficulty has to manufacture some?

With regard to the fabriquation all is explained on http://www.random.org/

Achievable downloadable:
http://poulphunter1.free.fr/Download/Mesprogs/Random.exe

Source / Exemple :


if not SaveDialog1.Execute then
begin
exit;
end;
label5.Caption:=tell+' : 0 %';
cmax:=strtoint(edit1.text);
ProgressBar1.Min:=0;
ProgressBar1.Max:=cmax;

for countt := 1 to cmax do
begin
File1:='check.txt';
urll:='http://www.random.org/cgi-bin/checkbuf';
telecharger();
  AssignFile(F, File1);
  Reset(F,1);
a:=0;
  For I := 0 to 1 do
     begin
     Seek(F,I);
     blockread(F,a,1);
     b:=b+chr(a);
     end;
CloseFile(F);
if strtoint(b[1]+b[2])<=20 then
begin
exit;
end;
File1:='Rand.'+FormatFloat('000', countt);
urll:='http://www.random.org/cgi-bin/randbyte?nbytes=16384&format=f';
telecharger();
ProgressBar1.Position:=countt;
label5.Caption:='Téléchargement : '+IntToStr(trunc(countt/cmax*100))+' %';
end;
deletefile('check.txt');
FilePath:='Rand.001';
label5.Caption:=rec;
ProgressBar1.Position := 0;
            Counter := 1;
            BuildFile := TFileStream.Create(SaveDialog1.FileName, fmCreate or fmShareExclusive);
            while FileExists(FilePath) do
            begin
                BuildFileCopy := TFileStream.Create(FilePath, fmOpenRead or fmShareDenyWrite);
                BuildFile.CopyFrom(BuildFileCopy, 0);
                Counter := Counter + 1;
                BuildFileCopy.Free;
                deletefile(FilePath);
                FilePath := ChangeFileExt(FilePath, '.' + FormatFloat('000', Counter));
                ProgressBar1.Position := Round(BuildFile.Position / BuildFile.Size * 100);
            end;
            BuildFile.Free;
label5.Caption:=ter;

Conclusion :


Tout est marqué ici :

http://www.random.org/essay.html

(pour les anglophobes : version traduite a la google
http://translate.google.com/translate?u=http%3A%2F%2Fwww.random.org%2Fessay.html&langpair=en%7Cfr&hl=fr&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools )

Sinon je dois aussi préciser que ce prog. utilise les composants Indy pour télécharger...
(IdAntiFreezeBase, IdAntiFreeze,IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP)
Indy version 9.00.10

Codes Sources

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.