The highest number that double can represent is extremely high, I thought. Though following code throws an exception. It's actually my full code.  public class Summe { public static void main(String[] args) {     System.out.println(summe(20000));   }  public static double summe(double s) {     return s == 0 ? s : s + summe(s-1);    } }   Thanks for the answers so far. My question is: How can I make my code work?
What is a StackOverflowError, what causes it, and how should I deal with them?
How many levels are there for Steam Trading Card badges? With the new Steam Trading Cards, I decided to craft the badge for CS:GO. I got this:    I then noticed that this is only a level 1 badge, and there was a level 2 badge to get. So I crafted it too:    Now it says there's a level 3 badge to get next. How many levels are there in total? Real UID, effective UID, and some systems even have a "saved UID". What's the purpose of all these, especially the last one? No direct object in 'give thee faithfully to follow' ? (1670 UK, Isaac Penington) The following code best describes the situation.  Why is the last line not outputting the trailing newline char?  Each line's output is shown in the comment.  I'm using GNU bash, version 4.1.5          echo -n $'a\nb\n'                  | xxd -p  # 610a620a              x=$'a\nb\n'   ; echo -n "$x" | xxd -p  # 610a620a      echo -ne "a\nb\n"                  | xxd -p  # 610a620a x="$(echo -ne "a\nb\n")" ; echo -n "$x" | xxd -p  # 610a62 SOAP or REST for Web Services? Is there a noun that doesn't have a plural in any of its forms? While attempting to answer  @ProgramFox has been trying to come up with an example of a noun with no plural.   The best I've come up with is egotism and Judaism.  ()  Some of the contenders I've already shot down are air, water, and money.  (Airs, waters, and monies are all legitimate plurals.)  My question is, a) Do my two examples have actual plurals?  b) Are there any other non-ism nouns that don't have a plural? Get the name of an object's type I am trying to draw a cantor set in LaTeX and I am having issues doing this. I am trying multiple \put commands, but they just go to the right of one another. Does anyone know how to do this?  Any help would be much appreciated. How can I check if an application is running from a batch (well cmd) file?  I need to not launch another instance if a program is already running. (I can't change the app to make it single instance only.)  Also the application could be running as any user. Use of 'const' for function parameters Why was the plan for the Purple Wedding so complicated? Spoilers for A Storm of Swords / Season 4 episode 2 "The Lion and the Rose".  At the Purple Wedding,      Littlefinger and Lady Olenna Tyrell   perform their plan of      poisoning King Joffrey.   A short summary of their plan:  Littlefinger orders Ser Dontos Hollard to give Sansa Stark a beautiful silver hairnet adorned with amethysts. At least some of the amethysts are actually strangler crystals in disguise. Ser Dontos also, still under orders of Littlefinger, urges Sansa to wear the hairnet at the wedding, which she then does. At the wedding, when Lady Olenna greets Sansa, she fusses her hairnet a bit, while secretly taking one of the strangler crystals. Later, during the wedding, Lady Olenna puts the crystal in Joffrey's royal cup, poisoning him.  But why was their plan so complicated? Why couldn't Lady Olenna just bring a strangler crystal with her to the wedding (as suggested in )?  Then they wouldn't depend on Ser Dontos and Sansa who could unknowingly have done something to prevent the success of the plan.  The only reason that I could think of, is Littlefinger and Lady Olenna plan for Sansa (and Tyrion as her husband with her) to take the blame for Joffrey's death.  They put the crystals on her person, so that upon examination it would clearly show that Sansa had the murder weapon on her. But Littlefinger had a plan he did not tell Lady Olenna, namely rescuing Sansa during the chaos ensuing the murder (and thereby leaving Tyrion behind as the only accused).  Is there anything confirming or debunking this theory? If my theory doesn't hold up, is there another explanation for why the plan was so needlessly complicated? Ownership of .Xauthority transferred to root Somehow, while playing around with LightDM and Webkit Greeter, the ownership of the .Xauthority file in my home dir was given to the root user and I couldn't login because I hadn't the privilegues to lock the file.  I was able to regain ownership of the file and I could login again. (After several hours of reinstalling LightDM and it's greeters)  So now everything's working fine again. But I'd like to know how this happened. Is this a bug in LightDM or Webkit Greeter or something else? How to install NVIDIA driver in Ubuntu I'm running Ubuntu 13.04 on DELL XPS L501 - Nvidia GeForce GT 420M. I'm using kernel 3.9.0-030900-generic.  All kernel-headers are installed in the system.  and  I've tried the following.   Use apt-get to install nvidia-current (which download 304) &amp;&amp; load using modprobe Use apt-get to install nvidia-310 &amp;&amp; load using modprobe Download nvidia 64-bit driver nvidia-319.23 for 400M series and install Use swat-x repo to install nvidia driver   All of these failed. And I tested it everytime like this   After the module is loaded (checked from lsmod),  restarted lightdm tested from get.webgl.org  (Google-Chrome webgl support is enabled)    Problem faced with nvidia-xconfig   after running nvidia-xconfig (which writes to /etc/X11/xorg.conf), and restarting lightdm, my display res changes to 640x480. and had to remove this file to revert back to old setting Have also tried commenting out those two lines which adjusts Horizontal and Vertical Setting in xorg.conf. That just rectified the resolution. But still I wasn't able to use the graphics card (webgl).   EDIT 1: (nouveau)   Tried rebooting after each installation Removed (purge) all of nouveau* before starting.  Removed one more package (dont remember the exact name though) - xorg-xserver-blah-blah.   EDIT 2: (bitlbee)   I had bitlbee installed before. Removed that too before starting installation. When bitlbee was present, NVIDIA-3.9-x86.run (downloaded from nvidia) was not able to recognize graphics card. But it did when I removed bitlbee. (So I'm assuming here that it should work if graphics driver was installed properly)   EDIT 3: (software-properties-gtk)   sudo software-properties-gtk the Additional drivers tab is always NIL. (before and after installation) (even if the installation was successful)   Have been trying this the whole day, and done it quite a few times. None of them worked.  Need help! Is it the problem with kernel-3.9, that there are no updates for this ? Does the series $\sum_{n=1}^{\infty}|x|^\sqrt n$ converge pointwise? If it then what would be the sum? I'm quite confused about the following regular expressions I found in a shell script:  ${0##*/} ${0%/*}   How do they work? How do I send a file as an email attachment using Linux command line? I've created a script that runs every night on my Linux server that uses mysqldump to back up each of my MySQL databases to .sql files and packages them together as a compressed .tar file.  The next step I want to accomplish is to send that tar file through email to a remote email server for safekeeping.  I've been able to send the raw script in the body an email by piping the backup text file to mailx like so:  $ cat mysqldbbackup.sql | mailx backup@email.com   cat echoes the backup file's text which is piped into the mailx program with the recipient's email address passed as an argument.  While this accomplishes what I need, I think it could be one step better, Is there any way, using shell scripts or otherwise, to send the compressed .tar file to an outgoing email message as an attachment?  This would beat having to deal with very long email messages which contain header data and often have word-wrapping issues etc. Possible Duplicate:          Prove $$\cos(\alpha) + \cos(\alpha + \beta) + \cos(\alpha + 2\beta) + \dots + \cos[\alpha + (n-1)\beta] = \frac{\cos(\alpha + \frac{n-1}{2}\beta) \cdot \sin\frac{n\beta}{2}}{\sin\frac{\beta}{2}} $$ How to compute PCA scores from eigendecomposition of the covariance matrix? Given a data matrix $\mathbf X$ of $12 \times 7$ size with samples in rows and variables in columns, I have calculated centered data $\mathbf X_c$ by subtracting column means, and then computed covariance matrix as $\frac{1}{N-1} \mathbf X_c^\top \mathbf X_c$.  The dimensions of this covariance matrix are $7 \times 7$. After that I have calculated the eigenvalue decomposition, obtaining eigenvector matrix $\mathbf V$ with eigenvectors in columns.  Now I want to know about projections (i.e. principal component scores in PCA): is it $\mathbf{V}^\top \mathbf{X}_c$ or $\mathbf{X}_c \mathbf{V}$?  mean_matrix = X - repmat(mean(X),size(X,1),1); covariance = (transpose(mean_matrix) * mean_matrix)/(12-1);  [V,D] = eig(covariance); [e,i] = sort(diag(D), 'descend'); V_sorted = V(:,i); Interior of closure of open set in topological space If $U$ is an open set in a topological space, is it true that $U$ is the interior of the closure of itself?   If $U$ is open, it must be the interior of itself. But is it the interior of the closure of itself? In the closure, we include all points $x$ such that any open set containing $x$ also contains a point in $U$. In the interior of the closure, we take the union of all open sets contained in the closure. Currently selected indicator's colour in flag summary and help pages, can be the same as the site's colour code