-
Content Count
3586 -
Joined
-
Last visited
-
Days Won
176
Everything posted by David Heffernan
-
It costs me time and money to upgrade and for now I'm missing nothing by sticking to XE7. But that's just me. Different users will have different drivers. Nobody can made a blanket statement like
-
How to make app with tabbed set of VNC windows
David Heffernan replied to David Schwartz's topic in General Help
It makes no difference to the operation of the code, its just worth being aware of the difference between THandle, which is a handle to a kernel object, and HWND which is a window handle. The Delphi rtl has been a little sloppy over the years distinguishing different handle types so it's not surprising that some of the rubs off. -
Imagine if the Delphi debugger was able to evaluate expressions without generating memory leaks in the debugger?
-
Sounds like management are right here. Why should they spend money on upgrading? And it's probably less the license costs but mote the time cost of the staff migrating code and tools.
-
How to make app with tabbed set of VNC windows
David Heffernan replied to David Schwartz's topic in General Help
Nope. It's an HWND. A THandle is quite different. Also, https://devblogs.microsoft.com/oldnewthing/20130412-00/?p=4683 -
pre-generic dictionary class
David Heffernan replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
TST, like binary tree, requires there to be an ordering of the key values? -
Accessing variables outside a For loop
David Heffernan replied to Bernard's topic in Algorithms, Data Structures and Class Design
No -
AddFontResource/Ex not working on some machines
David Heffernan replied to Dave Nottage's topic in Windows API
Quite possibly depends on the font files as well. Can't imagine this is related to Delphi. -
pre-generic dictionary class
David Heffernan replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
It is easy. And there are open source dictionaries out there. As for whether they are compatible with the GExperts license, I've no idea. -
pre-generic dictionary class
David Heffernan replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
Expand a generic dictionary implementation manually. Just replace the TKey and TValue textually. It would also be very valid to stop developing GExperts for pre generic delphi. -
SVG control package v2.3 update 4 released
David Heffernan replied to bverhue's topic in Delphi Third-Party
If you don't like the terms, don't buy the product. We all have a right to set the terms of any products that we sell. -
Array of named and typed parameters. (My Mind is blank)
David Heffernan replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Open array of record, using a function or record constructor to populate new instances of that record. Syntax support for initialization is a bit crappy in Delphi sadly. -
The question literally asks about intervals less than that which you obtakn with a timer. You'll find that Sleep has the same performance as a timer.
-
Dictionaries, Hashing and Performance
David Heffernan replied to Clément's topic in Algorithms, Data Structures and Class Design
Strange way round. Wouldn't it be normal for you to prove your prime claim?- 53 replies
-
- tdictionary
- tstringlist
-
(and 2 more)
Tagged with:
-
Try timing Sleep(1) with TStopwatch.
-
Dictionaries, Hashing and Performance
David Heffernan replied to Clément's topic in Algorithms, Data Structures and Class Design
The latter.- 53 replies
-
- tdictionary
- tstringlist
-
(and 2 more)
Tagged with:
-
Dictionaries, Hashing and Performance
David Heffernan replied to Clément's topic in Algorithms, Data Structures and Class Design
I'm not suggesting that you don't preallocate with a sensible capacity if you know it. I would always do that. In multithreaded code especially, minimising heap allocation is always advisable.- 53 replies
-
- tdictionary
- tstringlist
-
(and 2 more)
Tagged with:
-
Dictionaries, Hashing and Performance
David Heffernan replied to Clément's topic in Algorithms, Data Structures and Class Design
Ofc, you don't have to use the RTL dictionary. The spring4d dictionary has a number of powerful features. I don't think the growth is such an issue. Collisions can be, and better hash and proving would help. The issue for small collections is simply the constant of proportionality. O(1) can be slower than O(log n) for small enough n.- 53 replies
-
- tdictionary
- tstringlist
-
(and 2 more)
Tagged with:
-
Dictionaries, Hashing and Performance
David Heffernan replied to Clément's topic in Algorithms, Data Structures and Class Design
Not so simple. For small collections the dictionary can be slower.- 53 replies
-
- tdictionary
- tstringlist
-
(and 2 more)
Tagged with:
-
Combining bitmaps and preserving antialiased text quality...
David Heffernan replied to Steve Maughan's topic in VCL
There is transparency at the pixel level. PNGs have an alpha channel for that. -
Combining bitmaps and preserving antialiased text quality...
David Heffernan replied to Steve Maughan's topic in VCL
In general you can't do this. Anti-aliasing requires knowledge of the background at the point where the text is rendered. If the original background is a single colour then it may be possible, but will require clever processing. What you ought to do is simply render the text again on the new background. -
Any Good tutorial on Parallel Programming Library?
David Heffernan replied to Tommi Prami's topic in RTL and Delphi Object Pascal
PPL is a library too. It's also quite big. Why does it matter how big a library is? It would seem odd to me that there would be no problem using a library known to have many defects still, over a high quality library. Who in their right mind would choose the lower quality library facing this choice? -
As a Delphi expert, do you ever need to refactor or improve your code?
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
I find this to be a very apt principle. -
As a Delphi expert, do you ever need to refactor or improve your code?
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Much of the development I do is refactoring. Not for its own sake, but to enable a new development. Typically this means refactoring existing code, relying heavily on the testing of that code, so that the new development can be added easily. Often the bulk of the time is spent refactoring and then the new development is trivial. In other words, even when code is well factored, it often needs to be refactored. Also, its not at all the case that replacing standalone functions with classes always makes your code better. Don't be afraid to have standalone functions if that is the right design. -
Timers are event driven. You are suggesting polling. That's no good.