Jump to content

Der schöne Günther

Members
  • Content Count

    271
  • Joined

  • Last visited

  • Days Won

    7

Der schöne Günther last won the day on January 17

Der schöne Günther had the most liked content!

Community Reputation

124 Excellent

Technical Information

  • Delphi-Version
    Delphi 10.0 Seattle

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Der schöne Günther

    JSON array name.

    An array is just an element, like any other. A Json Object is made up of pairs. Every pair has a name and a value. A value can be an array, text, float, ... Here is an example: program Project1; uses System.SysUtils, System.JSON; const input = '{'+ ' "someNumbers": [1,2,3],'+ ' "justOneNumber": 42,'+ ' "some Texts": ["Hello World", "My body is ready"]'+ '}'; var jsonObject: TJsonObject; pair: TJsonPair; begin jsonObject := TJsonObject.ParseJSONValue(input) as TJsonObject; for pair in jsonObject do if(pair.JsonValue is TJsonArray) then WriteLn('We found an array called "', pair.JsonString.Value(), '"'); ReadLn; end. It will output the following: We found an array called "someNumbers" We found an array called "some Texts"
  2. Der schöne Günther

    Delphi EdgeBrowser Sample Project Fails

    Well, that's a stupid limitation of Embarcaderos example project, but not Edge itself: if not StartsText('http', URL) then URL := 'http://' + URL; RADStudio10.4Demos/MainFormU.pas · Embarcadero/RADStudio10.4Demos (github.com)
  3. Der schöne Günther

    Delphi EdgeBrowser Sample Project Fails

    Did you read this? Using TEdgeBrowser Component and Changes to the TWebBrowser Component - RAD Studio (embarcadero.com) TL;DR: You need to install the WebView2 runtime, or a beta version of Edge, or ship your own files. Also, you must place the "WebView2Loader.dll" in your project directory, as explained in the wiki article above.
  4. Der schöne Günther

    Quickly zero all local variables?

    That may be true in your case, but zeroing a local variable "just in case" for a method that gets called over and over defenitely is a performance hit.
  5. Der schöne Günther

    Undocumented language enhancements

    Not highly scientific, but better than nothing: Delphi Language Reference - RAD Studio (embarcadero.com)
  6. Der schöne Günther

    Is Delphi still taught in schools?

    I remember that in my school time, it was definitely Delphi, but for my brother (a few years later) they had already switched to Java. I think Embarcadero has a education program which basically licenses Enterprise editions, but I am not sure how complicated it is to setup. It's most probably easier for schools (especially smaller ones) to just go with Java or Python. C or C++ is, in my view, definitely a very bad choice for absolute beginners 😱
  7. Der schöne Günther

    Embarcadero Toaster - Notification Window Caption in Win10

    I can reproduce it on Windows Build 19042 as well: Windows Build Windows 10 Name Pass? 19042.804 20H2 ❌ 19041.804 2004 ✅ 18363.657 1909 ✅
  8. Good point. But from my experience, I think I won't really have to drive up the environmental light much. A small increase in brightness already makes it much more pleasurable. I really don't plan changing it from something cozy to bright flashing white
  9. I don't. They are controlled by Wi-Fi/Zigbee and report a brightness value 0 - 100%. I didn't plan to measure the light emission because I don't stare at lightbulbs. Most lamps just illuminate the wall, not point at something directly. Mapping the brightness output of the lamps to what I have on screen is highly subjective. I will just go through trial and error and probably stick with what seems right to me. The difficult part (for me) is not that, it's "how to determine the overall screen brightness in the first place?": If would say that 50% black, 50% white seems brighter than 100% medium gray. I tried to show that with some game screenshots.
  10. Der schöne Günther

    Global variable : why the compiler don't complain about this ?

    The same applies to type definitions. For example, there is a TBitmap in Vcl.Graphics, and a a completely different TBitmap in Winapi.Windows.
  11. Yes, it probably would (except for my desk lamp, which is not a Hue lamp). But as I said, this is just a free time project for personal leisure. And the Hue Sync box probably has other limitations, which I will run into later. I'd like to have full flexibility here. I have no deadline. This is just for fun.
  12. Now where's the fun in that? My desk lamp (pictures here) also has integration with something called "Razer Chroma", but I didn't really like it and decided to roll my own. The regular room lamps are Philips Hue, but this desk lamp has extremely low latency and therefore is an excellent choice for coupling to the screen. The regular lamps have a noticeable delay. Good point. The monitor does not support HDR. That would make it very challenging.
  13. Thank you very much for the replies. Exactly, that looks promising. I will dig into that 👍
  14. Thanks for your concern, but if questions here on Delphi-Praxis are only allowed if they include at least one StringList and a DBGrid, I'd rather hear that from a moderator.
  15. The category is "Algorithms, Data Structures and Class Design"
×