19 Matching Annotations
  1. Feb 2019
  2. Dec 2018
    1. Now let’s say another developer wants to make some additions to your code. In this situation, they would get the code, including the Pipfile, and use this command:

      pipenv.lock is like staging the changes, while pipfile is for active development. Unless specified, the latest site packages in development will be installed

    1. In C++11 scope guards can be trivially implemented in terms of std::function, with the cleanup action supplied in each place via a lambda expression.

      checkout folly/ScopeGuard

      syntax: auto cleanUpGuard = folly::makeGuard(&{cleanupDataStoresBeforeExit();});

  3. Nov 2018
    1. aggregate

      An aggregate is an array or class (clause 9) with no user-declared constructors (12.1), no private or protected non-static data members (clause 11), no base classes (clause 10) and no virtual functions

  4. Oct 2018
    1. the concept of magic numbers goes back to unix and pre-dates the use of file extensions. The original idea of the shell was that all 'executable' would look the same - it didn't matter how the file had been created or what program should be used to evaluate it. The shell would look at the contents of the file and determine the appropriate file. Microsoft came along and chose a different approach and the era of file extensions was born. Then to make things 'nicer' for users microsoft chose to 'hide' these extensions and the era of trojan files which look like they are of one type but really have a different extension and are processed by a different file was born.