How to play sound when the counter is equal to zero?
Play a Sound with Python
When did our universe and the Star Trek universe diverge? Note that my question assumes as a given that Star Trek is in an alternate universe which diverged from ours at some point in history.  That seems really, really obvious and undeniable to me.  So the question then becomes: at what point in time did the two universes diverge and have different histories? Any Video formats that render with Alpha Channel? Does anyone know if there are any video formats (besides the HUGE uncompressed avis) that you can render in that maintain the alpha channel? (i.e. for after FX etc.)   I used to use quicktime, but that's no longer an option.  I know you can render in png. or other image formats, but video is significantly smaller, and I often work on machines with less space &amp; resources. I often find myself adding a lot of \textsl{} around inside \emph{} or \textit{} blocks because I find italicized digits to look too "showoffy" and "baroque" and to hinder legibility (I'm using $$ when the number has a mathematical sense, but this situation occurs in less technical texts like CVs, and such.).  Could someone help me write a renewcommand to automate this, or better, a single low level command that makes \emph, \itshape, \textit and friends choose slanted over italic for numbers? I'm not too familiar with the low level latex font selection system nor with a way to detect digits from regular letters.  Edit: MWE of what I need and what I want to avoid  \documentclass{article} \begin{document} He thought: '\emph{Why 1234567890 apples?}' then he realized '\emph{ah yes, he has \textsl{1234567890} childs}' \end{document}   gives:   I find the italicized version (first one) of 2,3,4 and 7 to look especially bad. If I pass PHP variables with . in their names via $_GET PHP auto-replaces them with _ characters. For example:  &lt;?php echo "url is ".$_SERVER['REQUEST_URI']."&lt;p&gt;"; echo "x.y is ".$_GET['x.y'].".&lt;p&gt;"; echo "x_y is ".$_GET['x_y'].".&lt;p&gt;";   ... outputs the following:  url is /SpShipTool/php/testGetUrl.php?x.y=a.b x.y is . x_y is a.b.   ... my question is this: is there any way I can get this to stop? Cannot for the life of me figure out what I've done to deserve this  PHP version I'm running with is 5.2.4-2ubuntu5.3. Is there a way to recover deleted data from a SSD / USB Flash drive?  All I could find were recovery for damaged drives, but I want to recover deleted data.  So how do I do this? I'm working through Exercise 40 from section 1.2.3 of Knuth's The Art of Computer Programming volume 1, but am finding myself unable to produce a rigorous proof, and the one  is suspect and not quite clear enough (for me, at least) in some of the steps; in particular, how to "[identify] the $k$th order coefficient in [the] two polynomials."  The problem is this: given a Vandermonde matrix $[x_j^i]_n$, show that the inverse is given by  $$ [b_{ij}]_n = \left[ \frac{    \sum_{\substack{1 \leq k_1 &lt; \dotsc &lt; k_{n-j} \leq n\\k_1,\dotsc,k_{n-j} \neq i}} (-1)^{j-1} x_{k_1} \dotsc x_{k_{n-j}} }{    x_i \prod_{\substack{1 \leq k \leq n\\k \neq i}} (x_k - x_i) } \right]_n\text{.} $$  The author gives a hint by stating that the sum in the above numerator is just the coefficient of $x^{j-1}$ in the polynomial $(x_1-x)\dotsc(x_n-x)/(x_i-x)$; and he gives an intermediate result showing the explicit multiplication of the matrix and its inverse as  $$    \sum_{1 \leq t \leq n}b_{it}x_j^t    =    \frac{       x_j \prod_{\substack{1 \leq k \leq n\\k \neq i}} (x_k - x_j)    }{       x_i \prod_{\substack{1 \leq k \leq n\\k \neq i}} (x_k - x_i)    }    =    \delta_{ij}\text{.} $$  The only other hint as to the type of solution he was expecting is a reference to A. de Moivre's The Doctrine of Chances, 2nd edition, pp. 197-199, which deals with polynomial recurrence relations and difference products (available ).  At the least, I was just hoping someone could either verify the proof is correct at proofwiki and possibly fill in exactly how one identifies the $k$th order coefficient in the proof; or perhaps explain a proof strategy as to what steps to take where the intermediate result is obtained at some point before the final result.  Thanks so much for any help. Let's say I have some data, and then I fit the data with a model (a non-linear regression). Then I calculate the R-squared ($R^2$).  When R-squared is negative, what does that mean? Does that mean my model is bad? I know the range of $R^2$ can be [-1,1]. When $R^2$ is 0, what does that mean as well? Cosine of the sum of two solutions of trigonometric equation $a\cos \theta + b\sin \theta = c$ Question: If $\alpha$ and $\beta$ are the solutions of $a\cos \theta + b\sin \theta = c$, then show that: $$\cos (\alpha + \beta) = \frac{a^2 - b^2}{a^2 + b^2}$$  No idea how to even approach the problem. I tried taking two equations, by substituting $\alpha$ and $\beta$ in place of $\theta$ in the equation and manipulating them, but that didn't get me anywhere. Please help! Intensity of light If we have 2 beams of light with equal intensities, but with different frequencies, wouldn't the one with the higher frequency generate more power?  If so, how come the intensity, which is in $W/m^2$, of the higher frequency beam is not higher? When I create a UV sphere and add the subdivision surface modifier, the following wrinkle appears.    How can I avoid it?  I've read the article  but there seems to be no clear solution.  UPDATE 1  I've used the word 'apply' in the first sentence of the initial version of this question. It's misleading since I want to preserve the modifier without 'applying' it. Rather, what I meant is 'adding' the modifier.  UPDATE 2  I followed josh sanfelici's solution, but still there is an artifact at the pole.  Here is the screen: (A rendered view with a sun lamp)    Maybe it's the limitation of the general-purpose subdivision modifier.  BTW, when the cast modifier is added after the subdivision modifier, the sphere becomes perfect (even for my original wrinkled sphere).  But since I want to edit the resulting sphere (for example, scaling X, Y, etc) while modifier is added but not applied, it's not usable. I tried using integration by parts twice, the same way we do for  $\int \sin {(\sqrt{x})}$ but in the second integral, I'm not getting an expression that is equal to  $\int x\sin {(\sqrt{x})}$.  I let $\sqrt x = t$ thus, $$\int t^2 \cdot \sin({t})\cdot 2t dt =  2\int t^3\sin(t)dt = 2[(-\cos(t)\cdot t^3 + \int 3t^2\cos(t))] = 2[-\cos(t)\cdot t^3+(\sin(t)\cdot 3t^3 - \int 6t \cdot \sin(t))]]$$  which I can't find useful. Colored borders around windows after update After some gorgeous updates I witness this: Why more (and varying number of) logical reads with read ahead (prefetch)? After creating tpch database in my SQL Server, I tried below query:      set statistics io on     DBCC DROPCLEANBUFFERS;             select top 100 * from dbo.lineitem order by l_partkey;   The table lineitem has a non-clustered index on l_partkey. I issued the above queries for several times and found out that the logical reads vary each time:      Table 'lineitem'. Scan count 1, logical reads 1019, physical reads 4, read-ahead reads 1760, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.     Table 'lineitem'. Scan count 1, logical reads 1007, physical reads 4, read-ahead reads 1720, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.     Table 'lineitem'. Scan count 1, logical reads 1030, physical reads 4, read-ahead reads 1792, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.   From the post here: , I know it could be caused by read ahead behavior.  BUT exactly why read ahead could cause more logical reads? How does it change the SQL Server behavior? Like SQL Server may read more index page since it's in cache anyway?  Anyway, I disabled read ahead and issue the above query again. Now it reports the same amount of logical reads each time. BUT the logical reads is much smaller!!      Table 'lineitem'. Scan count 1, logical reads 404, physical reads 160, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.   So my question is, why the read ahead feature could cause many more and various logical reads count?  Out of curiosity, I tried another query without the "order by":      select top 100 * from dbo.lineitem   Here's the result without read ahead:      Table 'lineitem'. Scan count 1, logical reads 5, physical reads 3, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.   Here's the result with read ahead:      Table 'lineitem'. Scan count 1, logical reads 15, physical reads 2, read-ahead reads 3416, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.   The one with read ahead still has more logical reads. So, why? Does it feel lately like all questions have already been asked and answered and there is nothing more to do? I think everybody with a history of participation can't help but notice the explosive growth of repeated duplicate questions. The work of looking for duplicates and then closing questions has overtaken the work of actually answering questions.  It's become virtually impossible to ask something which hasn't been yet asked. Lately I feel boredom each time I see a new question and start answering it only to realize after the first written sentence that I have answered similar questions five times over or seen them answered some ten times or more. I know where it's going to be going and what answers with what votes it is going to receive before any answer is even written.  It's obviously not the administration's fault, it is simply so. The questions is, what to do about it? Engaging more moderators to close and close duplicates won't work because it's already starting to repel users who get mad at their questions closed and become afraid of asking more or perhaps just go away.  The original idea of Jeff stated the the site is for questions that can be answered. Meaning no open-ended discussions. When I first read this I had a casual thought - well, and what's gonna happen when they all are asked and answered? Will it become a museum, a monument of wisdom and knowledge or what?  I'm not sure what to do about it. Perhaps deprecation/versioning of older questions so that their new versions can sparkle the tiresome evening...  POSTSCRIPTUM.  I recall Star Trek Voyager episode  when another Q asked Captain Janeway for asylum. He was tired of immortality and wanted to die. They opened a hearing and went on to visit the continuum to evaluate the living conditions there which caused the suffering and the wish to escape it in death. A lifeless picture presented itself to the visitors... a house lone in an open space, two people going about their business, nobody talking. When asked why they were silent, the following was said. It's been so long, all has already been said, all stories told, all jokes are made... there is nothing left to do...  Are we there as well?  UPDATE: Just saw this answer in another question:       Also, some of the core questions got asked early on in the life of the site. Great questions still come around from time to time, but many have already been asked.   Doesn't that confirm my point? How can I analytically prove that randomly dividing an amount results in an exponential distribution (of e.g. income and wealth)? In this current  the following is being proposed:      Suppose you randomly divide 500 million in income among 10,000   people. There's only one way to give everyone an equal, 50,000 share.   So if you're doling out earnings randomly, equality is extremely   unlikely. But there are countless ways to give a few people a lot of   cash and many people a little or nothing. In fact, given all the ways   you could divvy out income, most of them produce an exponential   distribution of income.   I have done this with the following R code which seems to reaffirm the result:  library(MASS)  w &lt;- 500000000 #wealth p &lt;- 10000 #people  d &lt;- diff(c(0,sort(runif(p-1,max=w)),w)) #wealth-distribution h &lt;- hist(d, col="red", main="Exponential decline", freq = FALSE, breaks = 45, xlim = c(0, quantile(d, 0.99)))  fit &lt;- fitdistr(d,"exponential") curve(dexp(x, rate = fit$estimate), col = "black", type="p", pch=16, add = TRUE)     My question How can I analytically prove that the resulting distribution is indeed exponential?  Addendum Thank you for your answers and comments. I have thought about the problem and came up with the following intuitive reasoning. Basically the following happens (Beware: oversimplification ahead): You kind of go along the amount and toss a (biased) coin. Every time you get e.g. heads you divide the amount. You distribute the resulting partitions. In the discrete case the coin tossing follows a binomial distribution, the partitions are geometrically distributed. The continuous analogues are the poisson distribution and the exponential distribution respectively! (By the same reasoning it also becomes intuitively clear why the geometrical and the exponential distribution have the property of memorylessness - because the coin doesn't have a memory either). I was trying to solve the following:  Given: $0 &lt; a &lt; b$ and $n&gt;1$, prove: $$na^{n-1}(b-a) &lt; b^n-a^n &lt; nb^{n-1}(b-a)$$  I managed to get this far using the mean value theorem: $$a^n(b-a)&lt;b^n -a^n&lt;b^n (b-a)$$ Any idea how to continue? Can a sequence which decays more slowly still yield a converging series? In Bergman's companion notes to Rudin, he says that "If a sequence of positive terms has convergent sum, so does every sequence of positive terms which decays more rapidly." So given a sequence $\{a_n\}$ of positive terms such that $\sum_n a_n$ converges, if $\{b_n\}$ is such that $$ \lim_{n\to\infty} \frac{a_n}{b_n} = +\infty, $$ then $\sum_nb_n$ converges. I can prove this given $\{a_n\}$ and $\{b_n\}$. However, can we find $b_n$ which decays more slowly, i.e. $$ \lim_{n\to\infty} \frac{b_n}{a_n} = +\infty $$ such that $\sum_n b_n$ converges?  Similarly, we have the claim "if a sequence of positive terms has divergent sum, then so does every sequence of positive terms which decays more slowly." Installing particular versions when repo has newer versions? A Polygon is inscribed in a circle $\Gamma$ A regular polygon P is inscribed in a circle $\Gamma$. Let A, B, and C, be three consecutive vertices on the polygon P, and let M be a point on the arc AC of $\Gamma$ that does not contain B. Prove that  $MA\cdot MC=MB^2-AB^2$  I inscribed the polygon P in the unit circle and let B=1. Past this, I'm not really sure how to proceed. It might be helpful to have M at 1 as well but given that the polygon would have the n-th roots of unity in it B seemed like a good choice. What would be a good way to proceed from here? Integrate : $\int \frac{x^2}{(x\cos x -\sin x)(x\sin x +\cos x)}dx$ $$\int \frac{x^2}{(x\cos x -\sin x)(x\sin x +\cos x)}\ dx$$   My approach :   Dividing the denominator by $\cos^2x$ we get $\dfrac{x^2\sec^2x }{(x -\tan x)(x\tan x +1)}$ then  $$\int \frac{x^2\sec^2x}{x^2\tan x -x\tan^2x+x-\tan x}\ dx=\int \frac{x^2(1+\tan^2x)}{x^2\tan x -x\tan^2x+x-\tan x}dx$$  But I am not getting any relation between numerator and denominator so that I will take any substitution and solve further please suggest whether it is correct and how to proceed in this. Thanks.