Precision of double when reading from file
Is floating point math broken?
Test for finite variance? Is it possible to test for finiteness (or existence) of the variance of a random variable given a sample? As a null, either {the variance exists and is finite} or {the variance does not exist/is infinite} would be acceptable. Philosophically (and computationally), this seems very strange because there should be no difference between a population without finite variance, and one with a very very large variance (say > $10^{400}$), so I am not hopeful this problem can be solved.  One approach that had been suggested to me was via the Central Limit Theorem: assuming the samples are i.i.d., and the population has finite mean, one could check, somehow, whether the sample mean has the right standard error with increasing sample size. I'm not sure I believe this method would work, though. (In particular, I don't see how to make it into a proper test.) I can't seem to access instance members of the surrounding class from inside an enum, as I could from inside an inner class. Does that mean enums are static? Is there any access to the scope of the surrounding class's instance, or do I have to pass the instance into the enum's method where I need it?  public class Universe {     public final int theAnswer;      public enum Planet {         // ...         EARTH(...);         // ...          // ... constructor etc.          public int deepThought() {             // -&gt; "No enclosing instance of type 'Universe' is accessible in this scope"             return Universe.this.theAnswer;         }     }      public Universe(int locallyUniversalAnswer) {         this.theAnswer = locallyUniversalAnswer;     } } Solve for $f(x)$ if $f(f(x))=6x-f(x)$ Chapter 5: Are there multiple Endings? I just finished Episode 5 and wondered, if there were alternative endings or game branches. I brought the whole group with me, and am wondering what would have changed if different people accompined me, and if the episode is possible to play out differenly.      On my playthrough, Lee killed the stranger, and on the run back to Christa and Omid, was to weak to continue. Clementine shot him. Kenny died along with Ben after he fell off the building. And Lee was cut off Christa and Omid after they went over the "bridge" first. Is energy content of a system different depending on the observer? For the sake of simplicity, let's imagine that the entire universe is empty except for a single lump of (classical) matter with mass $m$. In its center of momentum frame, it is clear that the total energy is simply $E_\text{CoM}=mc^2$. However, in a frame moving relative to it with speed $v$, we have $E_\text{moving}=\sqrt{m^2c^4+p^2c^2}&gt; mc^2$ for all nonzero $v$.  Are we to infer that the energy content of a system can be different relative to the observer? Does this not violate the first law of thermodynamics? I was wondering if anyone knows how to configure a Windows 7 x64 Enterprise install that is on a domain to run a script if the user attempts to shutdown the computer - but I dont want the script to run if the user tries to log out.   Here is a bit of detail on my situation...  I have installed drive encryption software on 5 desktops that are in use by various people in my group.  These desktops are installed a few buildings away in a secure lab that very people have access to.   People in my group access these machines (8 Core 2600K Intel Sandybridge with 8GB RAM) over RDP to preform tasks that require heavy lifting that laptops are not well suited for.    I wrote a shutdown script (.hta file) to warn a user that if he/she shuts the computer down, they will have to get access to the lab and enter the drive encryption password in order to bring the machine back online.   The script has a timer that counts down for 1 minute and allows the user to cancel the shutdown command.    The script works as expected when a user tries to shutdown the computer, but I just realized that the script seems to run when a user tries to log off.  Is there any way to differentiate between a user logging off and a user shutting down a machine?   If possible, I would only want the script to run if the machine is shutdown.  If the user logs out, I would not want any script to run.  If this is possible, it seems like this would be managed via local Group Policy.     Let me know if you need any further details. How can I dual boot Windows and Ubuntu? I currently have Windows 7 on my computer and I want to install Ubuntu alongside Windows safely.  Could someone please provide clear instructions? Simple way of finding the locus of $z$? I am tasked to sketch the locus of complex numbers $z$ that satisfies $$(z-2+i)^2 + (z^*-2-i)^2 + 2zz^* + 6 = 0$$ I was wondering if there’s a special trick to this question, or if this is only solvable by plugging in $z=x+iy$ ? I noticed that the second term is the conjugate of the first, and wanted to substitute $w = z-2+i$, however this gives me a complicated expression for $zz^*$ which makes it more confusing. Is there a trick I’m missing out? Thanks! Edit: I have already solved it through direct substitution (parabola intersecting real axis at $x=3$ and $x=-1$) but it took a good 5 minutes or so, expanding everything correctly, which seems rather long (I was attempting it under exam conditions). I was just wondering if it is possible to exploit the $w$ substitution I made in particular. The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this? how can I find sum of series $ \sum_{n=1}^{\infty} (n\cdot \ln \frac{2n+1}{2n-1} - 1) $? It is so weird for me because I put this to Mathematica and it tells me that sum does not converge...  Let consider sum no to infinity, but to n  $$ \sum_{k=1}^{n} (k\cdot \ln \frac{2k+1}{2k-1} - 1) =$$ $$ ln \frac{3}{1}\cdot \left(\frac{5}{3}\right)^2 \cdot...\cdot \left(\frac{2n+1}{2n-1}\right)^n - n = ln \frac{1}{1}\cdot \frac{1}{3}\cdot \frac{1}{5}\cdot ... \frac{1}{2n-1} - n $$ but $$ n = ln e^n $$ so it will be $$ln\frac{1}{e^n} \cdot \frac{1}{1}\cdot \frac{1}{3}\cdot \frac{1}{5}\cdot ... \frac{1}{2n-1}$$  So the limit of it is $-\infty$ Have I done this well or I missed sth? Can a parallel computer simulate a quantum computer? Is BQP inside NP? I have two users, user1 and user2, that are both members of groupA. user2 has a folder in their home directory called folderA. If they wish to allow read-write-execute permissions for all members of groupA, how would they do this?  What if folderA contains many files and additional folders that also need to have read-write-execute permission?  Information regarding groups is a little 'spotty' across the web, so I am putting my question here in the hope someone posts a clear answer that might help others out too.  Thanks! Convert NSDate to NSString When I'm not exploring fresh caves or lands in minecraft, I'm busy trying to find deposits of diamond, gold and iron deep in the earth. So far I've just been digging around just above bedrock on a whim to look for these rare minerals but I've started thinking that I should be taking a more controlled, efficient approach to mining.  What is the optimal mining strategy that yields the most rare minerals while minimizing blocks removed and time spent digging and traveling?  Edit: The existing answers are great for mining, but no one has addressed travel time to and from the mine which is usually ~60 blocks downward and incredibly tedious. Solutions? glBufferData not working outside main function Let $f(x)$ be a monotone non-increasing function such that $\int_{0}^{\infty}f(x) dx$ converges. Prove: $\lim\limits_{x \to \infty} xf(x)=0$. My question is, why can't I simply contradict any other possibility by using the Integral Limit Comparison Test with $1\over x$? I am, after all, to show that $f(x)=o(x)$ as $x\to \infty$. I really don't understand why monotony is crucial here. I could use some help. Table column not align if give color for Table entries My code follows:  \documentclass{book} \usepackage{color,colortbl} \begin{document}  \begin{tabular}{ll&gt;{\color{red}}p{20pc}} a &amp;1 &amp;Test \end{tabular}  \end{document}   The output was:    Some unnecessary vertical space came before the last column. If I remove the tag \color{red} then everything works fine, how can I fix this?  Above said issue was fixed based on the suggestion given by David Carlisle and CarLaTeX, but the same problem was there if I use the supertabular environment, I used supertabular package for auto breaking table and the code follows:  \documentclass{book} \usepackage{color,colortbl,supertabular} \begin{document}  \begin{supertabular}{ll&gt;{\leavevmode\color{red}}p{4pc}&gt;{\leavevmode\color{black}}l&gt;{\leavevmode\color{black}}l&gt;{\leavevmode\color{red}}p{4pc}} a &amp;1 &amp;Test &amp;a &amp;1 &amp;Test\\ a &amp;1 &amp;Test &amp;a &amp;1 &amp;Test\\ \end{supertabular}  \end{document} How does body fat leave your body? So I know that it’s not from tears or sweat because they are composed of mainly water and sodium, it’s not from going poo or pee as poo and pee are made of the parts of food that supply your body with no nutrients and your body also doesn’t “burn body fat” because there is a theory that no matter is ever destroyed so it’s none of those but another thing is it’s not your hair, ear wax, finger nails or anything of that sort because people can lose over 17 pounds in 3 months but you can’t build up that amount of hair , ear wax or whatever else in three months so how does body fat leave your body Is it common for native speakers to put a question mark at the end of declarative sentence? Prove that $n=\dfrac{5^{125}-1}{5^{25}-1}$ is a composite number   My attempt,  Let $x=5^{25}$, so that $5^{125}-1=x^5-1=(x-1)(x^4+x^3+x^2+x+1)$  $=(x^4+9x^2+1+6x^3+6x+2x^2-5x^3-10x^2-5x)(x-1)$  $=((x^2+3x+1)^2-5x(x+1)^2)(x-1)$  I'm stuck at this point and don't know how to continue anymore. Hope someone can provide a detailed solution. Thanks a lot.