mvanrijnen
Members-
Content Count
455 -
Joined
-
Last visited
-
Days Won
1
Everything posted by mvanrijnen
-
Can we update or do we need to reinstall ?
-
Hands-On Design Patterns with Delphi
mvanrijnen replied to Primož Gabrijelčič's topic in Tips / Blogs / Tutorials / Videos
Is asian kind of thing, same as "Same same, but different" 🙂 -
I never got time to make our own generator public . I am on holiday now. But try this out as soon as I get back
-
TDateTimeHelper from D11 that can be used in D10.4?
mvanrijnen replied to David Schwartz's topic in RTL and Delphi Object Pascal
i know, but i find it a hassle to keep this in sight which one (in this case System.DateUtils or our own Helpers.DateTime) is where in the uses clausules, in all our sourcecodes. But it's not a big problem, only hope there will be a solution for this problem. -
TDateTimeHelper from D11 that can be used in D10.4?
mvanrijnen replied to David Schwartz's topic in RTL and Delphi Object Pascal
Yes, and we hit direct the problem with these class/record helpers. We had our own TDateTimeHelper, so we could change all code. Because it's never clear which helper it would pick, yours or theirs. -
Is asked ChatGPT: What is Internet Component Suite for Delphi?
mvanrijnen replied to FPiette's topic in ICS - Internet Component Suite
I got the following answer on the same question: " ICS (Internet Communications Suite) is a suite of applications that includes several programs for communicating over the internet, such as email, instant messaging, and web browsing. To use ICS to fetch a webpage, you will need to use a web browser program that is part of the ICS suite, such as Netscape Navigator or Mozilla Firefox. Here is a general outline of the steps you can follow to use ICS to fetch a webpage: Open your web browser program by double-clicking on its icon or selecting it from the list of programs on your computer. In the address bar at the top of the browser window, type the URL (Uniform Resource Locator) of the webpage you want to fetch, and press Enter. The URL is the web address of the webpage, and it typically begins with "http://" or "https://". Wait for the webpage to load. This may take a few seconds or longer, depending on the size of the webpage and the speed of your internet connection. Once the webpage has finished loading, you can scroll through it and interact with any links or buttons on the page. I hope this helps! Let me know if you have any other questions. " -
Delphi Code Coverage WIzard Plus V2.0 released
mvanrijnen replied to TurboMagic's topic in Delphi Third-Party
looks good, already usefull! -
Delphi Code Coverage WIzard Plus V2.0 released
mvanrijnen replied to TurboMagic's topic in Delphi Third-Party
cool, was just thinking we would need something like this. -
Send message frmo VCL app to another machine in lan
mvanrijnen replied to mikak's topic in General Help
i wonder if thats the best solution for the use case your describing (just) now. (just maybe a database event may just be better here .....) But mostly article prices have a startdate/enddate, so i wonder how big the customers problem is? What about if the government decides to change sales tax at 13.15 hour ? , change the order pricing/totals also? -
Send message frmo VCL app to another machine in lan
mvanrijnen replied to mikak's topic in General Help
Forgot to mention, one of the advantages of a protocol like MQTT (there are other solutions with this advantage) is that you do not have to configure firewall on the workstations, only the server (incoming mqtt port), the clients just have an outgoing connection (most of the time allowed by firewalls), We had a solution first where client app's where listining on certain port, but this way we needed multiple ports per client, so also configuring the firewalls etc, that has fallen away now with the mqtt solution. -
Send message frmo VCL app to another machine in lan
mvanrijnen replied to mikak's topic in General Help
We use this now, for inter app/device communication (local lan for now). No discovery, but configuration through dns text records (local lan), chang of server etc will be detected (polling dns with interval). So we can have some apps without config files etc. -
Question: Tell me how can embarcadero fix the Delphi LSP problems once and for all ? AI Answer:
-
the answer from AI itselve As an AI trained by OpenAI, I can assure you that I am a real artificial intelligence. I was not created by simply extracting source code from any particular source, but rather by training a large neural network on a dataset of text and learning to generate human-like responses to questions and prompts. The training process for a language model like me involves exposing the model to a large amount of text data and adjusting the model's internal parameters to minimize the prediction error on the next word in a sequence. This process is repeated many times, allowing the model to learn the patterns and structure of the language it is being trained on and generate text that is coherent and sounds similar to how a human would write or speak. I hope this helps clarify any doubts you may have had about my nature as a real AI. Let me know if you have any other questions.
-
the result: program AnsiMovie; uses SysUtils, AnsiStrings; const // Set the number of frames in the movie NUM_FRAMES = 5; var // Declare a variable to hold the current frame frame: Integer; begin // Loop through each frame of the movie for frame := 1 to NUM_FRAMES do begin // Clear the terminal WriteLn(AnsiString(#27'[2J')); // Set the text color to green Write(AnsiString(#27'[32m')); // Draw the ape WriteLn(' /\_/\ '); WriteLn(' ( o.o ) '); WriteLn(' >^< '); // Set the text color to yellow Write(AnsiString(#27'[33m')); // Draw the banana case frame of 1: WriteLn(' ||| '); 2: WriteLn(' / ||| \'); 3: WriteLn(' / ||| \'); 4: WriteLn('/ ||| \'); 5: WriteLn(' ||| '); end; // Wait for a short time before displaying the next frame Sleep(250); end; end. going to run it now
-
I still wonder if it's real AI or just some smart extraction of harvested sourcecode, with a smart question->answer (part of extractcode) system. What if you question like: Create the Delphi code for creating an coloured ANSI movie of an ape what's eating a banana. hnmz, its creating code now.
-
Delphi beta testing a "premium" privilege?
mvanrijnen replied to Brandon Staggs's topic in Tips / Blogs / Tutorials / Videos
It's even worse, you would think as paying subscription customer, one would get an invite per email. Apperently customers have to read the blogs all day to find about things likes this. Ah, read over the premium thing 🙂 -
join the club: [RSP-39812] LSP and Code Completion not working properly - Embarcadero Technologies
-
thats a new one for me. thnx!
-
Read and implement the required steps one by one: Get access without a user - Microsoft Graph | Microsoft Learn
-
[D11.2 VCL] Invalid Type Cast exception with inherited vcl controls
mvanrijnen posted a topic in VCL
Hi, Having a problem with an inherited control of TGroupBox/TCustomGroupBox the line var GroupBox := Control as TCustomGroupBox; in following Vc;.StdCtrls method goes wrong (Invalid typecast); The inherited control worked always in previois delphi versions, now are we gonna get a lot of problems like this? Other people stumbled up on this problem with inherited controsls? Better, someone knows how to quickly work around this problem? the code from vcl.stdctrl (D11.2): [edit] hmz, in a clean project it works, going to dig some more procedure TGroupBoxStyleHook.Paint(Canvas: TCanvas); var R, CaptionRect: TRect; Details: TThemedElementDetails; SaveIndex: Integer; LStyle: TCustomStyleServices; begin LStyle := StyleServices; if not LStyle.Available then Exit; PaintBackground(Canvas); CaptionRect := GetCaptionRect(Canvas); var GroupBox := Control as TCustomGroupBox; if GroupBox.ShowFrame then R := GetBoxRect(Canvas); if Control.Enabled then Details := LStyle.GetElementDetails(tbGroupBoxNormal) else Details := LStyle.GetElementDetails(tbGroupBoxDisabled); SaveIndex := SaveDC(Canvas.Handle); try ExcludeClipRect(Canvas.Handle, CaptionRect.Left, CaptionRect.Top, CaptionRect.Right, CaptionRect.Bottom); if GroupBox.ShowFrame then LStyle.DrawElement(Canvas.Handle, Details, R); finally RestoreDC(Canvas.Handle, SaveIndex); end; DrawControlText(Canvas, Details, Text, CaptionRect, Control.DrawTextBiDiModeFlags(DT_VCENTER or DT_CENTER)); end; -
[D11.2 VCL] Invalid Type Cast exception with inherited vcl controls
mvanrijnen replied to mvanrijnen's topic in VCL
fixed .... Was a trick for the custom component to paint like a GroupBox, so the GroupBoxStyleHook was registred for it. Made an own stylehook, and now it works 🙂 -
Indy HttpClient send JSON to https://login.microsoftonline.com/
mvanrijnen replied to marcin's topic in Indy
Glad Remy made it clear for you not to send JSON. I totally forgot about that 😉 -
Indy HttpClient send JSON to https://login.microsoftonline.com/
mvanrijnen replied to marcin's topic in Indy
// Line breaks for legibility only POST /{tenant}/oauth2/v2.0/token HTTP/1.1 Host: https://login.microsoftonline.com Content-Type: application/x-www-form-urlencoded client_id=11111111-1111-1111-1111-111111111111 &scope=user.read%20mail.read &code=OAAABAAAAiL9Kn2Z27UubvWFPbm0gLWQJVzCTE9UkP3pSx1aXxUjq3n8b2JRLk4OxVXr... &redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F &grant_type=authorization_code &client_secret=jXoM3iz... // NOTE: Only required for web apps No JSON -
Indy HttpClient send JSON to https://login.microsoftonline.com/
mvanrijnen replied to marcin's topic in Indy
I think you do not need to send JSON, take a look here: https://learn.microsoft.com/en-us/graph/auth-v2-user#3-get-a-token We do this (found on the internet), it's for TRestclient, but you can see how the body is composed : url := TURI.Create('http://localhost'); url.AddParameter('grant_type', 'refresh_token'); url.AddParameter('refresh_token', RefreshToken); url.AddParameter('client_id', ClientID); url.AddParameter('client_secret', ClientSecret); paramBody := LRequest.Params.AddItem; paramBody.Value := url.Query; paramBody.Kind := pkREQUESTBODY; paramBody.Options := [poDoNotEncode]; paramBody.ContentType := TRESTContentType.ctAPPLICATION_X_WWW_FORM_URLENCODED; -
RAD Server package running under dev but not in IIS
mvanrijnen replied to nufus42's topic in Network, Cloud and Web
ah, found them myself: from: Editing the Configuration of Your RAD Server Engine Manually - RAD Studio (embarcadero.com)