How can I delete items from my list of tuples?
Deleting multiple elements from a list
How to reinstall default packages In an attempt to uninstall wine I ran the command sudo apt-get purge wine* which as you may have guessed removed many of the default packages. I am wondering if there is a way to use the installation disk to reinstall the default packages without overwriting the file system. Not sure if it makes a difference or not, but I am duel booting Windows 8 and Ubuntu 14.04 which was updated from Ubuntu 12.04.  Thanks in advance. linux find command to move files Why would a single celled organism evolve to be multi-celled? I read a story this week on Richard Lenski who has been 'evolving' E. coli for more than 50,000 generations now.  One comment I read was from someone who doesn't accept Evolution who pointed out that we haven't seen a single celled organism 'evolve' into a multi-celled organism.  Another person responded and said that a bacteria is not going to evolve into something that isn't a bacteria.  So, if Evolution created single celled organisms and then multi-celled organisms how might that change have happened?  And is it possible to recreate that set of driving forces to make a bacteria something other than a bacteria?  To that end, what advantage does being multi-cellular have over being unicellular (if that's even a word)? If $-1&lt;x&lt;1$ show that $\lim\limits_{n \to \infty}{n\,x^n} = 0$. I don't have idea. I only prove that $n\,x^n$ is decreasing. What's the C++ way of parsing a string (given as char *) into an int? Robust and clear error handling is a plus (instead of ). More than one 'Open xxxxx here as Administrator' I want the option to open a Command window or Powershell window as Administrator from the drive and directory context menus in Windows.   I can have either by creating and populating the special 'runas' registry keys shown below, but is there a way I can have both listed on the context menu and have both run as Administrator?  [HKEY_CLASSES_ROOT\Drive\shell\runas] ... [HKEY_CLASSES_ROOT\Drive\shell\runas\command] ... [HKEY_CLASSES_ROOT\Directory\shell\runas] ... [HKEY_CLASSES_ROOT\Directory\shell\runas\command] ... [HKEY_CLASSES_ROOT\Directory\Background\shell\runas] ... [HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command] ... I want to create a standalone python script using QGIS python API (PYQGIS) for education. First I create a model and export that model to python script.  original python script from the export :  ##=name ##raster=raster ##stat=output html outputs_QGISRASTERLAYERSTATISTICS_1=processing.runalg('qgis:rasterlayerstatistics', raster,stat)   Next I read this  and I tried to follow this tutorial to create my script.  Final script :  import sys from qgis.core import QgsApplication from PyQt4.QtGui import QApplication app = QApplication([]) QgsApplication.setPrefixPath("/usr", True) QgsApplication.initQgis()  # Prepare processing framework  sys.path.append('/home/username/.qgis2/python') from processing.core.Processing import Processing dem='aster.tif' slope='slope.tif' aspect='aspect.tif' outputs_SAGASLOPEASPECTCURVATURE_1=processing.runalg('saga:slopeaspectcurvature', dem,6,1,1,slope,aspect,None,None,None,None,None,None,None,None,None,None) Processing.initialize()  # Exit applications QgsApplication.exitQgis() QApplication.exit()   If I run this script it works fine without error but I don't take some export like aspect and slope (these can't be found?). Any idea why I can't take exports ?  I use Ubuntu and python 2.7 and QGIS 2.18.1.    i try to this script :  import sys from qgis.core import QgsApplication sys.path.append('/usr/share/qgis/python/plugins') import processing a=processing.alglist() print a processing.alghelp("saga:slopeaspectcurvature")   and i take that print any idea why ?  Algorithm not found   but if i use this module in QGIS work fine. Find a plane that passes through a point and is perpendicular to 2 planes Find an equation of a plane that passes through $p(1,5,1)$ and is perpendicular to planes $2x+y-2z = 2$ and $x+3z=4$.  I basically need the 2 other points to make the vector and perform the cross product.  Since $ax+by+cz+d=0$ is the form of a plane. Can I obtain the points as $(a,b,c)$ of the 2 planes given? Also, how can I set them up to obtain the points? Is it possible to change where macOS Notification Center alerts appear on the screen?  They currently appear at the top right of the screen with the menu bar:    Alerts appearing in the top right tend to cover up work I'm doing more often than not. They cover up browser tabs, toolbar icons, and window titles.  I would prefer, say, the bottom right corner of the screen.  If moving the alerts is not possible, is it possible to change the screen on which they appear? I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back? How can I improve Ubuntu overall system performance? What are your tips for improving overall system performance on ubuntu? Inspired by this  I realized that some default settings may be rather conservative on Ubuntu and that it's possible to tweak it with little or no risk if you wish to make it faster.  This is not meant to be application specific (e.g. make firefox load pages faster), but system wide.  Preferably 1 tip per answer, with enough detail for people to implement it.  A couple of mine would be:   Install  (via Software Center or sudo apt-get install preload); Change  value - "which controls the degree to which the kernel prefers to swap when it tries to free memory";   What are yours?  PS: Since this is not intended to have a unique answer but rather, several useful tips, I'm making this community wiki out-of-the-box. plist or sqlite $$\lim_{n\to\infty} (1+\frac{2}{n})^{n^2} e^{-2n} = ? $$         $e$   $e^2$   $e^{-1}$   $e^{-2}$      My answer is 1. Since $$\lim_{n \to \infty} \left(1+\frac{2}{n}\right)^{n} =e^{+2}.$$  Therefore $$\lim_{n\to\infty} \left(1+\frac{2}{n}\right)^{n^2} =e^{2n}.$$  Where am I wrong? Is an explanation of 'effect of Earth's rotation on $g$' possible from an inertial reference frame? Edit : Added a picture for better understanding of my querry. All the texts I have studied has used an non-inertial frame to explain the phenomenon. But every time I see something explained with pseudo forces, I try to realize in real forces.   But in this case I tried to explain it in a frame which is centered in Earth's center and not rotating. But I couldn't explain what happens to the tangential component (to the point on Earth's surface where $g$ to be measured) of centripetal acceleration in this scenario. It doesn't cancel out.   But then I thought the tangential component is so low that practically it would have no effect.  Is my explanation wrong? How can I start up an application with a pre-defined window size and position? I'm wondering is there any way to achieve the affect of the Ctrl-Alt-Keypad shortcuts in Unity using terminal commands instead? I want a command that sets a gui window to half the size of the screen, either left or right aligned.  By way of background, I'm writing a script that runs after log in. It uses Zenity to ask whether or not I want to open my development environment (GVim and IPython side-by-side). I have been trying to achieve two equal-sized windows for these programmes by using set lines= columns= in my .gvimrc and c.IPythonWidget.width = and c.IPythonWidget.height = in my ipython_qtconsole_config.py. However, there are problems associated with this approach. I have HTML code like this :  &lt;div&gt;        &lt;a&gt;Link A1&lt;/a&gt;        &lt;a&gt;Link A2&lt;/a&gt;        &lt;a&gt;Link A3&lt;/a&gt; &lt;/div&gt;  &lt;div&gt;        &lt;a&gt;Link B1&lt;/a&gt;        &lt;a&gt;Link B2&lt;/a&gt;        &lt;a&gt;Link B3&lt;/a&gt; &lt;/div&gt;   When user clicks a link from above HTML, I want to get the jQuery object of the corresponding &lt;a&gt; element, and then manipulate its sibling. I can't think of any way other than creating an ID for each &lt;a&gt; element, and passing that ID to an onclick event handler. I really don't want to use IDs.   Any suggestions? Dual boot UEFI Windows 7 and Ubuntu 12.04 (both 64 bits). W7 entry doesn't appear in GRUB When constructing the matrices for the two CNOT based on the target and control qubit, I can use reasoning:  "If $q_0$==$|0\rangle$, everything simply passes through", resulting in an Identity matrix style $\begin{bmatrix}1&amp;0\\0&amp;1\end{bmatrix}$ in the top left. "If $q_0==|1\rangle$, we need to let $q_0$ pass and swap $q_1$, resulting in a Pauli X $\begin{bmatrix}0&amp;1\\1&amp;0\end{bmatrix}$ in the bottom right.  $CNOT \equiv \begin{bmatrix}1&amp;0&amp;0&amp;0\\0&amp;1&amp;0&amp;0\\0&amp;0&amp;0&amp;1\\0&amp;0&amp;1&amp;0\end{bmatrix}$  "If $q_1$==$|0\rangle$, everything simply passes through", results in leaving $|00\rangle$ and $|10\rangle$ unaffected. "If $q_1==|1\rangle$, we need to let $q_1$ pass and swap $q_0$, mapping $|01\rangle$ to $|11\rangle$ and  $|11\rangle$ to $|01\rangle$  $CNOT \equiv \begin{bmatrix}1&amp;0&amp;0&amp;0\\0&amp;0&amp;0&amp;1\\0&amp;0&amp;1&amp;0\\0&amp;1&amp;0&amp;0\end{bmatrix}$  This all seems to check out, but here comes my question: I would like to know if there is a more mathematical way to express this, just as there would be when combining for instance two hadamard gates: $H \otimes H \equiv \frac{1}{\sqrt{2}}\begin{bmatrix}1&amp;1\\1&amp;-1\\ \end{bmatrix} \otimes \frac{1}{\sqrt{2}}\begin{bmatrix}1&amp;1\\1&amp;-1\\ \end{bmatrix} = \frac{1}{2}\begin{bmatrix}1&amp;1&amp;1&amp;1\\1&amp;-1&amp;1&amp;-1\\1&amp;1&amp;-1&amp;-1\\1&amp;-1&amp;-1&amp;1 \end{bmatrix}$  And a bonus question:  How I can, using notation like "CNOT", show which qubit is the control bit and which qubit the target bit? How can I Remove .DS_Store files from a Git repository? How can I remove those annoying Mac OS X .DS_Store files from a Git repository? How do I install the latest Python 2.7.X or 3.X on Ubuntu? I want to install the latest Python tarball on Ubuntu, downloaded from .  Is this is a correct way to install?  ./configure make make install   If not, how do I do that?