Java 2 classes in one class?
Can a java file have more than one class?
Is there a fast way to get to the bottom of the Death Star? In Tiny Death Star, you can get to the top of your tower by tapping on the top of the screen while avoiding the "Add Level" button. However, the only way I can find to go to the bottom of the tower is to wait for someone to want an elevator ride, and tap on the button to give them that ride. Is there any other hot-spot for getting to the bottom of your Death Star? Performance differences between equal (=) and IN with one literal value Selecting features within Polygon from another layer using QGIS? I'm using QGIS 1.8 with a PostGIS database and I have three PostGIS-layers in QGIS a lines layer, a points layer and a polygon layer.  What I'm trying to do is to select a polygon in the polygon layer and mark all points within this polygon.   For me the only way to do this is to use the button "Select by Polygon" but in this way, I cannot use an existing polygon for selection. I am making the check for update script for my theme  I have 2 text files. First one is called "current.txt" and contains the current version. There is 4.1.1 string in that text file.  Second one is called "latest.txt" and contains the latest version. There is 4.2 string in this text file.  So here is the code  echo "Checking update"; x=$(cat ./current.txt) y=$(cat ./latest.txt) if [ "$x" -eq "$y" ] then        echo There is version $y update else        echo Version $x is the latest version fi   What it mean is if current.txt is NOT the same with latest.txt then it will say "there is version 4.2 update". If not, it will say "version 4.1.1 is the latest version"  But when I try to run it. I get this error  Checking update ./test.sh: line 4: [: 4.1.1: integer expression expected Version 4.1.1 is the latest version   So what am I doing wrong with this? Is there any adjustment required when computing the correlation coefficient between:   continuous and discrete variable  two discrete variables ?    Thanks ! Using Nouns or Gerunds Balloons and lifting gases Hydrogen is the lightest element, so it's cable of lifting the most weight in out atmosphere (probably not the best terminology there, but you get the picture)  Would hot hydrogen (in the same sense as hot air) be able to lift even more mass? Would a higher or lower density of hydrogen in a ballon lift more? If you could have a balloon which had nothing in it (it was a vacuum inside) would that lift more than a hydrogen balloon?  Basically what are the physics to balloons and lifting?  (really not sure what to tag this, so if someone else could that'd be great) Some ships in Star Trek are referred to with definite articles. "The Enterprise", "The Defiant". Other ships are referred to without them. "Voyager", "Enterprise". Is there a pattern to or explanation for this behavior? Is this a valid proof for the reverse triangle inequality: Given $x,\,y\in\mathbb{R}^n$, $\|x-y\|\ge |\|x\| - \|y\||$. $\def\a{{\bf a}} \def\b{{\bf b}}$ $\def\x{{\bf x}}$ $\def\y{{\bf y}}$  I've seen various methods of proving the reverse triangle inequality but I was wondering if this one is fine as well.   Prove the reverse triangle inequality:  Given $\x,\,\y\in\mathbb{R}^n$, $\|\x-\y\|\ge |\|\x\| - \|\y\||$.   $\textbf{Solution}$ Let $\x,\y \in \mathbb{R}^n$. Now, $\x=\x-\y+\y$ and so $||\x|| = ||\x-\y+\y|| \le ||\x-\y|| + ||\y||$ by triangle inequality. Thus, $||\x|| - ||\y|| \le ||\x-\y||$ [*].   Now for $\y$. Again, $\y = \y-\x+\x$ so $||\y|| = ||\y-\x+\x||$ implies $||\y|| \le ||\y-\x|| + ||\x||$ by triangle inequality. So, $||\y|| - ||\x||\le ||\x-\y||$. Hence, $-||\x-\y|| \le ||\x|| - ||\y||$ [**].   By [*] and [**], $-||\x-\y|| \le ||\x|| - ||\y|| &lt; ||\x-\y||$ implying $\bigl ||\x|| - ||\y|| \bigr\rvert \le ||\x-\y||$ for all $\x,\y \in \mathbb{R}^n$. Convergence of a Harmonic Continued Fraction Is there an idiom for people who boast too much? How does an attacker's reach interact with the Mounted Combatant feat's ability to force an attack against the mount to target the rider instead? Running out of cards in Exploding Kittens In the Exploding Kittens game, the rules say     You won't ever run out of cards in the Draw Pile, so there is never any need for a reshuffle.   In every game I've played all the cards end up on the discard pile fairly quickly and there is nothing left in the draw pile, so we have to reuse them.  Is this meant to happen? Are we doing something wrong? How to answer questions in a conference talk that I should know the answer to, but don't? I know it has been discussed that it is not possible to start an application from an usb drive upon connection due to limitations of autorun (or autoplay??) in Win 7. But it is possible to create a scheduled task having an event type trigger. Surely there must be an event occurring when the drive -- or any USB device, for that matter -- is connected.    Does anybody have the slightest idea which Event ID should I use? Or at least what type of event? Where can I find the event in event viewer? PHP Function with Optional Parameters xcode4 doesn't support Perforce? I'm trying to re-learn my undergrad math, and I'm using Stephen Abbot's Understanding Analysis. In section 2.7, he has the following exercise:  Exercise 2.7.5 (a) Show that if $\sum{a_n}$ converges absolutely, then $\sum{a_n^2}$ also converges absolutely. Does this proposition hold without absolute convergence?  I'm posting about this here because my answer to that last question about whether the proposition holds without absolute convergence is "Yes", but my suspicions are raised by him merely asking the question. Usually questions like this are asked to point out that certain conditions are necessary in the statement of propositions, theorems, etc. I just want to see if I'm missing something here.  Anyway, here's how I prove the absolute convergence of $\sum{a_n^2}$, and note that I never use the fact that $\sum{a_n}$ is absolutely convergent:  Proof: Let $s_n = \sum_{i=1}^n{a_n^2}$. I want to show that $(s_n)$ is a Cauchy sequence. So, let $\epsilon &gt; 0$ and $n &gt; m$, and consider, \begin{equation}   \begin{aligned}     |s_n - s_m| &amp;= |(a_1^2 + a_2^2 + \cdots a_n^2) - (a_1^2 + a_2^2 + \cdots a_m^2)|\\                 &amp;= |(a_{m+1})^2 + (a_{m+2})^2 + \cdots + a_n^2|\\                 &amp;= |a_{m+1}|^2 + |a_{m+2}|^2 + \cdots + |a_n|^2\\   \end{aligned} \end{equation} Now, since $\sum{a_m}$ converges, the sequence $(a_m)$ has limit 0. Therefore I can choose an $N$ such that $|a_m| &lt; \sqrt{\epsilon/n}$ for all $m &gt; N$. So for all $n &gt; m&gt; N$,  we have, \begin{equation}   \begin{aligned}     |s_n - s_m| &amp;= |a_{m+1}|^2 + |a_{m+2}|^2 + \cdots + |a_n|^2\\                 &amp;&lt; \left(\sqrt{\frac{\epsilon}{n}}\right)^2 + \left(\sqrt{\frac{\epsilon}{n}}\right)^2 + \cdots + \left(\sqrt{\frac{\epsilon}{n}}\right)^2\\                 &amp;&lt; \left(\sqrt{\frac{\epsilon}{n-m}}\right)^2 + \left(\sqrt{\frac{\epsilon}{n-m}}\right)^2 + \cdots + \left(\sqrt{\frac{\epsilon}{n-m}}\right)^2\\                 &amp;= \epsilon   \end{aligned} \end{equation} Therefore $(s_n)$ is Cauchy and $\sum{a_n^2}$ converges. And since $\sum{a_n^2} = \sum{|a_n^2|}$, the series $\sum{a_n^2}$ is absolutely convergent. &#x220E;  Am I doing something wrong here? Am I right in thinking that $\sum{a_n}$ need not be absolutely convergent for $\sum{a_n^2}$ to be absolutely convergent? 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); What are sentences like "the longer X, the more Y" called and can they be used in formal written English? What is the type of sentence exemplified below called? Is it appropriate to use it in a scientific paper and formal written English in general?     1. The more pronounced the variation, the   more the waste.      2. The more you give, the more you get.      3. The longer I live, the more I realize the impact of attitude on life.