Using x:Name or Name in WPF
In WPF, what are the differences between the x:Name and Name attributes?
How can I solve this integral using the Residue theorem? $$ \int_{-\infty}^\infty \frac{\sin(x)}{x^2 + 4x + 5}dx$$  What I now is you can use residue theorem, and evaluate this integral  $$ \oint \frac{e^{iz}}{z^2 + 4z + 5}dz$$ and through calculating the residues and using the residue theorem I get that the answer for the above integral is $$\pi e^{-1-2i}$$  However after this I am completely lost.  Any guidance will be much appreciated. I would like to know why I can evaluate the integral as an exponential integral as well. Robocall claiming to be IRS saying they are about to sue - Is it legit? We got a recorded call with a message claiming to be from the IRS.  It said they were giving final notice and preparing to file a lawsuit against us.  In our case, the message went to voicemail so the end was cut off, but it seemed like a scam all the way. (We don't have any pending problems with the IRS as far as we know.)  The question was whether this is a known scam? How can I program a simple chat bot AI? What should main() return in C and C++? Evolution threads extra lines before signature Disk space usage doesn't add up with df & du I think I have heard that the following is true before, but I don't know how to prove it:     Let $A$ be a matrix with real entries. Then the minimal polynomial of $A$ over $\mathbb{C}$ is the same as the minimal polynomial of $A$ over $\mathbb{R}$.   Is this true? Would anyone be willing to provide a proof?    Attempt at a proof:  Let $M(t)$ be the minimal polynomial over the reals, and $P(t)$ over the complex numbers. We can look at $M$ as a polynomial over $\Bbb C$, in which case it will fulfil $M(A)=0$, and therefore $P(t)$ divides it. In addition, we can look at $P(t)$ as the sum of two polynomials: $R(t)+iK(t)$. Plugging $A$ we get that $R(A)+iK(A)=P(A)=0$, but this forces both $R(A)=0$ and $K(A)=0$. Looking at both $K$ and $R$ as real polynomials, we get that $M(t)$ divides them both, and therefore divides $R+iK=P$.   Now $M$ and $P$ are monic polynomials, and they divide each other, therefore $M=P$.  Does this look to be correct?    More generally, one might prove the following     Let $A$ be any square matrix with entries in a field$~K$, and let $F$ be an extension field of$~K$. Then the minimal polynomial of$~A$ over$~F$ is the same as the minimal polynomial of $A$ over$~K$. Should I use  tag for icons instead of ? Sum and Product of Infinite Radicals Decode HTML entities in Python string? How to find the joint PDF? Ley X,Y two random variables with density $f(x,y)=8xy \  \text{if} \   0&lt;x&lt;y&lt;1$  Find the joint distribution F(x,y).  I find that $F(x,y)=2x^2y^2-x^4\ \text{  if}  \ 0&lt;x&lt;y&lt;1$ but I dont know how to find the didtribution in other points. How can I make my browser lie about my operating system? I'm using Chromium (Version 30.0.1599.114 Ubuntu 12.10) under Linux. I'm trying to access  that claims that it doesn't work under Linux. Of course, this is most likely crazy since the web is platform-independent (unless they're using some kind of evil plug-in).  I've used a user agent switcher to supply a Windows user agent, but to no avail. Upon viewing the source, it appears that the site is using Javascript to determine the operating system. I'm looking for a way to get my browser to report in Javascript that it is Windows or MacOS.  Do you know how to do it? Proving $\tan(\theta_1+\theta_2+\cdots+\theta_n)$ has the form $\frac{S_1-S_3+S_5+\cdots}{1-S_2+S_4+\cdots}$ $$\tan(\theta_1+\theta_2+\cdots+\theta_n)=\frac{S_1-S_3+S_5+\cdots}{1-S_2+S_4+\cdots}$$  where  $S_i$ denotes the sum of product of tangent of angles taken $i$ at a time.     For example,$$\tan(\theta_1+\theta_2)=\frac{S_1}{1-S_2}=\frac{\tan\theta_1+\tan\theta_2} {1-\tan\theta_1\tan\theta_2}$$   (This formula is given  in my textbook with no derivation or background)  How to derive this? How to copy files that have too long of a filepath in Windows? How can I test the quality of a RNG? On electronics.stackexchange we had  about constructing a True Random Number Generator. Since the method relies on noise, which isn't deterministic, the only way to test the quality of the RNG seems to be empirical. Not being a statistician I suggested to test a long bit sequence for normality, but I have no idea what outcome is acceptable and what isn't. For instance counting single bits I guess we have a thumbs-up for a 499500/500500 distribution, but when is the ratio too much skewed to be acceptable? Same for 2-bit and longer sequences. Of course, if testing for normality is a Bad Idea™, I'd like to hear it, including better alternatives.    edit Diehard was mentioned a few times, but I'm not sure this answers my question. The normality test should give a normal distribution, with better bell curve approximations for longer sequences. Diehard seems also to have tests which either should result in normal or exponential distributions. But my question remains: how do I judge the results? Just by looking at the curve and discern a bell curve in it? To get back at my first example, a 499500/500500 distribution is definitely OK, and a 950000/50000 distribution definitely is a no-no, so where does the switch-over happen? Why did Aragorn and Theoden ride out at the Hornburg? In the Battle of the Hornburg from The Two Towers, Aragorn and Theoden say "We must ride out." Why did they do this?  Was it just a matter of honor? Did they ride out on their horses in the middle of battle because they thought it was the end, as they were outnumbered? Was it because Aragorn knew Gandalf was coming so they were confident they were about to win? Join matrix based on conditions Unit testing is, roughly speaking, testing bits of your code in isolation with test code. The immediate advantages that come to mind are:  Running the tests becomes automate-able and repeatable You can test at a much more granular level than point-and-click testing via a GUI    My question is, what are the current &quot;best practices&quot; in terms of tools as well as when and where to use unit testing as part of your daily coding? Lets try to be somewhat language agnostic and cover all the bases. Say I have two strings,  String s1 = "AbBaCca"; String s2 = "bac";   I want to perform a check returning that s2 is contained within s1. I can do this with:  return s1.contains(s2);   I am pretty sure that contains() is case sensitive, however I can't determine this for sure from reading the documentation. If it is then I suppose my best method would be something like:  return s1.toLowerCase().contains(s2.toLowerCase());   All this aside, is there another (possibly better) way to accomplish this without caring about case-sensitivity? In Star Trek II: The Wrath of Khan (the one from 1982, not the recent remake), Khan yells "This is Ceti Alpha V!" and they're all like this is a big surprise, we didn't know.  If they had previously charted the planet, wouldn't the computer have told them the planets weren't quite where they should be based on earlier visits? I mean, we can predict the next hundred transits of Venus, shouldn't 23rd century explorers be able to predict where the Ceti planets are less than twenty years after their first visit?