Search for a word inside a string in C
How to find string position within another string in C recursively?
MacOS High Sierra: An error occurred while verifying firmware What is the quickest way to send some text from desktop\laptop to iPhone? I usually send emails to myself, but I wonder if there is a better way to share something quickly from my PC\laptop to iPhone. Transformation of Random Variable $Y = X^2$ I'm learning probability, specifically transformations of random variables, and need help to understand the solution to the following exercise:      Consider the continuous random variable $X$ with probability density function $$f(x) = \begin{cases} \frac{1}{3}x^2 \quad  -1 \leq x \leq 2, \\ 0 \quad \quad \text{elsewhere}. \end{cases}$$ Find the cumulative distribution function of the random variable $Y = X^2$.   The author gives the following solution:   For $0 \leq y \leq 1: F_Y(y) = P(Y \leq y) = P(X^2 \leq y) \stackrel{?}{=} P(-\sqrt y \leq X \leq \sqrt y) = \int_{-\sqrt y}^{\sqrt y}\frac{1}{3}x^2\, dx = \frac{2}{9}y\sqrt y.$  For $1 \leq y \leq 4: F_Y(y) = P(Y \leq y) = P(X^2 \leq y) \stackrel{?}{=} P(-1 \leq X \leq \sqrt y) = \int_{-1}^{\sqrt y}\frac{1}{3}x^2\, dx = \frac{1}{9} + \frac{1}{9}y\sqrt y.$  For $y &gt; 4: F_{Y}(y) = 1.$    Previous to this exercise, I've managed to follow the solutions of two similar (obviously simpler) problems for a strictly increasing and strictly decreasing function of $X$, respectively. However in this problem, I don't understand the computations being done, specifically:    How does the three intervals $0 \leq y \leq 1$, $1 \leq y \leq 4$ and $y &gt; 4$ are determined? In the two previous problems I've encountered, we only considered one interval which was identical to the interval where $f(x)$ was non-zero. In the case where $0 \leq y \leq 1$, why does $P(X^2 \leq y) = P(-\sqrt y \leq X \leq \sqrt y)$ and not $P(X \leq \sqrt y)$? I have put question marks above the equalities that I don't understand.   I think I have not understand the theory well enough. I'm looking for an answer that will make me understand the solution to this problem and possibly make the theory clearer. Have there been any anime with actual product placement? In Steins;Gate, Dr. Pepper is mentioned several times as the "An Intellectual Drink, For The Chosen Ones".    I've seen a lot of other shows that have stores or products with similar names to the real-life brand, so that the producers can avoid copyright issues.     Even though the inclusion of Dr.Pepper wasn't asked for by the Dr.Pepper company, after the release of Steins;Gate the sales in Japan for Dr.Pepper shot up. .   Have there been any anime where a company has paid for their product to be included in the show? It is often stated that the Lagrangian formalism and the Hamiltonian formalism are equivalent.   We often hear people talk about eigenvalues of Hamiltonians but I have never ever heard a word about eigenvalues of Lagrangians.   Why is this so? Is it not useful? is it not possible to do it? What's the English equivalent of the Japanese saying, “A fart ruins 100 days of sermons by the priest (bishop)”? I was amused by the expression "Paid a penny and only farted" (related by @FumbleFingers), which suggested a similar Japanese saying: 大山鳴動鼠一匹 - "Find only a small mouse coming out after hearing rumblings and experiencing shaking of the big mountain."  It’s humorous. I chuckled when I read it, and I wrote to the author that I love it.  With that said, the word "fart" reminds me of another Japanese proverb, 百日の説法屁一つ- "A fart ruins 100 days of sermons by the priest", which means that a small mistake (the sound of a fart in front of the congregation) brings all his efforts to naught.  It can’t happen in big Western churches. But it could well happen in a small wooden temple where a priest would preach to 30 – 50 provincial followers. Can you imagine how the proud priest being called 'the venerable' would be embarrased when his loud fart is heard by all his followers during his serious sermon and they start to giggle here and there in the hall?  We also have a similar saying" 九仞の功を一簣に欠く, which literally means "Collapse a 9- meter sand tower with the last pile of sand."  What is the English equivalent of the saying "A fart ruins 100 days of sermons by the priest (bishop): a small mistake depreciates the value of (vitiates) all labor and effort to naught," preferably in such a humorous way? Exactly half of the elements of $\mathcal{P}(A)$ are odd-sized What exactly happened with Dr. Crusher's husband and Captain Picard? Stop inserting hard line-wraps in blockquotes! When you use the markdown editor's blockquote feature (the quote button / Ctrl+Q), it inserts hard line-wraps in the markdown source automatically for you. That is, it transforms text like this:  Hindus regard it as an earthly manifestation of the goddess Tulsi, a consort of the god Vishnu.   The offering of its leaves is mandatory in ritualistic worship of Vishnu and his forms like Krishna and Vithoba.   Into text like this:  &gt; Hindus regard it as an earthly manifestation of the goddess Tulsi, a &gt; consort of the god Vishnu.  &gt;  &gt; The offering of its leaves is mandatory in ritualistic worship of &gt; Vishnu and his forms like Krishna and Vithoba.   The editor should instead transform it into this:  &gt; Hindus regard it as an earthly manifestation of the goddess Tulsi, a consort of the god Vishnu.  &gt;  &gt; The offering of its leaves is mandatory in ritualistic worship of Vishnu and his forms like Krishna and Vithoba.   That is, without adding any newlines.   Why on earth does it insert hard line-wraps!? Both these forms look the same when rendered, but the current way makes it more difficult for us to go back and edit the blockquoted text later if need be.   This is particularly objectionable functionality for sites that use MathJax - while the hard line-wraps don't impact the rendered output, the additional &gt; that are inserted do (they manifest as greater-than signs if they get inserted within MathJax $$...$$). See this post on Meta.Math.SE for more details: .    I found  that this behavior is apparently :      The "reflow the text when you click blockquote" is a deliberate feature, intended to improve the readability on quoted text.   Seriously? Are there any browsers that don't soft-linewrap textareas anymore? How is hard-wrapping at 70(?) characters better than soft-wrapping at $textareawidth? If readability is the concern here, then why not hard-wrap all non-code upon post submission? Next badge select dialog broken The "Select your next badge" dialog box is not displaying correctly. It looks like this:    Freehand circles, as requested:    It seems to be an issue with box-sizing, because when it's content-box, it looks fine. I think the width and height rules for .popup-badges .all-badge-progress .badge-progress should be increased a little, for example:  .popup-badges .all-badge-progress .badge-progress {   width: 214px;   height: 96px; }   Tested on the latest Chrome and Firefox on Linux Mint. Prove that if a number $n > 1$ is not prime, then it has a prime factor $\le \sqrt{n}$. Is there a way to send a file using POST from a Python script? Hydrogen radial wave function infinity at $r=0$ If $A$ commutes with $B$ and $B$ commutes with $C$, then $A$ commutes with $C$ Let $A,B,C \in \ M(3,\mathbb{R})$ be such that $A$ commutes with $B $and $B$ commutes with $C$. $B$ is not scalar matrix. Then, $A$ commutes with $C$.   Is this true or false? I think it is not true, but cannot think of a counterexample. Any suggestions? Here is a sentence excerpted from ,     Teen suicide is a growing health concern. It is the third-leading cause of death for young people ages 15 to 24, surpassed only by homicide and accidents, according to the U.S. Center for Disease Control and Prevention.   I've heard people use both "people aged from X to Y" and "people ages from X to Y" quite often, but I've always been believing that only the former is grammatically correct, whereas in the latter the "ages" doesn't seem to serve as any grammatical component of this sentence. So when I see an APA paper use "ages" in that way, I am just quite surprised: I just can't believe such an authoritative and rigourous academic institution will let such an explicit (and indeed naive, even to a non-native speaker's eyes) grammatical mistake survive in their publications. I'm aware that in daily language usage one ought not to become so fussy over insignificant matters like this, but I do wonder whether it should be paid attention to in academic writings.  OR, using "ages" in that way is no longer considered a grammatical mistake? Honestly I don't think this'd be true, but if it really is, I'd be grateful to be informed. Thanks! Number of ways to distribute 5 distinguishable balls between 3 kids such that each of them gets at least one ball How many ways are there to distribute 5 distinguishable balls between 3 kids such that each of them gets at least one ball?   My approach is $ \binom{5}{3} 3! $ + $ \binom{2}{2} \binom{3}{2}2!$ which is equal to $66$? Let $\{a_n\}$ be defined as follows: $$a_1 = 2, a_{n+1}=\dfrac{1}{3-a_n}$$ $n \geq 1$.   Does $\{a_n\}$  converge?    Using the monotone convergence thereom, if the sequence is both bounded below and decreasing, $\forall n\in\mathbb{N}, n\geq 1$, then we can say the sequence converges.  I'm having trouble proving that the sequence is bounded below by induction.    Claim: The sequence is bounded below by $0$.  Base Case:  $n=1$  $a_1 = 2 \geq 0$, so this holds.  Induction Step  Suppose that $a_k \geq 0$, for some $k \in\mathbb{N}$. (IH)  Prove $a_k \geq 0\to a_{k+1} \geq 0$  I have some difficulty here.  $a_{k}=\dfrac{1}{3-a_{k-1}} \geq 0$  $a_{k+1}=\dfrac{1}{3-a_{k}}$, but we know $a_k \geq 0$, but we don't know how much bigger. It could be that $a_k = 4$, and then I have $a_{k+1}=\dfrac{1}{3-4}$, which is negative, and does not confirm with my claim of being bounded below by $0$. Have I gone somewhere wrong in my induction? What makes induction (over natural numbers) a valid proof technique? Is $$ \dfrac{ P(0) \quad \forall i \in \mathbb{N}. P(i) \Rightarrow P(i+1) }{ \forall n \in \mathbb{N}.  P(n)} $$ just taken for granted as a proof rule, or can it be derived from more foundational axioms?  Similarly, can the principle of induction over well-founded sets be derived from something more foundational, or does it have to be assumed to be a valid inference rule? $\left|x_{n+1} - x_n\right| < C\left|x_n - x_{n-1}\right|$ prove this is Cauchy What happened to these edits (and the associated reputation)? My reputation rating on SO took this hit an hour ago, and it is due to what appears to be the simultaneous deletion of multiple questions.  I am uncertain why it happened, am concerned, and would appreciate an explanation.  Going to  shows that it was removed due to moderation.  Was a script run deliberately, or were we hit with a question deletion attack; what happened?  -12     today -2  1 hour ago  removed     How to send a 2d Vector over UDP in c++ -2  1 hour ago  removed     How do I use the Eclipse debugger to debug a Java application? -2  1 hour ago  removed     PHP string error; inconsistency with local and server -2  1 hour ago  removed     Unable to start the MySQL service after a server migration -2  1 hour ago  removed     How to use Java to print a text file on a ticket printer? -2  1 hour ago  removed     How can all of the ZBrush Obj files be imported to make a complete model?