Jump to content

Fr0sT.Brutal

Members
  • Content Count

    2268
  • Joined

  • Last visited

  • Days Won

    46

Posts posted by Fr0sT.Brutal


  1. Well, Webdriver libs just give you a convenient interface to browser automation API which is no more than REST API. This WebDriver API is a standard and browser implementation could be any (Chrome, Opera, Firefox, Edge...). Phantom was just one of those. I have my scraper able to switch between Phantom, Chrome and Firefox and work with the same code.

     

    As for CEF4D, I had no experience but some guys here had and I believe they could help if you encounter any issue

    • Like 1

  2. On 8/15/2023 at 2:38 AM, Vincent Parrett said:

    Coroutines/fibers/virtualthreads etc are really useful in high concurrency server applications, or under the hood in other libraries

    Regular DB client app but loading a data takes some time... While Delphi coder starts inventing a triangle-wheeled bicycle, anyone using other languages just write "await query.ExecSQL()" and chill.

    Or try to implement a protocol with complex req-resp like FTP in async (event-driven) mode. This quickly becomes a hard task.


  3. 18 hours ago, Rollo62 said:

    Maybe, if you are willing to bundle with Python or the ike, a headless browser could help.

    https://www.zenrows.com/blog/selenium-python-web-scraping#prerequisites

    But that is usually too fat for a simple, I would guess.

    There's no compact headless browser now as Phantom has died. Bundling whole browser install + python + selenium libs for a task that could be solved with chromium libs is nonsense.


  4. I didn't create web apps but I created a DB app with almost all logic at client and a DB app with all logic at server (only a few stored procs exposed to clients).

    Answer: it depends. Every approach has its pros and cons and which are more valuable to your project is you to decide. If your API grows, you can end with 100s of server end points with separate one for every modification. With client-side logic data flow could appear too fat or exposing too much internal fields


  5. On 8/12/2023 at 12:22 PM, David Schwartz said:

    I think it's a big problem that renders Google practically useless if you don't know the proper term to use, or if there even is one

    Yes and the fact that some coding features are only show themselves as some non-alpha symbols complicates things. Trying to google "what ^#$& means in <language name>" does not always return relevant results.

    On 8/12/2023 at 12:22 PM, David Schwartz said:

    Case in point: where can you find the entire set of % parameters that can be used in a Format statement?

    Hm, I was always going Format > Formatting strings for this in D7 help and XE2 already has these parameters in the function's page.


  6. 8 hours ago, sfrazor said:

    I'm using TNETHTTPClient - which is just a WINHttp wrapper it seems

    Yes but it raises exceptions while WinHttp doesn't. If multiplatform is not the goal, using WinAPI directly could help avoiding exceptions

     

    As for exceptions, probably something in the way Delphi handles them causes the issue. You'll probably face it again when exception will be unavoidable. I wouldn't recommend using memmodule approach in production with such a problem unsolved. Do you really really need to load DLLs without saving them to a file?

    Btw, are you using master or dev branch? dev had much updates but is untested.


  7. 12 hours ago, FLDelphi said:

    I cloned the master branch however many years ago, and I was hoping I could just "Fast-forward" or "Merge", but I'm hesitant to do so since I'm very much not a git expert. Plus with the complexity of already having the components installed.

    You don't have to be git expert to just do pull. Then open appropriate packages and build them, then install design-time one. Everything is simpler than with installers


  8. Would be nice however you can do it yourself

    (*******************************************************************************
      Include file for checking compiler settings.
    
      Based on JVCL
    
      ALIGN_ON               Compiling in the A+ state (no alignment)
      BOOLEVAL_ON            Compiling in the B+ state (complete boolean evaluation)
      ASSERTIONS_ON          Compiling in the C+ state (assertions on)
      DEBUGINFO_ON           Compiling in the D+ state (debug info generation on)
      IMPORTEDDATA_ON        Compiling in the G+ state (creation of imported data references)
      LONGSTRINGS_ON         Compiling in the H+ state (string defined as AnsiString)
      IOCHECKS_ON            Compiling in the I+ state (I/O checking enabled)
      WRITEABLECONST_ON      Compiling in the J+ state (typed constants can be modified)
      LOCALSYMBOLS_ON        Compiling in the L+ state (local symbol generation)
      TYPEINFO_ON            Compiling in the M+ state (RTTI generation on)
      OPTIMIZATION_ON        Compiling in the O+ state (code optimization on)
      OPENSTRINGS_ON         Compiling in the P+ state (variable string parameters are openstrings)
      OVERFLOWCHECKS_ON      Compiling in the Q+ state (overflow checing on)
      RANGECHECKS_ON         Compiling in the R+ state (range checking on)
      TYPEDADDRESS_ON        Compiling in the T+ state (pointers obtained using the @ operator are typed)
      SAFEDIVIDE_ON          Compiling in the U+ state (save FDIV instruction through RTL emulation)
      VARSTRINGCHECKS_ON     Compiling in the V+ state (type checking of shortstrings)
      STACKFRAMES_ON         Compiling in the W+ state (generation of stack frames)
      EXTENDEDSYNTAX_ON      Compiling in the X+ state (Delphi extended syntax enabled)
    
    
    *******************************************************************************)
    
    {$IFOPT A+} {$DEFINE ALIGN_ON} {$ENDIF}
    {$IFOPT B+} {$DEFINE BOOLEVAL_ON} {$ENDIF}
    {$IFOPT C+} {$DEFINE ASSERTIONS_ON} {$ENDIF}
    {$IFOPT D+} {$DEFINE DEBUGINFO_ON} {$ENDIF}
    {$IFOPT G+} {$DEFINE IMPORTEDDATA_ON} {$ENDIF}
    {$IFOPT H+} {$DEFINE LONGSTRINGS_ON} {$ENDIF}
    
    // Hints
    {$IFOPT I+} {$DEFINE IOCHECKS_ON} {$ENDIF}
    {$IFOPT J+} {$DEFINE WRITEABLECONST_ON} {$ENDIF}
    {$IFOPT L+} {$DEFINE LOCALSYMBOLS_ON} {$ENDIF}
    {$IFOPT M+} {$DEFINE TYPEINFO_ON} {$ENDIF}
    {$IFOPT O+} {$DEFINE OPTIMIZATION_ON} {$ENDIF}
    {$IFOPT P+} {$DEFINE OPENSTRINGS_ON} {$ENDIF}
    {$IFOPT Q+} {$DEFINE OVERFLOWCHECKS_ON} {$ENDIF}
    {$IFOPT R+} {$DEFINE RANGECHECKS_ON} {$ENDIF}
    
    // Real compatibility
    {$IFOPT T+} {$DEFINE TYPEDADDRESS_ON} {$ENDIF}
    {$IFOPT U+} {$DEFINE SAFEDIVIDE_ON} {$ENDIF}
    {$IFOPT V+} {$DEFINE VARSTRINGCHECKS_ON} {$ENDIF}
    {$IFOPT W+} {$DEFINE STACKFRAMES_ON} {$ENDIF}
    
    // Warnings
    {$IFOPT X+} {$DEFINE EXTENDEDSYNTAX_ON} {$ENDIF}

    https://github.com/Fr0sT-Brutal/Delphi_Compilers/blob/master/CompilerOpts.inc


  9. Hi!

    Do you mean postal addresses? If so, there's separate HUGE area that requires huge database. I'm not aware if OSM provides such API but they have the database and are able to search for an address.

    If there's a 3rd party service that converts an address to coords via REST or something, this is doable.


  10. I remember exactly the same topic some time ago. Was it yours? But the exact problem I can't understand either. Plz specify it more concretely.

    You can use arrays , dictionaries, lists and any other container that have unlimited length. Or VarInRange. Or, if the ranges are static, "case" (though internally it will be not more than multiple if's).

    I'm not aware of a class that handles multiple ranges (like ranges.Add(3, 300); ranges.Add(40000, 50000000); if ranges.Includes(i)) but probably someone had created such one. Otherwise it seems relatively easy to create from scratch. If you need exactly this, try to search in the area of Unicode handling. This is the 1st application that comes to mind which could require multiple ranges (f.ex., to define letters of some alphabet that are not coming in single block in the Unicode table)

    • Like 1
×