Jump to content

Fr0sT.Brutal

Members
  • Content Count

    2268
  • Joined

  • Last visited

  • Days Won

    46

Everything posted by Fr0sT.Brutal

  1. Fr0sT.Brutal

    Delphi / TCP/IP Server

    This will slowdown the app because of Memo performance, I use Selection for this if mLog.Lines.Count > 2000 then begin mLog.Lines.BeginUpdate; // Deleting lines one by one is damn slow. // So we take length of text and cut half of it mLog.SelStart := 0; mLog.SelLength := mLog.GetTextLen div 2; mLog.SelText := ''; // Remove probably partial line mLog.Lines.Delete(0); mLog.Lines.EndUpdate; end; This looks suspicious, shouldn't it be cliList [ i ]?
  2. Fr0sT.Brutal

    Firemonkey DLL: loading a TBitmap in initialization fails (solved)

    This is another evidence of what Raymond Chen has told in "Some reasons not to do anything scary in your DllMain" articles
  3. You mean, programmatically ? Because you can achieve the goal much easily with any SMS exporter. The cool one is My Phone explorer with PC client - I use it for more than decade
  4. There are plenty of places where this "terrible" looks like Heavens
  5. So, if you're in USA get $100k/yr, what real income is?
  6. AFAIR you have to listen for state change event and analyze item state. IMHO Listview is an awkward and slow piece of crap. I advice to avoid it where possible
  7. Fr0sT.Brutal

    App plugins

    Then Python4Delphi is your choice. There's even special section for it here in the forum
  8. Fr0sT.Brutal

    TNetHttpCLient trusted CA

    You can include necessary binaries to main one as resources and extract them at runtime.
  9. Fr0sT.Brutal

    App plugins

    You didn't say how these plugins should be linked to main app, probably something like RAD's Tools menu is enough? Otherwise you'll have to either include a script engine into app or have some interface a la COM in the main app for plugins to interact with
  10. Fr0sT.Brutal

    TNetHttpCLient trusted CA

    I still see no answer why these requirements. Moreover, what exact req's are?
  11. Fr0sT.Brutal

    Setting & Usage of TFormatSettings..

    Data display => locale-dependent Data exchange => hardcoded
  12. Probably it' something to do with UTF16 surrogate pairs which are used in Far East languages
  13. Fr0sT.Brutal

    File Search

    Why setting length to 0 at the start and end? Dynamic arrays are managed internally
  14. Fr0sT.Brutal

    Community license

    Everyone is smart when looking back. I guess nobody could expect such a trap from Emba. For the future seems reliable to put CE inside a VM or at least block all its network activities. You'll never know when they decide to blame you for, say, working with CE via McD's public WiFi.
  15. Fr0sT.Brutal

    Have any of you worked with Visual C++?

    Worked a little. Hate it, just like I hate any C++ and additional stuff from VС itself
  16. Fr0sT.Brutal

    Use case or if else ?

    No strict rule, just the personal feeling. I also prefer as short as possible solutions for non-critical fragments, i.e. I won't create and maintain dictionary for a proc that is called rarely, just use array of const. Where the speed REALLY matters (parsers), all beauty of code and extendability could be sacrificed so there could appear constructions like case inp[4] of 'A': // switch STRA1, STRABC, STRADEF 'B': // switch STRB2, STRBCD, STRDXYZ
  17. Fr0sT.Brutal

    set of object instances

    https://en.wikipedia.org/wiki/Set_(abstract_data_type)
  18. Fr0sT.Brutal

    Optimization On or Off ?

    Hard to tell without examples. Call stacks could vary for inlined functions but how optimization could cause difference?
  19. Fr0sT.Brutal

    Use case or if else ?

    TEnum + array[TEnum] of strings + case TEnum(IndexStr) => 1. Constants are extracted from code 2. array[TEnum] ensure constants are in sync with enum 3. named enum members are more readable than numbers 4. static analyzer (alas not the Delphi's) will how warning if case won't cover all possible enum values I used IndexStr approach in some of inline switches but it really doesn't look obvious. If this case is speed-critical, you probably have to use sorted array and binary search. However for low number of items it gains almost nothing. Dictionary also has its penalty of hashing the value to be searched for. In fact seems for short sets of short strings nothing beats dumb linear search in an array
  20. Fr0sT.Brutal

    File Search

    Has too many mistakes. Even ChatGPT would write it better. Why not just do FindFirst(root+pattern) where pattern could be either mask or exact name?
  21. Fr0sT.Brutal

    Message Broker??

    Seems you need some centralized storage of data where all other apps could connect. It could be some 3rd party server or your generator app. Server could be message broker (MQTT etc) or Redis or a light database or simple custom HTTP/REST server. What option you prefer depends on your setup: - is generator app constantly running so it could be server - is adding config of server address to all clients acceptable - what components are allowable Some message brokers include 0-conf server autodiscovery (I can't name exact implementations however)
  22. Fr0sT.Brutal

    Automating Delphi FMX based application

    Probably the most clever and correct solution is WinAppDriver which relies on accessibility info that seems to be supported by FMX. Probably this could help as well
  23. Fr0sT.Brutal

    Unicode normalization

    Why not extract only necessary external requirements to custom low-fat units and leave the unit of interest as is? Or there's too much deps?
  24. Fr0sT.Brutal

    set of object instances

    TList descendant with overridden .Add that would run Find before actual adding?
×