Lajos Juhász
-
Content Count
838 -
Joined
-
Last visited
-
Days Won
11
Posts posted by Lajos Juhász
-
-
8 hours ago, David Heffernan said:Isn't this better suited to a hash set rather than a string list?
It really depends on the data for a list of 3-5 elements my guess is a list is faster.
-
Your implementation of StrExists ignores the CaseSensitive property.
-
Check out the source and you can easily write your own version (a quick example code):
uses System.RTLConsts; type TMyStringList = class(TStringList) public function AddObject(const S: string; AObject: TObject): Integer; override; end; function TMyStringList.AddObject(const S: string; AObject: TObject): Integer; begin if sorted then result:=inherited AddObject(S, AObject) else begin result:=IndexOf(s); if (result=-1) then begin result:=count; InsertObject(result, S, AObject) end else begin case Duplicates of dupIgnore: Exit; dupError: Error(@SDuplicateString, 0); dupAccept: begin result:=count; InsertObject(result, S, AObject); end; end; end; end; end;
- 1
-
5 minutes ago, Mike Torrettinni said:Is there a way to use TStringList for this without me writing custom duplicate checking code?
No, there is no way and it's documented that Duplicates works only for sorted lists:
Set Duplicates to specify what should happen when an attempt is made to add a duplicate string to a sorted list. The CaseSensitive property controls whether two strings are considered duplicates if they are identical except for differences in case.
The value of Duplicates should be one of the following.
- 1
-
3 hours ago, Fr0sT.Brutal said:AFAIK usually ANSI codepage has all 1..255 bytes mapped to some character so ANSI=>UTF16=>ANSI conversion results in the same data. That's why it worked.
Try https://en.wikipedia.org/wiki/Windows-1251 one character is undefined hex 98.
https://en.wikipedia.org/wiki/Windows-1250 there 5 undefined characters.
- 1
-
52 minutes ago, KodeZwerg said:Good day everone!
I did opened this https://quality.embarcadero.com/browse/RSP-33937 to have Segoe UI (Windows Vista+) as Default Font instead of Tahoma (Windows XP)
Stay healthy!
Did you filled a bug report also with Microsoft? Delphi uses HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes\MS Shell Dlg 2 on my Windows 10 that's still Tahoma.
- 1
-
1 hour ago, Dalija Prasnikar said:For anyone interested in try...finally patch... it is still broken.
I guess those "3 minutes" tests strike again...
If I remember correctly try ... finally was not effecting windows. I am using VCL for Windows so I could be still fine of course since I am enjoying my 2020 vacation I will test it in more details when I return to work.
-
The patch is looking good after 3 minutes of testing 🙂
-
I have no experience with Interbase but a general sql could be:
select itemno,
sum(case when tname='Buy' then qty*uprice else 0 end) as totalbuy,
sum(case when tname='Sell' then qty*uprice else 0 end) as totalsell,
sum(case when tname='Return' then qty*uprice else 0 end) as totalreturn
from <Your table>
group by 1 -
7 hours ago, Günther Schoch said:where exactly is the problem (use cases affected)
We know that a bug in the compiler has been detected that affects several reported QC issues and with a help of a couple of developer the hotfix was tested a month ago. Unfortunately it's a top secret information what delayed the hotfix.
- 1
-
2 minutes ago, mvanrijnen said:Maybe, maybe if they think of it, on their own website, or maybe from within the IDE.
Please not on their website' That site is the worst in the entire universe!
- 1
-
51 minutes ago, mvanrijnen said:EMB and the MVP's denying the problems, and we the "people" (eg normal users/customers) are stuck with the ..... 🙂
Still wondering why no communication from EMB at all, they are on this Forum, better they refer to this forum, would be nice if the where some bit more active and/or responsive.
They're not I posted a link to a webinar 3 weeks ago where @Marco Cantu admitted that he is in charge to resolve this problem and to release the hotfix. I guess the cold weather in Europe made slowed the release a bit down.
- 1
-
9 minutes ago, Davide Angeli said:But is there anyone using 10.4.2 without problems? Has anyone switched to this shameful bug-ridden version to work seriously? Am I the only fool?
You can work with project that doesn't use packages. This is top priority that's the reason they will release a hotfix as soon as it will be ready. Meanwhile do try to test the application without debugging as much as you can.
-
You can turn on logging on LSP and send it to Embarcadero. Warning the log will contain parts of your source code. For more information check out http://docwiki.embarcadero.com/RADStudio/Sydney/en/Code_Insight_Reference .
-
We can now only hope that before Delphi 10.5 we will get at least one release of 10.4.2 without a major bug. From 10.4 to 10.4.2 every release had some issues :(. Embarcadero should change the release schedule. Now they are following the principle: "Ship it when the next major bug is checked in!".
- 1
-
1 hour ago, Davide Angeli said:We need Embarcadero fix ASAP!!!
The fix is on the way at least for a month. It's really shame that Embarcadero is silent on this issue. It's not a minor bug, but a major showstopper!
- 3
-
1 hour ago, Günther Schoch said:most probably interconnected. If the compiler fails randomly with an internal error then the LSP fails as well randomly (as LSP does interacts with the dcc.dll)!
Most probably. It would be nice to hear from @Marco Cantu what we can expect. I mean the hotfix is tested for a long period of time so it would be nice to know more about it.
-
4 hours ago, Iña said:seconds:=t div 1000;
minutes:=t div 60000;
You're here calculating the total seconds and minutes. Try:
seconds:=t div 1000;minutes:=seconds div 60;
seconds:=seconds-(minutes*60);
- 1
-
28 minutes ago, Lars Fosdal said:Use TStopWatch from System.Diagnostics / System.TimeSpan.
I'm afraid System.Diagnostics was not part of Delphi 7.
-
OnFieldchange for the field linked with dbCombobox1. I would also compare the field value, not the DBCombobox1.text.
- 2
-
The available information can be found at: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Code_Insight_Reference
You can always try to enable logging and read the logfiles.- 1
-
1 minute ago, mvanrijnen said:We do that, en then we hear nothing.
How many individual issues about the LSP etc you want to see?
I posted a link yesterday to the Webinar where Marco Cantu answered to my question about the Internal Errors in Delphi 10.4.2 most probably it's a bug in the compiler/LSP whatever that causes multiple problems with the IDE. He said that some customers received the hotfix and the feedback is positive. He didn't said anything about when the fix will be available for the public.
How much individual issues would I like to see? For every issue that could cause Internal Error, Access Violation or that the IDE dies. I can live with bugs that doesn't crash the IDE. Once again we cannot know what fix is being tested as Idera/Embarcadero will not give information about that to the public (in my opinion it's the wrong choice). -
1 minute ago, mvanrijnen said:the info is given by all the other RSP's about LSP etc, i see this as the only way to communicate with EMB.
A wonder what company would react in a positive way for a quality ticket that nothing is working and the product is falling apart. An individual issue can be investigated and most probably be fixed, but a general statement that the *thing doesn't work* will not help in anyway.
We have to wait for the hotfix that should fix the error that slipped into 10.4.2 and then report the new issues.
-
27 minutes ago, mvanrijnen said:There are still issues with the LSP, ErrorInsight, CodeCompletion etc.
See the list at: Issue Navigator - Embarcadero Technologies
Please vote, a scream to EMB 🙂
Unfortunately this RSP not even worth to read it there is no information in it it should be rejected.
- 1
StringList container with ignore duplicates, non-sorted
in Algorithms, Data Structures and Class Design
Posted
I've used that in my example and also it's better to implement the logic in AddObject as in the TStringList where method Add invokes Addobject with nil object.