What is the average distance of two points chosen uniformly on a unit square? What I am asking is how to calculate $E\left(\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}\right)$ for $x_1, x_2, y_1, y_2$ spread uniformly on $[0,1]$.
A square with side $a$ is given. What is the average distance between two uniformly-distributed random points inside the square?  For more general "rectangle" case, see . The proof found there is fairly complex, and I am looking for a simpler proof for this special case. I expect it could be significantly simpler.  See also .
How to switch language keyboard combination? How to create a progress bar? Calculating the number of possible paths through some squares I'm prepping for the GRE.  Would appreciate if someone could explain the right way to solve this problem. It seems simple to me but the site where I found this problem says I'm wrong but doesn't explain their answer. So here is the problem verbatim:    Find the number of paths from x to y moving only right (R) or down (D).  My answer is 6. What am I missing??  Thanks for any help. Can we have a moderator only "flag for community team/developer attention" link on posts? There are times when moderators come across things that only Stack Exchange employees can deal with. These include things like deleting sensitive information permanently from posts disassociating users from posts that require direct database access.  (The previous use case is now possible for moderators to do directly the moderator redaction tool)  Currently the workflow is:   See the post (either in normal site usage or via a flag) Go to chat Ping one of the community team (if they are around) Explain the problem   A far better workflow for the moderator would be to simply able to flag the post so it then appeared in an "employee only" queue somewhere. This could either be a page on the main Stack Exchange site or (better still) their inbox.  (OK I admit I hadn't fully thought this last bit out.)  This could either be a moderator "flag to devs" link on the post or a new option on the existing flag dialog (probably the better solution).  Now that moderators can't merge we have a fairly common situation where this would be very useful. A new users posts an answer (or question on sites that don't require registration) then loses their cookies and ends up creating another unregistered account (or two). Eventually the might even create a registered account. It used to be easy to merge the unregistered accounts into the registered ones, but now we either have to badger the OP to use the "merge accounts" form or ping the team somehow.  Having the "flag for team" option would be very useful in this scenario. We are always introduced to magnets by pictures illustrating a parallepiped magnet, a horseshoe magnet, etc... Anyway the first time we actually calculate a magnetic field is for eelectromagnets. Indeed I've rarely seen explaining or calculating the magnetic field of a permanent magnet. I know formulas for the magnetic field of a moving charge, around a conductive wire, inside a solenoid, but I don't have idea on how to go about calcualting the filed of a simple permanent magnet. It's like that without the help of electricity I'm stuck. I'd guess it would be heavily dependent on the magnetic material, its shape and the medium in which is placed. I hope that someone would provide me some insights on why such formulas are  never introduced in most physics courses and lay down some examples of a permanent magnet field caluclation. Is there a term for the moment when a lot of users visit/log onto your website at the same time? Is there a term for the moment when a lot of users visit/log onto your website at the same time? What is the scope of variables in JavaScript? What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally? Once in a while you wish to address a comment to someone in particular, so you type @ and then you pause ... because the username is  or .  Short of using copy-paste to get their username right (which is even more cumbersome on a mobile device), is there another way around this? In a few cases I've noticed that the system will attempt to "promote" a comment to a reply, but I'm not sure if that's very reliable.  Should user names at least start with a normal letter?  Update  The auto-complete feature seems to normalize Zalgo'ish usernames, so typing the letter L will trigger the suggestions as expected; this is of course knowing that the name actually spells "lawrence", which may not always be obvious.  Knowing the way of the symbol ninja would surely help to type Ω using only the elbows as well, but not everyone is blessed with the same keyboard layout.  Suggestion  It would be nice to have a reply feature like this:        When ↳ reply is clicked, it will automatically populate the comment box with @username pre-filled in.   Additional notes  To clarify, I'm not suggesting to put the "reply" on all comments, as proposed , because in most cases the owner of a post is already notified of a new comment; this would strictly be to effect cross-commenter communication. Count work days between two dates How can I calculate the number of work days between two dates in SQL Server?   Monday to Friday and it must be T-SQL. What is terminal velocity? I've heard the term especially when the Discovery Channel is covering something about sky diving. Also, it is commonly known that HALO (Hi-Altitude, Lo-Opening) infantry reaches terminal velocity before their chutes open.    Can the terminal velocity be different for one individual weighing 180 pounds versus an individual weighing 250 pounds? wrappers and JavaScript pop-up? Use Case:  What i want is a list of records, and allow this user to choose 2 of those records, then click a button to go to a new VF page, if the user selects more than 2, i want him to get a notification of some kind saying you need to select 2 records, I do not want the page refeshed though.  Strategy:  I'm creating a wrapper class for the records like this:  and i have that part going by creating a custonm controller... I need the notification part working.   Problem:  I don't know how to call methods from the customController in javascript Also, i do not want to refresh the entire page. I just want them to go back to where they were. I was thinking a pop-up notification but I'm flexible.. What is difference between a ring and a field? Solution af a system of 2 quadratic equations I have a system of two quadratic equations with unknowns $x$ and $y$:  $$a_{1 1} x y + a_{1 2} x^2 + a_{1 3} y^2 + a_{1 4} x + a_{1 5} y + a_{1 6} = 0,\\ a_{2 1} x y + a_{2 2} x^2 + a_{2 3} y^2 + a_{2 4} x + a_{2 5} y + a_{2 6} = 0,$$  where $a_{i j}$ are arbitrary scalars.  Is there an algebraic solution of the above system? I came across some scenarios like these:     Case 1: Obviously not true       Q: Why does the sun rise and fall every day?   A: Because the Earth .   A2: Because .     Case 2: Letting the OP do what is declared not to       Q: How can I charge my phone without a charger?   A: Try the USB ports on your computer.   A2: Go buy a charger.    Case 3: Attempt to joke (despite looking like a real answer)       Q: What's this round bird in bright red? [An image]   A: It may be a rare or mutated species of sparrow.   A2: It's a .   A3: It's an .    Should I flag A2/A3 as NAA in those cases? Novel about a dragon lord who has to wear gloves at all times I read this novel when I was young. It is probably a children's or young adult novel. I think I read it in 1997 or earlier. I remember very much enjoying it, but the title and most of the details are unfortunately quite hazy for me. Here is what I have:   The main character was a girl in her early teens (I think) She was sent to live with a man who was some sort of master of dragons She may have been related to this man (his niece, perhaps), but I also may have made that up The man wore gloves at all times. When he removed them and touched someone he could see something about them. Their future, I think?   Sound familiar to anyone?   Update: Thinking back on it some more, I think I remember that the dragon lord guy and the heroine ended up in some kind of romantic relationship (making it less likely that he was her uncle). Also, he did at one point take off his gloves and touch her, seeing her future (I think).  'nother Update: It's possible that I'm confusing dragons with volcanos. Or, there may have been both. And I think they lived on an island, or a coastline? Why didn't Harry die in the dark forest? Combining multirow and multicolumn When combining multirow and multicolumn in the same cell of a table I am getting extra vertical lines:  \documentclass[plain]{article} \usepackage{multirow} \pagestyle{empty}  \begin{document}  \begin{tabular}{|l|l|l|l|}\hline   \multirow{10}{*}{numeric literals} &amp; \multirow{5}{*}{integers} &amp; in decimal &amp; \verb|8743| \\ \cline{3-4}   &amp; &amp; \multirow{2}{*}{in octal} &amp; \verb|0o7464| \\ \cline{4-4}   &amp; &amp; &amp; \verb|0O103| \\ \cline{3-4}   &amp; &amp; \multirow{2}{*}{in hexadecimal} &amp; \verb|0x5A0FF| \\ \cline{4-4}   &amp; &amp; &amp; \verb|0xE0F2| \\ \cline{2-4}   &amp; \multirow{5}{*}{fractionals} &amp; \multirow{5}{*}{in decimal} &amp; \verb|140.58| \\ \cline{4-4}   &amp; &amp; &amp; \verb|8.04e7| \\ \cline{4-4}   &amp; &amp; &amp; \verb|0.347E+12| \\ \cline{4-4}   &amp; &amp; &amp; \verb|5.47E-12| \\ \cline{4-4}   &amp; &amp; &amp; \verb|47e22| \\ \cline{1-4}   \multicolumn{3}{|l|}{\multirow{3}{*}{char literals}} &amp; \verb|'H'| \\ \cline{4-4}   &amp; &amp; &amp; \verb|'\n'| \\ \cline{4-4}   &amp; &amp; &amp; \verb|'\x65'| \\ \cline{1-4}   \multicolumn{3}{|l|}{\multirow{2}{*}{string literals}} &amp; \verb|"bom dia"| \\ \cline{4-4}   &amp; &amp; &amp; \verb|"ouro preto\nmg"| \\ \cline{1-4} \end{tabular}  \end{document}     Notice the vertical lines in the char literals and string literals cells (which should span three columns). How can they be avoided? Is 512 bits a more secure hashing than 256 bits? How to modify an array's values by a foreach loop? Proving that a Hölder space is a Banach space I am trying to show that the Hölder space $C^{k,\gamma}(\bar{U})$ is a Banach space. To do this, I successfully proved that the mapping $\| \quad \| : C^{k,\gamma}(\bar{U}) \to [0,\infty)$ is a norm, by proving its properties.   But how do I show that the sequence $\{u_k\}_{k=1}^\infty \subset C^{k,\gamma}(\bar{U})$ converges to $u \in C^{k,\gamma}(\bar{U})$, that is, how do I show that $$\lim_{k \to \infty}\|u_k-u\|=0,$$ which would mean the normed linear space is complete, and hence a Banach space?  Here are the following taken from PDE Evans, 2nd edition, page 255:     Definition. The Hölder space $$C^{k,\gamma}(\bar{U})$$ consists of all functions $u \in C^k(\bar{U})$ for which the norm $$\|u\|_{C^{k,y}(\bar{U})}:= \sum_{|\alpha|\le k} \|D^\alpha u \|_{C(\bar{U})}+\sum_{|\alpha|=k} [D^\alpha u]_{C^{0,\gamma}(\bar{U})}$$ is finite.   Also from page 254,     Definitions. (i) If $u : U \to \mathbb{R}$ is bounded and continuous, we write $$\|u\|_{C(\bar{U})}:=\sup_{x\in U}|u(x)|.$$      (ii) The $\gamma$th-Hölder seminorm of $u : U \to \mathbb{R}$ is $$[u]_{C^{0,\gamma}(\bar{U})}:=\sup_{\substack{x,y\in U \\ x \neq y}} \left\{\frac{|u(x)-u(y)|}{|x-y|^\gamma} \right\},$$ and the $\gamma$th-Hölder norm is $$\|u\|_{C^{0,\gamma}(\bar{U})}:=\|u\|_{C(\bar{U})}+[u]_{C^{0,\gamma}(\bar{U})}.$$   This is all I got so far: \begin{align} \|u_k-u\|_{C^{k,\gamma}(\bar{U})}&amp;=\sum_{|\alpha|\le k} \|D^\alpha u \|_{C(\bar{U})}+\sum_{|\alpha|=k} [D^\alpha u]_{C^{0,\gamma}(\bar{U})} \\ &amp;= \sum_{|\alpha|\le k} \sup_{x\in U} |u_k(x)-u(x)|+ \sum_{|\alpha|=k} \sup_{\substack{x,y\in U \\ x \neq y}} \left\{\frac{|[u_k(x)-u(x)]-[u_k(y)-u(y)]|}{|x-y|^\gamma} \right\}. \end{align} Now, where can I go from here, to show that $\lim_{k \to \infty}\|u_k-u\|_{C^{k,\gamma}(\bar{U})}=0$? The sequence is Cauchy, and I have to use that fact somehow.