Jump to content

Lars Fosdal

Administrators
  • Content Count

    3416
  • Joined

  • Last visited

  • Days Won

    113

Everything posted by Lars Fosdal

  1. Lars Fosdal

    Backup of files + mysql

    Does the clients access the DB directly, or is there a service between the clients and the db? If direct access, you have to take extra care in your design of the backup - to avoid clients making partial changes during the backup. It is not a trivial problem you have here...
  2. Lars Fosdal

    Backup of files + mysql

    Is the DB a single instance on a server, accessed by multiple users? There are several strategies, but it is hard to say which one is the right one without insights into how your DB is setup and used. https://blog.devart.com/mysql-backup-tutorial.html https://dev.mysql.com/doc/refman/8.0/en/backup-and-recovery.html Your application could probably be installed from scratch, but what about application configuration? Stored locally in file or registry? Complex config or simply a URI to the DB + credentials?
  3. Lars Fosdal

    Replacement for TBits?

    MMFs are good for "random R/W access" - but not so great for sequential R/Ws of huge files. Have a look at all the SO posts about systems crawling to a halt when using MMFs.
  4. Lars Fosdal

    Console application - CRT Unit - Console Library

    Back in those days, I wrote a GUI for my first commercial DOS app. It supported Hercules, EGA, and VGA cards at the time. Source code on GitHub - UPPERCASE reserved words and all...
  5. Lars Fosdal

    Console application - CRT Unit - Console Library

    Wow, that sent me back to the 80's 🙂 Nicely done!
  6. Lars Fosdal

    System.Net.Sockets

    Any plans to add Android/iOS support in the future?
  7. Lars Fosdal

    Feedback Request - FastReports vs ReportBuilder?

    We use FastReports for simple reports, and it has been somewhat challenging due to quirky behaviours such as not liking to be used in parallell threads. Since we didn't need client tools for report design, but only crafted the reports in the development phase, it was chosen due to being available out of the box. We also use a server version of Crystal Reports that is fed through database queue tables and driven by a standalone integration to produce labelling and documents.
  8. Delphi 11.3 28.0.47991.2819 (Update 3 + Patch 1) Off-topic: Ctrl+O + Ctrl+O behaves weirdly, IMO. It inserts at top of file instead of at cursor, and it doesn't respect existing options like {$APPTYPE CONSOLE}
  9. Why does your sim code execute in the expected order for me?
  10. Lars Fosdal

    Strange debug output

    We used OutputDebugString for a while, but found that if you had a large number of logged outputs from multiple threads, it would occasionally drop the output. We ended up changing the way we logged by writing debug data in text format to a threadsafe ring buffer and have a background thread burst the logged data to a textfile periodically, and that would transition to a new file every midnight.
  11. Buffers that work with AssignFile/Readln/Writeln? That is the use I describe.
  12. I am open to suggestions for alternatives?
  13. So much fun with moving parts!
  14. Lars Fosdal

    Access TStringGrid InplaceEditor

    Doesn't the grid get OnKeyDown events once you are in the cell editor? https://docwiki.embarcadero.com/Libraries/Sydney/en/FMX.Controls.TControl.OnKeyDown
  15. When do you get the error? During connect, authentication or later?
  16. I use BlockRead/BlockWrite for a text file device driver that really speeds up writing and reading a text file, since it allows me to configure much larger buffers. https://pastebin.com/u/LarsFosdal/1/ns7ET60N
  17. Lars Fosdal

    Access TStringGrid InplaceEditor

    What about https://docwiki.embarcadero.com/Libraries/Sydney/en/FMX.Grid.TStringGrid.OnEditingDone ?
  18. Lars Fosdal

    Access TStringGrid InplaceEditor

    Argh, Mike - my bad. I was speaking from a VCL point of view - not noticing that you posted in the FMX section. Not the first time I've made that mistake.
  19. Threads are about parallel/background work, but after invoking a task, you could in theory use ITask.Wait to stop the main thread while waiting for it to complete - but then you might as well execute the code from the main thread instead of creating other threads. Also, if the thread gets stuck, your main thread would be stuck. It is better to use parallel threads and in the main thread receive signal events for when the background thread succeeds/completes/fails. Threads are not hard when you understand them and the best practices around the use of them - but gaining that knowledge can be a challenge. Read the theory, study the examples, and try it out.
  20. Lars Fosdal

    Access TStringGrid InplaceEditor

    One option is the OnSetEditText event. https://docwiki.embarcadero.com/Libraries/Sydney/en/Vcl.Grids.TCustomDrawGrid.OnSetEditText
  21. The JSON looks non-standard. JsonLint.com doesn't like it either. It doesn't know how to deal with ObjectId(); Can it be that it is BSON? Ref. https://stackoverflow.com/questions/16586180/typeerror-objectid-is-not-json-serializable
  22. I do a lot of string manipulation, but I have not seen this effect yet. Weird. I would definitively have assumed that the concatenation would go left to right on evaluation of the functions. Would this change the outcome? s := ''; s := s + ReadChar + ReadChar;
  23. Lars Fosdal

    Replacement for TBits?

    Intel's blurb: "Under the right circumstances, the technology lets CPU cores effectively do two things at once." - but it doesn't really outline the circumstances. https://en.wikipedia.org/wiki/Hyper-threading has some interesting observations, making me wonder if I actually would be better off by disabling Hyper-Threading...
  24. Searching the 11.x source: So - there is some compiler magic involved somewhere with the BlockWrite proc. In System.pas, below line 3000, you find the comment: { Procedures and functions that need compiler magic } and a long list of funcs and procs. _BlockWrite is in that section. Map file says 0001:0000BE10 System.@BlockWrite Is it a pointer to the procedure which is set up somewhere by the compiler/RTL?
  25. Lars Fosdal

    Can one run delphi (32 bit) apps on Windows 11 ARM?

    32-bit and 64-bit Windows Apps Runs fine in Windows for ARM under Parallells on my MacBook Pro M1 (macOS Ventura 13.4.x)
×