Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 12/09/22 in all areas

  1. Here is the QP entry: https://quality.embarcadero.com/browse/RSP-40174
  2. And where is this written? Whoever made the change obviously did it to handle lists with duplicates, so it's pointless to argue that lists are usually without duplicates. It's fine that there are corner cases that performs worse than optimal, like with quick sort, but the worst case here is a bit extreme considering that it could have been avoided with a bit of effort - or they could have just Googled the solution. There's just no excuse for the current implementation.
  3. I admit the wording was chosen as a counterpart to Davids claim and should not be taken literally. In addition I also mentioned that I would vote for a better implementation. It is just my personal opinion that if everybody is going to avoid the standard routines in favor of writing its own, we may never see any improvement in that area.
  4. The famous Quick Fix™ technique - Sponsored by Intel and your local power company.
  5. TL;DR: race condition means any use of the PPL may lead to a crash https://quality.embarcadero.com/browse/RSP-40169
  6. aehimself

    How to open a file in the already running IDE?

    https://github.com/aehimself/AEFramework/blob/master/AE.DelphiVersions.pas finally updated, if anyone will need this in the future. I'll attempt the reporting sometime next week. Never did that before 🙂
  7. aehimself

    How to open a file in the already running IDE?

    @Attila Kovacs // Need to reimport these two function UnpackDDElParam(msg: UINT; lParam: LPARAM; puiLo, puiHi: PUINT_PTR): BOOL; stdcall; external user32; function FreeDDElParam(msg: UINT; lParam: LPARAM): BOOL; stdcall; external user32; // class procedure TDdeHelper.DdeWndProc pLo, pHi: PUINT_PTR; // NOT IntPtr GlobalUnlock(pHi^); GlobalFree(pHi^); And your code should be 64-bit compatible 🙂 I'll run some more tests but it seems that now it is finally working.
  8. aehimself

    How to open a file in the already running IDE?

    It's not a threading issue, it's 64-bit issue! According to MSDN, it's declared as: BOOL UnpackDDElParam( [in] UINT msg, [in] LPARAM lParam, [out] PUINT_PTR puiLo, [out] PUINT_PTR puiHi ); In Delphi, however: Now, we are feeding it an LParam, which is NativeInt. Time to re-import it, correctly this time 🙂
  9. programmerdelphi2k

    No one can help

    normally, to read or save a BLOB you would use some like this ... better, TStream ... not TMemoryStream! in fact, the BLOB fields (data) are not loaded when in "select'ing", just a BLOB ID is known! now when read your blob then, the "data" will be known!
  10. This is in Winapi.Windows.pas: type PMemoryBasicInformation = ^TMemoryBasicInformation; _MEMORY_BASIC_INFORMATION = record BaseAddress : Pointer; AllocationBase : Pointer; AllocationProtect : DWORD; RegionSize : SIZE_T; State : DWORD; Protect : DWORD; Type_9 : DWORD; end; {$EXTERNALSYM _MEMORY_BASIC_INFORMATION} TMemoryBasicInformation = _MEMORY_BASIC_INFORMATION; MEMORY_BASIC_INFORMATION = _MEMORY_BASIC_INFORMATION; MemInfo is just a local variable in System.SysUtils, function GetExceptionObject.
  11. Has someone created it on QP, so that we can vote? Probably with link to https://en.wikipedia.org/wiki/Binary_search_algorithm#Procedure_for_finding_the_leftmost_element Everyone usually needs better version immediatelly, while waiting for the fix can take... ehm... few years?
  12. Lajos Juhász

    downloads website

    If you are looking for the Registered Prodducts portal you can find it at https://my.embarcadero.com.
  13. Der schöne Günther

    TestInsight 1.2 released

    @Stefan Glienkewhere is the most recent download? The page still links to https://files.spring4d.com/TestInsight/1.2.0.0/TestInsightSetup.zip Your comment here states that there is at least a 1.2.0.4. The most recent version I have been able to find was listed at https://bitbucket.org/sglienke/testinsight/wiki/Home and links to https://files.spring4d.com/TestInsight/1.2.0.1/TestInsightSetup.zip
  14. Voted If possible edit the code parts (I think there is way to have prettied code in Jira) so the bug report would be essier to read.
  15. Nobody should create such a worst case list in the first place. Honestly, I don't understand such a statement targeting an extreme corner case. Although I would vote for a better implementation, my lists are usually without any duplicates and therefore don't care about that, but perhaps I am special.
  16. Dalija Prasnikar

    function returning interface

    I just looked at that code and the problem is not in the inline variable. Casting as interface creates hidden interface reference no matter what and that reference hinders release. This behavior is not a regression and it is not related to inline variables so I wouldn't hope it will be fixed soon. Reported as https://quality.embarcadero.com/browse/RSP-40166
  17. I'm no longer looking. I am officially walking away from software engineering. I wish everyone the best.
  18. Wait. If you have a list with two million items that all have the same value, and you search for that value, the code will do 1 million compares to find the first item?
  19. I have implemented this kind of logic before, but only in plain socket code (though I suppose it can be applied to socket libraries like ICS or Indy, too). It requires the TLS server to peek not recv the first few bytes of a new connection, and only if those bytes belong to the header of a TLS handshake then enable TLS on that connection (allowing the previously-peeked bytes to now be read by whatever TLS library you use), otherwise don't enable TLS on the connection and just read the connection raw.
  20. dummzeuch

    tedit hint not working

    Also, "enable runtime themes" must be enabled in the project options (in Delphi 2007, no idea what it's called later), but that's the default. I know that because I usually disable this option so I can set colors as I want rather than having them overridden by Windows, so the cue banner didn't work in this case.
  21. Achim Kalwa

    tedit hint not working

    If you want to see the TextHint even if the TEdit control has the focus, you need to send EM_SETCUEABANNER to the control: https://learn.microsoft.com/en-us/windows/win32/controls/em-setcuebanner like this: uses ... WinApi.CommCtrl, ... procedure TForm1.FormShow(Sender: TObject); begin SendTextMessage(Edit1.Handle, EM_SETCUEBANNER, WParam(True), 'please type here'); end; WParam(True): if the cue banner (text hint) should show even when the edit control has focus. Be aware that VCL controls sometimes gets recreated, resulting in a new handle value and losing previous settings. A better way would be to inherit from TEdit and overwrite the protected DoSetTextHint() method like this: Interface uses ... WinApi.CommCtrl, Vcl.Themes, ...; type TMyEdit = class(TEdit) protected procedure DoSetTextHint(const Value: string); override; end; TEdit = class(TMyEdit); ... Implementation procedure TMyEdit.DoSetTextHint(const Value: string); begin if CheckWin32Version(6, 1) // Windows 7 and up and StyleServices(Self).Enabled and HandleAllocated then SendTextMessage(Handle, EM_SETCUEBANNER, WPARAM(True), Value) else inherited; end; HTH
×