* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Hashes
« Last post by lazarus9 on Today at 04:33:00 pm »
Does anyone know of any additional Hash generators code (.pas files ok) for Lazarus/pascal?  I need whirlpool, gost, tth, aich, and can use others also.

I have these:

DCP_tiger1
DCP_sha512_1
DCP_sha256_1
DCP_sha384_1
DCP_sha1_1
DCP_ripemd160_1
DCP_ripemd128_1
DCP_md5_1
DCP_haval1

Thanks
2
Win32/64 / Re: Initiating Drag/Drop files from Lazarus Application
« Last post by ASerge on Today at 03:53:46 pm »
I want to be able to drag a list of selected records from my grid and drop them onto a program which accepts WM_DROPFILES.
My environment is Windows (Windows 7 64bit).
An example of using attachment:
In the new project add the TMemo component to the form, fill in its lines with the full file names and add the code with the event:
Code: Pascal  [Select]
  1. procedure TForm1.Memo1MouseDown(Sender: TObject; Button: TMouseButton;
  2.   Shift: TShiftState; X, Y: Integer);
  3. begin
  4.   if DragDropCopyComplete(Memo1.Lines) then
  5.     Caption := 'Dropped';
  6. end;
Then, at run time, drag Memo to some directory in Windows Explorer.
3
I spent a lot of time with google'ing for "Ubuntu wiki gtk2 enable 32-bit repositories install 32-bit libraries", "Ubuntu wiki GTK2 32-bit 64-bit", "Ubuntu GTK2 32-bit download" and variants of these. I got a lot of material which was really hard to understand for me as a beginner. But I still don't know, what is my next step:
  • must I "only" find, download and install a 32 bit version of GTK2? If yes, where can I find it?
  • or must I download the sources of GTK2 and compile a 32 bit version by my own and place the result into the right destination folder?
4
Lazarus / Re: New debugger for Mac based on lldb (Call for testers)
« Last post by jwdietrich on Today at 03:38:30 pm »
My first impressions are:
  • It works quite well
  • Program execution is rather slow, especially at startup.
5
Mac OS X / Re: PMSessionPageSetupDialog - Mojave
« Last post by jwdietrich on Today at 03:35:44 pm »
Have you tried LCL's TPrinterSetupDialog?
6
Lazarus / Re: Lazarus Release Canditate 1 for 2.0
« Last post by fred on Today at 02:54:44 pm »
@Thaddy: Yes OPM is great no doubt about that!

@Martin_fr: I had doubts where to put it but since this RC showed the behaviour I did put it here.
Since i'm the only one who has it I will leave at this.
7
Lazarus / Re: Lazarus Release Canditate 1 for 2.0
« Last post by Martin_fr on Today at 02:33:32 pm »
As always nice to see that it gets better.
With this version 2.0 RC1 I see that it connects to internet to packages.lazarus-ide.org GET /packagelist.json
Why is it connection made at start?
In Online Package Manager I have set "Check for package updates: Never" but that doesn't matter.
If that is the case, report on tracker, or discuss/verify on a thread of its own please
8
Lazarus / Re: Lazarus Release Canditate 1 for 2.0
« Last post by Thaddy on Today at 02:19:27 pm »
If there is no connection OPM is ignored and fails silently, but indeed, it should not connect based on the user settings.
Note I like the OPM! but you are right: if you say no connection, no connection should be attempted.
9
Lazarus / Re: Lazarus Release Canditate 1 for 2.0
« Last post by fred on Today at 02:10:34 pm »
As always nice to see that it gets better.
With this version 2.0 RC1 I see that it connects to internet to packages.lazarus-ide.org GET /packagelist.json
Why is it connection made at start?
In Online Package Manager I have set "Check for package updates: Never" but that doesn't matter.
10
Yes, I recognize that code  :D O:-)
It is indeed sufficient to add ssl_openssl to the uses clause. Nothing more required.
Full program:
Code: Pascal  [Select]
  1. {$ifdef fpc}{$mode delphi}{$H+}{$endif}
  2. uses sysutils,classes,httpsend, ssl_openssl;
  3.  
  4. function DownloadHTTP(URL, TargetFile: string): boolean;
  5. var
  6.   HTTPSender: THTTPSend;
  7. begin
  8.   Result := False;
  9.   HTTPSender := THTTPSend.Create;
  10.   try
  11.     HTTPSender.HTTPMethod('GET', URL);
  12.     if (HTTPSender.ResultCode >= 100) and (HTTPSender.ResultCode <= 299) then
  13.     begin
  14.       HTTPSender.Document.SaveToFile(TargetFile);
  15.       Result := True;
  16.     end;
  17.   finally
  18.     HTTPSender.Free;
  19.   end;
  20. end;  
  21. var
  22.   s:string ='testme.html';
  23.   l:Tstringlist;
  24. begin
  25.   if fileexists(s) then deletefile(s);
  26.   if Downloadhttp('https://www.freepascal.org/index.html',s) then
  27.   try
  28.     l:=Tstringlist.create;
  29.     l.LoadfromFile(s);
  30.     writeln(l.text);
  31.   finally
  32.     l.free;
  33.   end;
  34. end.

Or much simpler, like this:
Code: Pascal  [Select]
  1. {$ifdef fpc}{$mode delphi}{$H+}{$endif}
  2. uses classes, httpsend, ssl_openssl;
  3. var
  4.   l:Tstrings;
  5. begin
  6.   try
  7.     l:=Tstringlist.create;
  8.     // this is a standard utility function from synapse
  9.     if HttpGetText('https://www.freepascal.org/index.html',L) then writeln(l.text); // or l.savetofile
  10.   finally
  11.     l.free;
  12.   end;
  13. end.

That's really all...



Pages: [1] 2 3 ... 10

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus