Does “volatile” guarantee anything at all in portable C code for multi-core systems?

I’m no expert, but cppreference.com has what appears to me to be some pretty good information on volatile. Here’s the gist of it: Every access (both read and write) made through an lvalue expression of volatile-qualified type is considered an observable side effect for the purpose of optimization and is evaluated strictly according to the … Read more

How to convert a simple .Net console project a into portable exe with Mono and mkbundle?

I have found a simple how-to here, however, as I have not tested it myself, I cannot guarantee results. As usual YMMV. Quote from the original article (please follow the thread on the original article as well though): Mkbundle: bundle Mono with your applications Did you ever wonder why you need .NET Framework or Mono … Read more

How can I mark a C++ class method as deprecated?

In C++14, you can mark a function as deprecated using the [[deprecated]] attribute (see section 7.6.5 [dcl.attr.deprecated]). The attribute-token deprecated can be used to mark names and entities whose use is still allowed, but is discouraged for some reason. For example, the following function foo is deprecated: [[deprecated]] void foo(int); It is possible to provide … Read more

What is the smallest possible Windows (PE) executable?

As quoted from source (Creating the smallest possible PE executable): 1 Smallest possible PE file: 97 bytes Smallest possible PE file on Windows 2000: 133 bytes Smallest PE file that downloads a file over WebDAV and executes it: 133 bytes The files above are the smallest possible PE files due to requirements of the PE … Read more

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