Jump to content

Leaderboard


Popular Content

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

  1. Hi, I have just released new book: Delphi Thread Safety Patterns. https://dalija.prasnikar.info/delphitspatt/ It is on promotional sale until June,14. You can use Coupon Code: DTSPATT10 at checkout to get a $10 discount. At the moment there are two options: you can purchase eBook only or bundle: eBook and paper edition (those are separate purchases that go through different sellers and you will receive instructions for paper book with the eBook order). Paper book only on the Amazon is not available for the time being. Thank you all for the support!
  2. Hi, I have released source code of a small game. You could see the demo here: https://youtu.be/KVNRi83yYQA Some screenshots: Github repository: https://github.com/nglthach/Swim Best!!
  3. tinyBigGAMES

    GameVision Toolkit

    I found the issue and updated GVExample, it should work for you now. You can redownload from the release page. Sorry about that. The repo has been updated as well. Thanks for reporting. 👏
  4. IIRC in Delphi 7, you have to list all fields in a const record declaration while in later versions you can omit some as I did - they are then automatically initialized by their default value. And depending on the usage of such a record they don't matter like in my case because I never need the CurrencyString. And you don't need it either because JSON has no currency representation. If you need that usually its represented by different fields, the amount and the currency abbreviation Personally, I could not care less about a Delphi version from almost 20 years ago lol
  5. The solution is to use the FloatToStr overload that takes a TFormatSettings and pass one that has DecimalSeparator set to dot. I typically declare such a TFormatSettings as const and fill all the fields that are required for JSON or some other textual format like this - the following for example is being used in Spring for converting various data types to string (from TValue): const ISO8601FormatSettings: TFormatSettings = ( DateSeparator: '-'; TimeSeparator: ':'; ShortDateFormat: 'YYYY-MM-DD'; LongDateFormat: 'YYYY-MM-DD'; TimeAMString: ''; TimePMString: ''; ShortTimeFormat: 'hh:nn:ss'; LongTimeFormat: 'hh:nn:ss'; DecimalSeparator: '.'; );
  6. Lars Fosdal

    2022 Stack Overflow Developer Survey

    Temporarily disabling the ad-blocker solved that for me.
  7. Fr0sT.Brutal

    GUI are not the same size

    Or call control's ScaleBy method
  8. Remy Lebeau

    TidTCPServer and TidTCPClient withh SSL/TLS enabled

    Yes. Define 2 separate ports in the server's Bindings collection, and then in the server's OnConnect event you can cast the AContext.Connection.IOHandler property to TIdSSLIOHandlerSocketBase and set its PassThrough property to True (SSL/TLS disabled) or False (SSL/TLS enabled) based on which port the client connected to, which you can get from the AContext.Binding.Port property.
  9. Remy Lebeau

    Indy OAuth authentication over SASL

    FYI, this morning I checked in a new 'sasl-oauth' branch in Indy's repo, which includes a new 'IdSASLOAuth.pas' unit for SASL classes for OAUTH10A, OAUTHBEARER, and XOAUTH2 for TIdDICT, TIdPOP3, TIdSMTP, and TIdIMAP4. They are still a work in progress (ie, no parsing of response JSON yet), and you are responsible for obtaining the OAuth tokens externally (ie, over HTTP), but once you have the tokens then you can use these SASLs to login to the DICT/POP3/SMTP/IMAP servers.
  10. Remy Lebeau

    Sending Email via GMail Using OAuth 2.0 via Indy

    FYI, this morning I checked in a new 'sasl-oauth' branch in Indy's repo, which includes a new 'IdSASLOAuth.pas' unit for SASL classes for OAUTH10A, OAUTHBEARER, and XOAUTH2 for TIdDICT, TIdPOP3, TIdSMTP, and TIdIMAP4. They are still a work in progress (ie, no parsing of response JSON yet), and you are responsible for obtaining the OAuth tokens externally (ie, over HTTP), but once you have the tokens then you can use these SASLs to login to the DICT/POP3/SMTP/IMAP servers.
  11. I think delivering a commercial software directly depending on some 3rd party components you don't control and which should be downloaded from some another 3rd party's source is not the right way to go unless that's some kind of GUI scripter that must allow using ANY package. The right way is to have all these packages in your repo and install them only from your source (distr / your site). This way you can be sure things work and no small update of a single tiny package breaks your whole setup.
  12. Marsil

    Delphi 11 - Customize Toolbar works very badly

    I tried that, doesn't work for me!, D11.1
  13. Martin Sedgewick

    win32 exe compiled in Delphi11 does not run on W2000

    https://github.com/ideasawakened/DelphiKB/wiki/D28.ALEXANDRIA.11.0.0.0 This might help Can no longer build executables for Windows XP without customization: Project Options->Building->Delphi Compiler->Linking->Set OS Version fields in PE Headers (and Set SubSystem Version fields in PE Headers" to 5.1 (it now defaults to 6.0) If you use System.Threading, then need to change GetTickCount64 references to a new routine matching something like the code below and then use a modified system.thread.dcu in your projects (or update \lib\win32\debug and \lib\win32\release with new versions of System.Threading.dcu) More info from Michal Mutl on Delphi PRAXIS forum message function _GetTickCount64: UInt64; begin if TOSVersion.Major<6 then Result := TThread.GetTickCount else Result := TThread.GetTickCount64; end; XP Compatibility notes As reported by Marco Cantu on Delphi PRAXIS, better HighDPI support was the reason for the PE header change. And the GetTickCount was un intentional. Changing the PE format to target newer versions was a design decision. It's the same Visual Studio does. And it does make a difference in the results when invoking some HighDPI related Windows APIs. They fail to return the right value if the app is for XP, so if you change the PE setting (doable) you'll have some trouble on the latest systems. The introduction of an XP breaking issue with GetTickCount64 was not intentional and discussed. We don't test on XP by design, no one in the beta did, most likley. While we don't officially support XP, such a simple change is doable -- as long there is zero impact on newer systems and it costs a limited time. I doubt we'll release a patch for it, though...
  14. If you don't want to rely on 3rd party wrappers, it is not very overly complicated to redirect the output and read it manually. Just create a pipe, assign it to the STARTUPINFO passed to CreateProcess(), and then read from the pipe. MSDN documents this task: Creating a Child Process with Redirected Input and Output
  15. That change was to allow the unit to be used on non-Windows systems, gcvt is a Windows API. The dirty way to fix this is to replace a comma with a period immediately after the FloatToText statement, I'll investigate if there is a non-localized FloatToText alternate. Angus
×