Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 05/18/21 in Posts

  1. ImageEn v10.0.1 has now been released. This update is free if you purchased a license or extension after 15 May 2020. You can access the download from: http://www.imageen.com/support/downloadrequest.html Other users can extend their registration for 12 months at: http://www.imageen.com/order/index.html#Extensions More info on ImageEn and a free trial is available at: http://www.imageen.com Top Ten Enhancements 1. PDF Viewer supports an "All Pages" view 2. Find Text can search the entire PDF document and scroll located text into view 3. TImageEnMView uses on demand loading with large PDF documents for much faster performance 4. Further high DPI improvements, including scaling of the ImageEn Open/Save dialogs and better support for multiple monitors 5. Global methods to add, merge and delete pages from PDF files 6. Many other PDF enhancements including adding and removing attachments, meta-data support, page rotation, and form editing improvements 7. Aspect ratio now considered when scaling JPEG for optimized loading 8. All Russian text is now natively translated 9. Now uses custom GDI+ dash drawing for improved selection styling (e.g. when cropping) 10. Various stability fixes and improvements Complete Change History: http://www.imageen.com/info/HistoryFull.html
  2. David Heffernan

    Bulk change of Manifest settings??

    Work out what change needs to be made to the dproj file and script that change using your preferred scripting language. FWIW, this is one reason why I generate my manifest XML in a pre-build script.
  3. Fr0sT.Brutal

    Getting Exception stack trace in 2021

    FWIW, there's a poor man's OS-based solution that gets addresses only const DBG_STACK_LENGTH = 32; type TDbgInfoStack = array[0..DBG_STACK_LENGTH - 1] of Pointer; PDbgInfoStack = ^TDbgInfoStack; {$IFDEF MSWINDOWS} function RtlCaptureStackBackTrace(FramesToSkip: ULONG; FramesToCapture: ULONG; BackTrace: Pointer; BackTraceHash: PULONG): USHORT; stdcall; external 'kernel32.dll'; {$ENDIF} {$IFDEF MSWINDOWS} procedure GetCallStackOS(var Stack: TDbgInfoStack; FramesToSkip: Integer); begin ZeroMemory(@Stack, SizeOf(Stack)); RtlCaptureStackBackTrace(FramesToSkip, Length(Stack), @Stack, nil); end; {$ENDIF} function CallStackToStr(const Stack: TDbgInfoStack): string; var Ptr: Pointer; begin Result := ''; for Ptr in Stack do if Ptr <> nil then Result := Result + Format('$%p', [Ptr]) + sLineBreak else Break; end; function GetExceptionStackInfo(P: PExceptionRecord): Pointer; begin Result := AllocMem(SizeOf(TDbgInfoStack)); GetCallStackOS(PDbgInfoStack(Result)^, 1); // исключаем саму функцию GetCallStackOS end; function GetStackInfoStringProc(Info: Pointer): string; begin Result := CallStackToStr(PDbgInfoStack(Info)^); end; procedure CleanUpStackInfoProc(Info: Pointer); begin Dispose(PDbgInfoStack(Info)); end; procedure InstallExceptionCallStack; begin SysUtils.Exception.GetExceptionStackInfoProc := GetExceptionStackInfo; SysUtils.Exception.GetStackInfoStringProc := GetStackInfoStringProc; SysUtils.Exception.CleanUpStackInfoProc := CleanUpStackInfoProc; end; procedure UninstallExceptionCallStack; begin SysUtils.Exception.GetExceptionStackInfoProc := nil; SysUtils.Exception.GetStackInfoStringProc := nil; SysUtils.Exception.CleanUpStackInfoProc := nil; end;
  4. Stefan Glienke

    TArray<T> helper

    GNU License 🤦‍♂️ Some of the methods in that helper are obsolete since XE7 because we have Insert, Add, Delete for dynamic arrays. Most of the other methods are in Spring.pas TArray which is not a helper for the System.Generics.Collections one but reimplements its methods and adds its own. For the TArrayRecord<T> type Spring.pas has Vector<T> (the naming is taken from C++ where this is the dynamic array type name)
  5. As I already said - the high constant factor with the RTL hash function is the problem - both TDict and Spring with faster equalitycomparer from Tiny.Library - results from an i5-3570 @ 3.4GHz Also testing in the global main is garbage because you are then using global variables that cause way less optimal code - fixing that (simply put all that benchmark code into a procedure) and you get the following results Win32: Get Name from ID (Search by integer): records Sequenced TArray.BinS TDict CustomBinS TSynDict Spring 10 26 375 25 24 32 27 50 56 447 25 29 32 26 100 83 473 26 32 35 25 1000 535 585 28 83 37 26 10000 5561 753 46 130 44 30 Get ID from Name (Search by string): records Sequenced TArray.BinS TDict CustomBinS TSynDict Spring 10 21 382 28 12 30 27 50 109 466 24 18 28 25 100 206 491 24 23 31 26 1000 2044 603 30 88 39 30 10000 20532 810 36 181 49 36 Win64: Get Name from ID (Search by integer): records Sequenced TArray.BinS TDict CustomBinS TSynDict Spring 10 24 297 26 23 32 26 50 60 323 26 30 31 26 100 94 328 26 40 32 26 1000 752 381 28 85 47 28 10000 8619 427 33 128 47 30 Get ID from Name (Search by string): records Sequenced TArray.BinS TDict CustomBinS TSynDict Spring 10 61 306 24 30 27 24 50 304 342 23 41 31 22 100 620 347 23 51 31 23 1000 6466 426 31 127 52 30 10000 64263 552 38 237 58 36
  6. Arnaud Bouchez

    SQLite - FireDAC or ?

    Note that the SQlite3 version embedded with FireDAC tends to be updated at a slow pace, and stick to the Delphi release. It is currently 3.23.1 in Delphi 10.3, whereas the current is 3.28. With an OpenSource or third-party solution, you may be able to update SQlite3 without upgrading the compiler. I have seen requests to upgrade SQlite3 for regulatory or security reasons. 3.23.1 is known to be vulnerable, as reported e.g. by https://www.cvedetails.com/vulnerability-list/vendor_id-9237/Sqlite.html and https://www.zdnet.com/article/sqlite-bug-impacts-thousands-of-apps-including-all-chromium-based-browsers/
  7. Edwin Yip

    SQLite - FireDAC or ?

    An alternative is mORMot, its core is based on SQLITE3, you don't even need the external sqlite3.dll - you statically link the .obj file into your executable. note: you can use the sqlite db functions alone, without using its excellent ORM layer or the http/rest server modules. But I suggest take advantage of it's ORM for CURD - it'll save a lot of your time! https://synopse.info/files/html/Synopse mORMot Framework SAD 1.18.html#TITLE_142
  8. Lars Fosdal

    TArray<T> helper

    @Tommi Prami It would have been awesome if we could do helpers for generics. We can't.
×