-
Content Count
3701 -
Joined
-
Last visited
-
Days Won
185
Everything posted by David Heffernan
-
Copying character to string problem
David Heffernan replied to Lainkes's topic in Algorithms, Data Structures and Class Design
I didn't say they were interchangeable. A Delphi string is an array of elements of type Char. The documentation says: "A string represents a sequence of characters." Wikipedia defines an array here: https://en.m.wikipedia.org/wiki/Array_(data_structure) So I guess perhaps what may be confusing here is maybe you think I am saying that a Delphi string is a Delphi dynamic array, TArray<Char>. I'm not saying that. I'm using the general computing usage of the word array. -
Copying character to string problem
David Heffernan replied to Lainkes's topic in Algorithms, Data Structures and Class Design
No, viewing a string as an array of char is pretty reasonable. I mean your argument could also be used to say that TArray<Integer> is not an array of integer because of the meta data. And when you do PChar(someString) to pass a null-terminated array of char to some external library, the compiler just passes the address of the first element. (Yes, I know about the empty string special case) -
Copying character to string problem
David Heffernan replied to Lainkes's topic in Algorithms, Data Structures and Class Design
In Delphi a string is essentially a 1 based array of char -
Imagine a world where Embarcadero weren't the only supplier of dev tools
-
Weird code in THttpConnection.ProcessWellKnownDir
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
The old code won't stop working. It's unrealistic to expect developers to expend extra time supporting legacy compilers and systems. It's no fun doing that. -
Why are you asking the same question in multiple topics.
-
Apache POI seems to be the go to library.
-
Then toss a coin. Expecting people to give you insights about your program's performance is a coin toss. May as weel save time and do it yourself.
-
Depends on what your program does. Try timing it.
-
I think Stefan suggests posting on Stack Overflow suitably tagged
-
Exception in TCustomSmtpClient.Destroy;
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
No they are not -
Weird code in THttpConnection.ProcessWellKnownDir
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
MaxInt -
Exception in TCustomSmtpClient.Destroy;
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
Nobody is going to be able to tell you what's wrong. You'll need to do some debugging. Does the issue occur when not using ReactOS? -
They can only choose from these 14 items? Why do you need any conversion? Isn't it just (EndIndex - StartIndex) / 2?
-
The problem is that your code is based on an assumption that the end time is after the start time, but 00:00 is the beginning of the day and so can never be used as an end time. Hard to advise you what to do because we don't know your goals, where your data is coming from, how you want to handle day boundaries etc.
-
Exception in TCustomSmtpClient.Destroy;
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
The error could be in code outside the destructor. So look in that code. We cannot see it. -
Weird code in THttpConnection.ProcessWellKnownDir
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
If that is the case, then MaxInt should be used for that argument -
Weird code in THttpConnection.ProcessWellKnownDir
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
I don't know what you mean here. Did you write this code? What problems are you having with the code? -
Weird code in THttpConnection.ProcessWellKnownDir
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
That's what I would do, but it's just a needless nil check which a compiler could remove. -
Weird code in THttpConnection.ProcessWellKnownDir
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
This statement is incorrect. The only way for Create to fail is if it raises an exception. The code is odd, but it doesn't do what you say. -
Exception in TCustomSmtpClient.Destroy;
David Heffernan replied to Kyle_Katarn31's topic in ICS - Internet Component Suite
If that code is from a destructor it's bizarre. Just call Free on each instance variable. But that may not be the issue, it would only be an issue if there were stale references in one of those instance variables. The issue may be a double free of the object. Or something else. Debugging required. -
From what I can see, for the hardware that Delphi runs on, float64 is the largest float that can be operated on efficiently with CPU hardware instructions. float80 is available in the x87 unit, but x87 is very inefficient on modern processors. Do you know how float128 is implemented by compilers like gcc on x64 hardware? It's done in software. Presumably therefore it is slow. What real-world applications do you know of that require float128?
-
How are you going to implement a BLAS efficiently on today's hardware? What processors do you know of with efficient FPUs that handle more than float64? Forgive me if I am ignorant. I'm not talking about business apps. I develop a structural FEA code for engineers. Double precision is all that is required.
-
TOpenDialog/TFileOpenDialog => how to to bypass file system redirection?
David Heffernan replied to Nigel Thomas's topic in VCL
Excluding files from system directory sounds like a recipe for disaster! But yeah, make a 64 bit process. If you still need to support 32 bit OS then you need to supply one version for each OS. -
TOpenDialog/TFileOpenDialog => how to to bypass file system redirection?
David Heffernan replied to Nigel Thomas's topic in VCL
Out of curiosity, what does your program do that requires users to select files in these directories which are private to the OS?