-
Content Count
3536 -
Joined
-
Last visited
-
Days Won
175
Posts posted by David Heffernan
-
-
58 minutes ago, Alexander Elagin said:Pred() and Succ() are simple iterators defined for enumerable simple data types. If only they could be overloaded for other data types (lists, collections, whatever... maybe even for yield support) their usefulness would be much higher.
That doesn't make a lot of sense. What is the successor of a collection. Perhaps you mean the successor of a member of a collection. But that only makes sense in the context of the collection.
-
9 hours ago, Anders Melander said:It depends. Sometimes indexed access is faster.
For an array indexed access is usually fastest.
Delphi RTL enumerators are often sub optimal. I mean, heap allocation to iterate a collection ffs.
-
> Is a standard comment before each procedure implementation useful?
No
-
High is fine for an array. Pred is a stupid way to write Count - 1. I mean, you aren't proposing writing Pred(Length(arr)) are you.
- 1
-
5 hours ago, Mike Torrettinni said:You don't use Pred(List.Count), you don't think is useful?
No. It's pointless verbiage. Use List.Count - 1
- 1
-
The difference is that Pred(...) is verbose and opaque.
- 1
-
36 minutes ago, Fr0sT.Brutal said:Maybe you could start from this https://forum.lazarus.freepascal.org/index.php?topic=33141.0
That's true type not open type
-
Find a C API and convert the header file.
-
I think it has a name something like &op_Equality. You should be able to enumerate the methods of the type.
-
2 hours ago, Turan Can said:Dear Lars,
Thanks for the quick response
I tried this, but it didn't work. He did not accept the big number.
....
var
b:BigInteger;
begin
b:=47875086426098177934326549022813196294; //does not run the project.
https://github.com/rvelthuis/DelphiBigNumbers
http://www.rvelthuis.de/programs/bigintegers.html
If that code would compile, then there wouldn't be much point in having the library. Think about what the literal on the rhs of the assignment actually is.
- 1
-
I doubt anyone wants to download your software. I know I don't. Normally if you want help you'd explain more what the problem is.
Anyway, never mind.
-
I'm afraid that none of this makes a lot of sense. Why do you feel that there should only be one explorer process? Why does that matter?
- 3
-
It's common to have lots of explorer processes. There's an option that means each window is run from a different process.
I can't understand why you would feel that there should only be a single explorer process. That's for the system to decide. If you want to interact with the system then you need to follow its rules. You don't make the system rules.
-
2 hours ago, Fr0sT.Brutal said:Are you addressing me?
Of course not. You aren't generating the html.
-
How are you generating the original html?
-
Yes, if it is an affinity mask then it should be NativeUInt.
-
Sounds like the classic OOP trap of trying to solve all problems with inheritance.
Good OOP programmers hardly ever use inheritance to solve problems.
-
I mean that this thing is named as though it is an affinity mask. And on Windows that makes it pointer sized. So, NativeUInt.
-
Affinity masks for pointer sized.
-
Don't try to use more than 48 threads in that case
-
If the hacker gets the program, and there is a hard coded key in the program, then it's trivial to hack.
-
Is it 96 cpus, or 48 with 2 threads per core? Is the memory NUMA?
-
9 minutes ago, Mike Torrettinni said:@vRecPointer^
What do you think this does?
- 1
-
3 hours ago, Soji said:No.
Seems like it's not really worthwhile then....
Using TFileStream to check if file is in use
in Algorithms, Data Structures and Class Design
Posted
What I can't understand is why you would ever need to call such a function. Broadly, you never ask if a file is in use an any one moment. You try to do something with a file, and then handle the scenario that it fails due to being open.