Multi-character constant warnings

According to the standard (§6.4.4.4/10) The value of an integer character constant containing more than one character (e.g., ‘ab’), […] is implementation-defined. This is valid ISO 9899:2011 C. It compiles without warning under gcc with -Wall, and a “multi-character character constant” warning with -pedantic. From Wikipedia: Multi-character constants (e.g. ‘xy’) are valid, although rarely useful … Read more

Is there a portable way to get the current username in Python?

Look at getpass module Availability: Unix, Windows p.s. Per comment below “this function looks at the values of various environment variables to determine the user name. Therefore, this function should not be relied on for access control purposes (or possibly any other purpose, since it allows any user to impersonate any other).“

Proper shebang for Python script

is more portable because in general the program /usr/bin/env can be used to “activate” the desired command without full path. Otherwise, you would have to specify the full path of the Python interpreter, which can vary. So no matter if the Python interpreter was in /usr/bin/python or in /usr/local/bin/python or in your home directory, using #!/usr/bin/env python will work.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)