Jump to content


Popular Content

Showing content with the highest reputation on 11/07/22 in all areas

  1. shineworld

    Zip Compression library

    Without to use 7z.dll there is a pure pascal implementation that I've used and works fine: LZMA.442b.7z
  2. This issue is now solved thanks to the support team at Embarcadero. The issue was happening for users who had an old version of Windows 10. The users who reported the error had not installed any Windows 10 updates in years! New DPI code added in Delphi 11 related to menu items was calling a Windows 10 function that did not exist in early versions of Windows 10 and so was causing the error. The fix was to modify line 297 of FMX.Helpers.Win.pas to the following. if (TOSVersion.Major >= 10) and (TOSVersion.Build >= 14393) then The issue has been reported so that it can be fixed permanently in future updates. Thanks for everyone's help. The extra debug info from the callstack made the difference.
  3. Fr0sT.Brutal

    A gem from the past (Goto)

    You underestimate how ancient Delphi legacy is 🙂 I have 2 alive projects written in D7
  4. Lajos Juhász

    Check duplicates in TADOQuery

    What is the metric for efficiency? You would have to iterate the query and for every record check the value in a memory structure if it's there you have duplicate if not insert into it. You can store the list in an array, list or a hash table.
  5. Yes, serialgames is a nice tool, I used that before too, but I'm not sure how well that is maintained. There would be also a solution from DelphiWorlds: DeviceLens
  6. Angus Robertson

    Zip Compression library

    The USP of LZMA in 7Zip was higher compression size and better decompression speed, against a slower compression speed, which is usually done rather less frequently. ZLIB deflate as used by ZIP and HTTP compression is speed, not minimal size, with options for both. The ZLIB library in Delphi is optimised C code which will be faster than the Pascal conversion of LZMA, I'm sure the DLL version will be faster, but then we are into DLL hell. Angus
  7. Serge_G

    Listview Programming

    Hi, 2 solutions. First one is to use a TListView and Dynamic appearance, like this (listview "livebinded" to fdmemtable) In this case, it could be easy to manage groups. pro : if data is in a Table, it's easy to fill with livebindings and easy to manage groups con : if you want different size (possible) you have to code Second one is to use a TScollbox and a TFrame (same design as Item). pro : It's easy to resize a TFrame. In this case, Headergroup should certainly be another frame. con : All is to code Depending of solution you choose, I will explain more if needed
  8. Rollo62

    Zip Compression library

    7-Zip with using the *.7z format is able to produce compressed files larger than 2GB and can be integrated into Delphi app as well, by using the 7z.dll. I think 7-Zip with using the *.zip format also stops at 2GB, but I haven't checked this with recent versions.
  9. Rollo62

    Split String

    How about something like TStringHelper.Split ? use System.SysUtils , System.Generics.Collections ; ... var LInput : String; LArray : TArray<String>; LElem : String; LStrQuo : String; begin LInput := '22-1, 22-2, 22-3'; LArray := LInput.Split( [ ',' ], TStringSplitOptions.ExcludeEmpty ); // Ignore empty elements for LElem in LArray do begin LStrQuo := LElem.Trim.QuotedString( '"' ); ... // Do something with the quoted in SQL end; end.
  10. Something simple like this will at least check (2) and (3). It won't check (1) but that should be done at entry (only allow unique student/answer combinations). select student, if((count(*)>1) and (max(answer)>7), 'INVALID', 'Valid') as Result from data1 group by student https://dbfiddle.uk/d-QSR_4l student Result 100 Valid 101 INVALID If you really want to check (1) you can do it with a sub-select with count on total number of answers and total number of unique answers. Something like: select student, if((sum(cnt)<>count(*)) or ((count(*)>1) and (max(answer)>7)), 'INVALID', 'Valid') as Result from ( select student, answer, count(*) as cnt from data1 group by student, answer ) as sub group by student https://dbfiddle.uk/B3JmU1_S student Result 100 Valid 101 INVALID 102 INVALID 103 Valid 104 INVALID