Explanation of polkitd Unregistered Authentication Agent

Policykit is a system daemon and policykit authentication agent is used to verify identity of the user before executing actions. The messages logged in /var/log/secure show that an authentication agent is registered when user logs in and it gets unregistered when user logs out. These messages are harmless and can be safely ignored.

Difference between `not` and `!` in ruby

They are almost synonymous, but not quite. The difference is that ! has a higher precedence than not, much like && and || are of higher precedence than and and or. ! has the highest precedence of all operators, and not one of the lowest, you can find the full table at the Ruby docs. As an example, consider: In the first example, ! has the highest precedence, so you’re effectively saying false && … Read more

How to keep the console window open in Visual C++?

Start the project with Ctrl+F5 instead of just F5. The console window will now stay open with the Press any key to continue . . . message after the program exits. Note that this requires the Console (/SUBSYSTEM:CONSOLE) linker option, which you can enable as follows: Open up your project, and go to the Solution Explorer. If you’re following along with me … Read more

The calling thread must be STA, because many UI components require this in WPF

Normally, the entry point method for threads for WPF have the [STAThreadAttribute] set for the ThreadMethod, or have the apartment state set to STA when creating the thread using Thread.SetApartmentState(). However, this can only be set before the thread is started. If you cannot apply this attribute to the entry point of the application of thread you are performing … Read more

Why use X-UA-Compatible IE=Edge anymore?

As @David’s answer points out, unless you’re hosting a site in the “Local Intranet” zone, there is very little reason to include <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> in your webpages, and (according to Microsoft’s best practice recommendations) absolutely no reason to include it in the HTML. (You should place it in your server config or site headers — not in … Read more