Jump to content

Attila Kovacs

Members
  • Content Count

    1936
  • Joined

  • Last visited

  • Days Won

    25

Everything posted by Attila Kovacs

  1. Attila Kovacs

    Convert two Integers to a DateTime??

    You can't save duration into a datetime value, ie. you could, but that makes not much sense.
  2. Attila Kovacs

    XLS 2 XLSX

    @Rollo62 right, libreoffice can convert "C:\Program Files\LibreOffice\program\soffice.exe" --convert-to xlsx "C:\input_path\file.xls" -outdir "C:\output_path"
  3. Attila Kovacs

    Delph ERP Help

    so, what database is that? does it have "views"?
  4. Since when does inherited work on properties? "Inherited Data". And where else except the obvious? Documentation? I was annoyed that I could not set FData as it is private so I gave him an "inherited" in anger and fury and the compiler wasn't complaining. 😮 TTreeNodeHelper = class helper for TTreeNode private function GetNodeData: TNodeData; procedure SetNodeData(const Value: TNodeData); public property Data: TNodeData read GetNodeData write SetNodeData; end; function TVariantenTreeNodeHelper.GetNodeData: TNodeData; begin Result := inherited Data; end; procedure TVariantenTreeNodeHelper.SetNodeData(const Value: TNodeData); begin inherited Data := Value; end;
  5. Attila Kovacs

    Inherited on Properties and co.

    @Lars Fosdal In this case I'm overriding the Data property, so this is the only way to set/get them.
  6. Attila Kovacs

    Inherited on Properties and co.

    Thx. The gas prices. 😉
  7. Attila Kovacs

    Inherited on Properties and co.

    @Uwe Raabe Wow. Will turn out it's on the first page of the help 🙂
  8. In my experience, lower the display's contrast and brightness and set the gamma correction higher in the game. Constantly changing lighting conditions can't be the answer for anything because it's just exhausting for the pupil. That's why I have to turn off instantly in modern displays and w10 the automatic brightness correction. On the other way, if you like it anyway, there are tons of DIY Ambilight kits on Ali*.
  9. @Uwe Raabe Yeah ok, I see, this is blurry mode, an eye killer. I'm switching to dpi awareness handled by application. (Yeah I know, there are several other problems, but I'm doing the same like you, when I find time I'm patching the IDE)
  10. How do you do that? Using it in blurry mode? Because MMX forms are broken in DPI Aware App mode.
  11. How long does this "IDE hang" takes? Can you attach the hanging IDE process to a debugger like OllyDbg and step through until user code and track it down what part of the IDE / Module it causes?
  12. Attila Kovacs

    How to fix "Warning'

    just write sl:=StrArray(TDirectory.GetFiles(SourceDir)); and drop "Dir"
  13. @David Heffernan I admire your patience.
  14. https://stackoverflow.com/questions/1282015/the-fastest-way-to-compare-a-partial-string answered by "mat"
  15. Attila Kovacs

    Free EurekaLog license drawing

    Holy cow.
  16. Attila Kovacs

    Uniqueness and Security of domain name

    As François suggested, set up a resource in the domain which you check against, then you can manage the permissions from the background. And for your customers, -as many of us suggested-, create a separate dll. If you are concerned about leaking the internal dll to the customers, load the data in the internal dll from the internal resource.
  17. I think adding an "in my case" on the bottom of the second page of the thread is a little unfair.
  18. "percent" is not a unit neither "lot" is If you are already patching files from your customers, it would have been a little effort to test it yourself on your use case with realtime data and post the results. I don't think that this test which comparing Pos() with SubString() and giving a result of 0,00006 milliseconds difference, makes any sense.
  19. I see now what you mean, you are right about optimization part (just as 5 years ago). I had only this thread in my mind.
  20. He isn't using that code at all. At least not in the tests.
  21. StringReplace iterates only once over the string, there is nothing to solve. It's his tests where he is ignoring the fact that StringReplace not only replacing (or not) parts of the string, but also assigns the result to a new string. Those test are failing and by fixing it the differences are not that big any more. A couple of milliseconds on a loop with 10 million iterations.
  22. Why don't you fix your tests first? You misled yourself with faulty tests.
  23. Attila Kovacs

    AnsiPos and AnsiString

    to answer your original question: They are in different units, one in System.AnsiStrings the other in System.SysUtils, and either you are using them mixed or they are declared in random order in the uses list.
  24. Ok, well Yes, it doesn't use Pos to check if it needs replacing at all. System.SysUtils.StringReplace: "FoundPos := Pos(xOldPattern, Str, FoundPos);" Fail. Aha, I just noticed StrigReplace has rfIgnoreCase flag. 6th line in System.SysUtils.StringReplace: "if rfIgnoreCase in Flags then" Fail. Your test case: vNewStr := 'Fail.'; if Pos(cNoFind, cLongStr) > 0 then vNewStr := StringReplace(cLongStr, cNoFind, cReplace, [rfReplaceAll]); Writeln(vNewStr); Fail.
  25. Maybe you have a special, dedicated RTL shipped with Delphi. Was it in a golden envelope?
×