

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 ExcellentTechnical Information
-
Delphi-Version
Delphi 10.0 Seattle
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
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"
-
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)
-
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.
-
Quickly zero all local variables?
Der schöne Günther replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
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. -
Undocumented language enhancements
Der schöne Günther replied to vfbb's topic in RTL and Delphi Object Pascal
Not highly scientific, but better than nothing: Delphi Language Reference - RAD Studio (embarcadero.com) -
Is Delphi still taught in schools?
Der schöne Günther replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
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 😱 -
Embarcadero Toaster - Notification Window Caption in Win10
Der schöne Günther replied to Shavkat PANDA's topic in VCL
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 ✅ -
How to determine the subjective brightness of my screen?
Der schöne Günther replied to Der schöne Günther's topic in Algorithms, Data Structures and Class Design
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 -
How to determine the subjective brightness of my screen?
Der schöne Günther replied to Der schöne Günther's topic in Algorithms, Data Structures and Class Design
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. -
Global variable : why the compiler don't complain about this ?
Der schöne Günther replied to mderie's topic in General Help
The same applies to type definitions. For example, there is a TBitmap in Vcl.Graphics, and a a completely different TBitmap in Winapi.Windows. -
How to determine the subjective brightness of my screen?
Der schöne Günther replied to Der schöne Günther's topic in Algorithms, Data Structures and Class Design
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. -
How to determine the subjective brightness of my screen?
Der schöne Günther replied to Der schöne Günther's topic in Algorithms, Data Structures and Class Design
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. -
How to determine the subjective brightness of my screen?
Der schöne Günther replied to Der schöne Günther's topic in Algorithms, Data Structures and Class Design
Thank you very much for the replies. Exactly, that looks promising. I will dig into that 👍 -
How to determine the subjective brightness of my screen?
Der schöne Günther replied to Der schöne Günther's topic in Algorithms, Data Structures and Class Design
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. -
How to determine the subjective brightness of my screen?
Der schöne Günther replied to Der schöne Günther's topic in Algorithms, Data Structures and Class Design
The category is "Algorithms, Data Structures and Class Design"