Jump to content

Rollo62

Members
  • Content Count

    1977
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by Rollo62

  1. Rollo62

    Zip Compression library

    7-Zip with using the *.7z format is able to produce compressed files larger than 2GB and can be integrated into Delphi app as well, by using the 7z.dll. I think 7-Zip with using the *.zip format also stops at 2GB, but I haven't checked this with recent versions.
  2. Rollo62

    Split String

    How about something like TStringHelper.Split ? use System.SysUtils , System.Generics.Collections ; ... var LInput : String; LArray : TArray<String>; LElem : String; LStrQuo : String; begin LInput := '22-1, 22-2, 22-3'; LArray := LInput.Split( [ ',' ], TStringSplitOptions.ExcludeEmpty ); // Ignore empty elements for LElem in LArray do begin LStrQuo := LElem.Trim.QuotedString( '"' ); ... // Do something with the quoted in SQL end; end.
  3. Maybe this database is helpful too, with real pronounciation examples and theoretical background. https://englishexplorations.check.uni-hamburg.de/basic-concepts-of-english-phonetics-and-pronunciation/ https://en.wikipedia.org/wiki/International_Phonetic_Alphabet https://www.internationalphoneticassociation.org/IPAcharts/IPA_chart_orig/pdfs/IPA_Kiel_2020_full.pdf If you use such IPA alphabet in the DB, then maybe its possible to find and run a specific soundex algorithm on that. I would doubt that the original soundex for the usual alphabet might help here, but its worth a try.
  4. Rollo62

    First Python + DelphiVCL Program

    Thanks, yes I know. But I'm afraid this would be simply getting too heavy for my app. Moreover Python alone doesn't come with OpenCV and OpenCV is too heavy as well. I hope the portions for marker detection could be stripped off separately, like using simple filters for that goal. My consideration is that simple, specific marker-shapes might exist that have simple, specific detection algorithms as well, to allow easy and simple detetion and location.
  5. Rollo62

    First Python + DelphiVCL Program

    @Brian Evans Yes, but I hope that shirneworld has found any other stable marker detection without even OpenCV, which is not that Cross-Plattform too. OpenCV is of course perfect in this case. I still hope to find some simple algorithm for marker detection, like e.g. QR-Code detection, to be able to locate them on pictures without much external stuff. Yes, QR-Code detection algorithm was one of my favorites too, but maybe there could be even more optimized algorithms just fpr that purpose. The markes itself were not critical, can be any shape.
  6. I'm not an expert with that, but I guess you have to structure the database with a phonetic interpretation of words. When you look at this https://www.rhymedb.com/ Moreover, how to handle other languages, I assume also there a phonetic interpretation might cover a few languages at once.
  7. Rollo62

    First Python + DelphiVCL Program

    Thats a great application, I was looking for a similar option to find and exactly locate markers and their positions in an image, but I'm afraid I cannot use P4D since this has to be CrossPlatform. Maybe you have evaluated and tested some pure Pascal or Algorithmic solutions to find markers and you could share it with us ? ( and I don't want to use Cloud-KI solutions either ).
  8. I think the main question here is: Which granularity of a single step the user really needs for setting something ? Is it full 0...255 or is 0...100 sufficient ? This can be depending on the application, the formulas above only make it more readable to the user in %
  9. Rollo62

    The Delphi 11.2 release thread

    Uwe Raabe had shown a proposal howto Kill LSP in the German DP, maybe that is more convenient.
  10. Rollo62

    Issue with TDialogService.InputQuery fmx for IOS

    I'm a little unsure about this fix is repairing now all cases. I had implemented some fixes in the FMX.Dialogs.iOS.pas file at different spots ( under constructor TFMXAlertViewInputDelegate.Create ) and have seen that Dave Nottage provided a fix RSP-37702 under "class function TCocoaDialogsService.CreateAlertView(". This fix now seems to be implemented in the original Delphi unit in Rx11.2 Patch1. I would remove this patched FMX.Dialogs.iOS.pas unit now from my "patched units" list, if there were no other known sideeffects with this unit. Still I'm trying to check all the places where this error might occur, but its a little hard to test all that. Has somebody maybe found any other dialog sideeffects, related where the buttons are mixed up, or is this original Delphi unit now 100% OK ?
  11. Rollo62

    Mockup mobile

    Do you know this introducion about Balsamiq and FMX Stencils from Sarina Du Pont ? https://blogs.embarcadero.com/prototyping-from-vision-to-ux-design/ I dont know if this is still valid, because its already older. Presonally I think Delphi FMX is "mockup" enough for me, using other tools inbetween FMX Designer and Code is only another dependency layer added, but I understand the urge to want that.
  12. You don't need to be a registered user, just download the ZIP file under "Code" button
  13. Rollo62

    SSL in IOS Simulator

    Maybe it helps what Uwe suggests in the German DP. Check according to Delphi Compiler - Conditions simply enter $(Platform) and in the program check with {$IFDEF iOSSimARM64 } https://docwiki.embarcadero.com/RADStudio/Sydney/en/Memory_Management
  14. Rollo62

    Windows 11 22H2 lost batch file association

    By .DMG ??? ..... NOOOOT
  15. Right, I also try to do keep the balance right. Usually I see modular units that define one functionality as "implementation details" of an interface, which may or maybe not involve one or more Units to do its implementation. When accessing this "functionality" through the interface, yes there may be a few units involved behind the scene, but not from the caller perspective ( he only needs one clean, simplified interface unit ). Higher complexity may arise from the implementation side, but thats worth it in my opinion, to keep such details separate whereever it make sense. For me it is most important to have a clean consumer side, which can be used many times in many places, while the implementation side is defined and tested only once mostly. You may call it imbalance, but I think the consumer side has higher weight than producer side.
  16. Like said, same app, since I heavily modularized I have not seen such issues any more. I don't recall, but in the past iOS or Android had some kind of 64K limit for relative jumps, I think. It was always my explanation that too large binary blocks might fail, while the linker could handle many smaller chunks as needed ( probably that view is too naive with modern linkers, but anyway this helped a lot). These were cases from the early beginning of FMX mobile, so maybe all that has changed a lot, over the last years anyway. Nevertheless, my principle to try to use only small units had a lot of other advantages too and I'm quite happy with it.
  17. All above said is right. I also want to mention that it may depend from Platform as well. While large units under Windws never made a big issue to me, it turned out that under mobile they may show various strange exceptions and crashes, under iOS or Android. I assume that the reason for this is because linker issues, since a simple re-order units might help in many cases. That is the main reason I try to highly decouple my units nowadays, even if the classes might be related. This is not only a better, modular design IMHO, easier to maintain and test, but also helps to prevent mysterious exception under Mobile
  18. Rollo62

    Wiegand component

    Maybe with a little "DIY", with Yocto-Serial module, this could be useful: https://www.yoctopuce.com/EN/article/interfacing-a-wiegand-rfid-reader-by-usb https://www.yoctopuce.com/EN/products/usb-electrical-interfaces/yocto-serial It has Delphi support too https://www.yoctopuce.com/EN/libraries.php https://github.com/yoctopuce/yoctolib_delphi
  19. Rollo62

    Deleting string wich does include number

    Right, could be also written like that: //if AList[ i ].IndexOfAny( CDigitChars ) < 0 then if AList[ i ].LastIndexOfAny( CDigitChars ) < 0 then begin AList.Delete( i ); end;
  20. Rollo62

    Deleting string wich does include number

    It would be also an option to use IndexOfAny, like this: unit UMain_Frm; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Controls.Presentation, FMX.StdCtrls, FMX.Memo.Types, FMX.Layouts, FMX.ScrollBox, FMX.Memo; type TForm1 = class(TForm) Button1: TButton; Memo1: TMemo; Layout1: TLayout; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.fmx} const CDigitChars : array [ 0..9 ] of Char = ('0','1','2','3','4','5','6','7','8','9' ); procedure doWithList( AList : TStrings ); var i: Integer; begin AList.BeginUpdate; try for i := AList.Count - 1 downto 0 do begin if AList[ i ].IndexOfAny( CDigitChars ) < 0 then begin AList.Delete( i ); end; end; finally AList.EndUpdate; end; end; procedure TForm1.Button1Click(Sender: TObject); begin var LList := TStringList.Create; try LList.Assign( Memo1.Lines ); // LList.Add( 'abc' ); // LList.Add( 'def23' ); // LList.Add( 'fgr65' ); // LList.Add( 'kbt' ); // LList.Add( 'idopt87' ); doWithList( LList ); Memo1.Lines.Assign( LList ); finally FreeAndNil( LList ); end; end; end.
  21. Its not a listbox, but maybe the System.IOUtils unit help you with that.
  22. I have tested Mitovs libraries too and they offer great stuff for video processing. But a complete traffic counter would be not easy to do, last time I checked the libraries only included some standard filters, like Hough, Canny, simple MotionDetection, etc. This can be maybe helpful to build a simple traffic counter, but I would assume that this performance will be not too good. Thats why something like Yolo has been invented, also because this is much faster and stable. I have tried some simple object detection algorithms of more or less static images some years ago and I can tell you that the normal image filters cannot magically give good results. It is very tricky to make them return stable and error-free results, especially if the scene is highly dynamic like traffic and if it can have different lighting situations. If you have some good ideas or solutions, would be great to see that too.
  23. Video processing is once thing, but maybe you are looking for object detection algorithms like Yolo too. https://www.delphipraxis.net/1428590-post11.html I'm not sure if VideoLab implements that or would let you support that, that would be good to know. One thing to consider is maybe Python with OpenCV too, the Python environment could make such task simple, but I'm unsure if that has enough performance for realtime analysis https://medium.com/@MrBam44/yolo-object-detection-using-opencv-with-python-b6386c3d6fc1 https://towardsdatascience.com/yolo-object-detection-with-opencv-and-python-21e50ac599e9 https://opencv-tutorial.readthedocs.io/en/latest/yolo/yolo.html https://pyimagesearch.com/2018/11/12/yolo-object-detection-with-opencv/
  24. Rollo62

    Detect shake gesture on IOS

    Maybe you also have a look into UIResponder, which sits in unit iOSapi.UIKit. https://developer.apple.com/documentation/uikit/uiresponder/1621090-motionended https://pinkstone.co.uk/how-to-implement-a-shake-gesture-in-ios/ https://www.informit.com/articles/article.aspx?p=2026017&seqNum=12 https://ios-developer.net/iphone-ipad-programmer/development/accelerometer/shake-detection https://stevenpcurtis.medium.com/detect-ios-shake-gestures-swift-5164a5695d47
×