What is the difference between list and list[:] in python?

When reading, list is a reference to the original list, and list[:] shallow-copies the list. When assigning, list (re)binds the name and list[:] slice-assigns, replacing what was previously in the list. Also, don’t use list as a name since it shadows the built-in.

Installation of MySQL for Visual Studio 1.2.8 failed

Today I’ve encountered a similar error. In my case I couldn’t uninstall mysql-visualstudio-plugin-1.1.1.msi. Also had MySQL Connector Net 6.7.4 + 6.8.3 installed before (and more stuff which give and gave me many errors to solve manually). Before doing machine.config replacement as described below, first make a backup or rename them, of course. Modified versions of … Read more

How can a add a row to a data frame in R?

Like @Khashaa and @Richard Scriven point out in comments, you have to set consistent column names for all the data frames you want to append. Hence, you need to explicitly declare the columns names for the second data frame, de, then use rbind(). You only set column names for the first data frame, df:

Generating random whole numbers in JavaScript in a specific range?

There are some examples on the Mozilla Developer Network page: Here’s the logic behind it. It’s a simple rule of three: Math.random() returns a Number between 0 (inclusive) and 1 (exclusive). So we have an interval like this: Now, we’d like a number between min (inclusive) and max (exclusive): We can use the Math.random to get the correspondent in the [min, max) interval. But, first we … Read more

What is the meaning of == $0 that is shown in inspect element of google chrome for the selected element [duplicate]

Dev Tools remembers the last five DOM elements (or JavaScript heap objects) that you’ve selected in the tab (or Profiles panel). It makes those objects available as $0, $1, $2, $3, and $4. $0 returns the most recently selected element or JavaScript object, $1 returns the second most recently selected one, and so on. See this for more information.