-
Content Count
562 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Tommi Prami
-
Running commandline app and capturing output
Tommi Prami replied to Tommi Prami's topic in Windows API
No, not going to run OpenSSL, Have used this code with OpenSSL previously. That was just an example. I am going to run internal company commandline tool. Which does some file processing, and I have x number of files, which I would like to run in parallel. Which going to work. Currently it is totally OK; parallel running would be faster. -Tee- -
New free firebird tool... (Didn't make it ;) )
Tommi Prami replied to Tommi Prami's topic in I made this
Report to the author. .Tee. -
Running commandline app and capturing output
Tommi Prami replied to Tommi Prami's topic in Windows API
@Angus Robertson but anyhow, seems that I coudöl fix problems with your code. Need to tinker adound with my current contraption, it is not very clean API-vise. Thanks!! -Tee- -
Running commandline app and capturing output
Tommi Prami replied to Tommi Prami's topic in Windows API
Angus Robertson, thanks for code, I think this should work without using temp file. Also as it is now can't work if same process is fired multiple times at same time, as I woulöd need to do (easy to fix tough)... -Tee- -
New free firebird tool... (Didn't make it ;) )
Tommi Prami replied to Tommi Prami's topic in I made this
Report to the author. I think it should not use gds*dll, but not sure. -Tee- -
Any Good tutorial on Parallel Programming Library?
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Overkill for small utility with only few lines of code. And if no other use (For now at least). -
Any Good tutorial on Parallel Programming Library?
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Fire up tasks in parallel and feed work to them, way or other, pass work log back and so on. Would be positive to terminate tasks, but that is not that big of a deal right now. Pretty basic stuff, but as I mentioned, I've tried few times to do something with PPL and it seems always been disaster. In way or another. OTL has good documentation and have the book, but as said, can't use it with this. -Tee- -
Running commandline app and capturing output
Tommi Prami replied to Tommi Prami's topic in Windows API
What I've tested, same app mich or might not get captured, earlier used this code to fire up OpenSSL, bow in house internal App. Now if I run 30 times same app, maybe none get captured, maybe all get captured, or anything in between. -Tee- -
New MemManager allocator Win,Osx,Ios,Android,Linux?
Tommi Prami replied to RDP1974's topic in RTL and Delphi Object Pascal
Could you clarify which takes which time. I can read that both ways 😄 -
New free firebird tool... (Didn't make it ;) )
Tommi Prami replied to Tommi Prami's topic in I made this
32-bit version worked for me, because I'll have 32bit FB on computer and client library also. -
New free firebird tool... (Didn't make it ;) )
Tommi Prami replied to Tommi Prami's topic in I made this
Send bug report. Dang... Happened for me also... I thinik it is because fot 64bit version and don't have clint library... -Tee- -
Difference between FastMM 4.992 and one that comes with Delphi (10.3)
Tommi Prami posted a topic in Delphi Third-Party
At first (2007 era) when FastMM4 was added into delphi as default memory manager there was some debug stuff removed I think. Is that the case still? Does anyone know reason why Embarcadero does not use the "full" version of it? Asked around Facebook I think, who uses internal and Who uses latest FastMM4 I think almost all used the latest one instead of one shipped with delphi. Which one you use? -Tee- -
With haters unite, please vote for this : https://quality.embarcadero.com/browse/RSP-18953 Compiler (etc) assisted with removal Refactoring tool would be super cool. Sometimes so error prone to remove by hand, especially nested withs. (oops wrong link at start)
-
Sorry about all link hassle.. -tee-
-
Damnation, right. This is correct URL: https://quality.embarcadero.com/browse/RSP-18953 Thanks... Copy paste errors all day 😄 -tee-
-
Maybe now...
-
Did quick google search to familiarize myself on the subject and ran into this: https://github.com/minio/sha256-simd Seems to be worth checking out. .Tee.
-
Thanks! I jumped through some serious hoops to get that. Have to go through that code...
-
Update Interface property value with RTTI
Tommi Prami posted a topic in RTL and Delphi Object Pascal
Did not find example for this. Basically I need some kind of methods that are UpdatePropertyIfAvaibalble(const AInterface interface; const APropertyName: string; const AValue: string); UpdatePropertyIfAvaibalble(IMyInterfaceThingy, 'Id', 'IDSTRINGVALUE'); And overloads for different data types. Datatype is known. Cool if would check the datatype of property tough, is it compatible... Why I need this is that there is XML interface which does not have inheritance, so most nodes have all the same properties but not inherited from same interface so can't use that (woulöd have been too easy :D). So using RTTI would help a ton. Never done that with interfaces so not sure where to start. -Tee- -
Anyone have good code to get difference of two TList<T>
Tommi Prami posted a topic in Algorithms, Data Structures and Class Design
Have not done much Generics stuff, but the trivial stuff. I think this must be class of some sort, right? To get the/return T Something like : (This could be actual helper also, maybe??) TGenericListHelper<T> = class(TObject) public function Diffference(const AList1, AList2: TLIst<T>): TList<T>; end; Something like that. And then add rest. I'll try to implement that on my own but if someone has good code/ideas for that, let me know. -
Anyone have good code to get difference of two TList<T>
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
True dat. I am interested in the values, not the order. -
Anyone have good code to get difference of two TList<T>
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
I is too large of an library to add into our SVN for such a little use cases, at least so far, Could check for the algorithm tough. -
Anyone have good code to get difference of two TList<T>
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Got it. Not super good but seems to work, TGenericListHelper = class(TObject) public class function Difference<T>(const AList1, AList2: TList<T>): TList<T>; end; class function TGenericListHelper.Difference<T>(const AList1, AList2: TList<T>): TList<T>; var I: Integer; begin Result := TList<T>.Create; for I := 0 to AList1.Count - 1 do if AList2.IndexOf(AList1) = -1 then Result.Add(AList1); for I := 0 to AList2.Count - 1 do if AList1.IndexOf(AList2) = -1 then Result.Add(AList2); end; Surely with sorting etc can make this faster and most likely there is better algorithm for this. If you know how to make this better, I am all ears. -Tee- -
I have an code: function FindParentNodeByName(const AChildNode: IXMLDOMNode; const AParentNodeName: string): IXMLDOMNode; var LParentNode: IXMLDOMNode; begin Result := nil; if not Assigned(AChildNode) then Exit; LParentNode := AChildNode; repeat LParentNode := LParentNode.parentNode; if Assigned(LParentNode) and (LParentNode.nodeName = AParentNodeName) then Exit(LParentNode); until not Assigned(LParentNode) end; Which finds the Node OK, but if I cann it two times with same parameters are not same, meaning their pointers are not same. So if I have two random IXMLDOMNodes from same XML document, how I can be sure that they are actually same, if can't compare pointer? So if I have something like: LParent1 := FindParentNodeByName(LNode1, 'somenode'); LParent2 := FindParentNodeByName(LNode1, 'somenode'); if LParent1 = LParent2 then ShowMessage('Same); // Won't work ever So I should have some way to compare they are actually same node like if LParent1.IsExactlySameNode(LParent2) then ShowMessage('Same); -Tee- PS. not sure if this is actually right group, move if in wrong one...
-
How to compare msXML nodes
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
How? Or where? But the actual DOM must not change because need to save it after processing. -Tee-