Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2007.02.04;
Скачать: CL | DM;

Вниз

Cортировщик уинов   Найти похожие ветки 

 
AleXerON   (2007-01-11 15:55) [0]

Помогите пожалуйста сделать сортировщик UIN`ов!

Хочу сделать как uin sorter. Помогите пожалуйста
Моя ICQ 474-374


 
Сергей М. ©   (2007-01-11 16:07) [1]

Помогаю.

Начни с этого:

procedure UINSort(UINs: TUINList; Direction: TUINSortDirection);
begin
end;


 
Anatoly Podgoretsky ©   (2007-01-11 16:11) [2]

> AleXerON  (11.01.2007 15:55:00)  [0]

Какой принцип сортировки?


 
Орион ©   (2007-01-11 16:25) [3]

> [1] Сергей М. ©   (11.01.07 16:07)

ему код готовый нужон, дабы в свой "Ultimate UIN Sorter Cool. Inferno Edition. v2.3.0.8" вставить.


 
Anatoly Podgoretsky ©   (2007-01-11 16:31) [4]

> Орион  (11.01.2007 16:25:03)  [3]

Можно, но дорогу, а ему на халяву нужно?


 
Орион ©   (2007-01-11 16:40) [5]

> [4] Anatoly Podgoretsky ©   (11.01.07 16:31)



> Помогите пожалуйста сделать сортировщик UIN`ов!

про деньги ни слова).


 
Anatoly Podgoretsky ©   (2007-01-11 17:27) [6]

> Орион  (11.01.2007 16:40:05)  [5]

Молчит зараза.


 
AleXerON   (2007-01-12 16:45) [7]

А бесплатно никто не поможет?


 
Орион ©   (2007-01-12 16:51) [8]

> [7] AleXerON   (12.01.07 16:45)

Google поможет. "Сортировка пузырьком".


 
Anatoly Podgoretsky ©   (2007-01-12 16:57) [9]

> AleXerON  (12.01.2007 16:45:07)  [7]

Почему же нет, помогут если найдешь кого либо, но искать надо соседа.


 
Zeqfreed ©   (2007-01-12 17:11) [10]

Сортировщик уинов наводит на мысль рассылания спама по этим уинам.


 
clickmaker ©   (2007-01-12 17:17) [11]


>  [10] Zeqfreed ©   (12.01.07 17:11)
> Сортировщик уинов наводит на мысль рассылания спама по этим
> уинам

а зачем для этого сортировать?


 
zdm ©   (2007-01-12 17:22) [12]


> clickmaker ©   (12.01.07 17:17) [11]
> >  [10] Zeqfreed ©   (12.01.07 17:11)> Сортировщик уинов
> наводит на мысль рассылания спама по этим > уинама зачем
> для этого сортировать?

наверное, что-бы "доставать" по степени враждебности.


 
Орион ©   (2007-01-12 17:22) [13]

> [11] clickmaker ©   (12.01.07 17:17)

для наглядности :)


 
novill ©   (2007-01-12 17:28) [14]

> [0] AleXerON   (11.01.07 15:55)

Стандартная консольная программа sort вам поможет :)


 
Anatoly Podgoretsky ©   (2007-01-12 17:57) [15]

> clickmaker  (12.01.2007 17:17:11)  [11]

> зачем для этого сортировать?

Что бы был порядок


 
Virgo_Style ©   (2007-01-12 18:01) [16]

AleXerON   (11.01.07 15:55)
Помогите пожалуйста сделать сортировщик UIN`ов!


> Моя ICQ 474-374


В очередь, будешь 474,374-м. Или, точнее, 374,374-м, если я не ошибаюсь.


 
kaZaNoVa ©   (2007-01-12 20:32) [17]

unit Unit1;

interface

uses
 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 Dialogs, StdCtrls;

type
 TForm1 = class(TForm)
   Button1: TButton;
   OpenDialog1: TOpenDialog;
   Edit1: TEdit;
   Button3: TButton;
   Button2: TButton;
   Button4: TButton;
   Button5: TButton;
   Label1: TLabel;
   Button6: TButton;
   Button7: TButton;
   procedure Button1Click(Sender: TObject);
   procedure Button3Click(Sender: TObject);
   procedure Button2Click(Sender: TObject);
   procedure Button4Click(Sender: TObject);
   procedure Button5Click(Sender: TObject);
   procedure Button6Click(Sender: TObject);
   procedure Button7Click(Sender: TObject);
   private
   { Private declarations }
 public
   { Public declarations }
 end;
type
kk=array [0..10000000] of string;
var
m,m2:kk;
 Form1: TForm1;
 f: Textfile;    k,k2,t1,t2:int64;
//  m:array[0..10000000] of string;
  w,w1,w2:longword; s:string;    q,a:boolean;
implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
QueryPerformanceFrequency(k);
QueryPerformanceCounter(T1);  q:=false;
Application.ProcessMessages;
For w1:=1 to w do   begin
if ((m[w1]=m[w1+1]) and (m[w1]<>"") and (m[w1]<>" "))  then
begin
q:=true;
if MessageBox(Handle,Pchar(m[w1]), Pchar(inttostr(w1)), 1) <>idOK then Exit;
 End;
 Application.ProcessMessages;
 Button2.Caption:=Inttostr(Round(w1*1000/w))+" %%";
 End;
 Button1.Caption:="Проверить";
 Button2.Caption:="%";
if not q then ShowMessage("Готово, проверено "+inttostr(w)+" строк, совпадений не найдено !");
QueryPerformanceCounter(T2);
Label1.caption:=FloatToStr(0.001*Round(1000000*(t2-t1)/k))+" ms";
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
Button1.Caption:="Проверить";
if (not (OpenDialog1.Execute)) then exit;
Edit1.Text:= OpenDialog1.Files[0];
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
halt(1);
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
QueryPerformanceFrequency(k);
QueryPerformanceCounter(T1);
Form1.Caption:="Load the file ..";
assignfile(f,Edit1.Text);
reset(f);
w:=0;
while not eof(f) do begin
inc(w);
readln(f,m[w]);
end;
closefile(f);
Form1.Caption:="Анализ  "+IntTostr(w);
QueryPerformanceCounter(T2);
Label1.caption:=FloatToStr(0.001*Round(1000000*(t2-t1)/k))+" ms";
end;

procedure Swap(Index1,Index2:cardinal);
var N: string;
begin
 N:=m[Index1];
 m[Index1]:=m[Index2];
 m[Index2]:=N;
end;

procedure QuickSort(Var IntArray:kk; Low, High: Integer);
var
Mid: Integer;
Item:string;
ScanUp, ScanDown: Integer;
begin
 if High - Low <= 0 then exit;
if High - Low = 1 then begin
 if IntArray[High] < {>} IntArray[Low] then Swap(Low, High);
 Exit;
end;
Mid:=(High + Low) shr 1;
Item:=IntArray[Mid];
Swap(Mid, Low);
ScanUp:=Low+1;
ScanDown:=High;
repeat
 while (ScanUp <= ScanDown) and (IntArray[ScanUp] <= {>=} Item) do
  Inc(ScanUp);
 while (IntArray[ScanDown] > {<} Item) do
  Dec(ScanDown);
 if (ScanUp < ScanDown) then Swap(ScanUp, ScanDown);
until (ScanUp >= ScanDown);
IntArray[Low] := IntArray[ScanDown];
IntArray[ScanDown] := Item;
if (Low < ScanDown - 1) then QuickSort(IntArray, Low, ScanDown - 1);
if (ScanDown + 1 < High) then QuickSort(IntArray, ScanDown+1, High);
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
M[0]:=#1;
Form1.Caption:="Sorting ..";
QueryPerformanceFrequency(k);
QueryPerformanceCounter(T1);
QuickSort(m,1,w);
Form1.Caption:="Анализ  "+IntTostr(w);
QueryPerformanceCounter(T2);
Label1.caption:=FloatToStr(0.001*Round(1000000*(t2-t1)/k))+" ms";
end;

procedure TForm1.Button6Click(Sender: TObject);
begin
QueryPerformanceFrequency(k);
QueryPerformanceCounter(T1);
Form1.Caption:="Save the file ..";
assignfile(f,Edit1.Text+".txt");
Rewrite(f);
For w1:=1 to k2 do
Writeln(f,m2[w1]);
closefile(f);
Form1.Caption:="Анализ  "+IntTostr(k2);
QueryPerformanceCounter(T2);
Label1.caption:=FloatToStr(0.001*Round(1000000*(t2-t1)/k))+" ms";

end;

procedure TForm1.Button7Click(Sender: TObject);
begin
QueryPerformanceFrequency(k);
QueryPerformanceCounter(T1);
w1:=0; k2:=1;
m2[1]:=m[1];
While (w1<=w) do   begin
Inc(w1);
If m[w1]<>m2[k2] then begin
inc(k2); m2[k2]:=m[w1];
end;
if w1 mod 750 = 0 then begin
Application.ProcessMessages;
Button2.Caption:=Inttostr(Round(w1*1000/w))+" %%";
                     end;
                   End;
w1:=0;
While (w1<=k2) do begin
inc(w1);
m[w1]:=m2[w1]; end; w:=k2;
 Button1.Caption:="Проверить";
 Button2.Caption:="%";

//ShowMessage("Готово, проверено "+inttostr(k2)+" строк, совпадений не найдено !");
QueryPerformanceCounter(T2);
Label1.caption:=FloatToStr(0.001*Round(1000000*(t2-t1)/k))+" ms";
Form1.Caption:="Анализ  "+IntTostr(w);
end;

End.


 
kaZaNoVa ©   (2007-01-12 20:34) [18]

kaZaNoVa ©   (12.01.07 20:32) [17]
умеет не тока сортировать но и удалять дубликаты!


 
Юрий Зотов ©   (2007-01-12 21:11) [19]

Круто.



Страницы: 1 вся ветка

Текущий архив: 2007.02.04;
Скачать: CL | DM;

Наверх




Память: 0.51 MB
Время: 0.031 c
15-1168543701
ArtemESC
2007-01-11 22:28
2007.02.04
Так и не понял Паскаля...


2-1168952771
Artik
2007-01-16 16:06
2007.02.04
Мастера Delphi помогите!


15-1168767111
vasIzmax
2007-01-14 12:31
2007.02.04
Работа в Интернете?


2-1168951673
RomanH
2007-01-16 15:47
2007.02.04
Fast Report для FIBPlus


1-1165581476
Elen
2006-12-08 15:37
2007.02.04
Print Screen