enum to string in modern C++11 / C++14 / C++17 and future C++20

Magic Enum header-only library provides static reflection for enums (to string, from string, iteration) for C++17. For more examples check home repository https://github.com/Neargye/magic_enum. Where is the drawback? This library uses a compiler-specific hack (based on __PRETTY_FUNCTION__ / __FUNCSIG__), which works on Clang >= 5, MSVC >= 15.3 and GCC >= 9. Enum value must be in range [MAGIC_ENUM_RANGE_MIN, MAGIC_ENUM_RANGE_MAX]. By default MAGIC_ENUM_RANGE_MIN … Read more

Alternative to ui-grid(doesn’t support angular2/4)

I was researching this recently, since I have an application that I used ui-grid on, and may be upgrading to angular 2 soon. I’ve found… Angular Datatables https://l-lin.github.io/angular-datatables/#/getting-started ag-Grid which has a free version https://www.ag-grid.com/

class << self idiom in Ruby

First, the class << foo syntax opens up foo‘s singleton class (eigenclass). This allows you to specialise the behaviour of methods called on that specific object. Now, to answer the question: class << self opens up self‘s singleton class, so that methods can be redefined for the current self object (which inside a class or module body is the class or module itself). Usually, … Read more

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