PHP Constants Containing Arrays?

Since PHP 5.6, you can declare an array constant with const: <?php const DEFAULT_ROLES = array(‘guy’, ‘development team’); The short syntax works too, as you’d expect: <?php const DEFAULT_ROLES = [‘guy’, ‘development team’]; If you have PHP 7, you can finally use define(), just as you had first tried: <?php define(‘DEFAULT_ROLES’, array(‘guy’, ‘development team’));

Constructing pandas DataFrame from values in variables gives “ValueError: If using all scalar values, you must pass an index”

The error message says that if you’re passing scalar values, you have to pass an index. So you can either not use scalar values for the columns — e.g. use a list: >>> df = pd.DataFrame({‘A’: [a], ‘B’: [b]}) >>> df A B 0 2 3 or use scalar values and pass an index: >>> … Read more

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