-
Content Count
2855 -
Joined
-
Last visited
-
Days Won
101
Everything posted by dummzeuch
-
Please support Stack Overflow moderators strike against AI content policy
dummzeuch replied to Dalija Prasnikar's topic in Tips / Blogs / Tutorials / Videos
After trying to get anything useful out of chatGPT and wasting a lot of time to fix all the errors in the answer(s) I got, I am all for banning it from SO. I'm not sure it will work though. The dilution of web search results with plausible but wrong content generated by AI has already started and we will see a lot more of it. Of course there was already a lot of garbage on the web to start with, but now it has become much easier (-> cheaper) to produce it. -
Alternatively there are quite a few other scripting engines, like the one included in Fastreport (Pascal, Basic, C, if I remember correctly) or DWScript (formerly known as Delphi Web Script, but definitely not restricted to Web usage). Extending a program by such an engine mostly means to provide an interface for these scripts to access the programs data and optionally the UI. It can be quite challenging to determine what to expose and in which way.
-
You should specify the complete path to exclude: C:\Windows Not just Windows
-
This command also searches all subdirectories and only later applies a filter removing all entries that start with c:\Windows\. The function @programmerdelphi2k gave you is actually more efficient because it doesn't descend into the windows directory at all.
-
I think the word you're looking for is "skip". But yes that's exactly how to implement this.
-
What exactly is it you are struggling with? Basically, you enable the debug options in the compiler options dialog, build and start your program from the IDE with F9. That's about it.
-
If he qualifies for using it. An old, legal Delphi 7 license can still be used for anything, including professional programming. The CE license is very limited in what it allows.
-
None of configurations create a map file by default.
-
Unfortunately that would allow for yet another possible problem: What if two or more of these strings were identical? In that case multiple different DecodeExportXxx calls would be made: if aMessageType = 'EXPREG' then DecodeExportReg(vDoc, aCdn, aRequestCorrelation, aMessageText); if aMessageType = 'EXPREG' then // <== typo here DecodeExportAcc(vDoc, aCdn, aRequestCorrelation, aMessageText); When using "else if", in theory the compiler could create a warning in that case because the second if for that string could never be executed. But I doubt that the Delphi compiler actually is that good at analysing the code. if aMessageType = 'EXPREG' then begin DecodeExportReg(vDoc, aCdn, aRequestCorrelation, aMessageText); end else if aMessageType = 'EXPREG' then begin DecodeExportAcc(vDoc, aCdn, aRequestCorrelation, aMessageText); // <== possible compiler warning here end;
-
I would like to have a set of some objects of the same class e.g. TEdit. Of course TEdit is not an ordinal type, so set of TEdit won't work. Is there some (generics?) container type that lets me Add Object instances to it, ignoring duplicates Check if an object instance is in the list Or even better lets me enumerate over all the object instances in the list So I can do something link this: var EditSet = TSet<TEdit>; ed: TEdit; begin EditSet.Add(Edit1); EditSet.Add(Edit1) EditSet.Add(Edit2); EditSet.Add(Edit4); if EditSet.Contains(Edit1) then Edit1.Text := 'Was in set'); if EditSet.Contains(Edit3) then Edit3.Text := 'Was in set'); // or even better: for ed in EditSet do ed.Text := 'Was in set'; end; I'd prefer using something ready made from the RTL, if it exists.
-
I'm not sure how efficient the implementation of IndexStr is. Assuming it's a linear search, the case statement is worse on two accounts: 1. It more difficult to read and understand. 2. It's a bit less efficient. On top of that this implementation is error prone. If somebody inserts a new string rather than appending it to the array the indices in the case statement will all have to be corrected. It has only one advantage: It's less to type. And of course, it looks cleaner. Some kind of sorted list or hash table storing the strings and an enum value would be more efficient and less error prone (edit: in short: a dictionary). Of course that list must be initialized before it can be used, preferably only once. People who are used to languages that support case statements with strings will of course laugh at that code anyway.
-
@robertjohns please don't crosspost
-
'mytext.txt' is a file mask. A file mask does not need to contain wild cards.
-
This was about a set with at most 20 different entries, so performance would most likely not have been an issue (when I asked the question, it was only 5). I have solved the actual problem differently by now. A set is still involved, but not a set of object instances but simply a classical set of an enum.
-
What happens, when I add the same object twice? In a set, the duplicate will be discarded, but in a list?
-
For medical devices/software it's not just ISO 9001 (which applies to my current job too) but the even worse standards of the American Food and Drugs Administration (FDA). I spent about 90% of my time producing paper, so our customers had to pay 10 times more.
-
Interesting. I would never ever work again for a company involved with medical devices or software. The pseudo QM requirements (not really improving quality but generating lots of paper) drove me crazy.
-
What may happen, if uncomplete, unclear advices found ...
dummzeuch replied to Rollo62's topic in Network, Cloud and Web
I don't. -
It's "English", not "english". Just saying ... Apart from that I agree 100% and I could add some more, but I can't really be bothered.
-
OK, so where do you create and assign Settings in that code? That must be done before using it.
-
It is not be necessary to free Settings before creating it. That change cannot have solved your problem, it's something else that you also changed.
-
What may happen, if uncomplete, unclear advices found ...
dummzeuch replied to Rollo62's topic in Network, Cloud and Web
If you say so, it must be right. -
How is Settings declared and how instantiated? Some code would give us a lot more information to help you.
-
What may happen, if uncomplete, unclear advices found ...
dummzeuch replied to Rollo62's topic in Network, Cloud and Web
Rest assured that people and companies in Europe are fully aware of that topic. And even more: Due to some American laws even servers that are hosted in the EU but are owned by American companies or even companies owned by American companies may be questionable. In theory that means that cloud services from Amazon, Microsoft, Google etc. are a no go for European companies. The reality unfortunately is very different, as even governments, universities and schools use these services, because lobbying has so far prevented that the laws are being applied. -
I just applied your patch in revision #4028