-
Content Count
562 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Tommi Prami
-
How to compare msXML nodes
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Not talking about equal, maybe lost in translation, I am talking of SAME node. BAsically i've got two separate processes, and I need to compare their result in third are they actually very same node or not. But I just assumed that DOM woulöd somehow know, or have some comparison to tell are these two random nodes actually same node or not. Apparently not, because there has not been any answer. And didn't find anything by googling around. I think I am not allowed to change the structure of the XML. if there is "tag" property in the nodes, most likely could walk through the DOM at beginning and initialize some counter ID. Or Actually would need only mark nodes I am interested in, while searching the nodes of interest. -Tee- -
How to compare msXML nodes
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Hello, Thanks for workaround ideas. I've got an workaround/fix idea. I just really really would like to avoid it. Too much of an work at this point of time. If someone has any idea how to compare compare random nodes and tell ae they exact same nodes or not, would be really cool! -Tee- -
How to compare msXML nodes
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
My first suggestions was not to use msXML, and guess the answer I got... -Tee- -
How to compare msXML nodes
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Here is the copy / paste style test app, thats why some extra complexity https://www.dropbox.com/s/zz3ui9kdtef9ybd/msXmlFindParent.7z?dl=0 -Tee- -
How to compare msXML nodes
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
The problem is that. I have two pr more nodes. I have one or nodes in the tree, same level and name, but there might be more than one. I'll try to illustrate. <?xml version="1.0" encoding="UTF-8"?> <root> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Beer this week end, please</body> <footer>and some other beverages</footer> </note> <note> <to>Big Lebowski</to> <from>Stephen King</from> <heading>FYI</heading> <body>Not on my rug</body> <footer>man</footer> </note> </root> If got list of From nodes on my hand, lets say for sport, from that XML 7 of them. lots of duplicates, sadly I am only here at this point in life (for sake of example). I need to know are they members of same node or not. Lets say I would like to throw away the duplicates, or whatever.. . To my surprise even though my code returns same node, but the pointer is not the same. I've debugged this and have unittest for it also that proves it. Is there in msXML any way to tell are two node s the same, as the variable/pointer are not same. Is this because of it's an Interface, dunno But the nodes returned haven't same value in those LNode1 and LNode2 variables in that case, I am sure the node is the same tough... XML which I was working on had only one parent node so it made me really question my mental health. But I've got code to prove it. I'll try to make runnable demo on weekend If have time. Path is not OK, because path can be same up to the root. I am not fully awake so I just can't managage to compress my thoughts into fewer words. -Tee- -
https://quality.embarcadero.com/browse/RSP-23466 And if someone is in Beta-program, test and try to be vocal towards Embarcadero about this.
-
Coworker sent me this, interesting to see active development on parallel algorithms. Don't have opinion on this, what so ever. Just FYI. https://en.wikipedia.org/wiki/Bitonic_sorter
-
Bitonic sorter
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Maybe examples are made single threaded for simplicity? Dunno tough. -
let's say if I have window Handle (Delphi app form), found by some windows API like FindWindow etc. Sometimes it seems that Window is created and has an handle but not fully functional yet. Is there a way to query with windows API that Delphi form is run all OnCreate etc events amnd is fully visible and all components are ready for user. Reason I as we use AutoIT to automatically test our Apps,, and sometimes Form is not ready yet. No fully visible or still runnin initialization events (OnCreate etc). If not I've suggested to add out base form class an message handler which we could use to quety, then problem would be how the Form it self Knows everything is OK, up and running 🙂 -Tee-
-
In .dpr? Yes it does and that has been going on at least few versions now
-
Relaxed JSON
Tommi Prami replied to John Kouraklis's topic in Algorithms, Data Structures and Class Design
Seems to me that is not very smart format/standard. If some service produce it and have to use it, then for sure need an parser. But I would steer away from that format if just can. Little bit sketchy. -Tee- -
Generic Command Line Parser for Delphi 10.3.x
Tommi Prami replied to Lars Fosdal's topic in I made this
I like your expected Command Line syntax. -Tee- -
WinAPI to query if a form is ready to Rock.
Tommi Prami replied to Tommi Prami's topic in Windows API
Could you elaborate bit more? What this means in practise -Tee- -
WinAPI to query if a form is ready to Rock.
Tommi Prami replied to Tommi Prami's topic in Windows API
While was walking to work had couple of ideas on this, What if at FormActivate (For example) event of base form, I would do either. 1. Send message to window it self, If I've understood correctly window will not receive that message untill it has processed all the Form initializations of it self, and is able to recveive messages again. 2. Create and start timer and disable and free it on first tick. I think this is essentially same as the method 1. Some codes, me included, are not used to using windows messages too much. Delphi hides the need quite well. When the message arrives or timer fires set the flag that can be queried with other messsage from outside of the app. This should give pretty good starting point. -Tee- -
WinAPI to query if a form is ready to Rock.
Tommi Prami replied to Tommi Prami's topic in Windows API
It seems this can happen (On Form) quite common places. Not too many but still. Did not know any of this, Always thought that handle would be totally permanent on it's whole life time... -Tee- -
WinAPI to query if a form is ready to Rock.
Tommi Prami replied to Tommi Prami's topic in Windows API
Delayed initialization is an separate problem I think, and that can be handled Case by case, if needed. How, why and when Delphi will recreate the Hvnd for a Form? Never heard of this, this might explain rare weirdness. -Tee- -
Delphi version of Fast inverse square root
Tommi Prami posted a topic in Algorithms, Data Structures and Class Design
https://en.wikipedia.org/wiki/Fast_inverse_square_root There was code samples long time ago for Delphi. With different constants, to spread error to positive , negative or +/- Also pure pascal version so routine could be inlined. It vas pretty fast Used in odl company. No need for me right now, but would be still cool to have it around and put into the Wiki and so on, also Delphi version of the code. -Tee- -
That is not all, there are also Embarcaderos inhouse fixes. -Tee-
-
That works also. -Tee-
-
If this works well would be nice if final code would be published in Github etc. I think many would need it and if there would be ready to run code, it would help community. -Tee-
-
Yo, Does anyone have 10.3.1 and 10.3.2 available? Would be cool to see some diff and/or analysis of RTL and/or VCL changes between the two, -Tee-
-
UltraCode64 for Delphi (aka 64-bit FastCode)
Tommi Prami replied to chmichael's topic in RTL and Delphi Object Pascal
Hope all start to contribute. When the FastCode was alive and kicking I suggested some kind of online server where benchmark/validation app could post results. Now hosting such a thing would be way easier. This could be good new contribution, to start with https://github.com/davidberneda/FastDateTime (Not my code, just to be clear) -Tee- -
UltraCode64 for Delphi (aka 64-bit FastCode)
Tommi Prami replied to chmichael's topic in RTL and Delphi Object Pascal
Drop in placements of RTL and/or VCL routines would be most beneficial for most. And maybe something as a bonus that are not in the Delphi as a standard. Hope this project attracts lot of coders. -Tee- -
Any way to make those Blue Balls (pun intended) different color? To me almost invisible.
-
Problem with Form/Window Caption on HIGH DPI, Delphi 10.3 and VCLStyles SKIN
Tommi Prami replied to ivancx's topic in VCL
Voted