-
Content Count
882 -
Joined
-
Last visited
-
Days Won
7
Everything posted by Stano
-
How do you identify bottleneck in Delphi code?
Stano replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
If you're bored, do it. Learning is a strong argument You still don't listen to David I personally don't know what he's talking about. The issue is beyond my comprehension -
How do you identify bottleneck in Delphi code?
Stano replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
I'd rather describe it again. I was dealing with a bulk write to a JSON file. Previously, I wrote down each item separately. It was unbearable. The acceleration was enormous. From a few seconds to "nothing". All my forms have been closing for a very long time. 5 -> 10 sec. That's when I realized it was caused by an incorrect entry in JSON. I go through the whole form and write to JSON for the affected components. Now only a small adjustment in one place. Forms close immediately. This is unwanted optimization. Maybe I could find profilers. I only mentioned it for variety. I'm not a programmer. I'm just playing with him -
How do you identify bottleneck in Delphi code?
Stano replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
You may have noticed my post "unwanted optimization". I knew about the narrowed place. But I didn't know how to do it. I thought that must be the case. -
atomic setting of a double variable
Stano replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
Again, only from a wise book. I agreed with that. Check everyone enter the routine (arguments) the result sent from the function -
For me, the question is quite unclear. I tried to give at least some answer. if fdqA.Locate (AFieldName, cPayee), []) then ShowMessage ('located!') else ShowMessage ('Failed!');
-
I created a function for this, which has a field name in the argument.
-
Is Delphi still taught in schools?
Stano replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
Not me personally. I do not use it. This is stated in the license. There are enough topics in which they have solved this problem. In relation to D10.3 -
Is Delphi still taught in schools?
Stano replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
Let's look at it through the eyes of a teacher: Will I learn Pascal or C syntax? Definitely Pascal. It's designed for that. Among other things. What do I have available? Since it's a school, it's free! LAZARUS - is handy and does not cause problems Delphi - is a huge hebedo. I have to reinstall it every year That is all. -
I looked in the help. The update part is not finished with ";"
-
Since I don't do it, I can only guess. I only work with Firebird. See help. It should be behind the penultimate end ";" ? I have nothing more to say.
-
I apologise. Such a mistake Case When SHAREHOLDER='Y' then (BRUTSALARY * :EMPPORTION /100) * :TMONTH End AS MYRESULT
-
Case When SHAREHOLDER='Y' then (BRUTSALARY * :EMPPORTION /100) * :TMONTH AS MYRESULT End I assume this.
-
Is Delphi still taught in schools?
Stano replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
It is clear from the article that this is the teacher's decision. The reason is simple. Pascal was created for this purpose. That's why I can read it too. But C syntax does not! -
Problems making a calculator with DELPHI in RAD STUDIO. (Tan, Cos, Sin)
Stano replied to DesadaptadoDimensional's topic in General Help
Move the cursor to the appropriate word (eg sin) and wait a bit. A pop-up window will tell you in which unit it is located. -
Using WITH. Somehow like this. If the unknown DB supports it WITH TB AS (SELECT EMPNO,EMPNAME, PRIORTAXBASE, BRUTSALARY, Case When SHAREHOLDER='Y' then (PRIORTAXBASE + BRUTSALARY) When RETIRED='Y' then (PRIORTAXBASE + BRUTSALARY)- ((PRIORTAXBASE + BRUTSALARY) * 4 /100) + When (SHAREHOLDER IS NULL or SHAREHOLDER='N') then (PRIORTAXBASE + BRUTSALARY) - ((PRIORTAXBASE + BRUTSALARY) * 0.18) end as TAXBASE ) SELECT Case When TAXBASE <= 30000 then TAXBASE * 20 When TAXBASE >30000 and TAXBASE <=50000 then TAXBASE * 30 .... end as TAXTOTAL FROM TB
-
Object Pascal Handbook - Delphi 10.4 Sydney Edition - Marco Cantù (2020) - 571pg
Stano replied to a topic in Tips / Blogs / Tutorials / Videos
I agree. There is also a note that this can be canceled. My data has been around for a long time -
Object Pascal Handbook - Delphi 10.4 Sydney Edition - Marco Cantù (2020) - 571pg
Stano replied to a topic in Tips / Blogs / Tutorials / Videos
And give consent to send ... -
For Firebird First Day of The Date: SELECT CAST(:DATA AS DATE) - EXTRACT(DAY FROM CAST(:DATA AS DATE)) + 1 FROM RDB$DATABASE LAST DAY OF THE DATE: SELECT CAST(:DATA AS DATE) - EXTRACT(DAY FROM CAST(:DATA AS DATE)) + 32 - EXTRACT(DAY FROM (CAST(:DATA AS DATE) - EXTRACT(DAY FROM CAST(:DATA AS DATE)) + 32)) FROM RDB$DATABASE
-
TimSort for Delphi without Generics
Stano replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
OT: There is also "unwanted" optimization. My fresh case. Writing to JSON file. Item by item. For 86 items, it was over 7 seconds. It made me act. So I edited it and I write all the items at once. I realized that when I close the form, I go through it and write it to JSON. So he took advantage of the change, and had everything written down at once. I don't have to wait for the form to close at once. It's immediate In debug mode. I couldn't figure out why the forms were closing for so long. -
Wke4Delphi, alternative to dcef3 or cef4delphi
Stano replied to Edwin Yip's topic in Delphi Third-Party
google translate plugin? -
A class that returns different types of components
Stano posted a topic in Algorithms, Data Structures and Class Design
I'm trying to create a class that returns different types of components. Specifically, it is a TMS TDBxxSource for TDBPlanner. All are descendants of TDBItems. Use for example in SpinEdit, which would serve all TDBxxSource. There is a separate SpinEdit for each TDBxxSource. I only want one OnClick event for them. The class must return, according to the index, the specific TDBxxSource. Not TDBItems, because I would have to cast it in OnClick. This is nonsense. The class would lose its meaning. Example of use procedure TfrmPlannerRole.advsedDayScaleChange(Sender: TObject); var SpinEdit: TAdvSpinEdit; begin SpinEdit := TAdvSpinEdit(Sender); MyClass.DBSource(5).VariousTypes := SpinEdit.Value; end; Originally at https://forum.delphi.cz/index.php/topic,17355.0.html There is silence. -
A class that returns different types of components
Stano replied to Stano's topic in Algorithms, Data Structures and Class Design
I tried to do it. I had a problem that I always needed a different component. I solve it using case .. of. In a separate class. -
A class that returns different types of components
Stano replied to Stano's topic in Algorithms, Data Structures and Class Design
Even those who know Slovak did not understand I already have a solution. The topic is closed to me. Thank you all for your willingness to help me.