-
Content Count
3586 -
Joined
-
Last visited
-
Days Won
176
Everything posted by David Heffernan
-
Managed dll instead of an unmanaged one
David Heffernan replied to AndrewHoward's topic in General Help
Don't really know what you mean. -
Performance - Find duplicates: Iteration vs Binary Search
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
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. -
StringList container with ignore duplicates, non-sorted
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Probably, but then for small lists often performance isn't key. -
StringList container with ignore duplicates, non-sorted
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Isn't this better suited to a hash set rather than a string list? -
Managed dll instead of an unmanaged one
David Heffernan replied to AndrewHoward's topic in General Help
Yes. But you need to use a tool like UnmanagedExports. -
Doesn't matter. May as well use nil.
-
Bulk change of Manifest settings??
David Heffernan replied to Ian Branch's topic in Delphi IDE and APIs
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. -
How to handle delphi exception elegantly with logging feature.
David Heffernan replied to HalfBlindCoder's topic in Algorithms, Data Structures and Class Design
It depends. There are lots of different ways to do it. There is no single "best" way. -
Build managed dll in Delphi
David Heffernan replied to BastiFantasti's topic in RTL and Delphi Object Pascal
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. -
Micro optimization: Math.InRange
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
I'm betting that improving the performance of InRange has no impact on the performance of these reports. -
TJsonTextWriter out of memory
David Heffernan replied to jhoward1801's topic in RTL and Delphi Object Pascal
Use a SAX style parser rather than DOM style parser is sometimes an option -
"Divided by zero" exception
David Heffernan replied to Mohammad Atikur Rhaman's topic in General Help
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. -
It's a helper for TArray, not for TArray<T>, by necessity. I think spring4d has something similar.
-
Examples of Android apps
David Heffernan replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
If you aren't going to reuse existing delphi code then you should also evaluate other tools. -
How would you handle non ANSI input?
-
"Divided by zero" exception
David Heffernan replied to Mohammad Atikur Rhaman's topic in General Help
It's all proscribed by ieee754. -
"Divided by zero" exception
David Heffernan replied to Mohammad Atikur Rhaman's topic in General Help
Are you talking about maths, or talking about ieee754? -
"Divided by zero" exception
David Heffernan replied to Mohammad Atikur Rhaman's topic in General Help
Well, this depends on whether or not exceptions are masked. -
"Divided by zero" exception
David Heffernan replied to Mohammad Atikur Rhaman's topic in General Help
I'm not recommending anything. I'm just stating how ieee754 defines these operations. -
"Divided by zero" exception
David Heffernan replied to Mohammad Atikur Rhaman's topic in General Help
Well, for ieee754 the former is NaN and the latter is +inf. -
"Divided by zero" exception
David Heffernan replied to Mohammad Atikur Rhaman's topic in General Help
Do yourself a favour and check whether exceptions are masked in the two programs at the point where exveptions are raised. -
"Divided by zero" exception
David Heffernan replied to Mohammad Atikur Rhaman's topic in General Help
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. -
High-Precision Floating-Point Types for Delphi
David Heffernan replied to Erik@Grijjy's topic in Tips / Blogs / Tutorials / Videos
Well, Delphi's floating point library isn't threadsafe so they can have a party together!! -
Do bug fix patches really require active subscription?
David Heffernan posted a topic in General Help
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? -
Is set a nullable type? (record constraint)
David Heffernan replied to Eugine Savin's topic in RTL and Delphi Object Pascal
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.