What is Cauchy Schwarz in 8th grade terms?

Question: I'm an 8th grader. After browsing aops.com, a math contest website, I've seen a lot of problems solved by Cauchy Schwarz. I'm only in geometry (have not started learning trigonometry yet). So can anyone explain Cauchy Schwarz in layman's terms, as if you are explaining it to someone who has just started geo in 8th grade?
Comment: What is an inner product?
Comment: Sal's video is pretty easy to follow: https://www.khanacademy.org/math/linear-algebra/vectors_and_spaces/dot_cross_products/v/proof-of-the-cauchy-schwarz-inequality
Comment: Cauchy Schwarz says that if $u$ and $v$ are vectors, the part of $v$ that is along $u$ is shorter than all of $v$, and vice versa.
Comment: Do you know what an inner product/ the dot product is?
Comment: The Cauchy Schwarz inequality is an inequality that has to do with norms (like absolute value) and inner products (like the dot product).  If you've never heard of the dot product (or some other inner product) then I'm not sure that the CS inequality will be at all useful to you yet.
Comment: What is the dot product?
Comment: Given two elements of $\Bbb R^n$, $\mathbf v=(v_1, \dots, v_n)$ and $\mathbf w = (w_1, \dots, w_n)$, the *dot product* is given by $\mathbf v \cdot \mathbf w = v_1w_1 + v_2w_2 + \cdots + v_nw_n$.
Comment: I don't know if it'll help you or not (I didn't go over the CS inequality) but I gave two different definitions and some exposition on the dot product in [this answer](http://math.stackexchange.com/questions/1395970/what-is-the-logic-rationale-behind-the-vector-cross-product/1471129#1471129).
Comment: What does the ㅌ (after v, w) before R^n mean?
Comment: $v \in S$ means that $v$ is an element of the set $S$.  For instance $2 \in \Bbb R$ where $\Bbb R$ is the set of all real numbers.
Comment: Vectors are awesome! If you haven't learned them yet, there's a lot to look forward to. (I'm an EE, not a mathematician, use vectors all the time at work.)
Answer: In geometry terms that you can understand, the Cauchy-Schwarz inequality says that:

Among all the parallelograms with sides a and b, the rectangle is the one with the largest area.

Usually you can use this inequality when you are looking for an upper (or lower) bound of an expression.
I wanted to give you an example, but my geometry studies are too far to remember an easy demonstration. Maybe you can ask somebody to give you a compass-and-straightedge demonstration of the equivalence between Cauchy-Schwarz and triangle inequalities.
Comment: +1 for the purely geometric interpretation that anyone can understand. Plus, I never independently saw this interpretation of Cauchy-Schwarz.
Comment: Proof: the area of a parallelogram is base times height. Base is constant, but height is sin(theta) times the side length. The maximum value of sine is 1, where height is the side length, at theta = 90 degrees. If that angle is 90 degrees, the parallelogram is a rectangle.
Comment: @N47 +1 nice answer
Answer: Since you said you browse AoPS, maybe you're interested in math contests. In math contests, the following forms of Cauchy-Schwarz (C-S) inequality are used:
For all $a_i,b_i\in\Bbb R$:
$$\left(a_1^2+a_2^2+\cdots+a_n^2\right)\left(b_1^2+b_2^2+\cdots+b_n^2\right)\ge (a_1b_1+a_2b_2+\cdots+a_nb_n)^2$$
Equality holds if and only if either $a_1=b_1k, a_2=b_2k,\ldots, a_n=b_nk$ for some $k\in\Bbb R$ or $a_1=a_2=\cdots=a_n=0$ or $b_1=b_2=\cdots=b_n=0$.
For all $a_i,b_i\in\Bbb R^+$:
$$\sqrt{a_1+a_2+\cdots+a_n}\sqrt{b_1+b_2+\cdots+b_n}\ge \sqrt{a_1b_1}+\sqrt{a_2b_2}+\cdots+\sqrt{a_nb_n}$$
Equality holds if and only if $\frac{a_1}{b_1}=\frac{a_2}{b_2}=\cdots=\frac{a_n}{b_n}$.
The following is also called Titu's lemma, or Engel's form of C-S inequality (to prove it, multiply both sides by $b_1+b_2+\cdots+b_n$ and apply the first form of C-S inequality):
For $b_i\in\Bbb R^+, a_i\in\Bbb R$:
$$\frac{a_1^2}{b_1}+\frac{a_2^2}{b_2}+\cdots+\frac{a_n^2}{b_n}\ge \frac{(a_1+a_2+\cdots+a_n)^2}{b_1+b_2+\cdots+b_n}$$
with equality if and only if $\frac{a_1}{b_1}=\frac{a_2}{b_2}=\cdots=\frac{a_n}{b_n}$.
The more general is Hölder's inequality:
For all $a_i,b_i,c_i\in\Bbb R$:
$$\left(a_1^3+a_2^3+\cdots+a_n^3\right)\left(b_1^3+b_2^3+\cdots+b_n^3\right)\left(c_1^3+c_2^3+\cdots+c_n^3\right)$$
$$\ge (a_1b_1c_1+a_2b_2c_2+\cdots+a_nb_nc_n)^3$$
The same holds for all $a_i,b_i,c_i,d_i\in\Bbb R$, etc. I.e., any number of arrays $a_i,b_i,c_i,d_i,\ldots$. In general, all these inequalities are called Hölder's inequalities.
Comment: @3.14 : I'd like to apologize on behalf of all of us here for the rude comment by another user (which, I'm glad to see, the moderators have deleted).  I like this question very much, and I hope you'll stick around despite that poor welcome.
Comment: What does the 2 over the 1 on the a and b mean?
Comment: @3.14 $a_1^2=a_1\cdot a_1$. We're applying the [square function](https://en.wikipedia.org/wiki/Square_(algebra)) on $a_1$ (here $1$ is an index, denoting the $1$'st member of the sequence $a_1,a_2,\ldots,a_n$).
Comment: Maybe it would clarify this for the asker if there were an example using two or three dimensional vectors using $x$, $y$, and maybe $z$ instead of indicies.
Comment: @ToddWilcox You can fully use these inequalities in contests without knowing what a vector is. And you can prove them without using vectors as well.
Comment: My suggestion wasn't about vectors but instead about indicies. It was prompted by the asker's confusion about the "2 over the 1 on the a and the b". To be clear, my suggestion was to put in something like $(x^2+y^2)(u^2+v^2)\geq (xu+yv)^2$.
Comment: @mt_ I've edited it. It seems only the exception $(0,0,\ldots,0)$, which is collinear to all vectors, causes problems. It should be ok now.
Comment: yes, it's right that zero is the only exception to what you had before. More briefly you have equality iff the two vectors are linearly dependent, but putting it that way doesn't fit the idea of making it accessible to 8th graders.
Comment: a good answer, +1, but maybe avoid the set membership symbols when writing for 8th graders and laymen in general?
Answer: Imagine that someone is pushing you. By doing so, a force is acting on you. That force has a direction (pointing from the person pushing you toward yourself) and a magnitude (measured by a non-negative real number, the amount of force that person is using to push you). Direction plus magnitude is what is known as a vector. So, somebody is applying a vector upon you. Now, suppose that you choose some direction, without magnitude. Just a direction. Since a direction plus magnitude is a vector, a direction without magnitude is vector with a fixed magnitude (if it's fixed, you can't control it, so effectively it is not there). So, when I say that you choose a direction, I mean you choose a vector whose magnitude is normalized, meaning it's magnitude is 1. Imagine simply you standing in place, someone is pushing you, and you are pointing at some direction. The question is: what is the component of the force acting on you in the direction you are pointing at? Asking the same question: How much will you move in the direction you are pointing at as a result of the person pushing you (in a direction not necessarily the same as the direction you are pointing at)? The Cauchy-Schwarz inequality says: the absolute value of the component of a vector at any given unit direction is bounded by the magnitude of the vector. In your case, the absolute displacement in physical space that you will experience in the direction you are pointing at as a result of someone pushing you is never larger than the total force that person used in order to push you.
Comment: I'm having trouble imagining an 8th grader following a sentence like, "Since a direction plus magnitude is a vector, a direction without magnitude is vector with a fixed magnitude (if it's fixed, you can't control it, so effectively it is not there)."
Comment: This answer boils down to its statement: "the absolute value of the component of a vector at any given unit direction is bounded by the magnitude of the vector". This is spot on - but for an 8-th grader, a picture would complete the story and make this a really good answer.
Comment: "A vector is a magnitude plus a direction, but if we want to talk about just directions, we can consider all of the vectors with a certain magnitude (for instance 1, since it's convenient), leaving only the direction to vary. For any direction, there's a unique vector with magnitude 1 in that direction."
Comment: @djechlin maybe. I wonder what the 8th grader thinks of this discussion.
Comment: "A direction plus a magnitude is a vector, so a direction without magnitude is still a vector, only it has magnitude, which is 'fixed', which means it's not there."
Answer: We denote by $x^{2}$ the number $x\cdot x$. We denote by $s\in S$ the  fact that an element $s$ belongs to a set $S$. For example, $1\in\mathbb{R}$: $1$ belongs to the set of all real numbers.
We will first define some concepts.

To stay simple, we will restrict to a euclidean space
  $\mathbb{R}^{n}$, that is
  $$\mathbb{R}^{n}:=\{(x_{1},x_{2},\dots,x_{n})\,\vert\,x_{1},x_{2},\dots,x_{n}\in\mathbb{R}\}$$
  The elements $(x_{1},x_{2},\dots,x_{n})$ are called vectors or points
  of $\mathbb{R}^{n}$ and have the following properties:

$(x_{1},x_{2},\dots,x_{n})+(y_{1},y_{2},\dots,y_{n})=(x_{1}+y_{1},x_{2}+y_{2},\dots,x_{n}+y_{n})$
$\lambda(x_{1},x_{2},\dots,x_{n})=(\lambda x_{1},\lambda x_{2},\dots,\lambda x_{n})$ where $\lambda$ is some real number.

The terms $x_{1},x_{2},\dots,x_{n}$ are called the components of the vector $(x_{1},x_{2},\dots,x_{n})$.

Example: $\mathbb{R}^{2}$. It is often called "cartesian plane". You probably denote by $(x,y)$ an element of the cartesian plane. As $n$ (in $\mathbb{R}^{n}$) can be arbitrarly big, you may eventually not have enough letters in the alphabet to denote all the components. It is why we prefer the notation $(x_{1},x_{2})$ instead of $(x,y)$. Be aware that $x_{1}$ is the abscissa of $(x_{1},x_{2})$ and $x_{2}$ is the ordinate of $(x_{1},x_{2})$. For example, $(1,2)$ has $1$ for abscissa and $2$ for ordinate. We can represent it as follows:

Actually, $\mathbb{R}^{n}$ is called euclidean when it is equipped with a euclidean distance. Let's define it.

Let $X,Y$ be two points in $\mathbb{R}^{n}$, such that
  $X=(x_{1},x_{2},\dots,x_{n})$ and $Y=(y_{1},y_{2},\dots,y_{n})$. The
  euclidean distance between $X$ and $Y$ is defined as follows:
$$\begin{align}d_{E}(X,Y) &=d_{E}((x_{1},x_{2},\dots,x_{n})\,,\,(y_{1},y_{2},\dots,y_{n}))\\
&=\sqrt{(x_{1}-y_{1})^{2}+(x_{2}-y_{2})^{2}+\dots+(x_{n}-y_{n})^{2}}
\end{align}$$

This is the usual distance you can think about: "the distance as the crow flies between $X$ and $Y$".
Example: $\mathbb{R}^{2}$ equipped with $d_{E}((x_{1},x_{2})\,,\,(y_{1},y_{2}))=\sqrt{(x_{1}-y_{1})^{2}+(y_{1}-y_{2})^{2}}$ is a euclidean space. If we take $(x_{1},x_{2})=(1,2)$ and $(y_{1},y_{2})=(3,-1)$, the distance between $(1,2)$ and $(3,-1)$ is
$$d_{E}((1,2)\,,\,(3,-1))=\sqrt{(1-3)^{2}+(2-(-1))^{2}}=\sqrt{(-2)^{2}+3^{2}}=\sqrt{13}$$
Visually, it gives:

We can define a very useful concept: the scalar product (also called "dot product" or "inner product"):

The scalar product between $X$ and $Y$ is defined as follows:
$$\begin{align}\langle X,Y\rangle &=\left\langle
(x_{1},x_{2},\dots,x_{n})\,,\,(y_{1},y_{2},\dots,y_{n})\right\rangle\\
&=x_{1}\cdot y_{1}+x_{2}\cdot y_{2}+\dots+x_{n}\cdot y_{n}
\end{align}$$
where $x_{i}\cdot y_{i}$ is the usual multiplication of the components
  $x_{i}$ and $y_{i}$ (for all $i=1,2,\dots,n$).

Example: If we take $(1,2)$ and $(3,-1)$ in $\mathbb{R}^{2}$, $\langle (1,2)\,,\,(3,-1)\rangle=1\cdot 3+2\cdot(-1)=3-2=1$. It admits a geometric interpretation but we will not develop it here. It has very interesting properties, but we will not develop them here.

We will call a norm of the vector $X$ and we will denote it $\Vert X\Vert=\Vert(x_{1},x_{2},\dots,x_{n})\Vert$ the square root of the
  scalar product between $X$ and itself:
$$\Vert X\Vert=\sqrt{\langle X\,,\,X\rangle}$$

Example: In $\mathbb{R}^{2}$, the norm of $(1,2)$ is $\Vert (1,2)\Vert\sqrt{\langle (1,2)\,,\,(1,2)\rangle}=\sqrt{1\cdot 1+2\cdot 2}=\sqrt{5}$. You can compute the norm of $(3,-1)$, which is $\Vert (3,-1)\Vert=\sqrt{10}$. Visually, the norm of $(x_{1},x_{2})$ is the euclidean distance between $(x,y)$ and $(0,0)$:

You have know all the required concepts to understand what Cauchy-Schwarz is. We denote by $\vert a\vert$ the absolute value of $a$.

If $X,Y$ are two vectors in a euclidean space $\mathbb{R}^{n}$, then
  we have the following relation, known as the "Cauchy-Schwarz
  inequality":
$$\vert\langle X\,,\,Y\rangle\vert\le\Vert X\Vert\cdot\Vert Y\Vert$$

Which is read "the scalar product between $X$ and $Y$ is less or equal than the product of the norm of $X$ by the norm of $Y$".
Example: In $\mathbb{R}^{2}$, we have shown that $\langle (1,2)\,,\,(3,-1)\rangle=1$ but $\Vert (1,2)\Vert=\sqrt{5}$ and $\Vert (3,-1)\Vert=\sqrt{10}$, so that $1\le\sqrt{5}\sqrt{10}=5\sqrt{2}$ and the Cauchy-Schwarz inequality is verified.
You can actually define the previous concepts in a more general context, but it requires more time (and more concepts.
Comment: Nice LAAARGE intelligently  coloured drawings with displayed unit squares: perfect, +1.
Comment: An excellent introduction.
Answer: Skip if you know what dot products are
Let's say you have two vectors and you want to know how much they line up with each other.
You want something that's really big if they point the same direction and really small if they point in the opposite direction.
Enter the dot product:
$$
\vec{a} \cdot \vec{b} = \left(|\vec{a}|\right) \left(|\vec{b}|\right)\cos{\theta}
$$
...where $\theta$ is the angle between the vectors and where $|\vec{v}|$ is the length of $\vec{v}$.
The dot product does other stuff too, but this is pretty much all you need to understand CS.
Stop skipping!
The Cauchy-Schwarz inequality concerns the absolute value of the dot product.  Because a length must be positive, only the cosine can make the dot product negative.  Therefore:
$$
|\vec{a} \cdot \vec{b}| = \left(|\vec{a}|\right) \left(|\vec{b}|\right)|\cos{\theta}|
$$
Because $0\leq|\cos{\theta}|\leq1$, it is pretty clear that:
$$
\left(|\vec{a}|\right) \left(|\vec{b}|\right)|\cos{\theta}| \leq \left(|\vec{a}|\right) \left(|\vec{b}|\right)
$$
Or equivalently,
$$
|\vec{a} \cdot \vec{b}| \leq \left(|\vec{a}|\right) \left(|\vec{b}|\right)
$$
And that's the Cauchy-Schwarz inequality.
To see it in action, search google for a dot product applet (or use this one).  Make both vectors have length 1.  1*1 is 1, so CS tells us the maximum magnitude of the dot product is 1.  If you swing one of the vectors around (without changing its length), does this seem legit?
So what?
On its own, the CS inequality tells you that two vectors can't line up more than two parallel vectors.  Eventually this will seem pretty elementary if it doesn't already.
However, it is commonly used to prove a lot of other, less easy-to-show things.  Take a look at this wikipedia article for more.
Comment: I believe you have an error sir.  The second equation after  you say "stop skipping"  You include the cosine in the equation.  The purpose of the inequality is to extend the concept of the dot product into n dimensions and the cosine proofs of CS are careful not to reference the angle in n dimensions. The expression may be defeating the purpose. If your proof was correct it would be splashed onto every text book in multivariable calculus instead of the more difficult proofs I am seeing, you may wish to revisit your proof or show me where I am not correct? Thank you
Comment: You're right.  This isn't a proof, but I hope it still provides some intuition
Answer: This answer uses a tiny bit of trigonometry, in the form of the cosine function. All you need to know about the cosine function is that $\cos \phi$ increases from $-1$ to $1$ as $\phi$ goes from $180^\circ$ to $0^\circ$, hitting zero when $\phi$ is $\pm 90^\circ$.
Pick a point in space and call it "the origin." A straight arrow starting at the origin is called a vector. Lots of other things can be called vectors too, but arrows in space are the examples that motivate the whole business.
Two fundamental ideas in geometry are the ideas of length and angle. When talking about arrows, geometers like to package length and angle into a single measurement, called the inner product. The inner product $\langle v, w \rangle$ of two arrows $v$ and $w$ can be defined as
$$\|v\|\|w\| \cos \theta_{v,w},$$
where $\|v\|$ is the length of $v$, $\|w\|$ is the length of $w$, and $\theta_{v,w}$ is the angle between $v$ and $w$. The Cauchy-Schwarz inequality is the fact that
$$\langle v, w \rangle \le \|v\| \|w\|.$$
The Cauchy-Schwarz inequality is totally obvious from the way we defined the inner product, so why does it deserve a name? For three reasons:

The Cauchy-Schwarz inequality is equivalent to the triangle inequality, a fundamental fact about how distances work.
There are other ways to define the inner product between arrows in space, and most of them make the Cauchy-Schwarz inequality much less obvious.
Things other than arrows in space can be called vectors, and the Cauchy-Schwarz inequality is true for them too. For example, sound waves can be called vectors. The "length" of a sound wave is its total energy, and the "angle" between two sound waves is a measurement of how they interfere. The triangle inequality is the fact that when two sounds interfere, the energy of the combined sound can't be greater than the total energy of the two original sounds.
Comment: Note the asker does clarify that they haven't learned Trigonometry yet.
Comment: @ToddWilcox: Whoops, I missed that! I'll edit a bit.
Comment: @ToddWilcox Nonetheless, this might be motivation to learn some. To have  C-S without trigonometry would be unusual, I think. Geometric interpretations lead quickly to trigonometry, and if this is out of contests then learning some trigonometry as an adjunct to geometry will rapidly become essential.
Answer: Cauchy's inequality is (the square of) the triangle inequality for vectors (in $n$-dimensional space) with Pythagorean distance, $|x| = \sqrt \sum x_i^2$.  Schwarz contributed a nice proof that generalizes well.
Answer: The most easy example I know, even useful in everyday life:
2 same rectangles each made out of edge length of a and b
are smaller or equal to
2 squares, each made of a and b separately.
Or in ever day terms:
Squares make the best use of edge length to gain area.

General:
|⟨X,Y⟩|≤∥X∥⋅∥Y∥
in a more concrete form (case):
|ab|   ≤   |a||b|
... more concrete (rectangle vs square - case):
2 *(a * b) ≤ a * a + b * b


What's the diminutive form of "reindeer"?

Question: Could you please tell me what the diminutive form of reindeer is? How do children call it? A pig is 'piggy', a dog is 'doggy', a reindeer is ... 'reinee'?
Comment: Baby reindeer are called "calves".   As for a diminutive suffix, I'm afraid there isn'f any.
Comment: A *Rudwarf*? :P
Comment: @Centaurus You're right that baby reindeer (also known as *caribou* in North America) are often called *calves*, just like their fellow deer-family cousins baby elk and baby moose are, not to mention baby cattle and baby hippos and baby elephants, too. But this is an odd thing, really, given how baby deer are called *fawns* and baby horses are called *foals*. Some sources do use *fawn* for reindeer but others do not.
Comment: Children still call it a reindeer (or maybe sometimes a deer). Not all animal words have diminutive forms.
Comment: I live in the semi-sticks. Certain times of the year, the roads are littered with carcasses. When an adult deer is killed, we always say "deer" - but when it's a faun, we say "Awww, *Bambi* got whacked." There are no reindeer around here, but I would guess that in lieu of a common diminutive we'd probably say: "Awww, *Rudolph* got whacked."
Comment: Obviously, it's "deerie".
Comment: Please explain what you mean.
Comment: Many thanks for your prompt reply.
How do children call it? A pig is 'piggy', a dog is 'doggy', a reindeer is ... 'reinee'?
Comment: How about the name of Belgian chocolate lollipops 'Reindeer Reni'?. Isn't the name 'Reni' the diminutive form of 'reindeer'?
https://chocdecor.be/en/choctales/Product/936
Comment: You could ask Father Christmas next time you go and visit him - he's bound to know!
Comment: Hahahahaha! Isn't he a member of this discussion forum?
Answer: The -y suffix (in some words spelled -ey or -ie) is used to create familiar diminutives, usually of people or animals we're close to, normally domesticated ones. These words may come off as playful or childish, or simply endearing.
It's subject to various restrictions and these days is not especially productive, at least in formal writing, so you should probable stick to established forms rather than trying to coin your own.

People: Susie, Johnny, Jamie, Jerry, Billy, Tommy, Willy, Sammy, Penny
Creatures: foxy, goosey, duckie, doggy, kitty, horsey, piggy, birdy, lambie

One of the restrictions involves syllable counts and stress. Notice how Robert becomes Robbie or Bobby, never *Roberty.  Or notice how we say bunny not *rabbity (even though no one now remembers bun). (Also, puppy has its own history: pup is actually a back-formation from it.)
The English-speaking peoples haven't had the long association with domesticated reindeer that some other peoples have, so they have never been given a short, friendly name such as children might use. There is no word *deery, and *reindeery not only has too many syllables, it might also be taken to mean that something were "like" a reindeer in some fashion.
I can almost imagine a five-year-old calling a little reindeer Rudy thinking of the storied Rudolph the Red-Nosed Reindeer of Christmas fame, but that's just random creativeness. It's not an established usage.
See also this question.
Answer: As people have mentioned in the comments, there is no stereotypical common noun that young children use to refer to reindeer. I would expect most children either just call it a reindeer, or use some more-or-less idiosyncratic name of their own for it, depending on their stage of linguistic development (I have heard that some children go through a stage where they call all animals "doggies"; see this book for corroboration).
English doesn't really have "diminutives" in the same way that languages like Dutch, Spanish or Polish do. If you were to form a "hypocoristic" or "pet name" based on "reindeer", the most likely strategy would be truncation (because of the syllable count restriction mentioned in tchrist's answer) and suffixation with -y. So, "Reiny" or "Deery".
If you Google "Reiny the Reindeer" you can find some results (e.g. "Noelle Herring on Instagram: 'This is Reiny the reindeer. She lives on our mantel year round because she makes us smile. ...' "; "App Shopper: Reiny The Reindeer - Christmas Holidays Stickers"). But note the context: there are not actually children's terms for a reindeer, but cutesy nicknames for specific personified depictions of reindeer.
I did find one example of "Deery" being used, as a nickname given by an adult for a raindeer toy intended for a young child:

This school project has the main aim to design wooden toys for kids between the ages 4-10.
  This family of shapes, named the Animinimals (= minimal-shaped animals) has four characters: Piggy- the pig, Beary- the bear,  Phanty- the elephant and Deery- the reindeer.

("Animinimals", a project on Behance by Reka Istvan)
Actually, as the author from Hungary, I would guess that she is not a native English speaker, but the nicknames sound natural to me. Note that "Deery" is used here as a proper noun, not as a common noun.
Comment: Isn't Deery a play on words, it reminds me of "deary", a somewhat old-fashioned term of endearment for an old woman, *an old dear*, also used facetiously nowadays.
Comment: @Mari-LouA: It could be. I'm not sure, since if so, it seems like it would be something unique about this one name out of the four
Comment: It's just my way of saying "Deery" as a child's name for a reindeer,  doesn't really work. Bambi does, however. See comments.

What’s the diminutive form of “reindeer”?


Is the proper formula for phosphorus oxide(V) P4O10 or P2O5?

Question: I would like to ask about formula of phosphorus oxide(V). Should it be $\ce{P4O10}$ or $\ce{P2O5}$? Which is right when I have to write the molecular formula?
Comment: Which do you think is correct and why?  Please add more details as to what you have attempted in doing the problem already.
Comment: I have no idea. I tried to check it somewhere online and I found that P2O5 is empirical and more suitable for everything is P4O10 but still not sure enough.
Comment: Note that empirical formula and molecular formula are different.  Ambiguous use of "formula", which can mean two different things, causes your confusion.  P2O5 is the empirical formula and P4O10 is the molecular formula.
Answer:
The simplest types of chemical formulas are called empirical formulas, which use only letters and numbers indicating atomic proportional ratios (the numerical proportions of atoms of one type to those of other types). Molecular formulas indicate the simple numbers of each type of atom in a molecule of a molecular substance, and are thus sometimes the same as empirical formulas (for molecules that only have one atom of a particular type), and at other times require larger numbers than do empirical formulas. (Wikipedia)

For phosphorus pentoxide the molecule seems to be an adamantane-like compound with 4 phosphorus atoms.
So the correct molecular formula of the compound would be $\ce{P4O10}$.


Photon detection

Question: Is it possible to detect the passage of a photon that passes across (orthogonal ) the detector line of sight , without the photon interacting directly with the detector or being reflected towards the detector by an intermediate event. Can the electromagnetic field associated with the photon peripherally trigger a detection, leaving the photons path unaltered?
Comment: There is no distinction between "a photon" and "the electromagnetic field associated with the photon." They are the same object.
Answer: If you have "no interaction" with the detector, the detector will not "detect" the passage of the photon. The same holds true for the passage of any fundamental particle and its detector. If, however, your detector detects physical events triggered by the photon, then this interaction occurs via this physical event. An example for this is the scintillation counter for gamma photons. These create energetic electrons in the detector crystal causing luminous photons that are detected via a photomultiplier.

Photon detection


Bitcoin wallet - why do i need it for cold storage?

Question: Why do I need a bitcoin wallet for cold storage?  Can I just write down randomly generated public address and private key pairs, and keep these on paper?  I am confused by the apparent need for a wallet stored on a thumb drive or some other data storage device that may become corrupt.  So why do I need the wallet?
Comment: This could simple be a confusion about terms. People call what you describe a "paper wallet." The term wallet does not only apply to Bitcoin keys stored on a computer, or even just digitally. Note that, indeed, you could simple just "store" a secret by memorizing it, and generate the secret key deterministically from that. People call this scheme a "brain wallet."
Answer: You can indeed do this. It has multiple environmental factors though which make this a bad idea.

Paper is easily damaged and very degradable.
You could make a mistake. If you do intend to do this maybe its best to quadruple check it.
Lack of extra security - unless you have it locked away in a safety deposit back in the city undergrounds, someone who knows it is there could steal it. Data drives give you extra level of security with wallet encryption.

There are probably other reasons but these are the main three, if you do decide to just do this there are a few techniques you could use to improve these factors..
Try laminating it, will give the paper exponentially longer lifepan.
Miss out a character that only you will remember, replacing a single character of a private key is easy if you know where it goes but hard if your not you, obviously just don't forget it!
Answer: You can indeed just write down, or print out the private key. Strictly speaking you don't need the public key in cold storage. Paper stores well for a long time as long as it is of archive quality. I would trust that more than any magnetic storage. Paper has been around for a long time and we know how to make it durable against time if so required. The ink of the pen needs to be of archive quality (at least where I live some pens are classified as such). Leaving the paper in the bank vault leaves you with one single point of failure though. And you may have made an error while copying the key to paper.
You could make another copy and give half the key to one trusted friend or relative, and the other one to another trusted friend or relative. It would be easier to brute force half a key for one of these people, but they are hopefully not into that with your key and half a key is still a lot of work.
If you consider using an offline computer, you could enter your private key into a  local off-line copy of this page: http://passguardian.com/
It implements Shamir's secret sharing and allows you to print out "keys" that needs to be combined (e.g any 3 out of 5) to yield the original key. Then give those out to people. Use a laser print for all print work, not an inkjet, since ink can be destroyed by water easily. The laser printer must not store copies of your print outs.
Laminating the paper as is suggested in another answer, then one would need to know that the plastic does not degrade the paper in the long run. There is no long term information on this, since laminated paper wasn't around 200 years ago.
Edit: Here is a link discussing archival standards at the Technical Research Institute of Sweden:
http://www.sp.se/en/index/services/permanence/sidor/default.aspx
Here is a list of their approved stuff; look in the left hand column and navigate down to the desired category:
http://www.sp.se/en/index/services/certprod/certprodprofil/arkiv/Sidor/default.aspx
Comment: From my experience, secrets.js (the library that passguardian uses) is a bit tough to read and understand, and I haven't looked much into how secure it is. Here's a python library that is quite straightforward and easy-to-read: https://github.com/halfmoonlabs/secretsharing.


User-level bundler Gemfile

Question: I'd love to have a Gemfile in Bundler that just sets my own personal Gemfiles to always be bult into bundles...
aka ruby-debug, interactive-editor, and so forth.
Any idea how to do this?
Answer: We use this technique.
Puth this in your Gemfile:
eval File.read(File.expand_path("Gemfile.personal")) if File.exists?(File.expand_path("Gemfile.personal"))

And then add your personal gems to Gemfile.personal. Of course exclude Gemfile.personal from your version control.
Comment: well, do you at least understand the reasons as to why the gemfile.lock is recommended to stay in there?   core teams (bundler and rails) usually don't recommend stuff for no good reason...
Comment: Yes it is. So we include our gemfile.lock file in .gitignore. Some people argue this is a bad practice but some people can go argue elsewhere.
Comment: I do understand their reasons. But in all my work there was only one case when dependency versions caused problems, but that was fixed fast and easily. So we use Gemfile.personal and do not commit .lock and everyone is happy.
Comment: you can also just ignore the locally modified Gemfile.lock temporarily by running `git update-index --assume-unchanged Gemfile.lock` and when you're ready to commit local changes, you can run `git update-index --no-assume-unchanged Gemfile.lock`. this trick just "lies" to git so that git will ignore these files for any status/commit calculations
Answer: One way to do this is to create different evnironments
group :scott do
end

Then
bundle --with-env=scott
Answer: I'm not 100% sure what it is you are trying to achieve, but;
If you just want to specify a number of development-only gems, you can specify a development group that can be excluded from deployments:
group :development do
  gem "ruby-debug"
  gem "interactive-editor"
end

Then on production or test you would do:
bundle install --without development

Answer: The cleanest solution I found so far is to use a separate Gemfile.personal and use a custom Gemfile path. I like this solution because you can use it in any project without modifying project code at all.
1. Add Gemfile.personal in to project root dir
# /path/to/your_ruby_project/Gemfile.personal
eval File.read('Gemfile') # use all gems from Gemfile

gem 'personal-gem1'
gem 'personal-gem2'

2. Install gems using Gemfile.personal file
BUNDLE_GEMFILE="Gemfile.personal" bundle install
# or
bundle install --gemfile=Gemfile.personal

Just remember to specify BUNDLE_GEMFILE every time you execute commands with bundler.
I personally put BUNDLE_GEMFILE=Gemfile.personal env variable in .env file using dotenv which ensures that Gemfile.personal is always used when I execute any command with bundler so I do not need to put it manually every time.
3. Put Gemfile.personal and Gemfile.personal.lock to .gitignore
For linux users:
touch ~/.gitignore
echo "Gemfile.personal\nGemfile.personal.lock" >> ~/.gitignore

This will affect all projects, so you do not need to update each project .gitignore separately.
Answer: My proposition does not depend on Bundler.  As such does not clutter Gemfile* with your private gems for the price being a bit less convenient than answer by @ScottSchulthess.
How Bundler works
There is an array stored in $LOAD_PATH global variable which is a "load path for scripts and binary modules by load or require" (see Ruby docs) and Bundler modifies this array.
If you're developing a gem, $LOAD_PATH it will contain paths to all gems in the system.  You can simply write e.g. require "pry" somewhere and pry gem will be loaded properly even if it's not mentioned in gemspec nor Gemfile.  You don't have to add it to dependencies.  (Of course it has to be already installed with gem install pry.)
A very different strategy Bundler takes when you're developing an application.  In such case most of $LOAD_PATH will be removed on require bundler/setup (Rails calls it in config/boot.rb). Only essential paths and those pointing to gems specified in Gemfile.lock will remain there.  So if you want to use pry without adding it to Gemfile, you got to append it to $LOAD_PATH before requiring it.
Solution for applications
gems_root = $LOAD_PATH.detect{ |p| %r{/bundler-} =~ p}.sub(%r{/bundler-.*}, "")

additional_gems = {
  "pry" => "pry-0.10.1/lib",
  "pry-rails" => "pry-rails-0.3.2/lib",
}

load_paths = additional_gems.values.map{ |p| File.join gems_root, p }
$LOAD_PATH.unshift *load_paths
additional_gems.keys.each{ |r| require r }

If you're using Rails, then save it in /config/initializers/00_custom_gems.rb and that's all.  Outside Rails you additionally need to require it, preferably right after require "bundler/setup":
require "path/to/it" if File.exists? "path/to/it"

Remember to mention this file in .gitignore.
Sometimes proper gem path does not end with /lib but with architecture name.  The easiest way to learn it is to add it for a moment to Gemfile and do puts $LOAD_PATH in aforementioned initializer.  You can also learn those dirs from gemspec.
Solution for gems
When developing gem, you don't need to enhance $LOAD_PATH, only to require gems you want.  If you need custom gems in tests and you're using RSpec, it can be done somewhere in /spec/support.
Another (less sane) idea is to add a file lib/development.rb:
require_relative "my_gem_name"
require "path/to/private/requires" if File.exists? "path/to/private/requires"

and refer to this file instead of to "my_gem_name" in your tests, demo application etc..

User-level bundler Gemfile


Youtube videos open in browser by default

Question: When I'm browsing the net using the Internet app (the default browser), youtube links open up in the browser and not in the youtube app. I don't get to choose any option like before. In Applications Manager > Internet there are no defaults set. I tried clearing cache & data for Internet & Youtube app but I still have this problem. Same thing with Facebook youtube links, they open in the browser, no option to have it opened in youtube...it's driving me crazy
I'm using a Samsung Galaxy S3 with Jelly Bean.
Turns out this problem is also on the HTC EVO (http://forum.xda-developers.com/showthread.php?t=1688866), something to do with an Apple lawsuit. If I remember correctly, I didn't have this problem when I had Ice Cream Sandwich on.
Also, if I long press a YT link in the browser, no option shows up to open it in the app? What gives?
Comment: What do you mean by "browsing the net using the Internet app"? What is the "internet app" you are using. Do you mean default browser?
Comment: You could try uninstalling the browser then reinstalling it? See what happens to the links in the mean time on a different browser?
Comment: Yes, the default browser.
Comment: I can't uninstall the browser, the uninstall button is grayed out.
Comment: Have you tried reinstalling the youtube app?
Comment: Yes, still doesn't work. Seems to be a problem with Jelly Bean. Other people are having this as well... http://forum.xda-developers.com/showthread.php?t=1892888
Comment: The links open to YouTube in the browser. If you hit Play, does that *stay* in the browser, or do you then get sent to the Youtube app? I ask because that is the behaviour that I see with Android 4.2.
Comment: This worked for me for the Android web browser: Settings -> Useful Features -> Open links in apps. For some reason mine became unchecked.
Comment: For Brave browser users, try: https://android.stackexchange.com/a/244632/22600
Answer: Try resetting app preferences. Go to Settings->Apps, choose from menu Reset app preferences and confirm Reset apps. This will reset all app preferences.
To reset preferences for specific app (e.g. Browser), choose it in Settings->Apps and press Clear defaults button in Launch by default section.
Next time you try to open YouTube video you should be asked which app to use.
These instruction were verified on pure Jelly Bean (on Galaxy Nexus).
Comment: The person asking the question noted that 'clear defaults' didn't work for him.
Answer: I had the same problem, here's one way to fix it: set user agent string as desktop.
To do so, type about:debug in address bar to get debug settings, then go to Settings > Debug > UA String. Set it to Desktop, restart browser and load any YT URL - it should show you the option to open YouTube app.
Tested personally on Nexus S running Android 4.2.
Comment: Thanks Sumesh, but that doesn't work either and I did everything like you said even rebooted the phone. Oh well...
Answer: FacebookLinks fix the problem of Facebook, it allow you to open youtube post from Facebook directly using Youtube app!
https://play.google.com/store/apps/details?id=com.obteq.sharetoyoutube
Comment: Welcome to StackExchange and thank you for your contribution! If you want some badges, fill out all of the fields in your profile and read the "About" link near the search box. Enjoy StackExchange!
Answer: Goto Apps in Settings and clear the youtube app preferences. It will reset your data and you will be prompted to open videos.
Answer: This really worked for me! Just follow these steps:

Go to Settings
Go to Apps
click on the Google Chrome app
Go down and click "clear defaults"

Your all done and the next time you click to watch a video it should give you the option to chose Youtube app.


Different Permission levels while Sharing document or folder SharePoint 2013

Question: I have two SharePoint sites. I am the site collection administrator and I have given one user Manage Permission level on one folder. User can share that folder with others by using 'Share' button. On one site while sharing he is getting the option to select permission level below 'Show Options' link and there are a 5-6 permission levels (Approve,Edit,Contribute etc).
While in the other site he has got the same permission on one folder and while Sharing the folder, he is getting only 'Edit' and 'View' option on the right side and there is no option to select permission levels.
How is this happening? Can someone please let me know the details of this behavior. I need the second site behavior everywhere. the user should not see 10 different permission levels only edit and view. but its not happening on every site.
Please help and suggest How can I achieve this.
Answer: Whether you have unique permission in the folder?
If we don't have permission to manage permission in the site level, there will be have options to let us select permission levels for files/folders in the Share dialog.


How to automatically approve after a period of time

Question: I've created a custom object with an approval process. The client wants objects that await approval to approve themselves 24 hours (or actually 1 work day) after they are submitted for approval. What would be a good way to implement this?
Answer: Well this seems to be a good and valid requirement. Seems like you have write some custom code. This can be achieved by following.

Batch Class : That runs at regular interval and checks that if a record is older than 24hrs, approve the same. Here is ecample of approval of recording using apex http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_process_example.htm
Workflow + triggers : you can use workflow time triggers to update a field in the record, then use trigger to identify the record and process the approval request.
Answer: We (Lightside Apps) have just released an App on the Appexchange that would help with this. 'Power Tools' is a collection of useful tools for Salesforce Admins and Developers and includes an 'Approval Automation' tool. This will allow you either Approve, Recall or Reject at an Approval Process Step after a nominated period.
For more information on Approval Automation (and the other components), please have a look at the documentation on our website here: http://www.lightsideapps.com/documentation/approvals/index.html
You can download the App with a free 30 day trial on the App Exchange here: https://appexchange.salesforce.com/listingDetail?listingId=a0N3A00000EFoy9UAD


What can you do in and what is haram in Oral sex

Question: I would like to know when a person have oral sex and the semen of the man gets into the womens mouth where does  it say it is haram beacuse there is no hadieth or nothing in the Quarn that said that semen is not allowed in a womens mouth.
Answer: Assalam o alaikum. Oral sex is makrooh(disliked), not haraam. There is difference within scholars on this matter but it is not mentioned as haraam in Holy Quran Or Hadith. Therefore, you should use your own judgement on this. As from my point of view, it doesn't appeal any goodness or morality, this act doesn't sound good, neither appealing. Rather, it is repulsive. For one's semen to enter one's mouth, doesn't indicate any morality. May Allah(s.w.t), guide us all. Ameen.
Answer: Well, there are no clear evidence in Islam that oral sex is haram.
This is one of the disgusting and filthy things. However to know if it's halal or haram, we need evidence.
This habit was never thought of during that Golden era of the Sahabah radiyallahu anhum (In fact , not even here a few decades ago) so you won't find hadeeth regarding it. (IslamQA.org)
But the advise from sheikhs are to stay away from these things.
And it's not appropriate for a Muslim to do such things. Also the mouth and the tongue is for Zikrullah, Tasbeeh, Istighfaar and tilaawat. Also, during oral sex, there is the risk of najaasat on the organs and a risk of it entering the mouth. Also the medical experts attribute many illnesses with this abhorred act. islamQA.org
And I highly recommend you to watch this video


Related products based on keywords

Question: Currently im using "Converio" wordpress theme. Related products is working by default on the basis of same category/sub-category, I want related products to be displayed based on "keyword","title","description".
Answer: Am I correct that you're meaning products as in WooCommerce products?
If so:
Right before WooCommerce returns the related products for a current product(if you're not on a product page you could define a post_id yourself). It uses a filter which you can hook into.
$related_posts = apply_filters( 'woocommerce_related_products', $related_posts, $product_id, array(
    'limit'        => $limit,
    'excluded_ids' => $exclude_ids,
) );

By using the following filter within your child-theme/theme:
add_filter( 'woocommerce_related_products, function( $related_posts ) {
    // Add or replace products to $related_posts.

    return $related_posts;
}, 10, 1 );

Related products based on keywords


iPad stuck on Guided Access with broken home button

Question: My iPad is stuck on Guided Access. I do remember the passcode but my home button is broken. I've been using the on-screen home button but that too is disabled. Will draining the battery out fix my problem or is there another way?
Answer: After a quick google search, I found this video that may help you, depending on what version of iOS you have. There are many other tutorials on youtube that you should check out as well.
Good Luck!


Best option/opinion on how to load website data - Html/PHP into a SQL Server Database?

Question: I have been thinking and trying to expand my knowledge of different tools. One thing I have never had personal experience with is getting website data that users enter, and have that loaded into a SQL Server Database. There are several tables in this database and I need a tool/advise on which is a good tool to use to have that data loaded into my data warehouse after end users enter information for different fields into the website. I am an experienced SQL user but have never needed to do this. This wouldn't be needed for any enterprise application, but more for personal use/knowledge. Can anyone provide any insight on the best tool/api they have used to make this happen. Obviously I know this can be done from sharepoint but I am looking for other ideas. Thanks in advance
Answer: You can obviously do it manually in PHP with any open connection, but there are so many security things you have to account for.
If your starting out your better off using a PHP framework which handles a lot of the under the hood work for you.  If there's a security issue with the framework the framework maintainers will handle it.
You must validate all user inputted data to avoid hackers slipping junk or hostile things into your form.
A framework also allows you to generate a working product faster, and your not constantly worried about the fine details.
Comment: Thanks for the reply. Each user to the website would have their own login/pw with encryption.
Comment: Yes you can have that, I just started working with Laravel and it has the ability to have usernames and passwords.  I am sure other frameworks have this ability. The password is obviously encrypted.  Are you asking about encrypting more than that?
Answer: You can do it directly from a Stored Procedure:
Enable Ole Automation Procedures:
sp_configure 'show advanced options', 1
GO
RECONFIGURE;

sp_configure 'Ole Automation Procedures', 1
GO
RECONFIGURE;

Just run this:
Declare @Object as Int;
DECLARE @hr  int
Declare @json as table(Json_Table nvarchar(max))

Exec @hr=sp_OACreate 'MSXML2.ServerXMLHTTP.6.0', @Object OUT;
IF @hr <> 0 EXEC sp_OAGetErrorInfo @Object
Exec @hr=sp_OAMethod @Object, 'open', NULL, 'get',
                 'http://overpass-api.de/api/interpreter?data=[out:json];area[name=%22Auckland%22]-%3E.a;(node(area.a)[amenity=cinema];way(area.a)[amenity=cinema];rel(area.a)[amenity=cinema];);out;', --Your Web Service Url (invoked)
                 'false'
IF @hr <> 0 EXEC sp_OAGetErrorInfo @Object
Exec @hr=sp_OAMethod @Object, 'send'
IF @hr <> 0 EXEC sp_OAGetErrorInfo @Object
Exec @hr=sp_OAMethod @Object, 'responseText', @json OUTPUT
IF @hr <> 0 EXEC sp_OAGetErrorInfo @Object

INSERT into @json (Json_Table) exec sp_OAGetProperty @Object, 'responseText'
-- select the JSON string
select * from @json
-- Parse the JSON string
SELECT * FROM OPENJSON((select * from @json), N'$.elements')
WITH (
      [type] nvarchar(max) N'$.type'   ,
      [id]   nvarchar(max) N'$.id',
      [lat]   nvarchar(max) N'$.lat',
      [lon]   nvarchar(max) N'$.lon',
      [amenity]   nvarchar(max) N'$.tags.amenity',
      [name]   nvarchar(max) N'$.tags.name'
)
EXEC sp_OADestroy @Object

This query will retrieve data about all the cinemas in Auckland from OpenStreetMap.
Yes, is a REST call directly from SSMS so you can create a stored procedure and your SQL Server will automatically call your website.


Soup Mandels on Shabbos

Question: Is it permissible to put Soup Mandels in hot (Yad Soledes) soup on Shabbos, assuming the soup bowl was filled in a standard way - pot taken off of fire, soup ladle inserted into pot and soup removed and put into the bowl in which it is served.
Comment: They are deep fried, AFAIK. I don't see why your link is relevant as the heat doesn't melt anything here.
Comment: Ein Bishul Achar Bishul, no? Why do you suspect there would be a problem?
Comment: @DoubleAA, I don't know the manufacturing process for these. [In addition ...](http://chabadlibrary.org/books/adhaz/piskey/18.htm)
Comment: @DoubleAA, sounds like an answer ...
Comment: @DoubleAA If they are deep fried it is an issue, as yesh bishul achar tzli, no? Or does _deep_ frying specifically constitute bishul because the item is enveloped in the oil?
Comment: @Yehuda bishul means cooking in a liquid
Answer: Yes. You can even put it in a cli rishon that's off the fire.

שקדיות מרק ... הנמכרות כשהן מוכנות לאכילה, מותר לתת אפילו בכלי ראשון, אם אינו עומד על גבי האש...
Soup mandels ... that are sold ready to eat, it is permissible to place them even in a cli rishon, if it is not on the fire. (Translation mine)
Source: Shmirat Shabbat C'Hilchata, 1:61
Answer: HaRav Chaim Bleier shlita in his Chukei Chaim series here (on page 2) addresses this question.
He writes as follows:

Adding Croutons or Soup Nuts to Soup on Shabbos
Croutons and noodles. Deep-fried soup croutons, which are considered cooked1, may be added to soup on Shabbos, even if it is yad soledes bo (מאור השבת ח"ב סי' ח' סק"ה) since we pasken 'ein bishul achar bishul' with dry foods (שו"ע סי' שי"ח ס"ד) The same applies to noodles....
Soup nuts. Although soup nuts are also deep-fried and have the same status (מו"ר בשו"ת שבט הקהתי ח"א סי' ק"ט), some are uncertain about them since the oil stays on their surface and does not permeate them; perhaps they should be considered baked, not entirely cooked, and adding them to hot soup would involve an issur of bishul achar afiyoh, which is a matter of dispute (ב' דיעות בשו"ע סי' שי"ח ס"ה) and should be avoided lechatchilo (רמ"א שם). Therefore it is best to put them into a kli shlishi, not a kli sheini (שו"ת שבט הלוי ח"ז סי"ב). Nevertheless, when considering that soup transferred from a pot to a bowl with a ladle may be a kli shlishi (מ"ב סי' שי"ח סקפ"ז), one may rely on this and be meikel for bishul achar afiyoh (מ"ב שם סקמ"ה).

1 Store-bought croutons made in a factory by deep-frying small pieces of bread have the status of less than a kezayis of cooked bread and are mezonos (שו"ע סי' קס"ח ס"י, הגרשז"א שש"כ פ"א סס"א). Even if they were fried in a bit of oil, not deep-fried, they are mezonos since they were made with bread baked specifically for croutons (מדריך הכשרות עדה"ח תשע"ז עמ' 162).
Comment: The link in shevet hakehati is to a responsum about taking medicine before Kiddush...?
Comment: Your right?! It must have been a typo - I'll have a look if I can find the right siman
Answer: When the pot is taken off the fire, it is still a kli rishon. The soup ladel is a kli sheni and the bowl a kli shlishi.
However:

If the soup ladel gets as hot as the soup it may be a kli rishon
as well.
Not everybody holds of a kli shlishi.
If the soup has a davar gush in it, e.g. noodles or kreplach, the
davar gush may be treated like a kli rishon. It is unclear if that
changes the status of the soup.
If frying is like cooking, the rule ain bishul achar bishul should
apply.
If frying is like baking, it is a machlokes whether there is bishul
achar afiyah.

As such, it depends on what you hold and how machmir you are on Shabbos. Either way you have who to rely on. IIUC, most people are lenient.
Comment: Who holds deep frying is like baking???
Comment: Not everyone agrees a ladel is kli sheni. See Taz YD 94
Comment: @DoubleAA actually, i don't remember. :( Maybe i'm remembering incorrectly. Also, i think there is a difference in whether the oil completely covers the item or not.
Comment: The question about whether frying is like cooking or baking is only when there is a little oil in the pan. However when you cook something in oil, what is called "deep frying" in our parlance, there is complete agreement that this is considered cooking

Soup Mandels on Shabbos


In my cover letter, how many faculty member should I list as people I want to work with?

Question: I am a grad student, graduating in the spring. In my application for postdocs, I include a cover letter that lists faculty members I want to work with. If there is one person that I am really interested in working with, should I just list that person? Or should I add another so that I sound open to working with other people too. More generally, if there isn't one specific person I am interested in, how many people should I list? How many is too many?
Answer: At least in mathematics, I would recommend something like:
"I am especially interested in working with X, as her research in Y overlaps with my interests in Z and W. I would also look forward to interacting with V and U, as their work is also related to my interests in T."
This might be different in fields where mentorship is less fluid (e.g., the laboratory sciences, if you would choose one faculty member's lab to work in).
Indeed, in my own postdoc, I learned a great deal from my formal mentor -- and I also learned a lot from his colleagues in his research group.
Answer: The mathjobs.org description for the University of British Columbia reads "The cover letter should give the names of up to three UBC faculty members whose research interests are closest to the applicant's." This is probably a good general rule: If any faculty members names are listed in the cover letter, there should be at most three.
Answer: As @Anonymous says, you can certainly name several potential advisors, but not too many (it surely depends on how many people at the target department are working in closely enough related fields, or work together as a team in charge of a lab) and, like @Anonymous says, make clear why you are interested in each one. No, you aren't interested in all fields, at least not enough to do your thesis.
Comment: The question is "how many is too many", so I think OP is looking for something more precise than what you write here.
Comment: @FedericoPoloni , that depends on the stuff I mention


Programmatically change the icons/names of homescreen apps in Android

Question: I'd like to build an app that allows me to change the icons and names of my homescreen apps. It's basically like what ADW Launcher does, but I don't want any of the other features it has to offer (namely, it strips away the rest of the ICS goodies like the blue end-scroll glow and panel pivots). I just want to be able to set custom icons and names for my homescreen apps. I am new to Android development and was wondering if you can point me in the right direction. Thanks in advance!
EDIT: I don't want to permanently change an app's icon/name, rather I just want modify it as it appears on my home screen (not in the app drawer). Similar to ADW or GO lauchers... a shortcut rather than the actual executable?
Answer: Nope. You can't. It's not possible to change the resources packaged with the app.
Answer: You can only do this if you rewrite the Launcher code, there is NO other way.


Roissybus - No more child fare, but how about baby?

Question: Does a baby pay for Roissybus? I understand the child fare is no longer available, but how about a baby?
Comment: May I suggest [the RER, on which children younger than 4 years old can travel for free](http://www.ratp.fr/fr/ratp/c_21070/reductions-et-gratuite-pour-les-enfants/)? If you take the direct train from CDG to Gare du Nord you avoid the `banlieue` neighbourhoods and get to the centre of Paris in 35 minutes.
Answer: The transport authority website states that children under 4 travel free on all buses. (I can't find the information in the anemic part of the site that's translated into English.) I don't see any mention of an exception for the airport buses (Roissybus, Orlybus).
Children under 10 get a half-rate only in certain (common) conditions: when you buy a book of 10 "ordinary" ("t+") tickets, you can buy children tickets for half the price; and suburban (point-to-point) train tickets are half-price for children. There is no child rate on the airport buses or Orlyval, so children aged 4 and up pay the same price as an adult.
The Parisinfo site mentions that children under 4 travel free. It isn't clear from the typesetting whether that applies only to Orlyval or also to Roissybus and Orlybus, but as far as I'm aware it applies everywhere in the publicly-run train and bus network around Paris. (The English version has no mention of this, and outdated rates. Sigh)
The price guide from the transit authority for the Paris region also states that children under 4 travel free "on the whole network". The RATP detailed rules mentions that as well (though the language does not clearly state that they always travel free), with the stipulation that this does not entitle them to a separate seat (but then paying adults aren't entitled to a seat either, just to transportation).
Note that these rules do not apply to private transportation that is not part of the transit network, such as the Air France coaches (free for babies only up to 2 years old, half-price up to 11 y.o., and with a slight reduction under 25). Air France coaches are significantly more expensive than the RATP buses except for large groups of children between 4 and 11, but a bit more comfortable in that you're less likely to end up in a crowded bus with barely any standing room (though in Paris, if you have a young child, feel free to ask for a seat, people might not volunteer to give up their seat but most will oblige).
Answer: You might be out of luck. Although the RATP, Aéroport de Paris and Paris Info websites mention different prices for the ticket (11EUR the first two and 11.60EUR the latter), they only mention one price. Moreover, the Paris Info website says that there is a unique fare (tarif unique in French):

Roissybus est une ligne de bus sans arrêt entre le centre de Paris et l'aéroport Roissy Charles de Gaulle à un tarif unique 11€60.

(Emphasis mine)
It would therefore seem that the Roissybus ticket is one-fare-fits-all, without distinction between adults, children and babies.
Comment: I do believe that the fares on the RATP site are correct (I can vouch for the Orlybus fare at least as the last time I took it was after the last price increase). I guess Paris Info charges for delivery. And they're not good at updating their site, they even list 9€10 at http://www.parisinfo.com/transports/73373/RoissyBus on the "descriptif" tab (I think that's the former former ticket price).
Comment: The price listen on the Paris Info website is the price that they charged you the last time they updated the page — if you order now you'll pay 12.10€! The price listed by RATP and ADP is the actual ticket price which you'll pay if you buy the ticket at a vending machine or ticket sales office.
Comment: @Gilles Ah so you are saying that the Paris Info fares are outdated, and that they charge for the booking?


Is there a way to calculate the global energy footprint of AES?

Question: Something that's puzzling me for a while is how we could calculate approximately the energy cost of using AES, for a company like Amazon or Google. How likely it is due to the nature of their business model that its an important part of their fixed cost? Considering key generation, encryption and decryption etc of so much data on a daily basis.
Comment: If you really know what CPU and networking capabilities then you can model, otherwise this is an opinion-based question.
Comment: Yes indeed! Thank you for your input. Any case studies or research regarding this? That would be extremely helpful. I've been searching a lot but I'm still unable to find something useful.
Answer: Back of the envelope calculation:
According to the World Bank, 2020 internet traffic was 100,000 GB/s. According to this analysis, an Intel i5-8250U CPU uses 2.2 J/GB when using AES-NI to encrypt. Since traffic needs to be both encrypted and decrypted, let's double this to get an energy requirement of 4.4 J/GB.
This works out to approximately 14 terajoules of energy per year.
The US BLS says that February 2022 US electricity costs were $0.137 per kWh.
Therefore, if all internet traffic is encrypted with hardware similar to that referenced above, the total electricity cost to encrypt and decrypt all internet traffic for a year is approximately only $530,000.
Comment: Hey! That's really helpful. I was wondering though. Can we really base the whole internet consumption based on an Intel i5-8250U CPU? I mean the average for 3 trillion GBs has to be more than 4.4J/GB right? Also the half-million $ electricity cost sounds a bit too small don't you think?
Comment: @Tunnel_Vision on the one hand, not all encryption will use AES-NI and be power efficient, so it will be an underestimate. On the other hand, the calculation assumes that all traffic will be encrypted, causing an over-estimate. The AES paper says that "AES consumes between 20 to 30 joule per Gigabyte, AES-NI consumes between 2.2 to 2.7 joule per Gigabyte". I'd assume data centres almost exclusively use CPUs with AES acceleration. I was surprised too that the cost is so low, but I checked the math and I can't see a mistake. The conclusion is that AES is not power-hungry compared to other tasks.
Comment: I see. Thank you very much. I agree with you on the math side. Now question is, who in the world would use AES without acceleration since it seems to be so slow and power-consuming. I wonder if our smartphones have that feature?
Comment: @Tunnel_Vision not all CPUs have AES-NI. However, it's only slow in comparison, and is still not a huge burden. A 45W CPU running at full power will use 162,000 joules per hour, and if part of what it was doing was encrypting 10 GB in that hour (without AES-NI), that would only be 300 joules.
Comment: Hey! I found this article: https://www.seagate.com/files/www-content/our-story/trends/files/idc-seagate-dataage-whitepaper.pdf Essentially it says that the storage demands and generally the Global Datasphere would hit 175 Zettabytes by 2025. Would that give us any additional clues? Is traffic the only metric to calculate the energy cost?
Comment: @Tunnel_Vision The energy cost isn't directly affected by much data is stored, only by how much of that data is decrypted and encrypted. You could include in the estimate the amount of data that is written/read from encrypted disks per day. However, this would be incredibly speculative, as there is no way to know how much a server in a data center is reading/writing to disk in encrypted form. Overall, I think it's safe to say that the cost of energy spent on encryption/decryption is a tiny rounding error on the cost of the equipment and the cost of performing other tasks on that equipment.


How to aim at long range with 2x scopes?

Question: I was in a match with an M14 and an M60 (a bad setup because it was the starting of the match), and I wanted to aim at a guy at least 90 meters away with the pre- installed scope. I used the scope-in-scope-out trick to give it some damage, but he escaped. From that moment on, I am wondering what the best way could be to hit an enemy with low fire-rate weapons and low-zoom scopes from far away.
Answer: Even though it might sound obvious, aim for the head. Aim a bit above the head as when you press the fire button, the aim somehow lowers downwards a bit (at least in my friends and my phone). You will learn aiming better with experience. Besides, the 2x scope obscures the aim, so you pretty much have to guess where you're gonna hit.
Edit: Just to emphasise on the point, games such as Freefire require skill to use whatever what you do along with a bit of luck. You can do crazy things wiht a bit of luck and some skill. I killed an MP-40 guy with M60 with two headshot. You see, top players mostly use default aim precision for the scope-in-scope-out to work so, mostly, the first shot is aimed for the middle of the body. So, you have to be hit badly before you die (that's 200 HP and each SMG does about 20 damage per hit). So using whatever you have to the fullest to win is all that you can do.
Comment: see aiming for the head is a good point but what if the target is moving continuously? That I have to aim with the red dot or pre-installed scope.
Comment: That's where the skill comes and choice of weapons as well. Not trying to brag or something but I've headshoted running people with Famas and M4A1.
Answer: Either search for mods that make the gun invisible when scoping, or simply fire from the hip and forget about the 2x scoping. The time you take to scope in is probably not worth much if the target is running fast across your screen. Scoping is mostly if you can take your time to fire.
A quick hack to fire from the hip is also to place a small marker on your monitor where the aim's center is.


What does the notation mean?

Question: Given a measure space $(\Omega,\mathcal{F},\upsilon)$ and a $p>0$.
What does the following mean?
$$ \|f\|_p=(\upsilon|f|^p)^{1/p}$$
Answer: I think they're trying to say:
$$
\|f\|_p=\left(\int_\Omega \vert f\vert^p dv\right)^{1/p}
$$  One way to justify their shorthand is that integration is like "measuring" the function, so $v\vert f\vert^p$ could be thought of as shorthand for $\int_\Omega\vert f\vert^pdv$.
Comment: Is $|f|^p$ the $p^{th}$ power of the absolute value of the function $f$ ?
Comment: Yes, that's correct.
Comment: so $|f|^p$ is another function, say, $g$, and $\upsilon|f|^p$ is the integral of $g$ with respect to $\upsilon$ ?
Comment: Correct, with the integration being over $\Omega$.
Answer: Indeed, for every measure $v$ and every integrable function $g$, one can use indifferently
$$
v(g),\qquad\int g\mathrm dv,\qquad\int_\Omega g(\omega)\mathrm dv(\omega),
$$
and a few other combinations of the above to denote the integral of the function $g$ with respect to the measure $v$. In particular,
$$
\|f\|_p=\left(\int_\Omega |f(\omega)|^p\mathrm dv(\omega)\right)^{1/p}=(v(|f|^p))^{1/p}.
$$

What does the notation mean?


How does the uncertainty principle make sense of the fact that momentum for massive particles depends in part on position?

Question: The momentum of an object is in part dependent on the change in position meaning the final position minus the initial position.  The  equation for momentum is
$$p=\frac{m \Delta x}{t\sqrt{1-(\Delta x/tc)^2}}$$
where $\Delta x$ means change in position, $c$ means speed of light, and $t$ means time.
The uncertainty principle states that the uncertainty of position and the uncertainty of momentum are inversely related.  How are the uncertainty principle and the equation for momentum consistent with each other?
Comment: This site supports [mathjax](http://physics.stackexchange.com/help/notation). I edited the post to use it. Please use mathjax for mathematical expressions as this makes posts readable.
Comment: Your formula isn't the formula for "the" momentum (and what appears inside isn't "the" velocity) but it is a formula for the average momentum and/or velocity along the trajectory $\Delta x$. The uncertainty principle constrains the uncertainties of $x,p$ at the *same* moment. But even if one ignores this thing, e.g. by taking $\Delta x$ infinitesimal, there is no contradiction.The uncertainty principle simply says that $x$ and $\Delta x$ cannot have well-defined values at the same moment. One must distinguish $\Delta x$ as the uncertainty of $x$, and as the change of $x$ between the moments.
Comment: First, one must come to grips with, if one can, that quantum particles do not, in general, have either definite momentum *or* definite position.  It's not that the particle's position is uncertain, i.e., definite but not exactly known, it's that the particle doesn't *have* a definite position (unless you subscribe to the Bohmian formulation) and similarly for momentum
Answer: They are consistent with each other because quantum mechanical momentum is not the change in position.
There is no quantum notion of velocity. Classically, velocity is the time derivative of $x(t)$ along a particular trajectory. The quantum theory has no notion of a real-valued trajectory $x(t)$. Quantum states, in general, are not position eigenstates, they don't have a position from which you could compute the velocity.
Quantum mechanical momentum is the quantization of the classical Hamiltonian momentum, not of classical velocity. It is the Hamilton equation of motion
$$ \dot{x} = \frac{\partial H}{\partial p} = \{q,H\}$$
that relates $\dot{x}$ to $p$ for the usual Hamiltonian quadratic in the momenta, but this equation is purely classical. It doesn't exist in the quantum theory except as an equation of expectation values (by Ehrenfest's theorem)
$$ \frac{\mathrm{d}}{\mathrm{d}t}\langle x\rangle = \frac{1}{\mathrm{i}\hbar}\langle[x,H]\rangle$$
which makes no statement about the standard deviations.
There is another sense in which $\dot{x} = p$ holds in the quantum theory, which is that the quantum mechanical equation of motion in the Heisenberg picture is really the quantum version of the classical Hamiltonian equations of motion, i.e. all operators are time-dependent, and so writing
$$ \dot{x} = \frac{i}{\hbar}[H,x]$$
does makes sense. However, the object $\dot{x}$ is not the classical notion of velocity - the time derivative is here not along a classical trajectory, but along the one-parameter group of operators $\{\mathrm{e}^{-\mathrm{i}tH}x\mathrm{e}^{\mathrm{i}tH}\}$ that are the time-evolution of the operator $x$. In particular, it does not make sense to speak of the velocity being the "change in position" divided by the time, because, again, most quantum states don't have a well-defined position and because something that is a position eigenstate at initial time will usually not stay one.
Comment: Apologies, I had to downvote it. The quantity "velocity" is exactly as well-defined as the position or the momentum, it's $\hat v = \hat p / m$ in non-relativistic physics, for example, and it *is* equal to the time derivative of the position. This is what the Heisenberg equation of motion says - and this equation holds as an operator equation. (One may describe physics in pictures not focusing on time dependence of operators but that only introduces confusion here.)
Comment: @LubošMotl: Hm, I would *not* say that it is obvious that the time derivative of the position operator in the Heisenberg picture corresponds to OP's idea that $p$ should be "change in position divided by time". You're right that $\dot{x} = p$ as operators for quandratic Hamiltonians is the Heisenberg equation of motion in the Heisenberg picture, but OP's concept of "velocity" is not that, so I "answered in the Schrödinger picture".
Comment: The equation $\dot x = v$ is the *definition* of the velocity - first written by Newton - and it is always true. In the Heisenberg picture of quantum mechanics, it holds as an operator equation. In non-relativistic physics, one has $p = mv$, again valid as the operator equation. In relativity, we would have $p = m_0 v / \sqrt{1-v^2/c^2}$ which would act as a nonlocal operators on the wave functions and it's not what we need in relativity - one of the reasons why we need to switch to quantum field theory to describe particles in a relativistic way.
Comment: I don't think that the OP has any wrong notion of velocity. Velocity is the final position over the initial position, and this difference divided by the small duration. It's only you, not the OP, who is questioning that. The OP is totally right that one may keep on using this understanding of velocity in QM. Talking about Schr. picture doesn't change anything - one may still define the form of the operator of velocity at a given time by converting the expression from the Heisenberg picture by the Heis-Schr transformation.
Comment: That squiggly brace in the first equation could be misinterpreted as an anticommutator. Maybe explicitly say it's a Poisson bracket. *Leaves before getting hit by theory crossfire*
Answer: The velocity $\hat v$ is a well-defined operator for particles, equal to $\hat p/m$ in non-relativistic physics. The non-relativistic, non-linear correction factors could be added but that would create a can of worms because the correct way to describe relativistic particles requires quantum field theory where $\hat x,\hat v,\hat p$ aren't quite well-defined because the number of particles may change.
In non-relativistic physics, it is also true that $\hat v = d \hat x / dt$, at least in the Heisenberg picture where this equation holds as an operator equation.
Now, the equation with $m\cdot \Delta x$ in the original question only holds if $\hat p$ means the "average" momentum (and similarly velocity etc.) during the relevant interval of time.
But we may ignore these things by taking $\Delta x$ infinitesimal. Then, ignoring the non-relativistic corrections,
$$ p = \frac{\Delta x\cdot m}{\Delta t} $$
Here, the $\Delta$ means the "change of the quantity" in the infinitesimal time $\Delta t$.
The key point. This equation is in no way "incompatible" with the uncertainty principle. The uncertainty principle says that if we know $x$ accurately e.g. at the initial moment of the infinitesimal interval, we can't know $p$ accurately. Because $p$ is rewritten in terms of $\Delta x$, the uncertainty principle simply means that if we know $x$ at the initial moment accurately, we can't know $\Delta x$ accumulated in the short period of time.
If $\delta$ means the statistical uncertainty, we will have
$$ \delta x \cdot \delta(\Delta x) \geq \frac{\hbar\cdot \Delta t}{2m} $$
For example, the uncertainty principle says that if the initial $x(t)$ were completely sharply determined, the position $x(t+\Delta t)$ would already be completely undetermined.
Comment: All physical quantities ("observables") are expressed as operators in quantum mechanics. But this is just a fact about the mathematical formalism. We may still talk about the measured values of the quantities, phenomenologically, and that's what the OP did, and we may talk about these things without knowing that the observables are represented by operators. The operator representation of observables like $x,p$ is needed for a clear proof of the uncertainty principle but it is not needed for the *formulation* of the uncertainty principle or the formulation of questions as as the OP's question.
Comment: I really think the main point to make here is that $\Delta x$ is ill-defined in the quanutm theory. You can't even make it infinitesimal - a position eigenstate will evolve into a non-position eigenstate even during an infinitesimal time interval.
Comment: It is not ill-defined in the quantum theory. $\Delta x$ is simply equal to $\hat x(t+\Delta t) - \hat x(t)$. Your comment about "eigenstates" is pure confusion. Almost no states are eigenstates of a given operator and there's nothing wrong about this fact - that's why the superposition principle says that all linear superpositions are equally allowed. One only gets an eigenstate after a measurement. But if one does a measurement, he still needs to know what operator he is measuring, and $\Delta x$ is as good an operator to measure as any other operator.
Comment: Ah, but then it's an operator! Maybe you should point that out in your answer more clearly, because I thought you were using the $\Delta x$ from the question, where it is the difference between the initial and final positions - a number.
Answer: The uncertainty principle states that product of the standard deviations of two observables is bounded below by a multiple of the absolute value of the expectation value of the commutator of the two operators. In detail, if $\Delta A=\sqrt{\langle \Psi|\left(A^2-\langle \Psi|A|\Psi\rangle^2\right)|\Psi\rangle}$ and $\Delta B=\sqrt{\langle \Psi|\left(B^2-\langle \Psi|B|\Psi\rangle^2\right)|\Psi\rangle}$ then $$\Delta A \Delta B \geq \left|\frac{\langle AB-BA\rangle}{2i}\right|=\left|\frac{\langle\Psi| AB-BA |\Psi\rangle}{2i}\right|
$$
For a canonical momentum conjugate to a specific coordinate, the commutator is a simple scalar and so has an expectation value that doesn't depend on the state and you can get the product of the two standard deviations to be bounded below by $\hbar/2.$
The canonical momentum only sometimes is equal to the mechanical momentum. And your formulation with a $t$ in the denominator is just not good at all. And they don't have to be inversely related to have a lower bound. To better understand the uncertainty principle you can read my answer to https://physics.stackexchange.com/a/169757


Chrome disable security warning for Intranet sites

Question: I have a site in my internal network that has a valid certificate for it's external hostname (blabla.example.com). But when I access it from my LAN I use it's IP address to connect to it and Chrome emits a warning due to the fact the hostname is different than the one used in the certificate. How can I disable this warning for this site or, preferentially for my whole LAN?
Answer: acces your site via the external name. for this you have to adjust your dns-resolver to provide the internal ip of your blabla.example.com. since you are a great admin you are able to achieve this :)
(to answer that 2nd part seriously you would have to provide more information about your network-topology or you could search http://serverfault.com)
Comment: for your own machine you could also go the short-route and set an entry to your `/etc/hosts` or the windows equivalent `C:\system32\drivers\etc\hosts` .. look http://en.wikipedia.org/wiki/Hosts_(file)
Comment: I'm not in control of the network, unfortunately (I share infrastructure with a few other companies). My external DNS resolves for another computer that does the port forwarding. I could start running a DNS server, though.


Why won't my nether portal bring me back where I left?

Question: On our minecraft server, I've built a Nether portal in my basement. Which connected two-way (tested) to a location in the Nether.

This nether portal took me to an area in the nether which was a small cave.
I dug upwards and surfaced close to a Nether Fortress. After clearing the fortress of Blaze spawners, I decided to 'move in'. So I went back to the portal, dismantled it, and reactivated in in a location in the Fortress.

The fortress would be within the same 128m radius I would assume as it's really close to the original place. Literally some steps to the surface, then a ladder up the nearest Nether Fortress bridge support.
Now, taking this portal back to my original doesn't work, I spawn deep underground in an Abandoned Mine Shaft.
I read somewhere that my Nether portal has found a 'better match' and this could be remedied by disabling the 'wrong' portal in the mine shaft.
However, upon multiple attempts, a new nether portal is dynamically created in the same area. See screenie for example. You'll see two 'stacked' portals on the left (from my different attempts at disabling) and then the current active one on the right.

My question is, how can I make sure these portals go to the correct place. Is it a matter of returning the portal to it's original location or am I stuck for returning to the basement?
Comment: Related? http://gaming.stackexchange.com/questions/28850/why-has-my-nether-portal-brought-me-back-some-where-mysterious?rq=1
Comment: What happens if you walk through your first overworld portal? Of if you reconstruct it? As far as I know, it should connect to that new portal.
Comment: After warping back to my house, I took the first portal, which successfully linked to my now moved nether fortress portal, then this portal goes to the abandoned mineshaft. It's like a three way portal, but none of them return me to the house.
Comment: @OrigamiRobot Sphax is the best texture pack!
Comment: Hah that's funny, I'm getting the exact same problem, abandoned mine shaft and all. Seems like one of the portals  needs to be moved so that it can connect to the correct one.
Answer: This is how it works:
Every time you enter a portal, the game looks for an exit portal inside +/-128 blocks square (y is irrelevant). If you enter a portal at x=100, y=60, z=200 in the overworld, this corresponds to x=12, y=60, z=25 in the Nether. The game scans a square from (x=-116, z=103) to (x=140, z=153), for all y values from 0 to 128. The closest portal in that space is where you appear. If there is no portal in that area, one will be created in a suitable place. Since there is a chance the x=12, y=60, z=25 will be obstructed, the game will search for an open space in that +/-128 blocks square. If such space is found nearby, all will be good, the new portal will lead back to the same one in the overworld.
Note that the game will only scan within the map height. That means that if you place a portal above the nether ceiling, it won't be found, and the game will create a new one for you.
However, sometimes the game will put the Nether portal far from the starting point, if it can't find other suitable place. Let's say it puts the Nether portal at x=80, y=60, z=110 (this is still in the +/-128 bounding box). When you enter that portal the game will search the corresponding space in the overworld: starting from x=640, z=880, it will search the +/-128 blocks - from x=512, z=752 to x=768, z=1008. As you may notice, the original overworld portal is well outside this box. So the game will create a new portal in the overworld. This is what is happening in your world.
To fix that, write down the coordinates of the portal in the overworld (use F3 to get them) and divide them by 8. Enter the Nether, go to the calculated coordinates and create a portal from the Nether. You don't have to be exact, as long as you are within 16 blocks from the calculated coordinates (you need to match only x and z, y is irrelevant). Then the game should find the original overworld portal. Or: Move the overworld portal using the above logic.
In described situation, there is no way to make the two portals lead to each other without moving either of them. I'd move the nether portal and if the new position is outside of the fortress, I'd build a short safe walkway to the fortress.
Here is a crude drawing of the process:
Comment: Thanks man, I didn't realise that the ratio was 8:1 - I've moved the Nether portal closer to it's original position and now it diverts to the correct place on both journeys!
Comment: @EgorHans: I'm not sure why you consider this janky - it's a perfectly reasonable design decision that the computation will be done each time a player uses a portal, rather than a single time with a portal remembering.  Binding portals permanently would create user interface pain when dealing with many-to-one portals, or when trying to relocate portals.  The current method is 100% deterministic given the current state of the world at any time, which means it's much easier to debug than something whose state is determined by the order of events in the past.
Comment: Really cool explanation. This is jank, though. Would it really be that hard to make a portal "remember" its corresponding portal? Like, that would just take making it a tile entity (which it probably already is, since it teleports the player) and adding one single reference!

EDIT: Just to make it clear, I'm 100% cool with the answer. I just complain about Mojang's janky coding, since doing it properly really wouldn't be that much harder.


How can one avoid Tor correlation attacks?

Question: People usually recommend either using a VPN or hosting an entry or exit node in a remote server. But what about proxies and bridges, for example? And are there any other way to avoid correlation attacks?
Comment: You really can't, adding a VPN only means both VPN provider and your ISP and the guard are in a position to perform the attacks. They're a problem that's general to (most? all?) existing low-latency anonymity networks.
Comment: you can find some more information on traffic correlation attacks here. https://blog.torproject.org/blog/traffic-correlation-using-netflows
Comment: Please don't just link to some webpages, but describe the solution and *additionally* link to pages.
Answer: As boring as it may sound, I think the most you can do is to use as much default torrc settings as possible. Don't manually pick relays for example. Oh, and use TorBrowser instead of setting up another browser to use Tor. If you can, use Tails.
Comment: Even if a relay is a relay I set up myself? For example, the entry or exit relay?
Comment: Well I think so. tor's default path selection properties are researched to be the most safe for everybody. If you interfere and restrict tor's behaviour, you may open random attack vectors.
Answer: What prevents you having a second circuit that shares entry node but not exit and adds noise by inflating entry node hroughput.  Can the entry node see individual packets?  I assume not ... just aggregate bandwidth and timing.  Noise generation would destroy size correlation and blur timing.
Now all thats left are longer term timing attacks at the session timescale.  Being a helper node may assist with that ... with your noise generator filling in any long silences you can effectively concatenate discrete sessions.
Not strictly bandwidth friendly, but if the alternative is torture... y'know : )
What we could use is the ability to ask middle nodes to randomly hold or buffer both requests and responses.  Perhaps even adding overhead with varilength 'null packets' ... and absorbing nulls sent by the client.
Send in 10 13 11 ... and 2 mins later a request of size 34 is released.  A response comes back as size 2000 and is forwarded 201 459 134 etc... mixed with a few nulls and the correlation blur is significant.
I wonder if an HS could be useful for timing, padding and deferral.  Essentially making a tor-to-tor supercircuit with user selectable jitter and latency... for those who would trade immediacy for correlation protection.
Just some thoughts ... don't shoot!
Comment: *"Can the entry node see individual packets"* It can see individual cells, which is sufficient. *"Noise generation would destroy size correlation and blur timing"* Not for the entry guard, no. And it wouldn't blur timing for others either. Adding "noise" is oft suggested but not as simple as it may first sound and it's expensive. This is covered in the Tor Project FAQ: https://www.torproject.org/docs/faq.html.en#SendPadding


How to backup installed softwares in Windows XP

Question: How to backup installed software on Windows XP and restore it back to another machine.
Is there any utility to do this ?
Comment: Do you mean individually, by software package, or are you wanting to clone one PC to another, all-inclusive?
Answer: I highly doubt there is a utility that can do this. Each software installs files to different locations in the system, some only in the program files directory, some in other places on the system. On top of that software often writes entries to different locations in the registry and there is no way a utility can keep track of all this for all programs out there.
Your best bet is to backup the settings for each program from the programs interface if it has such an option. Look for options like "export" och "backup" in the program. This produces a file which you later can import when you reinstall the program on the other machine and all settings should be restored.
Answer: PC Relocator can do this, no guarantee it can move every program.
http://www.amazon.com/Pearson-Software-PC-Relocator-4-0/dp/B000063CWY


Are there API available to measure the flexipage loading time?

Question: There is "Lightning Usage App" and there is "pages" tab, we can view the flexipage performance on that app. But is there any API available for developer to access those performance data instead of using the visualized way to view it in the Lightning Usage App? We want to get the loading time of those flexipage and use the data in our own report.
Answer: You can use this API and take a look at the EPT metrics (Experienced Page Time) for your page.
Comment: Thank you so I can do a query to the LightningUsageByFlexiPageMetrics and then use SumEPT/RecordCountEPT to get the average EPT for my flexipage and generate the report. Thank you!


Creating Google Maps Clusters by type

Question: I would like to know if it is possible to cluster markets on Google Maps not only by density or number, but also by type.
For example: I have 20 markers of type A and 50 of type B. Could I have a two different clusters, one grouping all the type A markers and another one with type B markers. Obviously with different icons.
Another possible solution would be a single cluster that its icon would change depending of the number of markers of type.
For example: if we have 20 markers type A and 50 type B, the cluster would be a B-Type image.
Any of this options can be possible?
Thanks a lot.
Comment: Thanks! But if I zoom out, mcA and mcB would cluster togheter?
Comment: you can add type A markers to say an object of MarkerClusterer called mcA and type B to mcB.
Answer: Yes, you can have a different MarkerClusterer for different types of markers. My map has seven different MarkerClusterer instances (I actually use: MarkerClustererPlus) managing different marker types, with different icons as you describe.
You could achieve your second option, but it would be some messy code with constant checking, re-checking, and setting of MarkerClusterer options. I strongly recommend the first option.
Answer: hope this may help you-
Google Maps Server-side Clustering with Asp.net

Creating Google Maps Clusters by type


When to use repeated measures versus ANOVA on differences

Question: I conducted an experiment where students were divided between two experiment groups and two language levels.  They all completed a pre-test and post-test.  I have tried the following two approaches, but I am not sure which one is giving me the correct answer.
I did a mixed ANOVA (within subjects test scores) and between subjects was the experiment group and language levels, using the Repeated measures ANOVA function on SPSS.
I also did a two-way ANCOVA on the post-test with the pre-test as a co-variate  the experiment and language groups were the between subjects factors.
The problem is that the results do not seem to be the same.  My groups were randomly allocated and there are no significant differences in their pre-test scores.
Comment: There's actually extensive literature on this question; it hasn't been resolved by a long shot, and each situation may present its own challenge.  For a bit of info see https://www.queryoverflow.gdn/query/how-should-one-control-for-group-and-individual-differences-in-pre-treatment-scores-in-a-randomised-controlled-trial-20_17724.html .  A longer source that looks informative is https://homes.ori.org//keiths/Tips/Stats_GainScores.html .
Comment: I removed the references to SPSS, which weren't really necessary to the question and which would tend to make the question off-topic on this site.
Comment: It's been a while but I find it strange that repeated measures ANOVA of two time points with the same between subjects factors is any different from ANOVA with same between subjects factors of the difference score. The t-test analog of a repeated measures ANOVA is the paired t-tests which is just analysis of the difference score. I think your results should only be different if you did an ANCOVA controlling for the pretest with the same between subjects factors.
Comment: More:  https://stats.stackexchange.com/questions/3466/best-practice-when-analysing-pre-post-treatment-control-designs/3467#3467, https://stats.stackexchange.com/questions/24077/how-to-choose-between-anova-and-ancova-in-a-designed-experiment/24080#24080
Comment: I have changed my post. It is quite correct the ANOVA on the difference scores and the repeated measures gave the same results.  It is the ANCOVA using the pre-test as a co-variate that gives me a different result.  I am looking for a non-technical explanation that I can use to explain which method I should use.  Thanks for all of the feedback.
Answer: The test of the main hypotheses should be the same for both of these
approaches. Keep in mind that the factors of interest are
different. In the second model of change (gain) scores, you have three F-values: a main-effect each for experiment and language and the interaction between the two. In the former within/between repeated measures ANOVA, you have seven F-values: main effects for experiment, language, and time as well as three two-way interactions and one three-way interaction. The two-way interactions correspond to the main effects in the first model and the
three-way interaction corresponds to the two-way interaction in the
first model. For example, the time by experiment interaction is testing
whether change over time differs between the groups. Thus, this is the
main effect for experiment in the change score ANVOA.
Below demonstrates that these two models produce identical
F-values for the three hypotheses tested by the change score model.
<code>> ## Create data in long format (2 rows per student)
> set.seed(1)
> y <- rnorm(32)
> student <- c(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,
+              10,10,11,11,12,12,13,13,14,14,15,15,16,16)
> student <- factor(student)
> time <- c(rep(c(1,2),16))
> experiment <- c(rep(1,16),rep(2,16))
> language <- c(rep(1,8),rep(2,8),rep(1,8),rep(2,8))
>
> ## run repeasted measures ANOVA
> summary(aov(y ~ experiment*language*time + Error(student/time)))

Error: student
                    Df Sum Sq Mean Sq F value Pr(>F)
experiment           1  0.020  0.0197   0.017  0.899
language             1  0.216  0.2165   0.186  0.674
experiment:language  1  0.058  0.0579   0.050  0.827
Residuals           12 13.963  1.1635

Error: student:time
                         Df Sum Sq Mean Sq F value Pr(>F)
time                      1  1.300   1.300   2.073 0.1755
experiment:time           1  0.080   0.080   0.128 0.7272
language:time             1  2.100   2.099   3.349 0.0922 .
experiment:language:time  1  1.133   1.133   1.806 0.2038
Residuals                12  7.524   0.627
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

> ## Createdata with change (gain) score
> gain <- y[time==2] - y[time==1]
> experiment <- c(rep(1,8),rep(2,8))
> language <- c(rep(1,4),rep(2,4),rep(1,4),rep(2,4))
>
> ## run ANOVA on change scores
> summary(aov(gain ~ experiment*language))
                    Df Sum Sq Mean Sq F value Pr(>F)
experiment           1  0.160   0.160   0.128 0.7272
language             1  4.199   4.199   3.349 0.0922 .
experiment:language  1  2.265   2.265   1.806 0.2038
Residuals           12 15.047   1.254
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
</code>
You can see in the above that the F for the experiment by language interaction effect in the change score ANOVA is equal to the time by experiment by language F from the repeated measure ANOVA (both are 1.806 with 1,12 degrees for freedom and a p-value of 0.2038).


Windows Phone 8 maps - licence uncertainty

Question: I plan developing Windows Phone 8 map application and think of using standard wp8 maps (Nokia) and map controls. It will be a fleet maagement/customers' devices location control application.
May I use standard maps used in wp8 and classes such as Microsoft.Phone.Maps, Microsoft.Phone.Maps.Controls?
On the first side, on the page
http://developer.nokia.com/lumia/nokia-apis/mapping
there is info:

Developers can use the APIs and library for any applications published
  in Windows Phone Store.
  The Windows Phone 8 Maps API and HERE
  launchers are available free of charge for all developers.

But on the other side, when you enter "full terms and conditions" there is point 3 "Use Restrictions" where we can find like

You may  not:  (...)

use the Mapping APIs for business asset tracking, fleet management, or dispatch;
use the Mapping APIs in connection with any internal business application which (a) is  directly related to the operation of your
  core business or the core business of your  customers, and (b) the
  sole users of such application are your employees, contactors or
  customers;

Does it mean my fleet maagement/customers' devices location control application can't use any Microsoft maps control code? (even with tiles from other source like OSM) If so, what are the other options/libraries?
Answer: Your application CAN use the Windows Phone 8 Maps API, but CAN'T use the Mapping APIS. Those are two different APIs: the first one is what you need to use (show points, routes, etc.), the second one is to create a map image, I mean, create roads, avenues, etc.


Best book for statistical inference (Self-study)

Question: I want to develop some skills in statistical inference for a career in data science or machine learning. I purchased the book "All of Statistics" which is a good book, but there are not answer keys online, which makes it difficult to check whether or not I am doing things correctly. Can anyone suggest books that are similar, but have exercise answers available.
Comment: A number of related threads can be found by searching for posts bearing the [tag:references] tag.
Comment: As @Sycorax pointed out, there are several threads on similar topics. The book you choose will also depend on your level of mathematical expertise and what you want out of the book.
Answer: I've been working through a masters thesis in wildlife sciences, with some heavy statistics. Browsed quite a few books but found this one the most intuitive:
https://www.amazon.ca/gp/product/1461471370/ref=ppx_yo_dt_b_asin_title_o07_s00?ie=UTF8&psc=1
"An Introduction to Statistical Learning: with Applications in R" by Gareth James et al. 2017
Getting into R seems the way to go as well. At least for ecology. It's really taken over all the statistical software being used in this field.