-
Content Count
3710 -
Joined
-
Last visited
-
Days Won
185
Everything posted by David Heffernan
-
Clearly there's a problem. But nobody knows anything about your code, because you've not shared any actionable details. Surely you understand that we can't guess what's wrong?
-
Do we just have to guess what you are doing? Step back, and look at this thread, from top to bottom, and ask yourself how we could possibly say anything about what is happening on your machine. If you genuinely want help, then you need to help us to help you.
-
no success in loading MiniConda with recommended setup
David Heffernan replied to Talal Bader's topic in Python4Delphi
I can't believe that modifying Windows path could be a wise thing to do in this scenario. Who advises that? -
TRegEx.IsMatch question
David Heffernan replied to karl Jonson's topic in Algorithms, Data Structures and Class Design
You didn't specify that the pattern had to exhaust the entire string. Capture the match, look at the match, and see. Use a Web tool to test regex and see the matches. This will help you learn more quickly. -
Copy nodes from a TTreeView with Delphi 4!
David Heffernan replied to Magno's topic in RTL and Delphi Object Pascal
Yeah, I think you can ignore that answer, it's really not relevant to your question. What you are trying to do is possible by iterating over the node and its children. I would start with some code to do that iteration. Do you have such code? -
File Manifest : changing it does not load new settings.
David Heffernan replied to gioma's topic in VCL
I guess I misunderstood when the subject said file manifest. Details are quite important. -
File Manifest : changing it does not load new settings.
David Heffernan replied to gioma's topic in VCL
Why do you have a manifest file. It should be a linked resource. Delete the .manifest file. -
Searching for full-time remote position...
David Heffernan replied to Rick_Delphi's topic in Job Opportunities / Coder for Hire
Is that in part because of the cost of healthcare in the US? -
CreateProcess causing some strange Access Violations
David Heffernan replied to aehimself's topic in VCL
Oh dear, I'm not having a good day. I think that obce upon a time this wasn't documented as such, and I've not kept up. But I could be wrong about that too! -
CreateProcess causing some strange Access Violations
David Heffernan replied to aehimself's topic in VCL
Oh. Sorry. My mistake. Only in the Unicode version is an implementation detail though. I wouldn't rely on it. -
CreateProcess causing some strange Access Violations
David Heffernan replied to aehimself's topic in VCL
I don't think that's true. You should use UniqueString. But it sounds like this isn't the cause of your problem. -
CreateProcess causing some strange Access Violations
David Heffernan replied to aehimself's topic in VCL
The documentation says the first arg is LPCWSTR, pointer to const array. If you want to make a string writeable use UniqueString. -
CreateProcess causing some strange Access Violations
David Heffernan replied to aehimself's topic in VCL
First argument of CreateProcess must be writeable? Is it? -
Searching for full-time remote position...
David Heffernan replied to Rick_Delphi's topic in Job Opportunities / Coder for Hire
The big problem here is that there is no detail. There should be a cv or a link to a linkedin profile. -
lxml in TPythonThread with Delphi don´t works
David Heffernan replied to Nefari0's topic in General Help
No. CoInitialize doesn't report errors by throwing exceptions. You are expected to check its return value. This is stated clearly in the documentation for the function which is required reading before using it. Let's leave error handling to one side for now though. The try finally pattern is like this. res := acquireResource; try res.doSomething; finally releaseResource(res); end; The try/finally is protecting the code *between* acquisition and release. Therefore the try must be *after* acquisition. -
lxml in TPythonThread with Delphi don´t works
David Heffernan replied to Nefari0's topic in General Help
This code is wrong. The try is always placed after the resource has been acquired. -
System.Generics.Collections.TList.BinarySearch if there are duplicates
David Heffernan replied to dummzeuch's topic in RTL and Delphi Object Pascal
It's broken in my view because binary search should be O(log n). And this code isn't. It isn't binary search. It's a hybrid binary and linear search. Obviously people can do what they want. I won't be using this code though. -
System.Generics.Collections.TList.BinarySearch if there are duplicates
David Heffernan replied to dummzeuch's topic in RTL and Delphi Object Pascal
I don't think that's right. You suggest we should just use broken code because that's likely to persuade Emba to change it? I want the program that I ship to be good. -
System.Generics.Collections.TList.BinarySearch if there are duplicates
David Heffernan replied to dummzeuch's topic in RTL and Delphi Object Pascal
This is why I avoid Embarcadero library code and write my own -
System.Generics.Collections.TList.BinarySearch if there are duplicates
David Heffernan replied to dummzeuch's topic in RTL and Delphi Object Pascal
Nobody should be calling that function that makes binary search O(n) in worst case. -
System.Generics.Collections.TList.BinarySearch if there are duplicates
David Heffernan replied to dummzeuch's topic in RTL and Delphi Object Pascal
Stefan is talking about a different algorithm, modified binary search algorithms know as lower or upper bound binary search. Kind of the entire point of this topic. -
System.Generics.Collections.TList.BinarySearch if there are duplicates
David Heffernan replied to dummzeuch's topic in RTL and Delphi Object Pascal
Wait. If you have a list with two million items that all have the same value, and you search for that value, the code will do 1 million compares to find the first item? -
System.Generics.Collections.TList.BinarySearch if there are duplicates
David Heffernan replied to dummzeuch's topic in RTL and Delphi Object Pascal
If there is no existing function then what? You just give up. Why is it not possible to write code? -
Attempt to release mutex not owned by caller
David Heffernan replied to desert_coffee's topic in RTL and Delphi Object Pascal
We are talking about the bug described here https://stackoverflow.com/a/7640979/505088 -
Attempt to release mutex not owned by caller
David Heffernan replied to desert_coffee's topic in RTL and Delphi Object Pascal
No. The asker is talking about the known bug where you pass TInterfacedObject.Create to a const arg and the object is never destroyed.