How to disable text selection highlighting

UPDATE January, 2017: According to Can I use, the user-select is currently supported in all browsers except Internet Explorer 9 and its earlier versions (but sadly still needs a vendor prefix). These are all of the available correct CSS variations:  Run code snippetExpand snippet Note that user-select is in standardization process (currently in a W3C working draft). It is not guaranteed to work everywhere … Read more

Still Reachable Leak detected by Valgrind

There is more than one way to define “memory leak”. In particular, there are two primary definitions of “memory leak” that are in common usage among programmers. The first commonly used definition of “memory leak” is, “Memory was allocated and was not subsequently freed before the program terminated.” However, many programmers (rightly) argue that certain … Read more

Tab Error in Python

You cannot mix tabs and spaces, according the PEP8 styleguide: Spaces are the preferred indentation method. Tabs should be used solely to remain consistent with code that is already indented with tabs. Python 3 disallows mixing the use of tabs and spaces for indentation. Python 2 code indented with a mixture of tabs and spaces should … Read more

How to update a branch with master on GitHub

It’s simple and can be done by two command lines: This will merge the remote master branch to the local sprint branch. So your local sprint branch is up to date like master branch. If you need to do this on Github.com, then create a PR(Pull Request) and then select two branches(base:sprint and compare:master) and then … Read more

datetime to string with series in pandas

There is no str accessor for datetimes and you can’t do dates.astype(str) either, you can call apply and use datetime.strftime: You can change the format of your date strings using whatever you like: strftime() and strptime() Behavior. Update As of version 0.17.0 you can do this using dt.strftime will now work