Jump to content

David Heffernan

Members
  • Content Count

    3586
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by David Heffernan

  1. David Heffernan

    Managed dll instead of an unmanaged one

    Don't really know what you mean.
  2. You don't do binary search here. With sorting, you sort and then a single iteration is all you need. That has the same complexity as the sort O(n log n). Without sorting you compare all vs all, so O(n^2). But yeah, no binary search.
  3. Probably, but then for small lists often performance isn't key.
  4. Isn't this better suited to a hash set rather than a string list?
  5. David Heffernan

    Managed dll instead of an unmanaged one

    Yes. But you need to use a tool like UnmanagedExports.
  6. David Heffernan

    nil v self in form create??

    Doesn't matter. May as well use nil.
  7. David Heffernan

    Bulk change of Manifest settings??

    Work out what change needs to be made to the dproj file and script that change using your preferred scripting language. FWIW, this is one reason why I generate my manifest XML in a pre-build script.
  8. It depends. There are lots of different ways to do it. There is no single "best" way.
  9. David Heffernan

    Build managed dll in Delphi

    No. That's a library for creating unmanaged exports from a managed library. So you take a C# library and use DllExport attributes to allow unmanaged code, like Delphi, to consume that C# library with LoadLibrary, GetProcAddress, etc. The question being asked here is very different. It asks if it is possible to make a managed library with Delphi. And that isn't possible.
  10. David Heffernan

    Micro optimization: Math.InRange

    I'm betting that improving the performance of InRange has no impact on the performance of these reports.
  11. David Heffernan

    TJsonTextWriter out of memory

    Use a SAX style parser rather than DOM style parser is sometimes an option
  12. David Heffernan

    "Divided by zero" exception

    Step 1 is to inspect the state of the floating point exception masks while your program is executing. Use trace debugging to do that. Check whether or not my hypothesis is correct.
  13. David Heffernan

    TArray<T> helper

    It's a helper for TArray, not for TArray<T>, by necessity. I think spring4d has something similar.
  14. David Heffernan

    Examples of Android apps

    If you aren't going to reuse existing delphi code then you should also evaluate other tools.
  15. David Heffernan

    InputQuery texts

    How would you handle non ANSI input?
  16. David Heffernan

    "Divided by zero" exception

    It's all proscribed by ieee754.
  17. David Heffernan

    "Divided by zero" exception

    Are you talking about maths, or talking about ieee754?
  18. David Heffernan

    "Divided by zero" exception

    Well, this depends on whether or not exceptions are masked.
  19. David Heffernan

    "Divided by zero" exception

    I'm not recommending anything. I'm just stating how ieee754 defines these operations.
  20. David Heffernan

    "Divided by zero" exception

    Well, for ieee754 the former is NaN and the latter is +inf.
  21. David Heffernan

    "Divided by zero" exception

    Do yourself a favour and check whether exceptions are masked in the two programs at the point where exveptions are raised.
  22. David Heffernan

    "Divided by zero" exception

    Probably you are calling some code, typically in a DLL, which changes the floating point control status to mask exceptions. Delphi default is for them to be unmasked, but most other Windows dev tools mask them.
  23. Well, Delphi's floating point library isn't threadsafe so they can have a party together!!
  24. Reading Marco's article on the recently released patches for 10.4.2 I noticed this text: Is that right? If you don't keep an active update subscription, you aren't entitled to bug fixes?
  25. David Heffernan

    Is set a nullable type? (record constraint)

    The code fails to compile in XE7 with the same E2512 error. I consider a set type to be a non-nullable value type so this must be a defect.
×