Enum flags over 2^32

When I try to do that I get a constant value compile-time error. You’d actually be okay if you used the L suffix to force it to be a long literal – but it’s still not ideal to have to specify them all manually. (It’s not “obviously correct” when reading the code.) You can’t use … Read more

Enum flags in JavaScript

You just have to use the bitwise operators: var myEnum = { left: 1, right: 2, top: 4, bottom: 8 } var myConfig = myEnum.left | myEnum.right; if (myConfig & myEnum.right) { // right flag is set } More info: Understanding bitwise operations in javascript How to check my byte flag?

SameSite cookie in Java application

I am not a JEE expert, but I think that because that cookie property is a somewhat new invention, you cannot expect it to be present in Java EE 7 interfaces or implementations. The Cookie class is missing a setter for generic properties, as it seems. But instead of adding the cookie to your HttpServletResponse … Read more

Print All JVM Flags

Do not miss also -XX:+JVMCIPrintProperties for Graal JIT options. Before dive into sources you can skim over following extracts and find suitable option faster: https://chriswhocodes.com/ (OracleJDK 6/7/8/9/10/11/12, OpenJDK 8/9/10/11, Graal CE/EE, OpenJ9, Zing) http://jvm-options.tech.xebia.fr/ http://www.pingtimeout.fr/2012/05/jvm-options-complete-reference.html http://stas-blogspot.blogspot.com/2011/07/most-complete-list-of-xx-options-for.html

Perl flags -pe, -pi, -p, -w, -d, -i, -t?

Yes, Google is notoriously difficult for looking up punctuation and, unfortunately, Perl does seem to be mostly made up of punctuation 🙂 The command line switches are all detailed in perlrun (available from the command line by calling perldoc perlrun). Going into the options briefly, one-by-one: -p: Places a printing loop around your command so … Read more

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