How do you find the median of a long list of unsorted integers that can only be loaded in the memory in batches?
What is a good algorithm for estimating the median of a huge read-once data set?
restore table from .frm and .ibd file? I have previously saved a copy of /var/lib/mysql/ddms directory ("ddms" is the schema name). Now I installed a new MySQL on a freshly installed Ubuntu 10.04.3 LTS by running apt-get install mysql-server, I believe version 5.1 was installed. After I copy the ddms directory under /var/lib/mysql, some of its tables work fine, these are the tables with an associated set of three files: a .frm file, a .MYD file and a .MYI file.  However, there are two tables with a different set of files: a .frm file and a .ibd file. These two tables didn't show up in the table list in phpMyAdmin. When I look at the error log, it says:  [ERROR] Cannot find or open table ddms/dictionary_item from the internal data dictionary of InnoDB though the .frm file for the table exists. Maybe you have deleted and recreated InnoDB data files but have forgotten to delete the corresponding .frm files of InnoDB tables, or you have moved .frm files to another database? or, the table contains indexes that this version of the engine doesn't support.   Please help with restoring these two tables. Thanks. How to prevent updating of a specific package? Because of  I'd like to prevent apt-get upgrade and Update Manager from updating the "libgtk2.0-0" package.   How can this be achieved? Can black holes form in a finite amount of time? Detach (move) subdirectory into separate Git repository No chatoutput in tellraw onClick Event I'm using a /tellraw command to display some kind of menu to the player. How can I react to the clickEvent without posting something in the chat? When I try using the scoreboard, I get an output in my chat like this Set score of &lt;objective&gt; for player &lt;playername&gt; to &lt;value&gt;. The same thing happens, when trying /setblock, /entitydata or /trigger Is there any way, I can execute a command which commandblocks can detect without writing a success/fail message in the chat?  the only commands without a "real" response message I found were /say, /tell and /tellraw. But all of these are impossible to detect(also, they write something else in the chat). Mean and variance of inverse of a normal RV My random variable $X$ is normally distributed with mean $b$ and variance $p$. I defined a new RV, $Y$, such that $Y=1/X$. Does anyone know how to find the mean of $Y$ and $Y^2$? Plurality of verb depending on plurality of list elements This question is also open on EL&amp;U:   Considering the amount of controversy it aroused, I believe it's past "Learners'" level.    An edit was suggested to my sentence.     There was were an orange, some grapes, two apples and a small pile of cherries on the plate.   In my native language plurality of the verb always follows plurality of the first element on the list. There were an orange,... sounds awkward to me, no matter what follows up. My simple solution was reordering:     There were some grapes, an orange, two apples and a small pile of cherries on the plate.   But that's not the first time I faced this situation and I'd like to know what the rules of grammar say about that — was my editor overzealous or am I trying to copy rules of my language that don't apply in English? What is the difference between Halt and Shutdown commands? We were discussing Kirchoff's theorem on blackbody radiation in class today and the equation was: $$e_{f}= J(f,T)$$  $e_f$ was defined as power per unit area per unit frequency. What does per unit frequency refer to here? I know what per unit time means but don't understand 'per unit frequency'. Expectation inequality for a set and its subset. Given that a function $g(x)$ is a monotone increasing function. Its domain is an interval [c,d]. There are two sets $a_j \in A, j= 1,...,J$ and $b_k \in B,k=1,...,K$  on this interval, which satisfy $c_z \in C = B$\A and $c_z \geq a_j$ for all $a_j \in A$. For example, the interval $[c,d]=[0,8]$,$A=\{0,1,2,3,4,5\}$ and $B=\{0,1,2,3,4,5,6,7\}$. In this case, does the following inequality hold? If yes, could you give me some hints to prove that?  $$\frac{1}{K} \sum_{k=1}^{K}g(b_k) \geq \frac{1}{J} \sum_{j=1}^{J}g(a_j)$$ Filter data.frame rows by a logical condition Central Moments of Symmetric Distributions I am trying to show that the central moment of a symmetric distribution:     $${\bf f}_x{\bf (a+x)} = {\bf f}_x{\bf(a-x)}$$ is zero for odd numbers. So for instance the third central moment $${\bf E[(X-u)^3] = 0}.$$ I started by trying to show that $${\bf E[(X-u)^3] = E[X^3] -3uE[X^2] + 3u^2E[X] - u^3}.$$ I am not sure where to go from here, any suggestions? Is there a better way to go about proving this? Deriving ordered statistics minimum cdf Assume ${{X}_{1}}$, ${{X}_{2}}$, ${{X}_{3}}$,...,${{X}_{n}}$  are i.i.d. samples from distribution with density f, and cdf F.  Let V=min( ${{X}_{1}}$, ${{X}_{2}}$, ${{X}_{3}}$,...,${{X}_{n}}$)  To find the minimum $${B}_{v}={\{V\ge{v}\}}=\{{X}_{1}\ge{v}\}\cap\{{X}_{2}\ge{v}\}\cap...\cap\{{X}_{n}\ge{v}\}$$  So, $$P(V\ge{v})=[1-F(v)]^{n}$$  The cdf is  $$F_{v}(V)=1-[1-F(v)]^{n}$$   The density is $${f}_{v}(V)=\frac{d}{dv}[1-F(v)]^{n}=nf(v)[1-F(v)]^{n-1}$$   To find the density, why did we use $[1-F(v)]^{n}$ instead of $1-[1-F(v)]^{n}$, shouldn't we used the cdf to derive the pdf? I installed some version of Ubuntu on my VMware, but I don't know what version exactly it is. How can I find it out? Usage of -n and -z in test built in - Bash In Windows there is a straightforward "Format" option in a flash drive's right-click pop-up menu. Where's that in Ubuntu? Detecting the onload event of a window opened with window.open How to interpret regression coefficients when response was transformed by the 4th root? I'm using fourth root (1/4) power transformation on my response variable, as a result of heteroscedasticity. But now I'm not sure how to interpret my regression coefficients.   I assume that I would need to take the coefficients to the fourth power when I back-transform (see below regression output). All of the variables are in units of dollar in millions, but I would like to know the change in dollar in billions.    While holding the other independent variable constant, a billion dollar change in fees, on average, leads to a change of 32 (or 32,000 dollars) in collections. I take 0.000075223 * 1000 (to get to billions) ^ 4 = 0.000032. Now do I multiply this number by 1 million or 1 billion (the original unit of the dependent variable is in millions)?  lm(formula = (Collections^(1/4)) ~ Fees + DIR)                   Estimate      Std. Error  t value            Pr(&gt;|t|) (Intercept)   2.094573355     0.112292375   18.653  0.0000000000000151 Fees        **0.000075223   **0.000008411    8.943  0.0000000131878713 DIR           0.000022279     0.000004107    5.425  0.0000221138881913 If $$\tan(\frac{\pi}{4}+\frac{\theta}{2})=\tan^3(\frac{\pi}{4}+\frac{\alpha}{2})$$, then prove that $$\sin \theta=\frac{3 \sin \alpha+\sin^3 \alpha}{1+3\sin^2 \alpha}$$  I tried using the fact that  $\frac{\cos A}{1-\sin A}=\tan(\frac{\pi}{4}+\frac{A}{2})$ but now not able to eliminate $\cos \alpha$ and $\cos \theta$. How should I proceed? Linearization of PDE: $0$ is an eigenvalue since all translates of travelling waves are also travelling waves