What’s the difference between event.stopPropagation and event.preventDefault?

stopPropagation prevents further propagation of the current event in the capturing and bubbling phases. preventDefault prevents the default action the browser makes on that event. Examples preventDefault stopPropagation With stopPropagation, only the button‘s click handler is called while the div‘s click handler never fires. Where as if you use preventDefault, only the browser’s default action is stopped but the div’s click handler still … Read more

“Cannot publish, unborn head” error message

The error is due to a file in “Desktop/MY REPOS/The-Tech-Academy-C-Sharp-Coding-Projects/AppData/Local/Microsoft/VisualStudio/15.0_8067392e/VTC/” having a name that is too long. The filename looks like it is generated by a tool, not written by you. In fact it looks like the whole “Desktop/MY REPOS/The-Tech-Academy-C-Sharp-Coding-Projects/AppData/Local/Microsoft/” directory is probably not code that you are working on yourself. With version control, it … Read more

“&” meaning after variable type

It means you’re passing the variable by reference. In fact, in a declaration of a type, it means reference, just like: declares a reference to x, called y.

How do I analyze a .mdmp file?

The .mdmp file is a Windows MiniDump file that you can only read with a debugger (like WinDbg). Typically you need the sources of the crashed application to really get some information out of the dump. So in your case you can’t do much but contacting JRockit support. Here a link to the Orace JRockit information about JVM … Read more

How does ifstream’s eof() work?

-1 is get‘s way of saying you’ve reached the end of file. Compare it using the std::char_traits<char>::eof() (or std::istream::traits_type::eof()) – avoid -1, it’s a magic number. (Although the other one is a bit verbose – you can always just call istream::eof) The EOF flag is only set once a read tries to read past the end of the file. If I … Read more

How to customize a scatter matrix to see all titles?

As a minimal scatter_matrix example to switch off axis ticks and rotate the labels, #May need to offset label when rotating to prevent overlap of figure #Hide all ticks plt.show() and similarly, you can adjust labels, resize, etc with any of the axis objects contained in the returned handle from scatter_matrix. This results in,