Jump to content

Attila Kovacs

Members
  • Content Count

    1967
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by Attila Kovacs

  1. Attila Kovacs

    Sorting two lists in step?

    no it wasn't
  2. Attila Kovacs

    Sorting two lists in step?

    was not defined tht list A contains unique keys 🙂
  3. Attila Kovacs

    Sorting two lists in step?

    no, but it's already answered. creating an index array and sorting that.
  4. Attila Kovacs

    Sorting two lists in step?

    no, it's like 'C' -> Pear 'A' -> Apple 'B' -> Banana
  5. Attila Kovacs

    Scanning for files while they are created or deleted

    You are overcomplicating the task. The file can be deleted even when its last byte is read. Just copy the files, catch all IO errors, and ignore the ones from the currenct file. The backup will be still valid for that moment.
  6. Attila Kovacs

    for i := X to Y inclusive... how?

    if (i >=0) and (i <=7) then do_something;
  7. Attila Kovacs

    Why does a stack overflow cause a VCL application to terminate?

    There is no such thing as 'popping back,' and it's highly likely that the last return address is already missing or sitting at the wrong stack position. It only guards against small increases in the stack, not large ones.
  8. Attila Kovacs

    Why does a stack overflow cause a VCL application to terminate?

    Perhaps it's because x64 parameters are stored in registers instead of on the stack. Could you check the assembly code and add more parameters to see if x64 fails as well?
  9. Ask a programmer to convert that BSON example into an universal one-liner class method.
  10. Attila Kovacs

    Close all othr pages in the IDE

    Am I the only one annoyed that the function 'Close all other pages' (Shift + Ctrl + F4) also closes the welcome page? How much time have you spent in the past 30 years reopening the welcome page?
  11. Attila Kovacs

    Close all othr pages in the IDE

    Ok, once I find an acceptable release, I may decide to buy it again. After reinstalling the wizard, the tthread version stopped working, so I had to switch to using a timer instead. The only way it would work was if it was loaded at startup. Fortunately, it's becoming more stable now. The annoying undocked wizard windows are now history, at least I'm testing this code and it looks ok: procedure TClipboardWizard.ToggleLayout; var ctx: TRttiContext; AppBuilder: TComponent; AppBuilderType: TRTTIType; cbDesktopKeyPress: TRTTIMethod; Key: Char; begin ctx := TRttiContext.Create; try AppBuilder := Application.FindComponent('AppBuilder'); if AppBuilder <> nil then begin AppBuilderType := ctx.GetType(AppBuilder.ClassType); cbDesktopKeyPress := AppBuilderType.GetMethod('cbDesktopKeyPress'); Key := Chr(VK_RETURN); if cbDesktopKeyPress <> nil then cbDesktopKeyPress.Invoke(AppBuilder, [AppBuilder, TValue.From(Key)]); // cbDesktopKeyPress(Sender: TObject; var Key: Char); end; finally ctx.Free; end; end; Thank you for the input and the ideas.
  12. Attila Kovacs

    Close all othr pages in the IDE

    @Uwe Raabe ok, looks like postponing the open/close helped (got AV on closing opening wp from OTA FileNotification events) https://stackoverflow.com/questions/38997386/queue-procedure-call-on-same-main-thread still your solution 😄 by the way, is it possible to auto-dock the wizard's DockableForm's after compiling/instlaling the ota wizard? or should I imitate a layout-combo-enter after loading the dll
  13. so you are trying to cache the incoming stream to gain performance why don't you just feed the form from a local reader instead of downloading it when the version matches? using the same method I don't think any other solution would pay off in the long run
  14. Attila Kovacs

    Delphi says "x is not a valid integer value"

    In c++, you are also assigning it after the "begin".
  15. Attila Kovacs

    Delphi says "x is not a valid integer value"

    where do you assign it in c++/pick one ? before the "{"/pick one ?
  16. Attila Kovacs

    Delphi says "x is not a valid integer value"

    Are you Roman? What do you expect from "StrToInt('x')" ? 10 ?
  17. Attila Kovacs

    Close all othr pages in the IDE

    Okay, It's a good idea, I can steal that.
  18. Attila Kovacs

    Remove empty event handler

    *changed my mind*
  19. Attila Kovacs

    ScanTime issue

    in System.SysUtils.ScanTime() (Berlin U2) there is a line if ScanChar(S, Pos, AFormatSettings.DecimalSeparator) then is this nonse still the same in recent Delphi versions?
  20. Attila Kovacs

    ScanTime issue

    I'm sure we could find a workaround but why not just fix Delphi?
  21. Attila Kovacs

    ScanTime issue

    Not really. I can't modify the DAC source, neither do I want to. 😕
  22. Attila Kovacs

    ScanTime issue

    or just scanning for both
  23. Attila Kovacs

    ScanTime issue

    https://learn.microsoft.com/en-us/sql/t-sql/data-types/time-transact-sql?view=sql-server-ver16#supported-string-literal-formats-for-time ISO 8601 hh:mm[:ss][.fractional seconds] It seems that Microsoft did not fully comply with the ISO 8601 standard, which allows for either a dot or a comma as the fractional seconds separator, as seen in RFC 3339. This has resulted in issues with the DAC, and simply changing the decimal separator will not resolve the problem. Microsoft's SQL Server consistently uses a dot as the fractional seconds separator. But using a hardcoded dot as the fractional seconds separator in the time format could cause issues when integrating with other sources that use a comma. Therefore, the best solution may be to introduce a new separator specifically for the time fraction, which can be left open or limited to either comma or dot. So we are there where we started.
  24. Attila Kovacs

    ScanTime issue

    @Uwe Raabe I found that in RFC3339, this separator it's called "time-fraction" and restricted to comma or dot. However, we do not have here an RFC3339 implementation as we can set anything to decimalseparator. The question is, is it necessary to separate the two or not. If not, it should be decimalseparator for both directions, indeed. However, I'm still not comfortable with combining the two and it gives less freedom.
×