Login to Ubuntu after update if you don't know user name and password
How do I reset a lost administrative password?
How to disable Macbook Pro internal display when using external monitors I have a Late 2011 Macbook Pro 13" (running Lion - OS 10.7.4) which I use with a dual external monitor setup. I have two 21" LCDs that I use as external monitors. One uses the built in Mini Display Port on the Macbook Pro and the other is connected via a USB to DVI adapter (Diamond DVILink).  The problem I am having is with the 13" built in display of the Macbook Pro. I would like it to remain closed and unused (I prefer the dual monitors at same resolution), however I cannot seem to "disable" the display in the display preferences applet. So even though the Macbook Pro lid is closed the operating system still makes use of the display, even though the apple logo on the back of the display is unlit. I have tried to move the laptop screen off out of the way in display preferences but I find when I "sleep" my setup that any applications that remain open move to the laptop screen. This makes it difficult to locate the application windows when resuming from sleep.    Does anyone know of a way to disable the laptop built in display so it is not seen by the OS when external monitors are being used? I have a very large codebase (read: thousands of modules) that has code shared across numerous projects that all run on different operating systems with different C++ compilers. Needless to say, maintaining the build process can be quite a chore.   There are several places in the codebase where it would clean up the code substantially if only there were a way to make the pre-processor ignore certain #includes if the file didn't exist in the current folder. Does anyone know a way to achieve that?  Presently, we use an #ifdef around the #include in the shared file, with a second project-specific file that #defines whether or not the #include exists in the project. This works, but it's ugly. People often forget to properly update the definitions when they add or remove files from the project. I've contemplated writing a pre-build tool to keep this file up to date, but if there's a platform-independent way to do this with the preprocessor I'd much rather do it that way instead. Any ideas? Analysis Question Involving Real Numbers Wow, the iOS app feed sure showed me an interesting question! I want to read more. Uh, how do I get there? In the iOS app, pulling up a question from the feed gives the standard question view, which provides no means of navigating elsewhere on that site, either to browse or search. This should be changed for feed questions.  For example, I tapped on a highlighted Seasoned Advice question today, and found that I wanted to make a comment pointing to a related question on the site. The best way I could think of finding that post was to leave the app and use my browser. Then I came back with the link to copy-paste in.  Similarly, a question in the feed might be so intriguing that I want to look around for more cool stuff on the site. That requires two taps back and then a search via the "All Sites" menu item.  I'd suggest that questions selected from the feed should get a special header bar (or maybe stuck in between the questions and the answers) that provides a "More posts!" link at least to the site's top view; ideally there would also be a search field that could pop out of it.  Another possibility that would work pretty well, although it's a small tap target on a phone, would be to link the site name that appears under the question title to the site's top view. How can I work with file uploads during a Webdriver test? This is a canonical question, intended to provide a comprehensive answer to many related questions  During the course of a Webdriver test, I want to upload files. However, this opens a native file picker, which Webdriver doesn't seem to support interacting with. How do I interact with it? How to tile textures in Cycles? How to delete a file in Windows with a too long filename? My wife has several files and folders that somehow ended up having filenames that have caused them to be undeleteable (can't be deleted) by normal means or via the command line. I believe the filenames are too long due to the depth of the folder structures. Does anyone know of a good utility for cleaning up files like this? MySQL Access denied for user 'root'@'localhost' In my server, everytime I try to access MySQL I get the error:        Access denied for user 'root'@'localhost' (using password: NO)   when I try mysqladmin -u root -p password I get        Access denied for user 'root'@'localhost' (using password: YES)   How can I access MySQL in my Ubuntu server 12.04? Asynchronous shell exec in PHP Duplicating a mesh object Trying to show that $\ln(x) = \lim_{n\to\infty} n(x^{1/n} -1)$ How do I show that $\ln(x) = \lim_{n\to\infty} n (x^{1/n} - 1)$?  I ran into this identity on . I haven't been able to find any proof online and my efforts to get from $\ln(x) := \int_1^x \frac{\mathrm dt}t$ to that limit have been a failure. Is there a way to preserve a weapon in Magicka within a saved multiplayer game I have to show that the ring $\mathbb{Z}[X]/(X^2-1)$ is not isomorphic with $\mathbb{Z}\times \mathbb{Z}$.    I know that $(\mathbb{Z}\times\mathbb{Z})^*=\{(\pm1,\pm1)\}$, so I thought I should be looking for elements which have inverses in $\mathbb{Z}[X]/(X^2-1)$ and hopefully find more or less than 4. But I didnt succeed, so I need hints. Thanks. Show that if the smallest prime factor $p$ of the positive integer $n$ exceeds $\sqrt[3]{n}$, then $\frac{n}{p}$ must be prime or 1.  I'm stuck trying to prove this. I tried this using contradiction, but I haven't been able to prove it.  My approach:  Let $p$ be the smallest prime factor of the positive integer $n$.  Let $p &gt; \sqrt[3]{n}$  Then we must show that $\frac{n}{p}$ is either a prime number or 1.  We know that $n = pe$ for some $e \in \mathbb{Z}$.  Thus, $\frac{n}{p} = e$  We also know that $p$ > $\sqrt[3]{n}$, so $p^3 &gt; n$, and $p^2 &gt; \frac{n}{p}$  So, assume $\frac{n}{p} = e$ is not prime nor 1, meaning it's a composite number. Let's try to get a contradiction.  If $\frac{n}{p}$ is composite, then $\exists a,b \neq 1: \frac{n}{p} = ab $  Now, here's where I get stuck. What can I do with this info? $\frac{n}{p} = ab $ and $p^2 &gt; \frac{n}{p}$. Prove that Gauss map on M is surjective Using 'return' instead of 'else' in JavaScript Calculate Limit 0f nested square roots I read Griffiths EM today and it says something very interesting but a little bothering to me. It states for an atom, the position of center of mass of an electron cloud lies in the center of the proton.  But my question is why? What will happen if this is not true? Can a wizard use his familiar's senses to enlarge his "you can see" area? Blaise Pascal's famous wager was that even if the existence of God cannot be determined through reason, a rational person should wager as though God exists, because living life accordingly has everything to gain, and nothing to lose.  What logical flaws and/or fallacies (if any) are committed in making this argument?