Value of $1/e$ with the partial sum of $e$
Why does the Taylor expansion of $e^x$ satisfy exponential properties?
How to handle a lost KeyStore password in Android? While explaining to my nephew about the physics of light, I told him we cannot see infrared color, and he kicked back with a very simple question: why can't we see it? I could not tell him. Is the human eye unable to sense such light or can it indeed but the brain can't understand the signal? any other reason? How do I transfer my Destiny account from Xbox 360 to Xbox One? I'm looking to find records in a table that match a specific number that the user enters.  So, the user may enter 12345, but this could be 123zz4-5 in the database. I imagine something like this would work, if PHP functions worked in MySQL. SELECT * FROM foo WHERE preg_replace(&quot;/[^0-9]/&quot;,&quot;&quot;,bar) = '12345'  What's the equivalent function or way to do this with just MySQL? Speed is not important. ViewPager as a circular queue / wrapping What identifies an action-reaction pair of forces? This is a question on a worksheet that I'm giving to a student:  A man of weight $W$ steps into the lift. The lift then moves downwards with a constant speed. If $R$ represents the force acting on the man by the lift floor, which of the following statements is/are correct? (3) $R$ and $W$ are an action-reaction pair according to Newton's third law  Why isn't this statement (3) correct? best way to pick a random subset from a collection? I have a set of objects in a Vector from which I'd like to select a random subset (e.g. 100 items coming back; pick 5 randomly). In my first (very hasty) pass I did an extremely simple and perhaps overly clever solution:  Vector itemsVector = getItems();  Collections.shuffle(itemsVector); itemsVector.setSize(5);   While this has the advantage of being nice and simple, I suspect it's not going to scale very well, i.e. Collections.shuffle() must be O(n) at least. My less clever alternative is  Vector itemsVector = getItems();  Random rand = new Random(System.currentTimeMillis()); // would make this static to the class      List subsetList = new ArrayList(5); for (int i = 0; i &lt; 5; i++) {      // be sure to use Vector.remove() or you may get the same item twice      subsetList.add(itemsVector.remove(rand.nextInt(itemsVector.size()))); }   Any suggestions on better ways to draw out a random subset from a Collection? I have studied that every normed space $(V, \lVert\cdot \lVert)$ is a metric space with respect to distance function  $d(u,v) = \lVert u - v \rVert$, $u,v \in V$.   My question is whether every metric on a linear space can be induced by norm? I know answer is  no but I need proper justification.   Edit: Is there any method to check whether a given metric space is induced by norm ?  Thanks for help How to fix the incompatility between BiBer and BiBLaTeX versions in TeXmaker? How do I add PHP code/file to HTML(.html) files? Can you be refused a visitor visa to US if you have bad Credit there? Is there a more complete way of proving this theorem (that I devised)? OR does this theorem already exist and have a name? Last night, I was working on re-solidifying my understanding of parametric equations, and came up with a neat trick for evaluating certain definite integrals. I'm not sure if it exists as a formal theorem, though I refuse to believe I'm the first to notice such a relation. The 'theorem' is a useful trick to evaluate the definite integral of a continuous function over an interval where the function is either strictly increasing or strictly decreasing, given that the inverse of the function is 'nicer' to work with than the function itself. My idea goes as follows:  If $y = f(x)$ is a continuous function over the interval $I$, and either:  $f'(x) &gt; 0$   OR   $f'(x) &lt; 0$   for all values of $x \epsilon I$, then:  $\int_{a}^{b}{f(x)dx} = bf(b) - af(a) - \int_{f(a)}^{f(b)}{f^{-1}(x)dx}$  where $a,b \epsilon I$  Quasi-proof:  Clearly, if a function is strictly increasing or decreasing, it is injective. This is clear because no two values in the domain can correspond to a single value in the range. I feel intuitively that it must also be surjective (though I'm not entirely sure how to prove this part). Assuming it is both injective and surjective over $I$, the function must have an inverse.   If we were to draw two rectangles out of our bounds, they will have areas:  $af(a)$ and $bf(b)$, so that   $bf(b) - af(a)$ will be the area of the region we are observing.  This area is equivalent to the sum of the areas connecting the curve $f(x)$ to the $x$-axis and to the $y$-axis. Thus:  $bf(b) - af(a) = \int_{a}^{b}{f(x)dx} + \int_{f(a)}^{f(b)}{f^{-1}(x)dx}$  Solving for $\int_{a}^{b}{f(x)dx}$, we get:  $\int_{a}^{b}{f(x)dx} = bf(b) - af(a) - \int_{f(a)}^{f(b)}{f^{-1}(x)dx}$  A particularly illuminating example is evaluating:  $\int_{a}^{b}{ln(x)dx}$  $ln(x)$ is strictly increasing over any interval, so the 'theorem' applies.  $\int_{a}^{b}{ln(x)dx} = bln(b) - aln(a) - \int_{ln(a)}^{ln(b)}{e^xdx}$  $\int_{a}^{b}{ln(x)dx} = ln(b^b/a^a) - (e^{ln(b)} - e^{ln(a)})$  $\int_{a}^{b}{ln(x)dx} = ln(b^b/a^a) + a - b$  and so we've evaluated the integral without the need of integrating the function itself (by method of integration by parts), but rather by integrating its inverse, which is trivial to evaluate.!  Response to Jason DeVito's answer: [This image was taken from   () How do you attach a debugger to a Web service? I am using a Web service. Can anybody tell me how to debug through it? How do I expire by type in .htaccess for remote loaded Google fonts? Is it possible to set expire by type for remote fonts or Google analytics? I'm getting this report from GTMetrix and everything I've tried isn't working. Suggestions?  There are 4 static components without a far-future expiration date. http://fonts.googleapis.com/css?family=Open+Sans:300 http://fonts.googleapis.com/css?family=Roboto&amp;subset=latin,latin-ext http://www.google-analytics.com/ga.js http://www.google-analytics.com/analytics.js   All of my other expires are working fine.  But apparently this type of thing isn't right?  ExpiresByType application/x-font-woff "access 1 year" ExpiresByType application/font-woff "access 1 year"   What should I do? How do I apply differential cryptanalysis to a block cipher? I have read a lot of summaries of block ciphers particularly with regards to the NIST competitions stating that reduced-round block ciphers are – for example – vulnerable to differential cryptanalysis.  I have a general idea that the application of differential cryptanalysis is to look at the difference between inputs;  makes that fairly clear. However, I could take any two inputs for any given block cipher and I am pretty certain I'd be staring at random differences.    I am aware this is the idea of a well written block cipher; however, assuming a broken or vulnerable cipher (feel free to provide simple examples) how do I go about choosing differences to try?  Are there any clues in algorithm design that would inform a decision on which values to choose?  How does being vulnerable to differential cryptanalysis impact a cipher in the wild?  If all I have are differences between known plain-texts and known keys as my analysis and a captured ciphertext as my data to exploit, what can I actually deduce? Variance of Normal Order Statistics Suppose we have $X_1, \cdots, X_n \overset{\textrm{i.i.d.}}{\sim} \mathcal{N}(0, 1)$ with $n &gt; 50$, and let $X_{(1)}, \cdots, X_{(n)}$ be the associated order statistics. Are there any references pointing to formulas that specify (or estimate) the variance of the $k^{\textrm{th}}$ order statistic, i.e. $\textrm{Var}(X_{(k)})$, for $1 \leq k \leq n$? I am looking for formulas can be explicitly evaluated without resorting back to numerical integration.  I have seen this question: , which attracted a number of answers on approximate formula for the mean of the $k^{\textrm{th}}$ order statistic, e.g. Blom (1958) (and modifications based on work by Harter (1961) and Elfving (1947)). Searching on Google also yields a number of work on the variance / standard deviation for the $k^\textrm{th}$ order statistics for small $n$, all of them opting for a computation/tabulation route. They are: Godwin(1949), Teichroew (1956), and Parrish (1992). I have also attempted to derive something myself following the method sketched by @probabilityislogic in , along the lines of: $$\textrm{Var}(X_{(k)}) = \int_{-\infty}^{\infty} \left(x-\mathbb{E}(X)\right)^2 \frac{n!}{(k-1)!(n-k)!} f_X(x)[1-F_X(x)]^{n-k}[F_X(x)]^{k-1}\;\textrm{d}x,$$ with lower case $f$ denoting the PDF of a r.v. $X$, and upper case $F$ denoting the CDF. Noting $x = F^{-1}(F_X(x))$ and using the substitution $u = F_X(x)$ (with corresponding r.v. in upper case $U$), we have: $$\textrm{Var}(X_{(k)}) = \int_{0}^{1} \left(F_X^{-1}(u) - \mathbb{E}\left(F_X^{-1}(U)\right)\right)^2\,\mathcal{B}(u | k, n-k+1) \; \textrm{d}u,$$ where $\mathcal{B}$ denotes the PDF of a beta distribution (not the beta function). This can be rewritten as the variance based on the beta distribution: $$\textrm{Var}(X_{(k)}) = \textrm{Var}_{\mathcal{B}(u | k, n-k+1)}\left(F_X^{-1}(u)\right).$$ Approximating the RHS using (the variance bit of the) delta method, we get: $$\textrm{Var}_{\mathcal{B}(u | k, n-k+1)}\left(F_X^{-1}(u)\right) \approx \textrm{Var}_{\mathcal{B}(u | k, n-k+1)}(U) \cdot \left[(F_X^{-1})'\left(\mathbb{E}_{\mathcal{B}(u | k, n-k+1)}(U)\right)\right]^2,$$ where the prime denotes the derivative. The first term of the product is standard result. For the second part, given $(F^{-1})'(\cdot)=\frac{1}{f(F^{-1})(\cdot)}$ (see e.g. ), we then have: $$\textrm{Var}_{\mathcal{B}(u | k, n-k+1)}\left(F_X^{-1}(u)\right) \approx \frac{k(n-k+1)}{(n+1)^2(n+2)} \frac{1}{\left(f\left(F^{-1}\left(\frac{k}{n+1}\right)\right)\right)^2}.$$ Substituting in the standard normal distribution ($\phi$ for PDF, $\Phi$ for CDF) and scaling it to the desired variance $\sigma^2$ we arrive at: $$\textrm{Var}(X_{(k)}) \approx \frac{k(n-k+1)}{(n+1)^2(n+2)} \frac{1}{\left(\phi\left(\Phi^{-1}\left(\frac{k}{n+1}\right)\right)\right)^2},$$ which we can throw in a $\sigma^2$ term in front if it is not a standard normal. But surely someone must have derived that somewhere (again I am looking for some references), and there is a high chance that I have gone off track somewhere above. How does a pharmacy discount card work? Can I invoke Google to check my robots.txt? I read the answers in this question, but they still leave my question open:   I didn't find a way in the Google Webmaster Tools to invoke a re-download of my robots.txt.  Through some error, my robots.txt was replaced with:  User-agent: * Disallow: /   And now all my content was removed from Google search results.  Obviously, I'm interested in correcting this as soon as possible. I already replaced the robots.txt, but I can't find a way to make Google update the cached version. What is the intuition behind defining completeness in a statistic as being impossible to form an unbiased estimator of $0$ from it? I have a script that does a number of different things, most of which do not require any special privileges. However, one specific section, which I have contained within a function, needs root privileges.  I don't wish to require the entire script to run as root, and I want to be able to call this function, with root privileges, from within the script. Prompting for a password if necessary isn't an issue since it is mostly interactive anyway. However, when I try to use sudo functionx, I get:  sudo: functionx: command not found   As I expected, export didn't make a difference. I'd like to be able to execute the function directly in the script rather than breaking it out and executing it as a separate script for a number of reasons.  Is there some way I can make my function "visible" to sudo without extracting it, finding the appropriate directory, and then executing it as a stand-alone script?  The function is about a page long itself and contains multiple strings, some double-quoted and some single-quoted. It is also dependent upon a menu function defined elsewhere in the main script.  I would only expect someone with sudo ANY to be able to run the function, as one of the things it does is change passwords.