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

How to Compare Flags in C#?

In .NET 4 there is a new method Enum.HasFlag. This allows you to write: if ( testItem.HasFlag( FlagTest.Flag1 ) ) { // Do Stuff } which is much more readable, IMO. The .NET source indicates that this performs the same logic as the accepted answer: public Boolean HasFlag(Enum flag) { if (!this.GetType().IsEquivalentTo(flag.GetType())) { throw new … 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

Compiling C++11 with g++

Flags (or compiler options) are nothing but ordinary command line arguments passed to the compiler executable. Assuming you are invoking g++ from the command line (terminal): $ g++ -std=c++11 your_file.cpp -o your_program or $ g++ -std=c++0x your_file.cpp -o your_program if the above doesn’t work.