MySQL Performance - "IN" Clause vs. Equals (=) for a Single Value
Performance differences between equal (=) and IN with one literal value
Irrationality proofs not by contradiction Per now, I have basically come upon proofs of the irrationality of $\sqrt{2}$ (and so on) and the proof of the irrationality of $e$. However, both proofs were by contradiction.  When thinking about it, it seems like the definition of irrationality itself demands proofs by contradiction. An irrational number is a number that is not a rational number. It seems then that if we were to find direct irrationality proofs, this would rely on some equivalent definition of irrational numbers, not involving rational numbers themselves.   Are there any irrationality proofs not using contradiction? What is meant by "obfuscate by pretending"? I came accross the following sentence:  "Politicians obfuscate by pretending that the world would be the same if it weren't for the Cold War."  What is the meaning of obfuscate by pretending and how does it relate to the rest of the sentence?  The way I understood it: politicans are aware that the world would not be the same if it weren't for the Cold War, but are (due to unknown or suspected reasons) not willing to admit this and therefore pretend otherwise. I like to be thorough, but if you feel confident you can skip the first paragraph.  Review: A ring is a set $R$ endowed with two operations of + and $\cdot$ such that $(G,+)$ is an additive abelian group, multiplication is associative, $R$ contains the multiplicative identity (denoted with 1), and the distributive law holds.  If multiplication is also commutative, we say $R$ is a commutative ring. A ring that has no zero divisors (non-zero elements whose product is zero) is called an integral domain, or just a domain.  We want to show that for a domain, the equation $x^2 = 1$ has at most 2 solutions in $R$ (one of which is the trivial solution 1).    Here's what I did:   For simplicity let $1,a,b$ and $c$ be distinct non-zero elements in $R$.  Assume $a^2 = 1$.  We want to show that letting $b^2 = 1$ as well will lead to a contradiction.  So suppose $b^2 = 1$, then it follows that $a^2b^2 = (ab)^2 = 1$, so $ab$ is a solution as well, but is it a new solution?  If $ab = 1$, then $abb = 1b \Rightarrow a = b$ which is a contradiction.  If $ab = a$, then $aab = aa \Rightarrow b = 1$ which is also a contradiction.  Similarly, $ab = b$ won't work either.  So it must be that $ab = c$.  So by "admitting" $b$ as a solution, we're forced to admit $c$ as well.  So far we have $a^2 = b^2 = c^2 = 1$ and $ab = c$.  We can procede as before as say that $(abc)^2 = 1$, so $abc$ is a solution, but once again we should check if it is a new solution.  From $ab = c$, we get $a = cb$ and $b = ac$, so $abc = (cb)(ac)(ab) = (abc)^2 = 1$.  So $abc$ is not a new solution; it's just one.  At this point I'm stuck.  I've shown that it is in fact possible to have a ring with 4 distinct elements, namely $1,a,b$ and $c$ such that each satisfies the equation $x^2 = 1$ and $abc = 1$.  What am I missing? How to prove this statement: $\binom{r}{r}+\binom{r+1}{r}+\cdots+\binom{n}{r}=\binom{n+1}{r+1}$ Transpose/Unzip Function (inverse of zip)? I have a list of 2-item tuples and I'd like to convert them to 2 lists where the first contains the first item in each tuple and the second list holds the second item.  For example:  original = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] # and I want to become... result = (['a', 'b', 'c', 'd'], [1, 2, 3, 4])   Is there a builtin function that does that? Can you get a Windows (AD) username in PHP? I have a PHP web application on an intranet that can extract the IP and host name of the current user on that page, but I was wondering if there is a way to get/extract their Active Directory/Windows username as well. Is this possible? Can I insert elements to the beginning of an element using .appendChild()? If the user selects an option in a dropdown box, there must be added a label and a textbox. Using appendChild, these elements get added to the end of the container.  var newFreeformLabel = document.createElement('label'); newFreeformLabel.innerHTML = 'Omschrijving:';  var newFreeformField = document.createElement('input'); newFreeformField.className = 'textfield'; newFreeformField.name = 'factuur_orderregel[]';  var newFreeformSpacer = document.createElement('div'); newFreeformSpacer.className = 'spacer';  container.appendChild(newFreeformLabel); container.appendChild(newFreeformField); container.appendChild(newFreeformSpacer);   The issue is that these elements should be inserted at the beginning of container, not at the end.  Is there a solution to this in PrototypeJS? "The following packages have been kept back:" Why and how do I solve it? I just added a PPA repository for the development version of the GIMP, but I get this error:  $ apt-get update &amp;&amp; apt-get upgrade ... The following packages have been kept back:   gimp gimp-data libgegl-0.0-0 libgimp2.0   Why and how can I solve it so that I can use the latest version instead of the one I have now? Say I have a huge text file (>2GB) and I just want to cat the lines X to Y (e.g. 57890000 to 57890010).  From what I understand I can do this by piping head into tail or viceversa, i.e.   head -A /path/to/file | tail -B   or alternatively  tail -C /path/to/file | head -D   where A,B,C and D can be computed from the number of lines in the file, X and Y.  But there are two problems with this approach:   You have to compute A,B,C and D. The commands could pipe to each other many more lines than I am interested in reading (e.g. if I am reading just a few lines in the middle of a huge file)   Is there a way to have the shell just work with and output the lines I want? (while providing only X and Y)? Is an automorphism of the field of real numbers the identity map? Is an automorphism of the field of real numbers $\mathbb{R}$ the identity map? If yes, how can we prove it?  Remark An automorphism of $\mathbb{R}$ may not be continuous. The repository 'http://ppa.launchpad.net/mdeguzis/libregeek/ubuntu focal Release' does not have a Release file How to change the light grey text that many web sites seem to use these days? Of late, I've noticed that many web sites seem to be using light grey text for many sections of their sites. Some such sections include - the text (link, usually) that shows in the status bar at the bottom of the browser when you hover the mouse over a link on their page, the indicator text in form fields to be filled in (e.g. the word "email" in the email address field), and many other elements on the page.  That light grey makes it much less readable.    Not sure whether is a new trend, or something to do with my browser settings (I haven't changed them lately, AFAIK), or Google Chrome, which is my browser. This is on Windows 7 running on a Dell Vostro laptop. I added the info about the laptop because I suspect the problem may even be due to my hardware settings, since I found the default brightness to be too high after I bought it, and changed it via Control Panel.  Would like to know what are some of the things I can check or change to solve this.  Thanks. I could have modifications ready for a specific question that was downvoted. I felt like the best thing to do was to delete the post first.  Is it possible to flag for moderator attention after you deleted the post ? What's the difference between mobile and desktop processors? I just read about the new Samsung Galaxy Note Edge having a 2.7&nbsp;GHz quad-core processor and 3GB of RAM.  The laptop I bought last year by HP is 4&nbsp;GB of RAM and 2.3&nbsp;GHz quad-core and my iMac is even older and is 2.5&nbsp;GHz i5.  Does this mean that the new Samsung gadget is more powerful than my desktop?  Is the 2.7&nbsp;GHz the same kind of GHz as non-mobile devices (is it scaled up, or compared, etc.)?  Why, in terms of power, do modern computers not have two of those Samsung quad-core processors running in parallel pushing out 5.4&nbsp;GHz processing power for the amount of electrical energy as two Galaxy Note batteries? Finding the contact point with SAT What's the cleanest, most effective way to validate decimal numbers in JavaScript?  Bonus points for:   Clarity. Solution should be clean and simple. Cross-platform.   Test cases:  01. IsNumeric('-1')      =&gt; true 02. IsNumeric('-1.5')    =&gt; true 03. IsNumeric('0')       =&gt; true 04. IsNumeric('0.42')    =&gt; true 05. IsNumeric('.42')     =&gt; true 06. IsNumeric('99,999')  =&gt; false 07. IsNumeric('0x89f')   =&gt; false 08. IsNumeric('#abcdef') =&gt; false 09. IsNumeric('1.2.3')   =&gt; false 10. IsNumeric('')        =&gt; false 11. IsNumeric('blah')    =&gt; false Why are so many different types of objects white, yet appear gray when they are wet? There are many things with different textures that appear white – salt, beer foam, paper, shaving cream, snow, talcum powder, white paint, etc. The most common answer is all of the frequencies must be reflected in order for us to perceive white, which I already know. There must be more underlining details why such a huge variety of things are white. Furthermore, if you wet paper, snow or talcum powder, they appear off-white or gray. Why is this? Let $\mathbf A, \mathbf B$ be Hermitian matrices of the same size. What is the characterization of $\mathbf A, \mathbf B$ such that $p(\lambda)=\det(\mathbf A-\lambda\mathbf B)=0$ has only real roots?   If $\mathbf B$ is positive definite (I corrected this), it is easy to see $p(\lambda)$ has only real roots. Preferred languages: C/C++, Java, and Ruby.  I am looking for some helpful books/tutorials on how to write your own compiler simply for educational purposes. I am most familiar with C/C++, Java, and Ruby, so I prefer resources that involve one of those three, but any good resource is acceptable. How to backup 20+TB of data? We have a NAS server at the company I work for that is being used for storing photography sessions. Each session is approximately 100gb. Over the last couple of years this server has accumulated 10+ TB of data, and we are increasing the amount of photoshoots exponentially. I estimate that by the end of next year we will have 20+ TB stored on this NAS. We are currently backing this server up to tape using LTO-5 tapes with Symantec BackupExec. Since the size of this server has grown, full backups of this server are not completing overnight. Does anyone have any suggestion on how to backup this amount of data? Should we be backing it up to tape? Are there any other options which may be better?