Strategy to prove a set is compact. Case: $S=\{0\}\cup\bigcup_\limits{i=1}^{\infty}\{\frac{1}{n}\}$
Prove that $ S=\{0\}\cup\left(\bigcup_{n=0}^{\infty} \{\frac{1}{n}\}\right)$ is a compact set in $\mathbb{R}$.
How do I break out of a loop in Perl? I'm trying to use a break statement in a for loop, but since I'm also using strict subs in my Perl code, I'm getting an error saying:     Bareword "break" not allowed while   "strict subs" in use at ./final.pl   line 154.   Is there a workaround for this (besides disabling strict subs)?  My code is formatted as follows:  for my $entry (@array){     if ($string eq "text"){          break;     } } Probability that median falls within a range? If I draw 5 samples from a distribution that is cont., what is the probability that the median of the population is between the xmin and xmax of the draw samples?  What is the formula to apply here? Adding "noise" to overlapping X,Y coordinates so no longer in EXACT same place? I have a series of points representing animal observations. Many of them overlap, having the exact same coordinates, and this is causing me trouble when I want to run some analytical tools which requite no identical points. I was wondering if there's any tool that can add some "noise" to the coordinates, that's to say, adding some random decimal values at the end in order to obtain slightly different coordinates which are still close enough in space so as to not really modify the observation. I've heard about such a tool, but I can't find it, at least in ArcGis 10. Maybe there's another software that can do it? Thanks! Does $\langle\Omega|\mathrm{e}^{\mathrm{i}Px}=\langle\Omega|\mathrm{e}^{\mathrm{i}0x}$? $(\langle\Omega| =$ ground state of the interacting theory) Let $\langle\Omega|$ be the ground state of an interacting theory, just as Peskin &amp; Schroeder(PS) describes on page 82 and page 213. On page 213 PS do the following   $$\tag{1}\langle\Omega|\phi(x)|\lambda_{\vec{p}}\rangle = \langle\Omega|\exp(+\mathrm{i}Px)\phi(0)\exp(-\mathrm{i}Px)|\lambda_{\vec{p}}\rangle \\ =\langle\Omega|\phi(0)|\lambda_{0}\rangle\exp(-\mathrm{i}px)\bigg|_{p^0=E_{\vec{p}}} $$  In the above $|\lambda_0\rangle$ is an eigenstate of the full interacting hamiltonian $H$. The ket $|\lambda_{\vec{p}}\rangle$ is the boost of $|\lambda_0\rangle$ with momentum $\vec{p}.$ Furthermore $E_{\vec{p}} = \sqrt{p^2+m_\lambda^2}$ and $\vec{P}|\lambda_0\rangle = 0.$  I assume PS used $$\tag{2}\langle\Omega|\mathrm{e}^{\mathrm{i}Px}=\langle\Omega|\mathrm{e}^{\mathrm{i}0x}$$ in $(1)$.   Is $(2)$ true?   I thought $\langle0|\mathrm{e}^{\mathrm{i}Px}=\langle0|\mathrm{e}^{\mathrm{i}0x}$ where $\langle0|$ is the ground state of the free theory.   I hope I have provided enough info for the question to make sense. When am I entitled to participate in a stock split? — record date, split date, ex date Stock split announcements usually mention a few dates — record date (&quot;date of record&quot;), split date (&quot;distribution date&quot;, &quot;pay date&quot;, or &quot;payment date&quot;), ex date (&quot;ex-split date&quot;). Examples:  :  Each Apple shareholder of record at the close of business on August 24, 2020 will receive three additional shares for every share held on the record date, and trading will begin on a split-adjusted basis on August 31, 2020.   :  Each stockholder of record on August 21, 2020 will receive a dividend of four additional shares of common stock for each then-held share, to be distributed after close of trading on August 28, 2020. Trading will begin on a stock split-adjusted basis on August 31, 2020.    In the case of the Tesla split, the record date is August 21, the split date is August 28 (Friday), and the ex date is August 31 (Monday). Apple's  provides definitions of these dates:  What is the effective date of the split? There are several key dates. The Record Date – August 24, 2020 - determines which shareholders are entitled to receive additional shares due to the split. The Split Date – August 28, 2020 - shareholders are due split shares after the close of business on this date. The Ex Date – August 31, 2020 - the date determined by Nasdaq when Apple common shares will trade at the new split-adjusted price.  However, further down in the FAQ, there is an explanation that seems to contradict the definition of the record date given above:  What happens if I buy or sell shares on or after the Record Date and before the Ex Date? [...] If you buy shares on or after the Record Date but before the Ex Date, you will purchase the shares at the pre-split price and will receive (or your brokerage account will be credited with) the shares purchased. Following the split, you will receive (or your brokerage account will be credited with) the additional shares resulting from the stock split.  Judging by the Apple FAQ, the way the record date works for stock splits is completely different from the way the record date works for cash dividends. With cash dividends, people who become shareholders of record after the record date are not entitled to the dividends. With stock splits, however, people who purchase shares after the record date (but before the ex date) are entitled to the stock split. Furthermore, for stock splits, the record date comes before the ex date, whereas for cash dividends, the record date comes after the ex date. It appears that I am not the only one confused about this. A quick internet search reveals years and years of confusion regarding the record date for stock splits. An extremely common point of confusion is the apparently incorrect assumption that the record date for stock splits works in the same way as the record date for cash dividends. A few questions:  Am I right that the record date for stock splits works differently from the record date of cash dividends? The only relevant dates for a stock split seem to be the split date (on which I will receive new shares after the market closes), and the ex date (on which I can sell the new shares on stock exchanges at a post-split price). It seems that the record date is completely irrelevant. What is the record date for? From my understanding, the price of the stock will be reduced at the instant the new shares are distributed (on the split date). Is this correct? This has always been a big want for me. I love using multi-monitor setups but only want a single laptop. Does the 2011 MBP Thunderbolt support chaining multiple monitors together? I know that you can add a monitor and say, a few hard drives, but can you connect it to 2 27" monitors and your flat screen TV (for example)? Thanks! Per   I did the following:  ec2run ami-3c994355 --region us-east-1 -n 1 -t m1.large -z us-east-1d   On the machine:  sudo apt-get update sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade   I still get a prompt asking me which config file I want to use. These are the lines that come before the prompt:  Setting up grub-pc (1.99-21ubuntu3.1) ...   then:                           ┌───────────────────────────────────────────────────────┤ Configuring grub-pc ├───────────────────────────────────────────────────────┐                                                        │ A new version of configuration file /etc/default/grub is available, but the version installed currently has been locally modified.  │                                                        │                                                                                                                                     │                                                        │ What do you want to do about modified configuration file grub?                                                                      │                                                        │                                                                                                                                     │                                                        │                                     install the package maintainer's version                                                        │ Markov/Chebychev inequality If Z is a square integrable random variable such that $E[Z]&gt;0$, then prove that  $$P(Z\geq k) \geq \frac{(E(Z)-k)^2}{E(Z^2)} \forall k \in [0,E(Z)]. $$  This is a homework question and I don't even understand why the inequality is reversed comparing to Markov/Chebychev inequality. Should Cauchy-Schwartz inequality be used? If yes, then how to begin? Thanks a ton! How to wait for a shell process to finish before executing further code in VB6 What does this mean? "Your UK visa application has been issued" Your UK visa application has been issued.      PLEASE DO NOT GO TO THE VISA APPLICATION CENTRE BEFORE THEY CONTACT YOU.      You will be contacted by the Visa Application Centre when your documents are ready for collection, or have been dispatched via courier where this is relevant.       You are reminded that you should avoid making travel plans until you have collected your passport, as the outcome of your visa application is not final until you receive your passport.      Please ensure you check the details on your visa when collecting your passport. If you need to contact us you can do so via our International Enquiry Service at www.gov.uk/contact-ukvi-outside-uk      Kind regards,      UK Visas and Immigration   British Embassy Abu Dhabi     Your UK visa application has been issued.   I know words like processed, forwarded, received, refused but never heard anything like that, so I am confused. Need hint: Determine whether the series $\sum_{n=1}^{\infty}(\frac{n}{n+1})^{n^2}$ is convergent or divergent. C# List Sort by x then y Similar to , we want to sort by one element, then another.  we want to achieve the functional equivalent of   SELECT * from Table ORDER BY x, y     We have a class that contains a number of sorting functions, and we have no issues sorting by one element. For example:    public class MyClass {     public int x;     public int y; }    List&lt;MyClass&gt; MyList;  public void SortList() {     MyList.Sort( MySortingFunction ); }   And we have the following in the list:    Unsorted     Sorted(x)     Desired ---------    ---------    --------- ID   x  y    ID   x  y    ID   x  y [0]  0  1    [2]  0  2    [0]  0  1 [1]  1  1    [0]  0  1    [2]  0  2 [2]  0  2    [1]  1  1    [1]  1  1 [3]  1  2    [3]  1  2    [3]  1  2   Stable sort would be preferable, but not required. Solution that works for .Net 2.0 is welcome. I am trying very hard to install Canon LBP2900b Printer in Ubuntu 13.10.  I have searched and googled a lot for the solution over fortnight but none of the site / link gave me the simple solution for me. How can accomplish my goal? How do I set my DNS when resolv.conf is being overwritten? Most of the info I see online says to edit /etc/resolv.conf, but any changes I make there just get overridden.  $ cat /etc/resolv.conf  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #     DO NOT EDIT THIS FILE BY HAND --  #     YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.1.1   It seems that 127.0.1.1 is a local instance of dnsmasq. The dnsmasq docs say to edit /etc/resolv.conf. I tried putting custom nameservers in /etc/resolv.conf.d/base, but the changes didn't show up in /etc/resolv.conf after running sudo resolvconf -u.  FYI, I don't want to change DNS on a per-connection basis, I want to set default DNS settings to use for all connections when not otherwise specified.  UPDATE:  I answered this question myself:   I think it's the best solution since:   It works. It requires the least amount of changes and It still works in conjunction with dnsmasq's DNS cache, rather than bypassing it. Is there a way I can avoid imperial ships? Whenever I am traveling on foot, imperial ships will fly by and drop down troops for me to fight. In a normal situation, this is no big deal and I will fight or flee to continue with my travels.  However this will also occur when I am doing a quest that requires me to locate and pick up items. This is an inconvenience as I cannot pick up items while in combat and I have to kill them before I can continue.  Is there a way I can "hide" and allow the ships to by pass my location? Backslash escaping in code regions in comments I've noticed that in comments, when you create `code region` with backticks, the backslash will still work as an escape character within that region (but it should not, IMHO).  To clarify:   In comments, `\\` will be rendered as \, but it should be rendered as \\ In the post body itself, `\\` will be rendered as \\ (i.e., correctly)   This is especially confusing when you enter regular expressions into a comment, since backslash-escaping is very common there, and confusion increases if you are dealing with a regex that is double-escaped for representation in a string.   At some point you lose track how many backslashes you must make so the comment renders correctly, or you don't notice fast enough (or at all) and the comment contains wrong code where the same markup in a question or answer would come out as perfectly correct.   It's just that comments can't be corrected anymore after the grace period, leaving you with the choice of either deleting the comment, thus crippling the conversation, or engaging in a trial-and-error game of writing another comment with even more backslashes to explain the issue.  My question is two-fold:   Will this error be corrected? If yes, existing comments should probably be searched and "fixed" by a routine that tries to do the right thing (this is probably somewhere between hard and impossible) Or, can I rest assured that never ever the behavior of the backslash in comments is going to be changed, so I can start working around this issue by hand, knowing that they won't start displaying incorrectly at some point in the future? Where has all the RAM gone? I have 1GB of RAM, and when I run NetBeans and Firefox, they get about 300MB of RAM. At some point, the system becomes very slow, probably 100 times slower than normal, switching windows (Alt+Tab) becomes a huge task and the computer is practically useless. This is probably the moment when it starts to swap.    Two questions:   According to images provided, where has all the RAM gone? When I calculate all the processes memory, it is far smaller then 1GB. Is it normal for system to become 100 times slower when the RAM is full and using swap space?   On another computer with 4GB of RAM I have no problems.     Update: I added 2GB of RAM, now I have 3GB. Anyone who wants to use heavy apps with 1GB on Unity, I don't think it's going to work. Works fine on an empty desktop :) Types of things vs. types of thing If object A is moving at velocity $v$ (normalized so that $c=1$) relative to a ground observer emits object B at velocity $w$ relative to A, the velocity of B relative to the ground observer is  $$ v \oplus w = \frac{v+w}{1+vw} $$  As expected, $v \oplus 1 = 1$,  as "nothing can go faster than light".  Similarly, $v \oplus -1 = -1$. (same thing in the other direction)  But what if object A is moving at the speed of light and emits object B at the speed of light in the exact opposite direction? In other words, what is the value of $$1 \oplus -1?$$ Putting the values in the formula yields the indeterminate form $\frac{0}{0}$. This invites making sense of things by taking a limit, but $$ \lim_{(v,w)\to (1,-1)} \frac{v+w}{1+vw}$$ is not well-defined, because the limit depends on the path taken.  So what would the ground observer see? Is this even a meaningful question?  Edit: I understand $1 \oplus -1$ doesn't make sense mathematically (thought I made it clear above!), I'm asking what would happen physically. I'm getting the sense that my fears were correct, it's physically a nonsensical situation. As stated in the question, I am looking for a Noetherian ring over which the Euclidean algorithm is not valid.  I am trying to construct non-trivial examples of Noetherian rings.  Thank you.