Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 10/10/22 in all areas

  1. gtDelphiZXingQRCode is a fork of the out dated DelphiZXingQRCode https://github.com/War3Evo/gtDelphi/tree/master/gtDelphiZXingQRCode DelphiZXingQRCode has not been updated for 9 years and all the pull requests are being ignored. So, I downloaded the file and started adding new life to the project. I was going to fork it, but I wanted to rename it slightly. I still give credit where it's due. I have mainly been focusing on the FMX side of the source code. What's new? It now has a non-visual FMX component that is threaded for background work. I know if I want to get this library ready for Android usage, it needs to be threaded. It can create both SVG and BMP file data. You can change the pixel colors while it's creating the SVG / BMP file data. I changed the black to blue and the white to violet... My Google pixel was still able to recognize the QR code quickly! There's a option to not use "inner style" in order to be compatible with Skia4Delphi. Road Map: I plan to create another SampleFMX application just for incorporating Skia4Delphi. Skia4Delphi has a SVG viewer that I wish to integrate with the component for those whom also want to use Skia4Delphi. I need to add resizing capabilities. If I can figure out how to resize the SVG version, then I can create the SVG version...resize it to any size then save it as BMP. Resizing BMP makes the QR code unusable. I eventually want to incorporate the QR code reader from Delphi ZXing and also include a better third party camera into gtDelphiZXingQRCode. Any other ideas are welcome.
  2. Uwe Raabe

    Replacing Apostrophe

    There also is a built-in function to decode HTML text: uses System.NetEncoding; ... var S := TNetEncoding.HTML.Decode(sHtml);
  3. David Heffernan

    Change of coding style/structure..

    If using a local variable with the basic try finally, Create, ShowModal, Free pattern is complicated and requires simplification, then I think you may have deeper problems.
  4. Hello, Is it possible to read XML processing instructions using TXMLDocument? Assuming XML I am trying to parse is as follows <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="xsl_for_this_xml.xslt"?> <DATA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> </DATA> I am trying to read "href" value in "xml-stylesheet". I will parse it as text if this is not possible to read using existing XML routines in Delphi. Thanks & Regards, Ertan
  5. Fr0sT.Brutal

    Windows 11 22H2 lost batch file association

    Who on Earth wrote that? Some of these diff's I just can't understand (" When the error level is called using BAT, the previous command is executed. " - ?? "Commands and utilities along with the programming language make CMD unique" / "The program is just a batch script and is called a batch file" - WTH that means?), some mention ancient command.com (my W7 has no this binary and still BAT files can be run), and some are just weird. I was always thinking CMD is just a newer alias for BAT introduced just to calm down MS's NIH syndrome. P.S. EXE is even more stoneage. Why not replace it with something new? 🙂
  6. FPiette

    Change of coding style/structure..

    I like to use FreeAndNil for the same reason David explained for the rest : One day you make your procedure more complex, adding some code lines after the FreeAndNil and yet use the freed variable. Calling FreeAndNil instead of Free will make you quickly discover (AV° the error you made. The price is very low for this security.
  7. Angus Robertson

    Windows 11 22H2 lost batch file association

    But not in the GetIt scripts, and perhaps many other installers, which is why I brought it up. Angus
  8. Lajos Juhász

    Change of coding style/structure..

    David already said everything. With can cause that you access something that you doesn't think (new property, field, method). Calling FreeAndNil for a local object has no reason it's just a classic code smell. Your aim should be to write clean and maintanable code that cannot be achieved using with.
  9. Fr0sT.Brutal

    One large unit vs multiple small units

    Small units are good for modularization but they complicate code navigation and understanding and enlarge "uses" section. As anywhere - it's important to keep the balance
  10. Fr0sT.Brutal

    XML validation

    XML validation would only have sense if you had configurable set of validation rules (f.i. as another XML or XSD). Otherwise I see no reason to validate output rather than source data.
  11. David Heffernan

    Change of coding style/structure..

    And then you need to call a few more methods and then you risk with hell. Or you need to pass the form reference to another method and you don't have it any more. So you change back to local variable pattern. Now have you multiple different patterns for the same task. Which is fine if the different patterns bring significant benefit. But they don't. So use a single unified pattern.
  12. Ian Branch

    Change of coding style/structure..

    Dave - 🙂 Lajos - W.. n..? Lars - I'm not exactly sure which code block you are referring to? David - It isn't complicated. It can just be easier.
  13. Dave Nottage

    Change of coding style/structure..

    No comment. Oh wait.. that was a comment 😉
  14. Lajos Juhász

    XML validation

    There is no reason to verify the data after you generated the XML. It's always the best to verify in case the data is incorrect to change it and as a last step to generate the output.
  15. Attila Kovacs

    How should spaces after a comment be handled by the formatter

    why not? you could name it "The option I didn't want to implement #4223"
  16. Lars Fosdal

    Deleting string wich does include number

    I prefer not to give explicit answers to educational questions. Having to understand a description of how to implement the answer is better learning than being given the answer. That said: LastDelimiter - a little tidbit that I didn't know existed - although it appears to origin from the days of PChar.
  17. David Heffernan

    Weird code in THttpConnection.ProcessWellKnownDir

    If that is the case, then MaxInt should be used for that argument
×