docker command not found even though installed with apt-get

The Ubuntu package docker actually refers to a GUI application, not the beloved DevOps tool we’ve come out to look for. The instructions for docker can be followed per instructions on the docker page here: https://docs.docker.com/engine/install/ubuntu/ === UPDATED (thanks @Scott Stensland) === You now run the following install script to get docker: Note: review the script on the … Read more

React eslint error missing in props validation

You need to define propTypes as a static getter if you want it inside the class declaration: If you want to define it as an object, you need to define it outside the class, like this: Also it’s better if you import prop types from prop-types, not react, otherwise you’ll see warnings in console (as preparation for React 16):

Change size of axes title and labels in ggplot2

You can change axis text and label size with arguments axis.text= and axis.title= in function theme(). If you need, for example, change only x axis title size, then use axis.title.x=. There is good examples about setting of different theme() parameters in ggplot2 page.

Categories r

libstdc++-6.dll not found

If you are using MingW to compile C++ code on Windows, you may like to add the options -static-libgcc and -static-libstdc++ to link the C and C++ standard libraries statically and thus remove the need to carry around any separate copies of those. Version management of libraries is a pain in Windows, so I’ve found this approach the quickest … Read more

How to trim a std::string?

EDIT Since c++17, some parts of the standard library were removed. Fortunately, starting with c++11, we have lambdas which are a superior solution. Thanks to https://stackoverflow.com/a/44973498/524503 for bringing up the modern solution. Original answer: I tend to use one of these 3 for my trimming needs: They are fairly self-explanatory and work very well. EDIT: BTW, I have std::ptr_fun in … Read more