Jump to content

mvanrijnen

Members
  • Content Count

    471
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by mvanrijnen

  1. 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.
  2. 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.
  3. mvanrijnen

    Open AI Chat

    Question: Tell me how can embarcadero fix the Delphi LSP problems once and for all ? AI Answer:
  4. mvanrijnen

    Open AI Chat

    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.
  5. mvanrijnen

    Open AI Chat

    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
  6. mvanrijnen

    Open AI Chat

    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.
  7. 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 🙂
  8. mvanrijnen

    Code completion failure

    join the club: [RSP-39812] LSP and Code Completion not working properly - Embarcadero Technologies
  9. mvanrijnen

    Indy IMAP and Microsoft EWS

    thats a new one for me. thnx!
  10. mvanrijnen

    Indy IMAP and Microsoft EWS

    Read and implement the required steps one by one: Get access without a user - Microsoft Graph | Microsoft Learn
  11. 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;
  12. 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 🙂
  13. Glad Remy made it clear for you not to send JSON. I totally forgot about that 😉
  14. // 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
  15. 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;
  16. ah, found them myself: from: Editing the Configuration of Your RAD Server Engine Manually - RAD Studio (embarcadero.com)
  17. Can you post an example of the section? Somehow we do not have it on our config at all?
  18. ah ok, maybe missing some DLL's or wrong versions of DLL's? * What we also do as test, is run the emsdevserver for the BPL on the IIS machine. (we were able to find/fix some problems with this) * Use procmon for get a view on which files are trying to be loaded, filter out the right process, view only files, look for errors on opening fils: Process Monitor - Windows Sysinternals | Microsoft Learn. I know on Radserver is hard to debug this kind of things, there is no logging of what goes wrong. I have read about enabling debugfile in the emsserver.ini but never found out how this works. (very bad documentation)
  19. mvanrijnen

    Using Delphi Rest Components

    mitm is also a localapp.
  20. mvanrijnen

    Using Delphi Rest Components

    i use mitm proxy a lot, not a specific rest proxy, but you can see all the data flowing: mitmproxy - an interactive HTTPS proxy (mostly i use a compiler directives to force proxy use of my software, for debugging purposes, sometimes a confusion on monday mornings then, if you forget to start the proxy 🙂)
  21. you could try fiddling with the SynchronizedEvents property REST.Client.TCustomRESTClient.SynchronizedEvents - RAD Studio API Documentation (embarcadero.com)
  22. mvanrijnen

    HoursBetween

    i use about the same method in our planner (with a timeoffset and a flexible interval (as setting for the user)). function TframeEditFromTill.ComboToTime: TTime; begin Result := TimeOf(IncMinute(0, TimeOffSet + (cmbTimeTo.ItemIndex*EditTimeInterval))); end; * TimeOffSet is a integer property, just to have the possibility to force a mininum time * EditTimeInterval is a integer property, the interval in minutes e.g. 5, 15, 30
  23. mvanrijnen

    DelphiMVCFramework-3.2.2-nitrogen has been released

    gonna give it a try, with a small private project. btw bough the cookbook 😉
  24. Had the same with clipboard (CTRL-C, CTRL-V, CTRL-X) in D10.xx etc, often exceptions with the rightclick-mouse method, always working through the IDE main menu. very very weird, have made rsp's in the paste about this kind of things, but have giving up hope about it. Maybe it get's fixed when we start paying 10times the price of Delphi as we do now, seems that the current price range is not high enough to garantee a reasonable working product.
  25. mvanrijnen

    DelphiMVCFramework-3.2.2-nitrogen has been released

    Okay, looks very interesting, do people here at the forum have experiences with it ? Is it usable for production?
×