What am I doing wrong with the .get command in ArrayLists
How do I compare strings in Java?
$X_n\leq Y_n$ implies $\liminf X_n \leq \liminf Y_n$ and $\limsup X_n \leq \limsup Y_n$ Can anyone prove this question? I tried but I didn't get any I idea, so I hope someone can solve it.     Let $X_n\leq Y_n$ for each $n\in \Bbb N$. Show that $\liminf X_n \leq \liminf Y_n$ and $\limsup X_n \leq \limsup Y_n$.   Please prove this question - thanks.  The definition I have:     Let $X_n$ be a sequence in real number and let $$E=\{x\in \Bbb R^\sharp:(X_{n_k}) \rightarrow x \text{ for some subsequence }(X_{n_k})\text{ of }(X_n)\}$$ for all $n \in \Bbb N$ and $k$ from $1$ to $\infty$. Then by definition $\lim\sup X_n = \sup E$ and $\lim\inf X_n = \inf E$. Is it possible to generate electric energy from the radiation of radioactive materials I wonder if it is possible to generate electric energy from the radiation of radioactive materials like nuclear waste? If it is then wouldn't that also mean that it could be used as an energy source for a very long time since the radiation takes a long time to decay? How do I set environment variables from Java? One thing that made me curious while watching a football game on TV was the numbers that appear on the ground. For instance, there's a "1st &amp; 10" beside one team, but there was a "3rd &amp; 6" a few minutes prior (and I think it was beside the other team). What do these numbers mean? I have Ubuntu 14.04 and two monitors. When I open applications I need some of them to be on the primary monitor and others On the secondary. At the moment, apps always open in the primary monitor.   I have dash icons only on one (left) display, so I can't launch apps using the cursor or active window setting from Compiz. Split Java String by New Line I'm trying to split text in a JTextArea using a regex to split the String by \n However, this does not work and I also tried by \r\n|\r|n and many other combination of regexes. Code:  public void insertUpdate(DocumentEvent e) {     String split[], docStr = null;     Document textAreaDoc = (Document)e.getDocument();      try {         docStr = textAreaDoc.getText(textAreaDoc.getStartPosition().getOffset(), textAreaDoc.getEndPosition().getOffset());     } catch (BadLocationException e1) {         // TODO Auto-generated catch block         e1.printStackTrace();     }      split = docStr.split("\\n"); } Meta sites in "Your Communities" display different reputation Why square the difference instead of taking the absolute value in standard deviation? "It is not possible to check out a single file. The finest level of checkouts you can do is at the directory level."  How do I get around this issue when using Subversion?  We have this folder in Subversion where we keep all our images. I just want to check out one file (image) from that. This folder is really big and has ton of other stuff which I don't need now. When I place a multipage pdf file into InDesign CC, the pages go outside of my document settings, making this function useless.  What do I have to do to make the placed  pdf pages go within my document settings, which in this case is 11 in. Length X 8.5 in. width, .5 in. margins on all sides, with two columns per page. I would greatly appreciate an answer to this, Thank you. Limit of a stochastic integral "OpenID 2.0 for Google Accounts is going away"; will this affect Stack Exchange? I tried to find an answer to this a few years ago, but it seemed it wasn't possible then (I suspect it isn't now either! - but what the hell!)   I have a three monitor system, that I mostly use for remote desktop. However occasionally it would be useful to have remote desktop on two monitors and use the other monitor for the local machine.   I know it is possible to have a single monitor full screen, or to stretch an RDP session across monitors, but this loses things like snapping etc.   P.S. this is a duplicate of  thread, but that was a couple of years ago, I'm hoping things have changed. Is it possible to create an instance of a generic type in Java? I'm thinking based on what I've seen that the answer is no (due to type erasure), but I'd be interested if anyone can see something I'm missing:  class SomeContainer&lt;E&gt; {     E createContents()     {         return what???     } }   EDIT: It turns out that  could be used to resolve my issue, but it requires a lot of reflection-based code, as some of the answers below have indicated.  I'll leave this open for a little while to see if anyone comes up with anything dramatically different than Ian Robertson's . The [ifs] tag is used for 2 separate things I think  might correspond to IBM's  according to this .   But currently out of the 27 question tagged with , most of it have to do with the 's "Internal Field Separator".  What should be done here?   create a new tag for "Internal Field Separator" e.g. , and keep the IBM's under ? create a new tag for "Integrated File System" e.g. , and keep the other one under ? just remove the  tag from the  questions? Example of non-isomorphic structures which are elementarily equivalent I just started learning model theory on my own, and I was wondering if there are any interesting examples of two structures of a language L which are not isomorphic, but are elementarily equivalent (this means that any L-sentence satisfied by one of them is satisfied by the second).  I am using the notaion of David Marker's book "Model theory: an introduction". Covering estate tax on US assets for non-resident alien I am a non-resident alien holding a brokerage account in the USA but residing outside the USA. My country does not have an estate tax treaty with the USA. So my estate is liable for a significant estate tax up to 40%. Is there any way to avoid or to cover this tax? I thought of buying term insurance for myself, but I am not sure whether US companies will sell term insurance to a non-resident. I want to buy insurance from a US company because I want the death benefit to be in USD. Can someone suggest as to what the best way to approach this issue is? Mcrypt extension is missing in 14.04 server for mysql How to test hypothesis of no group differences? $P(\limsup A_n)=1 $ if $\forall A \in \mathfrak{F}$ s.t. $\sum_{n=1}^{\infty} P(A \cap A_n) = \infty$ Let $\mathfrak{F} = (A_n)_{n \in \mathbb{N}}$. Prove that $P(\limsup A_n)=1$ if $\forall A \in \mathfrak{F}$ s.t. $P(A) &gt; 0, \sum_{n=1}^{\infty} P(A \cap A_n) = \infty$. (Side question 1 Is second Borel-Cantelli out because we don't know if the $A_n$'s are independent?)  Suppose $\forall A \in \mathfrak{F}$ s.t. $P(A) &gt; 0, \sum_{n=1}^{\infty} P(A \cap A_n) = \infty$, but $P(\limsup A_n)&lt;1$. My prof gave us this convenient hint: Show $\exists M &gt; 0$ s.t. $P(\bigcap_{j=M}^{\infty} A_j^{c}) &gt; 0$.  $1 &gt; P(\limsup A_n)$  $1 - P(\limsup A_n) &gt; 0$  $P(\liminf A_n^{c}) &gt; 0$  By definition of $\liminf A_n^{c}$, $\exists M &gt; 0 $ s.t. $P(\bigcap_{j=M}^{\infty} A_j^{c}) &gt; 0$. (Side questions 2 and 3 Isn't this =1? ...Wait, is that what we're trying to prove? Haha)  $\to 1 - P(\bigcup_{j=M}^{\infty} A_j) &gt; 0$  $\to 1 &gt; P(\bigcup_{j=M}^{\infty} A_j)$  Main question: Now I guess we have to come up with some A s.t.  $\to 1 &gt; P(\bigcup_{j=M}^{\infty} A_j) \geq \sum_{n=1}^{\infty} P(A \cap A_n)$, or is there something else to do?