I am studying a set of uniformly generated points, more concretely the distance between the points. When the set is unsorted the histrogram shows it is normally distributed and that matches my intuition: hist(diff(runif(100,0,100)))  However, when the set is sorted the histogram resembles an exponential distribution: hist(diff(sort(runif(100,0,100))))  The way my intuition works this  means that the most common distance between 2 consecutive endpoints is the smallest one of all the distances which seems odd to me, my intuition when looking at the problem was driving me more towards an inverse-gaussian, I understand the most common distances will be close to the bottom but I was not expecting it to be straight the smallest one. What property of this system makes this happen?
Let $U_1, \cdots, U_n$ be $n$ i.i.d continuous uniform random variables on $(0,1)$ and their order statistics be $U_{(1)}, \cdots, U_{(n)}$.  Define $D_i=U_{(i)}−U_{(i−1)}$ for $i=1, \cdots, n$ with $U_0=0$.  I am trying to figure out the distribution $\lim_{n\to\infty} \#\{i = 1, \cdots, n \mid nD_i \geq z\}/n$. This must be very well known, but I cannot find a reference.
Suppose $K/F$ is an extension field, and $E_1$ and $E_2$ are two intermediate subfields of finite degree. Let $E$ be the subfields of $K$ generated by $E_1$ and $E_2$. I'm trying to prove that $$ [E:F]\leq[E_1:F][E_2:F].$$  Since $E_1$ and $E_2$ are finite extensions, I suppose they have bases $\{a_1,\dots,a_n\}$ and $\{b_1,\dots,b_m\}$, respectively. If $E_1=F$ or $E_2=F$, then the inequality is actually equality, so I suppose both are proper extension fields. I think $E=F(a_1,\dots,a_n,b_1,\dots,b_m)$. Since $\{a_1,\dots,a_n,b_1,\dots,b_m\}$ is a spanning set for $E$ over $F$,  $$[E:F]\leq n+m\leq nm=[E_1:F][E_2:F]$$ since $m,n&gt;1$.  Is this sufficient? I'm weirded out since the problem did not ask to show $[E:F]\leq [E_1:F]+[E_2:F]$ which I feel will generally be a better upper bound. I just wrote a question before this one and had trouble uploading a screenshot. The drop your image dialog throws no warning or error, but after uploading it won't show.  I also noticed that other questions won't load their images. Could this be some issue with imgur or similar?  Example:     When opening the image in a separate tab, Chrome gives a "too many redirects" error:    This might be linked to In Hitchcock's Vertigo, there is one part of the film that has never made sense to me and I believe that it was a cheap ploy to mislead the audience until the ultimate reveal (I won't spoil it here).    In this scene Jimmy Stewart watches Kim Novak enter a rooming house and afterwards sees her standing by the window on the 2nd floor.  When he enters the house and talks to the inn-keeper, she tells him that Kim Novaks's character positively never came in and even shows him her room key that is still behind the front desk.  They go up to the room and find it empty.   This scene seems to imply that the Kim Novak character may have had a ghost like quality. But given the reveal at the end she clearly does not and there was no way for her to enter the room without a key and without being seen by the inn-keeper.  If this was done by some other director I probably wouldn't have given this much thought but Hitchcock was a perfectionist (especially for this film) so I never understood the significance of this scene other than to mislead the audience (with a cheap ploy IMO).  Does anyone who is familiar with this film have a different explanation/perspective about this scene in an otherwise brilliant movie. Probability Interval for Gamma Distribution There is something that I am doing wrong in the exercise below and I would appreciate some help figuring it out.  Let $X_1, X_2, \ldots, X_5$ be a random sample from a $\Gamma \left(3,3 \right)$ distribution . Define $W=\sum_{i=1}^5 X_i $.    Obtain the distribution of $W$ and of $2W/3$ Find $c_1$ and $c_2$ such that $P \left( c_1 &lt; W &lt;c_2 \right)=0.95 $     Since $W$ is the sum of iid gamma variables, $W \sim \Gamma \left(15,3 \right)$ and now a straightforward transformation argument shows that $Y=\frac{2}{3} W \sim \chi^2 \left(30 \right) $. This completes question 1.  Now for question 2, my thoughts were to transform these probabilities using the result from question 1, namely that $\frac{2}{3} W \sim \chi^2 \left(30 \right) $. Hence, unless I have made a horrible mistake here:  $$P \left( \frac{2}{3} c_1 &lt; Y &lt; \frac{2}{3} c_2 \right)=0.95 $$  We can find the constants from a chisquare table for $30$ degrees of freedom. In my case, they are $16.791$ for the lower bound and $46.979$ for the upper one.   Then if we equate $\frac{2}{3}c_1=16.791$ and solve for $c_1$ we should be able to find the constant for the above gamma confidence interval, right?   The problem is that according to $R$, $P \left( W&lt;c_1 \right) =1 $, instead of  the desired $0.025$ which means I have gone wrong somewhere. I do not think it is in question though $1$ as I have verified the result many times.   Thank you. Can sudo be reinstalled after being removed? Why is CDC capture failing due to a missing dbo principal Avoid if for chained objects Partial Sums of Geometric Series I changed both the desktop and login screen background photos. However,only desktop photo is changed. The one on the login screen is still the purple Ubuntu one. Is this a bug? Enable HTTP DELETE requests on Apache server I need to configure my server to permit the http delete method.  currently, I get the following error when I attempt to make this call:    HTTP/1.1 405 Method Not Allowed Date: Mon, 11 Apr 2011 20:56:23 GMT Server: Apache/2.2.17 (Win32) PHP/5.3.5 Allow: GET,HEAD,POST,OPTIONS,TRACE Content-Length: 233 Keep-Alive: timeout=5, max=98 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1     I have searched far and wide and have not been able to come up with an answer as to how I can configure the server to allow this request.  Someone please help as it has put a stop to my project. jQuery get specific option tag text All right, say I have this:  &lt;select id='list'&gt;     &lt;option value='1'&gt;Option A&lt;/option&gt;     &lt;option value='2'&gt;Option B&lt;/option&gt;     &lt;option value='3'&gt;Option C&lt;/option&gt; &lt;/select&gt;   What would the selector look like if I wanted to get "Option B" when I have the value '2'?  Please note that this is not asking how to get the selected text value, but just any one of them, whether selected or not, depending on the value attribute. I tried:  $("#list[value='2']").text();   But it is not working. Numlock turned on on boot-up I have a desktop running ubuntu 10.04  I want numlock to be turned on initially.  What do I have to change to accomplish this?  ~~edit~~  I checked in my BIOS.  It was already set up to have the numlock turned on initially.  Yet it isn't being turned on initially.  I have a USB keyboard: would that break this functionality?   Or, should I ask elsewhere (superuser, perhaps) about how to get that BOIS setting working properly? "Me and my wife" or "my wife and me" MBR recovery - Corrupted MBR after it changed to dynamic & testdisk gives up . No backup sector found I had a Windows 7 installation on my 1TB SSD laptop with 4 primary partitions. I wanted to install Lubuntu Linux but the process failed with an error which kind of said:     cannot write MBR   It gave me an option to put an MBR somewhere else or to boot without MBR. None of these options worked and it became a useless install. After this failed dual boot attempt, Windows would give a BSOD wit Code 007 ending - translated to inaccessible boot device. That is a huge NTFS partition and I don't think I have any other media to back it up before formatting it.  My only option is somehow rebuilding the old MBR. Hence I started creating a whole bunch of live USB boot environments  including Super GRUB Disk and MiniTool Partition Editor Live CD, but none of this could ever help me recover my lost MBR.  Win PE 4.0 reported the partition as bad disc and the latest version did not even have an option for MBR. I managed to create a live USB with Testdisk Running on Ubuntu. Whatever partition was seen as HPFS on quick  search was written in the MBR and after this the disc is totally unreadable. Earlier I could see my data through Linux and now I can see nothing.  Here are my questions:   When some data could be read (but Windows would not boot) the MBR was shown as dynamic MBR. As far as I know dynamic MBR is a Windows concept and my Linux attempt would not have converted it. While installing Linux I tried to delete 2 primary partitions which I found to be not really useful (I backed up their data first). So I am not sure what created the dynamic MBR.  Did my dual install convert those basic MBR to dynamic MBR? How did that happen? Here is a screenshot of my deep search attempt with TestDisk which is still in progress. I can see 4 NTFS partitions and one of these two system partitions should be the original MBR. When I tried to write both these system partitions (after stopping the deep search momentarily) I got an error like "partition not found". The file system utility showed me that there is no backup sector and that may be the reason why it cannot be read.  What other Resorts do I have, other than doing a plain format and then using some recovery tool to recover all my lost data? I am not even sure I will recover the folder names.  What other options should I be trying to restore my old MBR so Windows can boot?      Update  as of last I managed to create a live USB w/ W7  I used AOMEI Partition assistant 6.0 and on deeper  search I can see the 909 gb partition - it wont let me select it for recovery. I am sorry if my earlier Q was not clear. I referred to restoring an MBR from a partition . What happened earlier  - superficial search revealed all old partitions but NOT this one   and the later partitions showed up on Deep search &amp; I can select Other partitions for recovery but for this one. It wont let me select the partition I want  Here are some more screen shots    So in summary all that happened is   4 primary windows 7 partition -->  wanted to install Linux so I deleted 2 non bootable partitions after backing them up  ended up with BSOD ( inaccessible boot device ) and noticed that some windows partitions showed up as Dynamic MBR  (using Live USB Linux,gparted )  Use standard testdisk procedure to write MBR from the superficial NTFS-HDFS partition.  this is where I screwed up . Hindsight I should have really done a deep search and caught the 901gb partition to write MBR. I am not sure if I can undo this action  after this - life gets worse. I am  on a ventilator ! Now C is unreadable by windows and linux both and testdisk cannot list file ( see screenshots ) and I have been using a series of live USB's with some recovery s/w but no luck. ALL I want is to recreate that 901gb partition and the boot partition and put the MBR on the latter so I can get my windows 7 back again PHP function overloading How do you deserialize json properties that are reserved words in apex? I have a program which produces useful information on stdout but also reads from stdin. I want to redirect its standard output to a file without providing anything on standard input. So far, so good: I can do:  program &gt; output   and don't do anything in the tty.  However, the problem is I want to do this in the background. If I do:  program &gt; output &amp;   the program will get suspended ("suspended (tty input)").  If I do:  program &lt; /dev/null &gt; output &amp;   the program terminates immediately because it reaches EOF.  It seems that what I need is to pipe into program something which does not do anything for an indefinite amount of time and does not read stdin. The following approaches work:  while true; do sleep 100; done | program &gt; output &amp; mkfifo fifo &amp;&amp; cat fifo | program &gt; output &amp; tail -f /dev/null | program &gt; output &amp;   However, this is all very ugly. There has to be an elegant way, using standard Unix utilities, to "do nothing, indefinitely" (to paraphrase man true). How could I achieve this? (My main criteria for elegance here: no temporary files; no busy-waiting or periodic wakeups; no exotic utilities; as short as possible.) UNetbootin is stuck in an "Automatic boot in 10 seconds" countdown loop I made a bootable Windows 7 USB using UNetbootin, and when I try to boot from the bootable USB and select the Default boot menu entry, it gets stuck at the UNetbootin boot menu and it keeps repeating an Automatic boot in 10 seconds... message in an endless countdown loop. Selecting Press [Tab] to edit options and editing the options has no effect. When I go back to the boot menu, it keeps repeating the same countdown loop.   I've tried redoing the UNetbootin extraction, but I still have the same issue. "implements Runnable" vs "extends Thread" in Java From what time I've spent with threads in Java, I've found these two ways to write threads:  With implements Runnable:  public class MyRunnable implements Runnable {     public void run() {         //Code     } } //Started with a "new Thread(new MyRunnable()).start()" call   Or, with extends Thread:  public class MyThread extends Thread {     public MyThread() {         super("MyThread");     }     public void run() {         //Code     } } //Started with a "new MyThread().start()" call   Is there any significant difference in these two blocks of code ? How do I delete unwanted Apple ID's? I'm going thru a phone swap, and I now realize that I have multiple ID's   "codename" "codename@example.com" "realname@example.com"   I've tested all three, and they all have different login passwords. Not sure how I got here but I'd like to clean the mess up.  Is there any way to delete / remove / erase unwanted ID's so they don't exist anymore?  (Note: their existence creates total havoc with any type of ID edit...)  I see from  that I can't merge the apple ID's, but can I simply delete the unwanted ID's?