What’s the difference between __PRETTY_FUNCTION__, __FUNCTION__, __func__?

__func__ is an implicitly declared identifier that expands to a character array variable containing the function name when it is used inside of a function. It was added to C in C99. From C99 ยง6.4.2.2/1: The identifier __func__ is implicitly declared by the translator as if, immediately following the opening brace of each function definition, … Read more

Why does Java switch on contiguous ints appear to run faster with added cases?

As pointed out by the other answer, because the case values are contiguous (as opposed to sparse), the generated bytecode for your various tests uses a switch table (bytecode instruction tableswitch). However, once the JIT starts its job and compiles the bytecode into assembly, the tableswitch instruction does not always result in an array of … Read more

Compiled vs. Interpreted Languages

A compiled language is one where the program, once compiled, is expressed in the instructions of the target machine. For example, an addition “+” operation in your source code could be translated directly to the “ADD” instruction in machine code. An interpreted language is one where the instructions are not directly executed by the target … Read more

How does the compilation/linking process work?

The compilation of a C++ program involves three steps: Preprocessing: the preprocessor takes a C++ source code file and deals with the #includes, #defines and other preprocessor directives. The output of this step is a “pure” C++ file without pre-processor directives. Compilation: the compiler takes the pre-processor’s output and produces an object file from it. … Read more

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