Jump to content

Lars Fosdal

Administrators
  • Content Count

    3416
  • Joined

  • Last visited

  • Days Won

    113

Everything posted by Lars Fosdal

  1. Lars Fosdal

    Pitfalls of Anonymous methods and capture

    Which is why my post specifically pointed out that there is a link to the SCCE in the blog post?
  2. Lars Fosdal

    Pitfalls of Anonymous methods and capture

    Yes, the examples leak. I didn't want to clutter it up with too much housekeeping code. Thank you, Uwe, for enlightening me on variable vs value capture. IMO, the compiler could need a hint or warning if a variable capture happens in a loop, because it is really easy to overlook. I use a number of variations on this to do dependency injection. It really helps with avoiding pulling too much project specific code into general code and keep the libraries isolated from each other. This code in particular is part of a web server that (now correctly) supports a configurable collection of JsonRPC protocol handlers. The web server knows nothing about Json, and the protocol handlers knows almost nothing about http.
  3. Lars Fosdal

    10.2 Tokyo unable to report issues from within the IDE

    What do we know about the state of 10.3 Rio in this context?
  4. Does anyone know if there are existing libs out there that can extract this across all FMX platforms? - Current user - Device name
  5. Lars Fosdal

    Cross-platform discovery of device name and user name?

    https://developer.android.com/training/id-auth/identify Would this be usable to get some sort of username / identity? Perhaps there is something similar on iOS as well?
  6. Lars Fosdal

    Request for advice: FireMonkey and Frames

    So basically just like for VCL. Nice.
  7. Lars Fosdal

    Request for advice: FireMonkey and Frames

    @Rollo62 Can you exemplify how you "load via runtime into TRectangles" ? In my current app, I want to instantiate the frame onto a TTabItem.
  8. SSD disks are usually connected via SATA (Serial ATA) or PCIe using the NVMe protocol. The first does not do parallel operations, while the second does. However, the speed benefit of the latter is when writing large amounts of data in parallel to individual areas. When deleting files, the OS is rewriting minor amounts of data in a shared area that needs to be integrity managed i.e. shared access locking, so I would suspect that there is no gain to parallelizing deletion of files.
  9. Doh! Never mind! I had commented out one of two overloaded methods in the interface section. There was another "fatal" compilation error further up in the compiler output list. Basically, it was just a weird IDE/compiler artifact due to invalid code.
  10. Lars Fosdal

    TFDParam.Size - best practice?

    I have a new stored proc that takes a varchar(max) argument for logging - and I occasionally run into this problem when the argument is very long. It then raises the following exception EFDException [FireDAC][Phys][ODBC]-345. Data too large for variable [#9]. Max len = [8000], actual len = [24448] Hint: set the TFDParam.Size to a greater value Note that I have a couple of varchar(5000) arguments in the same method that does not complain, so I assume that the default length for strings is 8000 chars. What is the best practice for dealing with this situation? My wrapper code for the stored proc does not really know anything about the potential sizes of these strings as it passes the values as variants. Is it acceptable to always measure the length of the string and dynamically increase TFDParam.size? I have a case already that deals with XML logging to an XML field. vtUnicodeString: begin p.DataType := ftString; s := String(ConstParams[ix].VUnicodeString); len := Length(s) * SizeOf(Char); if Len > p.Size // Autosize then begin p.DataType := ftWideMemo; p.Size := Len + 2; end; p.Value := s; end; But - what happens if the actual field is not type , but [varchar(max)] ? Can I do the above for long string fields? What is the recommended action for handling changes to TFDParam.size for long varchar arguments?
  11. Lars Fosdal

    Amazing support at TMS

    I love how responsive TMS are as a company, but I wish they did more regression tests on the TAdvStringGrid.
  12. Delphi Developers Archive (Experimental) for the Google + Delphi Developers Community is online. https://delphi-developers-archive.blogspot.com The posts are searchable by tag list or free text search. FYI - This is work in progress, and I hope to improve the following issues: - Some posts have erroneous titles - Some posts are missing attribution of the original poster - Some 600 posts are missing due to an inexplicable quota error during import Comments on the archived posts are currently disabled until the import is finalized. Comments appreciated.
  13. It looks like I have to delete and re-import, oh joy...
  14. @Attila Kovacs That is one of the fixups that the Google+Exporter have implemented. At the moment I am trying to find out if I can update the posts, or if I have to delete them all and re-import them. Blogger is a difficult beast...
  15. Odd story: Of the 12K posts, 3 did NOT have a category! Go figure!
  16. @Attila Kovacs - If you find something truly horrendous, feel free to send me a link. I am not going over the 12K posts by hand, though. Edit: But not yet, do it after I've done the brush ups that Google+Exporter are implementing. I'll announce it when I think it is "done". Besides, Tags existing in the original G+ posts are perpetuated. Post category is also attributed as a tag. Also, the blog search is full Google search, so you can write things like someword AND (thisword OR thatword) Note the capitalization of logical keywords. Hence the titles are the least of worries.
  17. Not possible. Blogger insists on a title, and Google+Exporter makes what it can out of the first text(s) it finds in the post.
  18. Lars Fosdal

    Changes in Parallel Library

    Alternatives to sleep,could be to have a class that creates large arrays of random values, and do Bubble sort on them, optionally logging the progress to disk 😛
  19. Consider the following Json data: The array elements are lists of integers, strings and objects. { "message": [ [ 0, "a text" ], [ 1 ], [ 1, { "switch": true } ], [ 2, "text one", "text line two" ] ] } Assume the JsonData const below is filled with the Json above. Using the Json tools from unit REST.Json, I would typically do like this. const JsonData = // see Json data above var Message: TJsonMessage; begin Message := TJson.JsonToObject<TJsonMessage>(JsonData); But - how should TMessageArray be declared to accept the above structure? Is it actually possible? TJsonMessage = class private Fmessage: TMessageArray; public property message: TMessageArray read FMessage write FMessage; end;
  20. Correct link: REST.Json.Interceptors types/methods are undocumented https://quality.embarcadero.com/browse/RSP-23026 Unabashedly mentions @Marco Cantu
  21. G+ is slightly different. As Owner or Moderator you can only remove posts or comments, not edit them. A post that is removed from a community, remains on the profile of the original poster. I am already missing G+ a lot.
  22. Lars Fosdal

    Changes in Parallel Library

    Please amend the title. The title should IMO reflect the contents of the post, which "-------" does not.
  23. Sounds like the std terms for any social media platform, i.e. meaning that the content will be massaged electronically to fit onto different devices and delivery methods.
  24. Although there are no usage statistics for the G+ Delphi Developers, there is no doubt that the near 10k user count it has, in no way represent the actual number of active users, nor does it indicate the number of lurkers.
×