Jump to content

Tommi Prami

Members
  • Content Count

    562
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Tommi Prami

  1. Tommi Prami

    Running commandline app and capturing output

    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-
  2. Tommi Prami

    New free firebird tool... (Didn't make it ;) )

    Report to the author. .Tee.
  3. Tommi Prami

    Running commandline app and capturing output

    @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-
  4. Tommi Prami

    Running commandline app and capturing output

    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-
  5. Tommi Prami

    New free firebird tool... (Didn't make it ;) )

    Report to the author. I think it should not use gds*dll, but not sure. -Tee-
  6. Overkill for small utility with only few lines of code. And if no other use (For now at least).
  7. 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-
  8. Tommi Prami

    Running commandline app and capturing output

    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-
  9. Could you clarify which takes which time. I can read that both ways 😄
  10. Tommi Prami

    New free firebird tool... (Didn't make it ;) )

    32-bit version worked for me, because I'll have 32bit FB on computer and client library also.
  11. Tommi Prami

    New free firebird tool... (Didn't make it ;) )

    Send bug report. Dang... Happened for me also... I thinik it is because fot 64bit version and don't have clint library... -Tee-
  12. 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-
  13. Tommi Prami

    With haters unite

    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)
  14. Tommi Prami

    With haters unite

    Sorry about all link hassle.. -tee-
  15. Tommi Prami

    With haters unite

    Damnation, right. This is correct URL: https://quality.embarcadero.com/browse/RSP-18953 Thanks... Copy paste errors all day 😄 -tee-
  16. Tommi Prami

    With haters unite

    Maybe now...
  17. Tommi Prami

    SHA Extensions and Delphi

    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.
  18. Tommi Prami

    Null value for T

    Thanks! I jumped through some serious hoops to get that. Have to go through that code...
  19. 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-
  20. 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.
  21. True dat. I am interested in the values, not the order.
  22. 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.
  23. 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-
  24. 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...
  25. Tommi Prami

    How to compare msXML nodes

    How? Or where? But the actual DOM must not change because need to save it after processing. -Tee-
×