* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Re: Update short filename on a file?
« Last post by snorkel on Today at 06:56:42 pm »
Made a nice GUI utility app to scan for files greater than 260 chars and the ability to clone the original short path name for a folder from one server to another given the same structure except for the server name.
Works great and saved many many hours of recopying the data to generate the filenames after 8.3 support was enabled on the new server.
2
I have submitted the information to the bug tracker forum.

Thank you very much!
3
I have submitted the information to the bug tracker forum.
4
General / Comparing two TFPHashLists
« Last post by Gizmo on Today at 06:19:37 pm »
Hi

One feature of a program I make is that it allows the user to compare the content of two folders based on hashes. Currently it does this by using stringlists of filenames and hashes. It works OK but I want to make it better - faster, more efficient.

I've looked at TFPHashList which I know is famed for being very fast and it's shortstring limitation is fine for hash algorithms with even SHA512 being 128 hex chars, but I can't quite work out how I can very quickly check if HashListA = HashlistB? Using my current implementation of stringlists, slHashListA contains all the hashes of folderA, and slHashListB contains all the hashes of FolderB. So to compare if one equals the other, I am simply passing slHashListA.Text and slHashlistB.Text to the FPC sha hasher, and comparing the result of the returned hash values. But TFPHashList has no such text property, so I'm curious to know how\if I can say "Is HashListA the same as HashListB?". And although syntacically it seems that the following is OK

Code: Pascal  [Select]
  1. HashListA.Add(HashValA, Pointer(HashValA));
  2. HashListB.Add(HashValB, Pointer(HashValB));
  3. if HashListA = HashListB then...
  4.  


I'm not so sure this is quite the same thing, because in a quick test of 3 files all having the same hash in FolderA and FolderB, it returned false even though all the hashes were the same. I'm guessing this is because each list has a key system, so each value is called by a key. So I guess the keys used in ListA will be different to the keys in ListB? That being the case, how can I quickly check if one matches the other?

There seems to very little documentation or examples for TFPHashList. There's a few threads like this one (http://forum.lazarus.freepascal.org/index.php/topic,17433.15.html) and there's the official docs (https://www.freepascal.org/docs-html/fcl/contnrs/tfphashlist.html) but examples are very few. It's hard to get my head round what values are stored in them, and in what form, and how you itterate and compare values in them etc without some basic examples. Does anyone know of any?
5
Have you applied the patch? Or tried the revision r56138 or above?

I have applied the patch. and This code works normally:
Code: Pascal  [Select]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var
  3.   i: Integer;
  4. begin
  5.   Memo1.Text := 'abcdefg';
  6.   for i := 1 to 5 do begin
  7.     Memo1.SelStart := 1;
  8.     Memo1.SelLength := 2;
  9.     Memo1.SelText := 'a';
  10.   end;  // Result is 'aa'
  11. end;

But this code is not normal:
Code: Pascal  [Select]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. begin
  3.   Memo1.Text := 'abc';
  4.   Memo1.SelStart := 0;
  5.   Memo1.SelLength := 1;
  6.   Memo1.SelText := 'd';   // Result should be 'dbc', but is 'abcd'
  7. end;
6
Is there somewhere a separate FPC 3.0.4 installer available? I'm normaly taking Lazarus from svn repository and install FPC separately

Not yet. The FPC team is still building their releases. I dont know when they will have them ready.

They did tag 3.0.4 already. So you can build it from SVN. (That is what the win installer for Lazarus includes)
7
Have you applied the patch? Or tried the revision r56138 or above?
8
Databases / Re: MySQL writing into BLOB error: ""is invalid float
« Last post by rvk on Today at 05:46:59 pm »
Wait, you said you had the following message:
"MySQL50Connection: error exequting query: Column count doesn't match value count at row 1."

So what message do you really get.

You get set a breakpoint and step through the code until you get the error.
9
General / Re: fpcbootstrap.exe not found
« Last post by GreatDayDan on Today at 05:42:29 pm »
I am trying to get Lazarus projects to compile.
LazarusAndroidModuleWizard says to put Laz4Android in its folder and run build.
This is the screen output:
PS C:\LAMW\Laz4Android> ./build

C:\LAMW\Laz4Android>REM Adjust the path to yours path

C:\LAMW\Laz4Android>REM ╟δ╫╘╨╨╡≈╒√╧┬├µ╡─┬╖╛╢

C:\LAMW\Laz4Android>SET FPC_BIN_PATH=C:\LAMW\Laz4Android\

C:\LAMW\Laz4Android>REM Create fpc.cfg

C:\LAMW\Laz4Android>C:\LAMW\Laz4Android\\fpc\3.1.1\bin\i386-win32\fpcmkcfg.exe -d basepath=C:\LAMW\Laz4Android\\fpc\3.1.1 -o C:\LAMW\Laz4Android\\fpc\3.1.1\bin\i386-win32\fpc.cfg
Saved old "fpc.cfg" to "fpc.bak"

C:\LAMW\Laz4Android>REM Set FPC Path

C:\LAMW\Laz4Android>Set Path=C:\LAMW\Laz4Android\\fpc\3.1.1\bin\i386-win32

C:\LAMW\Laz4Android>REM Make lazarus

*****************************************************
C:\LAMW\Laz4Android>make clean all bigide
Makefile:134: *** Compiler C:/fpclaztrunk/fpcbootstrap.exe not found.  Stop.
****************************************************
C:\LAMW\Laz4Android>REM Strip

C:\LAMW\Laz4Android>strip.exe lazarus.exe

C:\LAMW\Laz4Android>strip.exe lazbuild.exe

C:\LAMW\Laz4Android>strip.exe startlazarus.exe
PS C:\LAMW\Laz4Android>

I then used the Laz4Android installer. Ran the exe and tried to add a package. It also complained about the missing exe:
Panic: Makefile:134: *** Compiler C:/fpclaztrunk/fpcbootstrap.exe not found.  Stop.

OK, what gives.

I used to be able to compile projects.


10
Databases / Re: MySQL writing into BLOB error: ""is invalid float
« Last post by syalyshev on Today at 05:27:00 pm »
Quote
Yes, and according to the rest, the columns should match:
The INSERT SQL had 50 fields, and the table also has 50 fields.
So they should match.
but they don't match!
Of course the "parameter" method will let me to pinpoint the field that causes ""is invalid float, but how to make it work!
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