Is there Any Quick SQL Query to Remove Duplicate Rows
MySQL remove duplicates from big database quick
How to install LXDM instead of GDM3? I'm running Debian Wheezy and my default Display Manager is GDM3, and I would like to replace it with LXDM. The problem is that I'm trying to run # apt-get install lxde and it's not working, what am I doing wrong?  My /etc/apt/sources.list is:  deb cdrom:[Debian GNU/Linux testing _Wheezy_ - Official Snapshot i386 DVD Binar$  deb http://ftp.br.debian.org/debian wheezy main deb-src http://ftp.br.debian.org/debian/ wheezy main  deb http://security.debian.org/ wheezy/updates main contrib deb-src http://security.debian.org/ wheezy/updates main contrib What is the best way to unit test a method that calls into multiple methods, for example:  modify(string value) {     if(value.Length &gt; 5)  replaceit(value);      else changeit(value); }   This pseudo code has a modify method that (currently) calls either replaceit() or changeit(). I have already wrote tests for replaceit and changeit, so writing a new test for modify will be 99% the same set of code.  I need to test it thought because it may change in the future.    So do I copy paste the existing test code?  Move the test code to a common function?  Any other ideas?  I'm not sure of the best practice here. Mechanics of Horizontal Stretching and Shrinking I know $y=2f(x)$ doubles the $y$ value in vertical shifting, and I know that $y=(1/2)f(x)$ halves the $y$ value. But, why does $y=f(2x)$ halve the $x$ value, and why does $y=f((1/2)x)$ double the $x$ value in horizontal shifting? I looked at the graphs, and I see the difference, but I want to know the math behind why it halves instead of doubling the $x$ value for $y=f(2x)$. Maybe this is a stupid question, but could someone help me out?  Thank you. Is the power set of the natural numbers countable? Deriving a QM expectation value for a square of momentum $\langle p^2 \rangle$ I already derived a QM expectation value for ordinary momentum which is: $$ \langle p \rangle=  \int\limits_{-\infty}^{\infty} \overline{\Psi}  \left(- i\hbar\frac{d}{dx}\right) \Psi \, d x $$ And I can read clearly that operator for momentum equals $\widehat{p}=- i\hbar\frac{d}{dx}$. Is there an easy way to derive an expectation value for $\langle p^2 \rangle$ and its QM operator $\widehat{p^2}$? Simultaneous collaborative editing of a LaTeX file Is http://stackexchange.com/ down ? What is the command to truncate a SQL Server log file? I need to empty an LDF file before sending to a colleague.  How do I force SQL Server to truncate the log? Is there a problem with closing the lid of a MacBook Pro when using an external monitor? I am using an external monitor and the only way (that doesn't involve jumping through hoops) to turn off the MacBook Pro monitor is to close the lid.  Does closing the lid causes any problems? I have read the following on :     You can still run a single external monitor if you close the lid of   your laptop, but that restricts airflow and exposes your display to a   lot of heat. Not good. I am trying to disable the touchscreen on my Asus S200E laptop.  In Ubuntu 16.04, I was able to do so with this:  Section "InputClass"     Identifier "evdev touchscreen catchall"     MatchIsTouchscreen "on"     MatchDevicePath "/dev/input/event*"     Driver "libinput" EndSection   How can this be done on Ubuntu 18.04? latex gives me the error: Ouch---my internal constants have been clobbered As the title states, compiling with latex produces the error, right away:  Ouch---my internal constants have been clobbered!---case 14   I have no idea what this means... I use TexLive 2012. I updated my texmf.cnf and ran fmtutil-sys and texhash. I guess texhash may have messed it up?  Any ideas?  As requested a minimal working example:  \documentclass{article} \begin{document}     Any tex file. \end{document} While browsing Stack Overflow, I noticed that I lost a lot of reputation:        Is this serial downvoting? Will it be corrected by a rep-recalculation? How often are those done?    Here's a second instance: How can I check dependency list for a deb package How can I check dependency list for a deb package. I am running Ubuntu 11.10 and I have backed up all deb packages from var/cache/apt/archives. I want to format my pc and re-install selected applications only. Also how can I get the list of installed packages and dependencies. List of IP addresses/hostnames from local network in Python How can I get a list of the IP addresses or host names from a local network easily in Python?  It would be best if it was multi-platform, but it needs to work on Mac OS X first, then others follow.  Edit: By local I mean all active addresses within a local network, such as 192.168.xxx.xxx.  So, if the IP address of my computer (within the local network) is 192.168.1.1, and I have three other connected computers, I would want it to return the IP addresses 192.168.1.2, 192.168.1.3, 192.168.1.4, and possibly their hostnames. How can there be a directory named `~`? I was trying to test out this buggy/new tool to see how it works, and it prompted me to choose a directory to use for stuff I am doing. From the directory ~/Code/indep, I typed in ~/Code/indep/tarbell. (Stupid, I could have just typed 'tarbell', but whatever.) It prompted me to create it because it didn't exist, I said yes. When I inspected the contents of this directory, here is what I see:  brian@navis:~/Code/indep$ ls ~ project1 project2 project3 ...   I thought "oh, weird, it created a symlink to ~". However:  brian@navis:~/Code/indep$ file ./~ ./~: directory   file thinks it's a directory.   brian@navis:~/Code/indep$ ls -l drwxr-xr-x 3 brian brian 4096 Nov  8 16:50 ~ drwxr-xr-x 8 brian brian 4096 Oct 14 18:42 project1 drwxr-xr-x 3 brian brian 4096 Sep 10 21:15 project2 drwxr-xr-x 5 brian brian 4096 Oct 14 19:33 project3 ...   And so does ls -l.   I thought, "oh, ... is it a hard link? I've never really used those." But I tried to reproduce, and it's impossible to create a hard link to a directory. So... I guess I've narrowed this down to things I don't understand. Did I mount my home directory in this other directory somehow?   My main goal at this point is to remove the reference to my home directory in this folder (rm doesn't seem like the answer), but I'm also curious to know what's going on.  EDIT:   In retrospect, I understand exactly what happened. As was answered below, the program created a directory called "~" inside my current directory. The only really obfuscating fact about this is that I wasn't consistent with how I was actually viewing what the directory was. Sometimes I referred to it as  "~" and sometimes as "./~". It's only if you do the latter that you can actually see what's going on, but until I understood this, I was conflating what I was seeing from using the absolute path of "~" to to what was in fact a local directory. Is there any way to automatically rename accessor/mutator when a variable they get/set gets refactored -> renamed (Eclipse 3.4)? Supposing we have a table with four columns (a,b,c,d) of the same data type.  Is it possible to select all distinct values within the data in the columns and return them as a single column or do I have to create a function to achieve this? If the order of all nontrivial elements in a group is 2, then the group is Abelian. I know of a proof that is just from calculations (see below). I'm wondering if there is any theory or motivation behind this fact. Perhaps to do with commutators?    Proof: $a \cdot b = (b \cdot b)  \cdot (a \cdot b) \cdot (a \cdot a) = b \cdot (b \cdot a) \cdot (b\cdot a) \cdot a = b \cdot a$. Can you explain briefly the main concepts and command line tools used to manage file permissions? Korea: Visa required to go to the city while in transit in Seoul for a Philippine citizen?