Jump to content

Fr0sT.Brutal

Members
  • Content Count

    2268
  • Joined

  • Last visited

  • Days Won

    46

Everything posted by Fr0sT.Brutal

  1. Fr0sT.Brutal

    Waiting for multiple threads

    Usually there's a list of all running threads in process (anon threads are simple but lead to hell) and stopping them involves accessing every instance anyway so there's no big difference between local or global stop events, just the stopper code: SetEvent(GlobalStopEvent) for thr in Threads do thr.WaitFor vs for thr in Threads do SetEvent(thr.StopEvent) for thr in Threads do thr.WaitFor For the best flexibility the stop event could be optionally passed to a thread or created locally if not specified.
  2. Fr0sT.Brutal

    How to gracefully get rid of the use of dictionaries?

    TDirection = (dirN, dirS, dirW, dirE) TDirectionArr = array[TDirection] of ShortInt
  3. Fr0sT.Brutal

    [firebird] Converting DB from one charset to other

    IB/FB has DataPump AFAIK
  4. Fr0sT.Brutal

    ERD tool needed!

    IBExpert, as its name obviously means, deals with IB and FB. OP has Postgres. bug
  5. Fr0sT.Brutal

    Adressing IP with System.Net.HttpClient

    Disable server verification. IDK how to do it with THTTPClient but you have the subject to search for. With Windows secure sockets I done this https://github.com/Fr0sT-Brutal/Delphi_SChannelTLS/ // starting TLS handshake if sfNoServerVerify in SessionData.Flags then dwSSPIFlags := dwSSPIFlags or ISC_REQ_MANUAL_CRED_VALIDATION; ... // before starting TLS if FAddrIsIP then begin SChannelLog(loSslInfo, Format(S_Msg_AddrIsIP, [Addr])); Include(FSessionData.Flags, sfNoServerVerify); end; ... // after successful handshake // Don't pass host addr if it's IP otherwise verification would fail if FAddrIsIP then CheckServerCert(FhContext, '') else CheckServerCert(FhContext, Addr); In cURL this option is called "insecure" -k, --insecure (TLS) By default, every SSL connection curl makes is verified to be secure. This option allows curl to proceed and operate even for server connections otherwise considered insecure. The server connection is verified by making sure the server's certificate contains the right name and verifies successfully using the cert store. See this online resource for further details: https://curl.haxx.se/docs/sslcerts.html See also --proxy-insecure and --cacert.
  6. Fr0sT.Brutal

    ERD tool needed!

    Postgres
  7. Fix incorrect logic that raises exceptions if HTTP tunnel / socks address is non-IP 0001-TCustomHttpTunnelWSocket.Connect-allow-HTTP-tunnel-t.patch 0002-TCustomSocksWSocket.Connect-allow-socks-to-have-non-.patch Patches are applied over v8.66 pt5
  8. Fr0sT.Brutal

    Retrieve Delphi version used from within an App?

    Nice to know, thanks! I support D7+ only though 🙂
  9. Fr0sT.Brutal

    Remote desktop friendly

    @pyscripter I mostly addressed David's answer on that SO topic where he calls TBaseForm.UpdateDoubleBuffered. AFAIU the issue with crashes only affects apps using styles or FMX which is not my case for now so I'm not dealing with all this registering and messaging
  10. Fr0sT.Brutal

    Remote desktop friendly

    Hmm, how about setting ParentDoubleBuffered to True for all components and changing only form's DoubleBuffered property? I did so for now and see no issues. Probably I'm missing something? I also did it the simplest way setting DoubleBuffered on startup only - I've no machines accessed both locally and remotely
  11. Currently it's much better than it was
  12. Fr0sT.Brutal

    Database in Delphi

    Zeos of course
  13. Fr0sT.Brutal

    Retrieve Delphi version used from within an App?

    // Compiler version constants for checking with CompilerVersion constant const RAD_Sydney = 34; RAD_10_4 = 34; RAD_Rio = 33; RAD_10_3 = 33; RAD_Tokyo = 32; RAD_10_2 = 32; RAD_Berlin = 31; RAD_10_1 = 31; RAD_Seattle = 30; RAD_10 = 30; RAD_XE8 = 29; RAD_XE7 = 28; RAD_XE6 = 27; RAD_XE5 = 26; RAD_XE4 = 25; RAD_XE3 = 24; RAD_XE2 = 23; RAD_XE = 22; RAD_2010 = 21; RAD_2009 = 20; RAD_2007 = 19; RAD_2006 = 18; RAD_2005 = 17; Delphi_8 = 16; Delphi_7 = 15;
  14. Fr0sT.Brutal

    Remote desktop friendly

    Good subject BTW - I learned GetSystemMetrics(SM_REMOTESESSION) and redesigned DoubleBuffered usage in my apps that are running on remote PC's
  15. OTOH I wouldn't be happy with something like Microsoft.Interfaces.Winapi.IOUtils.TPath.PathDelimiter
  16. Fr0sT.Brutal

    Remote desktop friendly

    F.ex., my 10.3 is veeery lazy on scrolling via RDP.
  17. Are you sure that's RTL that does these things? In which method?
  18. Fr0sT.Brutal

    Creating and Freeing components on-the-fly..

    My preference: - Place on a form only visual and related components (dialogs, etc). Place Data access components in Data module. Other ones are created dynamically - Use .Create(Form) when component's lifecycle is the same as owner form's. This way the form cares of destroying it - Use .Create(nil) and destroy manually otherwise
  19. Fr0sT.Brutal

    Install flag to say it's for ALL USERS?

    Security restrictions are PITA! So you can just nag those security guys to do whatever they want but provide you, the software writer, with properly set instruments. Alternatively, try to just copy files from UserData and registry entries from Admin's HKCU to your account
  20. I've never seen FileCreate/FileClose inlined; DeleteFile is inlined for Posix and yes, RenameFile is still inlined for all platforms (checking in XE2 and 10.3). Odd decision really. The worse thing with inlines is that they can't use internal constants 😞
  21. Fr0sT.Brutal

    Nneed a mentor

    Well, I suppose if you need both English&coding tutor, you should expect x2 price 😄
  22. Fr0sT.Brutal

    Nneed a mentor

    It's weird to seek for a mentor on international forum with such lang skills. Why don't try at sql.ru?
  23. Fr0sT.Brutal

    Edge Webview update (?)

    *facepalm* Winsock is included into RTL and you can create client-server apps with it. What a stupid policy
  24. Fr0sT.Brutal

    Micro optimization: Split strings

    @Attila Kovacs yep that's why I came up to AllowEmpty option. Nevertheless I agree that behavior should be consistent between implementations in other languages (this issue is long-lasting TODO entry, probably I'll move it somewhat upper)
×