-
Content Count
443 -
Joined
-
Last visited
-
Days Won
5
Posts posted by Cristian Peța
-
-
2 minutes ago, new_x said:I use parameters
Using TSQLMonitor you can see parameters value. If there are wrong characters then is something from FireDAC otherwise is from PostgreSQL.
-
6 minutes ago, new_x said:But If I insert the data from pgAdmin4 they are correctly stored. So the DB Encoding is UTF8
This is not the proof that Encoding is UTF8. You need to verify database encoding. Have you?
-
Personally I would debug the FireDAC code to see where the characters change.
Do you use parameters or the values are in SQL text directly?
I suppose if you use TSQLMonitor the values are already wrong.
-
Is the database ENCODING = 'UTF8'?
I think it can be specified only when you create it.
-
Have you tried a new empty project with that line of code?
If the issue persists then it would be better to report.
-
3 hours ago, JohnLM said:Update. . . on other news.. regarding the MD5 checksum number given at the download page.
I spent hours trying to find out how to do MD5 encode/decode, and finally found the answer I was looking for.
It is easily to generate MD5 with some tool like Notepad++.
-
Try to add MidasLib unit in the projects uses clause. Maybe the cause is an old midas.dll
-
After you created the form and want to have only one form you can not return to the code into the constructor without creating an other form.
-
1 hour ago, Ian Branch said:There is only the one form.
If you create only one form and want to keep it to change the table the I ask myself as Remy asked: why is that code in the constructor?
Also calling Abort into the constructor will destroy the form.
-
This happens also when you build you package?
Usually this happens at compile but not at build.
If build was successful then try install again.
-
5 hours ago, JonRobertson said:Disassembled code would reveal the code generated by the compiler. But it isn't going to reveal the contents of memory (registers, stack, or heap) prior to the code even executing. As Dalija points out, I could execute it once and the memory was zero at the time and execute it a thousand more times and the memory has values aside from zero.
Compiler generated code can tell you if a variable is automatically initialized or not. I only wanted to point out that there is a method to check if an AI statement in this regard is true or not.
-
1
-
-
11 hours ago, bravesofts said:Did the tone of this conversation lean towards mockery or belittling the person asking the question, or am I mistaken?
I apologize, now that I read again was I wrote... but it was not my intention.
-
1
-
-
1 hour ago, Dalija Prasnikar said:For instance AI can say "Local variables are automatically initialized" and "Local variables are not automatically initialized" If you don't know which of those statements is true, you will not be in position to verify. You cannot even check with code, because local variable can accidentally occupy memory that was zero at the time, so it may seem like the first statement is true, while it is not.
Assembler of that code will show the truth... but I think that someone that ask such things do not have ability to read assembler.
-
4 minutes ago, bravesofts said:Do random values only occur for local variables?
Not. The best practice is to initialize to nil if you need this.
7 minutes ago, bravesofts said:Why does uninitialized memory sometimes contain garbage values, especially when an object hasn't been allocated yet?
Because there was something before and that memory was deallocated.
It doesn't have anything with object allocation. You can allocate the memory for an object and you variable will remain as it was.
var LObj: TObject; begin TMyClass.Create; //LObj is not changed and will contain garbage
10 minutes ago, bravesofts said:LObj
is just a variable that will reference the object onceTMyClass
creates it.Only if you pass the value of the object to the variable:
LObj := TMyClass.Create;
13 minutes ago, bravesofts said:Does
TMyClass
automatically assign anything toLObj
just by declaring it like this? var LObj: TMyClass;
Not. Declaration will only allocate the memory for the variable (a typed pointer in this case) and that memory will contain garbage.
-
1
-
-
About emNewInterpreterOwnGIL.
Not every script can run with this. There are limitations.
-
8 hours ago, Celebr0 said:I just can't run 10 instances of a .py script through Python4Delphi, right?
You can run 10 instances with Python4Delphi but you have GIL limitation because Python. Python limits you, not Python4Delphi. Is there a library in this word that can circumvent GIL?
You can use CreateProcess and run 10 processes. You don't need Python4Delphi for this. But in the same processes you are limited by GIL. And all this because Python, not Python4Delphi.
Is Python a bad and low quality implementation of the language because this?
-
When you start 10 console windows you are starting 10 processes.
With Python4Delphi you will start all 10 in the same process. In this way you are limited by GIL.
You can start from a Delphi app 10 process executing same Python script but not using Python4Delphi.
Python4Delphi runs in your process and so you have a lot of advantages but also GIL.
PS. You can start at the same time 10 Delphi app and you will have 10 Python scripts running from Python4Delphi at the same time without GIL limitation.
-
RSP-30732 is marked as fixed in 10.4.2.
Can you reproduce it with the sample from that RSP?
If you can reproduce it in 12.1 you should open a new request at https://qp.embarcadero.com/
-
1 hour ago, Celebr0 said:Dude, all the indentations are correct everywhere, I don’t know where you got the idea that they are incorrect?
Yes, syntactically they are correct but I don't bother to read a code without indentations.
-
I don't have an answer but you code is so hard to read because wrong indentation that some will not bother to read you code and answer.
I understand that Pascal syntax is permissive but do you write your code in Python also with wrong indentation? And it works?
-
1 hour ago, Andro12 said:Data processing: Thousands of records are handled by the application in datasets. I'm currently manipulating data in-memory using TClientDataSet. Large dataset activities like sorting and filtering are taking longer than expected for me.
TClientDataSet is pretty fast. Faster than FireDAC.
You should reduce filtering and sorting if this is a bottleneck. Consider using CloneCursor if you need same sorting or filtering many times.
But first: use a profiler!
-
1
-
-
You can use something like EurekaLog or madExcept to get a call stack.
Also you can use, while debugging, the address from the message in the CPU view in the context menu "Go to Addresses" and see if that is in your code. If not, then you need a call stack.
-
2 hours ago, Sonjli said:For now I work day by day, but it is not an option.
I do not understand the problem. It is processed automatically but too slow or do you work manually?
What do you try to solve?
-
3 minutes ago, shineworld said:The pas file was corrupted
This should be easily spotted with a source control.
Storing Unicode Characters in PostGreSQL DB table
in Databases
Posted
Not exactly the database ENCODING. Every database can have other encoding but probably it is OK.