cosine of angle between random variables is equal to the correlation coefficient?
Building the connection between cosine similarity and correlation in R
How do I match any character across multiple lines in a regular expression? For example, this regex  (.*)&lt;FooBar&gt;   will match:  abcde&lt;FooBar&gt;   But how do I get it to match across multiple lines?  abcde fghij&lt;FooBar&gt; Basic Electronics Book I need basic electronics books  (diodes,transistors,current.. etc) as I am just starting out with electronics and want to have something to read over the holiday.  Any suggestions of good beginners' books? Why did I just get the Announcer Badge and the Booster badge? Today I got both the Announcer badge and the Booster badge for  that I asked last year.   I don't remember ever sharing a link to it, and it seems odd to me that I would get both badges in one day, implying that there were at least 276 people who viewed it today from a link I don't remember ever sharing.  What's going on? Prefer composition over inheritance? Why prefer composition over inheritance?  What trade-offs are there for each approach?  When should you choose inheritance over composition? Is there any method to close connection similar to  for  in WordPress?  Is it not necessary to close connection for global $wpdb? We are provided with a string A (may contain repeated characters as well ). One needs to make all possible permutations of A , and find out how many pairs of strings chosen from these permutations are not similar.  Two strings are similar if we can make both of them exactly same by carrying out at most 1 swap in each of them .  Example :- if we are provided with string abcd  , then for permutation abcd , the permutations which are not similar to it are bcda , bdac , cadb , cdba , dabc , dcab . Similar is the case for other permuations as well. So overall number of desired pairs are 24*6=144 .  I tried solving it for each possible pair by approach mentioned here     But as the permutations can be large enough , I need a better approach of solving this. For three days straight, I have connected to the public WiFi network at my local library. Each day, I have seen a different prompt in Terminal. Here are some of the prompts I've seen:  zp-pc:~ russell$ mary-pc:~ russell$ normob05:~ russell$   I have check under System Preferences -> Sharing, and my computer name is "Russell's Mac". Also, I set the DHCP Client ID to "RUSSMAC" under System Preferences -> Network -> Advanced -> TCP/IP, but I still see the random host names at the Terminal prompt.  Why is my computer name changing every day? Did Snape ever commit murder? It's well known that Severus Snape was, in one way or another, a Death Eater since he was at Hogwarts. He hung out with the likes of Avery and Mulciber who became well known Death Eaters, he joined Voldemort right after he left Hogwarts, and he basically became Voldemort's right hand man until the very end.   However, in his time as a Death Eater did he ever kill anyone? We know that he was a Death Eater for around 3 years before Voldemort fell; Lily and James died at 21 and they were the same age as Snape, so it would have been 3 years since they left Hogwarts. Then after Voldemort came back in book 4, Snape would have been a Death Eater again for around 3 years. That's a total of around 6 years of Death Eaterhood with Voldemort.  So, in either of these periods, did Snape commit murder as part of his job as Death Eater? I'm not counting a certain death at the end of book 6 for reasons which are obvious if you've read book 7.   Clearly it's much more likely he killed before Voldemort fell since that roughly correlated with the period when he pledged allegiance only to Voldemort, before he became a teacher at Hogwarts. But did he ever do it? Let $M$ be a smooth manifold and let $N$ be a manifold with boundary. If $dF_{p}$ is an isomorphism, then $F\left(p\right)\in\mbox{int}M $. Let $M$ be a smooth manifold and let $N$ be a manifold with boundary, both with the same dimension $n$. If $dF_{p}$ is an isomorphism, then $F\left(p\right)\in\mbox{int}N  $.  I am trying to prove this theorem to prove a result about smooth embeddings.  Here is how I am thinking the problem could be solved. Assume thet $F(p)$ is a boundary point of $N$. Then there exists a chart $(V,\psi)$ at $F(p)$ such that $\psi(V) $ is an open subset of the upper half space $\mathbb{H}^{n}$. I guess we have to use some fact about $M$ having no boundary and the the fact that $dF_p$ is an isomorphism to show that there is a contradiction, but I cannot figure that out. Do we still need to avoid using frames and iframes for SEO? I thought frame and iframe were bad for SEO, but today I was doing a search for "numismatica" on Google.it.  The 3rd site is lemonete.com which is all made with frames. A competitor site (nummus.com) that has no frames ranks much lower when searching for the same word: "numismatica".  So can we use frames without taking an SEO hit now?  Any explanation (possibly simple) would be appreciated also about the fact the 2nd site ranks much lower. :) Is there any criterion (theorem or algorithm) to find out a given polynomial $f(x)$ is irreducible over the field $\mathbb{F}_2$? Why is RAM not put on the CPU chip? Modern CPUs are very fast compared to all things external, including memory (RAM).   It is understandable, since CPU clock frequency has reached a point where it takes several clock ticks for an electric signal simply to run from from the CPU through the bus to RAM chips and back.   It also complicates life on many levels: multi-level cache hierarchies are built to deliver data closer to the CPU, which in turn require complex synchronization logic in the chip. Programs must be written in a cache-friendly way to avoid wait cycles while data is fetched.   Many of these problems could be avoided if a significant amount of RAM was located directly on the CPU chip. It doesn't have to an exclusive arrangement: maybe put 1-4 GB on the chip, depending on its class and allow additional memory installed separately.   I'm sure there are good reasons Intel, AMD and the like are not doing this. What are these reasons? Is it that there's no room to spare on the chip? Dual-boot boot menu does not show up after installing Ubuntu 15.10 alongside Windows 10 Write a formula in an Excel Cell using VBA I'm trying to use VBA to write a formula into a cell in Excel. My problem is that when I use a semicolon (;) in my formula, I get an error:     Run-time error 1004   My macro is the following :   Sub Jours_ouvres()     Dim Feuille_Document As String     Feuille_Document = "DOCUMENT"             Application.Worksheets(Feuille_Document).Range("F2").Formula = "=SUM(D2;E2)"     End Sub How to add CC to a webform email? I'm using Drupal 7.  Is it possible to add a CC to a webform email?  I was using   function theme_webform_mail_headers($variables) {   $headers = array(     'X-Mailer' =&gt; 'Drupal Webform (PHP/' . phpversion() . ')',   );   return $headers; }   changing it with      function MYTHEME_webform_mail_headers($variables) {       $headers = array( 'CC' =&gt; 'ccmeail@domain.com', 'X-Mailer' =&gt; 'Drupal Webform (PHP/'. phpversion() .')',  );       return $headers;     }   It does not work, I've cleared all the chaches and it does not add the CC. How could I add the CC?  Thanks in advance. Pullback of a Volume Form Under a Diffeomorphism. I have an exercise here, which I have no idea how to do.     Problem: Let $ U $ and $ V $ be open sets in $ \mathbb{R}^{n} $ and $ f: U \to V $ an orientation-preserving diffeomorphism. Then show that   $$   {f^{*}}(\text{vol}_{V}) = \sqrt{\det \! \left( \left[   \left\langle {\partial_{i} f}(\bullet),{\partial_{j} f}(\bullet) \right\rangle   \right]_{i,j = 1}^{n} \right)} \cdot   \text{vol}_{U}. $$   Notation:         $ \text{vol}_{U} $ and $ \text{vol}_{V} $ denote the volume forms on $ U $ and $ V $ respectively.   $ f^{*}: {\Lambda^{n}}(T^{*} V) \to {\Lambda^{n}}(T^{*} U) $ denotes the pullback operation on differential $ n $-forms corresponding to $ f $. How do I fix a NoSuchMethodError? The Lie algebra of $SL_n(\mathbb C)$ are the matrices where the trace is $0$. But what is the Lie algebra of $SL_n(\mathbb H)$ where $\mathbb H$ is the quaternions? What packages do people load by default in LaTeX? I'm getting the impression from reading the answers written by some of the real experts here that there are quite a few little packages that just tweak LaTeX2e's default behaviour a little to make it more sensible here and there.  Rather than try to pick these up one by one as I read answers to questions (and thus risk missing them), I thought I'd ask up front what LaTeX2e packages people load by default in (almost) every document.  As this is a "big list" question, I'm making it CW.  I don't know if there are standard rules across all SE/SO sites for such questions, but on MathOverflow the rule is generally: one thing (in this case, package) per answer.  I guess that if a couple of packages really do go together then it would be fine to group them.  This is perhaps a little subjective and a little close to the line, so I'll not be offended if it gets closed or voted down!  (But please explain why in the comments.)  Also see our community poll question: We know that $221 = 17*13$. So we can check if the system has roots to both of those equations separately, which it does:  $x^{5} \equiv 2$ mod $13$ has the solution $6 + 13n$ and $x^{5} \equiv 2$ mod $17$ has the solution $15 + 17n$.   I got these numbers from wolfram, I have no idea how to solve this problem WITHOUT a calculator. And even after finding these numbers. How would one obtain a solution modulo $221$? I was thinking the Chinese Remainder Theorem but I am under the assumption that CRT only applies to problems with powers of $x$ which are $1$.  Thanks.