Jump to content

Der schöne Günther

Members
  • Content Count

    656
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by Der schöne Günther

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. Thank you very much for the replies. Exactly, that looks promising. I will dig into that 👍
  6. 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.
  7. The category is "Algorithms, Data Structures and Class Design"
  8. Der schöne Günther

    Modernizing the Dev-C++ IDE

    It's probably more like a trip down the memory lane. I will definitely try it out, just for the sake of nostalgia. It's a bit like an old Amiga game brought back to life.
  9. Der schöne Günther

    Prevent External DLL from Exiting Application

    Running the code in an auxiliary process instead of your own could also be an option if you cannot fix the cause and only battle the symptoms.
  10. Der schöne Günther

    Read ASCII file from URL like a file

    For something simple like this, The THTTPClient from System.Net.HttpClient.hpp is sufficient.
  11. Der schöne Günther

    TWebBrowser / SHDocVW problem

    Not published anything with 10.4.1 yet (just 10.4.0), but I had no problems compiling projects with 10.4.1. Have you tried removing all dcu files and trying to recompile? Does this even happen when you create a new VCL project and drop a TWebBrowser onto the main form?
  12. Der schöne Günther

    Open File Location

    TPath.GetDirectoryName(..) from System.IoUtils will report "\\MySrv\MyFiles" for your file path. If I understood correctly, you want to open Windows explorer in the directory that contains your file. There is an even better way: Open Windows explorer in that directory, and already select that file. Here is how: https://stackoverflow.com/q/15300999/2298252
  13. Der schöne Günther

    slowdown tcp transfer under Windows 10 64bits

    Do you have a minimal, reproducible example? Also, you are still running a 32 bit executable on a 64 bit OS. What if you run the example as a 64 bit application?
  14. Der schöne Günther

    slowdown tcp transfer under Windows 10 64bits

    Maybe there is something wrong with my eyes or the image is too compressed, but... I think "TCP Checksum incorrect" does not have to be an error. If it can, Windows will delegate the TCP checksum calculation to the hardware itself, therefore the checksum is just visible as zeroes to Wireshark. Is the checksum zeroes or something else?
  15. Der schöne Günther

    BDE for 10.4?

    Available at https://my.embarcadero.com/#downloadDetail/721
  16. Der schöne Günther

    Installing Community Edition (error 500)

    What do you mean by "chosing"? It's RAD Studio 10.3. It does not ship with previous compilers and runtime libraries. If your code does not compile anymore, you will have to make it compile again 🤨
  17. For your reference, his original article was In Which I Argue That Embarcadero Should Open Source Their Unit Tests By Nick at July 27, 2013 04:27 which is no longer online, but archived at http://web.archive.org/web/20200109055953/https://www.nickhodges.com/post/In-Which-I-Argue-That-Embarcadero-Should-Open-Source-Their-Unit-Tests.aspx
  18. Der schöne Günther

    Compute nearest color

    I'm not sure if the RGB space the right choice for an approach to subjective perception which colour is the closest. Have you considered HSL/HSV? HSL and HSV - Wikipedia
  19. Der schöne Günther

    Security - How freaky can you get!

    Delphi itself made it relatively easy for 3rd party tools to modify the UI as the DFM files were readable plain text resources within the .exe file. One rather popular "hack" was to entirely remove the "Please consider buying" screen from the WinRAR interface. Sounds like this "screen" was removed from your tampered executable as well. This form probably checked the credentials and indicated success by the according TModalResult (mrOk, mrAbort, ...) instead of passing back the credentials so they can be used by the software backend.
  20. Der schöne Günther

    Range Check Error - what actually happens

    As far as I understand the documentation Range checking - RAD Studio (embarcadero.com), enabling range checks adds additional code around every array access. If that is not the case, then a write beyond the arrays end can silently succeed, but corrupt memory. People Wizards who understand assembly code can probably identify the additional code added by the compiler.
  21. Der schöne Günther

    TTask running twice?

    I find it a bit sad that none of these fixes get backported to earlier versions. They had something like this around 2016, but somehow stopped doing so. Or never really started, I don't know. I think this especially important when everything (editor, debugger, runtime, ...) is so tightly coupled together.
  22. Der schöne Günther

    Lookup for "localhost" takes 2 seconds

    Adding a ipv6 binding causes Indy to call socket like this: socket(AF_INET6, SOCK_STREAM, 0 {no protocol specified}) which is apparently fine with Windows as it returns a valid socket descriptor, although ipv6 is disabled. Maybe this is just a problem when UDP is used? For me, everything seems fine. It doesn't seem I need to handle the "ipv6 was manually disabled" case. 😎
  23. Der schöne Günther

    Lookup for "localhost" takes 2 seconds

    Thank you. Do you have a suggestion on how to properly check that? I am only using Indy, no other libraries like ICS.
  24. Der schöne Günther

    TTask running twice?

    It sounds like this could be the cause: [RSP-16377] TTask.WaitForAll crashes if timeout is INFINITE - Embarcadero Technologies Rio 10.3.2 is still affected, it was fixed in 10.4 Sydney. Can you check what happens if you add an explicit timeout to your WaitForAll(..)
  25. Der schöne Günther

    Lookup for "localhost" takes 2 seconds

    That did the trick, thank you! Time taken for http://127.0.0.1: 28 ms Time taken for http://localhost/: 6 ms Time taken for http://localhost/: 5 ms I hope I did that binding stuff correctly: constructor TServerClientTest.Create(); var binding: TIdSocketHandle; begin inherited Create(); server := TIdHTTPServer.Create(nil); binding := server.Bindings.Add(); binding.Port := 80; binding.IPVersion := TIdIpVersion.Id_IPv4; binding.IP := '127.0.0.1'; binding := server.Bindings.Add(); binding.Port := 80; binding.IPVersion := TIdIPVersion.Id_IPv6; binding.IP := '::1'; server.OnCommandGet := handleServer; client := THTTPClient.Create(); end;
×