Jump to content

David Heffernan

Members
  • Content Count

    3496
  • Joined

  • Last visited

  • Days Won

    172

Everything posted by David Heffernan

  1. 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?
  2. David Heffernan

    File Manifest : changing it does not load new settings.

    I guess I misunderstood when the subject said file manifest. Details are quite important.
  3. David Heffernan

    File Manifest : changing it does not load new settings.

    Why do you have a manifest file. It should be a linked resource. Delete the .manifest file.
  4. David Heffernan

    Searching for full-time remote position...

    Is that in part because of the cost of healthcare in the US?
  5. David Heffernan

    CreateProcess causing some strange Access Violations

    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!
  6. David Heffernan

    CreateProcess causing some strange Access Violations

    Oh. Sorry. My mistake. Only in the Unicode version is an implementation detail though. I wouldn't rely on it.
  7. David Heffernan

    CreateProcess causing some strange Access Violations

    I don't think that's true. You should use UniqueString. But it sounds like this isn't the cause of your problem.
  8. David Heffernan

    CreateProcess causing some strange Access Violations

    The documentation says the first arg is LPCWSTR, pointer to const array. If you want to make a string writeable use UniqueString.
  9. David Heffernan

    CreateProcess causing some strange Access Violations

    First argument of CreateProcess must be writeable? Is it?
  10. David Heffernan

    Searching for full-time remote position...

    The big problem here is that there is no detail. There should be a cv or a link to a linkedin profile.
  11. David Heffernan

    lxml in TPythonThread with Delphi don´t works

    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.
  12. David Heffernan

    lxml in TPythonThread with Delphi don´t works

    This code is wrong. The try is always placed after the resource has been acquired.
  13. 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.
  14. 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.
  15. This is why I avoid Embarcadero library code and write my own
  16. Nobody should be calling that function that makes binary search O(n) in worst case.
  17. 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.
  18. 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?
  19. If there is no existing function then what? You just give up. Why is it not possible to write code?
  20. David Heffernan

    Attempt to release mutex not owned by caller

    We are talking about the bug described here https://stackoverflow.com/a/7640979/505088
  21. David Heffernan

    Attempt to release mutex not owned by caller

    No. The asker is talking about the known bug where you pass TInterfacedObject.Create to a const arg and the object is never destroyed.
  22. David Heffernan

    Attempt to release mutex not owned by caller

    This is a very long standing bug that for reasons I cannot understand Embarcadero won't fix
  23. David Heffernan

    Attempt to release mutex not owned by caller

    The asker wants to use reference counting with a mutex that is created elsewhere, and passed to the guard object. Your code does something completely different from what the asker wants to do.
  24. David Heffernan

    How to open a file in the already running IDE?

    Why wouldn't you do it with DDE. That's precisely what it's for.
  25. Also the if statement is not needed and just be removed
×