A friend sent me this problem and I couldn't find a solution online. I'm wondering if my attempt is correct and whether if there is a more elegant solution?  The Problem: Suppose that $a_0, a_1, ... a_{n-1} $ are $n$ integers. Show that the following product $$ P(a_0,a_1,...,a_{n-1}) = \prod _{0\le i&lt;j\le n-1}^{ }\frac{a_j-a_i}{j-i}\ \qquad(1)$$ is integer.  My Attempt: We will prove this with induction and an application of the pigeonhole principle  Base case: $n=1$  $$P(a_0,a_1) = \frac{a_1 - a_0}{1-0}$$ is clearly integer as $1-0 = 1$ and $a_1,a_0 \in \mathbb{N}$  We now assume $n=k$ Assume $P(a_0, ... , a_{k-1}) \in \mathbb{N}$  Note that  $$P(a_0, ... , a_{k}) = P(a_0, ... , a_{k-1}) \cdot \prod _{0\le i \le k-1}^{ }\frac{a_k-a_i}{k-i}\ \qquad (2)$$  For any fixed $0 \le i \le k-1$, we see that it is possible that $k-i \not| \ a_k - a_i$, and then resulting in the product on the right of (2) being non-integer.   Specifically, we observe that the product on the right of (2) is non integer if the following occurs  $$a_k\ \text{mod}\ (k-i) \not\cong a_j \qquad (3)$$  For all $0 \le j \not= i \le k-1$  Note that as $0 \le i \le k-1$, then $1 \le k-i \le k$, meaning that the complete residual class of $k-i$ is at a maximum, $\{0, 1, 2, ..., k - 1\}$, $k$ possible distinct residuals.  Consider the $P(a_0, ... , a_{k-1})$ in (2)  By the definition of $P$ in (1), we see that for every unique permutation of the set $\{c,d\}$ corresponding to the term $\frac{a_c-a_d}{c-d}$ for $0 \le c&lt;d \le k-i$ exists in $P(a_0, ... , a_{k-1})$.  Additionally, due to (3), we have that $a_c, a_d$ can have a possible $k-1$ distinct residuals at most, with one being the residual of $a_k\ \text{mod}\ (k-i)$  But note that $P(a_0, ... , a_{k-1})$ uses $k$ variables $a_0, a_1, ..., a_{k-1}$, so therefore by the pigeonhole principle, there must be one term in that product that results in $$k-i \ | \ a_c - a_d$$  Otherwise similar stated by saying that $a_c - a_d \ \text{mod} \ k - i\cong 0$  Thus, we show that for any $0\le i \le k-1$, the product on the right of $(2)$ will still evaluate to be an integer. Thus (2) is integral as we also assumed that $P(a_0, ..., a_{k-1})$ is integer.   Thus, by the induction principle, (1) must be true.  I'm not sure if this is a valid formal proof, also am wondering if there are better solutions.
Let $x_1,...,x_n$ be distinct integers. Prove that  $$\prod_{i&lt;j} \frac{x_i-x_j}{i-j}\in \mathbb Z$$   I know there is a solution using determinant of a matrix, but I can't remember it now. Any help will be appreciated.
Lie algebra and tangent space at the identity are isomorphic Define the Lie algebra $\mathfrak{g}$ of a Lie group G to be the set of all left-invariant vector fields of $G$. I want to prove that   $$          f: \mathfrak{g} \rightarrow T_eG \\              X \mapsto X(e) $$ is a linear isomorphism.  The only thing that I have left to prove is surjectivity.Letting $v\in T_eG$, we set $X\in \mathcal{X}(G)$ such that $\forall x\in G,\,X(x)=L_{x_{*,e}}(v)$ (I still have to show that such an $X$ is indeed a vector field on $G$). We get that  $$ f(X)=X(e)=L_{e_{*,e}}(v)=v $$  where the last equality holds because  $$       L_{e_{*,e}}(v)f = v(f \circ L_e) = v(f \circ id_G) = v(f) $$ for any $f\in C^\infty(G)$. (I am thinking of the tangent vectors as derivations).  Now all we have left to do is prove that such an $X$ is left-invariant, and it is therefore an element of $\mathfrak{g}$, but I do not know how. I tried to prove that  $$            \forall f\in C^\infty(G),\, L_{{x}_*,y}(X(y))f=X(L_x(y))f $$ but with no success. Should Suggested Edits change the technical content of a post? I have noticed a significant number of suggested edits that attempt to fix code, or change the original meaning of someone else's post.    Is this really a good idea?    I've been on StackOverflow awhile, and among the editors who have sufficient reputation to edit without approval, I've never seen anyone modify the technical content or meaning of someone else's post.   I would consider obvious syntax and spelling errors OK to change, but I have seen many suggested edits that change the meaning of the code that was posted, or add things to the code that have nothing to do with the original question. A good example of this would be adding parameters to a SQL command, when the question was not asking about SQL injection. Having recently introduced an overload of a method the application started to fail. Finally tracking it down, the new method is being called where I did not expect it to be.  We had  setValue( const std::wstring&amp; name, const std::wstring&amp; value );  std::wstring avalue( func() ); setValue( L"string", avalue ); std::wstring bvalue( func2() ? L"true", L"false" ); setValue( L"bool", bvalue ); setValue( L"empty", L"" );   It was changed so that when a bool value is stored we use the same strings (internal data storage of strings)  setValue( const std::wstring&amp; name, const std::wstring&amp; value ); setValue( const std::wstring&amp; name, const bool&amp; value );  std::wstring avalue( func() ); setValue( L"string", avalue ); setValue( L"bool", func2() ); setValue( L"empty", L"" ); &lt;&lt; --- this FAILS!?!   The problem with L"" is that it is implicitly casting and previously it was happy to be a std::wstring, but not it prefers to be a bool. The MSVC compiler does not complain, or raise warning, so I'm worried that even if I "fix" the setValue( L"empty", L"" ); to be  setValue( L"empty", std::wstring() );   somebody else may come later and simply use setValue( L"empty", L"" ); and have to track down this issue again.  We thought to use explicit on the method but it is not a valid keyword for this usage. Is there some way to get the compiler to complain about this, or otherwise prevent the issue?  Otherwise I'm thinking to change the name of the method which takes a bool to ensure it can't make an incorrect guess. Classic ASP SQL Injection Protection What is a strong way to protect against sql injection for a classic asp app?  FYI I am using it with an access DB.  (I didnt write the app) How can I downgrade a package to an older version via apt-get?  Other tools are also acceptable but apt-get is preferred. If $$(1+ \cos A) (1+ \cos B) (1+\cos C)= y = (1- \cos A) (1-\cos B) (1-\cos C)$$ then prove that $$y = \pm \sin A \sin B \sin C$$ EXTRA PROBLEM I have NEI on minecraft with some other mods and NEI is supposed to have a saves thing on the left, and items on the right. The only thing on the left is the options. I want to see the saves and time changing options too.  Cheat Mode When I click on a item to get it it keeps showing me the recipe. Though in the options menu from NEI it is on cheatmode. I saw another post saying I need to change something to this lockmode=-1 or cheatmode=2 but it is already that way. That didn't work how do i get it to give me the items and also recipe when I press R. I understand that the architecture of Convolutional Neural Networks (CNN) and Feed forward (FNN) are quite different. And that CNNs use pooling and filters of shared weights over a patch of the image. I am not so clear on the core convolution operator (1):   If anyone could link me to an explanation, I have looked at the Colah blog and Nielsen's online book, and I understand what it is doing but don't understand the convolution operator.  Also, it looks quite similar to the the core FNN function is there and difference? (2).  (1) convolution operator is $a^1 = \sigma(b + w*a^0)$ which is equivalent to:  $a^1 = \sigma(b + \sum^4_{l=0}\sum^4_{l=0}w_{l,m}a_{j+l,k+m})$  (2) feed forward operation:  $a^1_i = \sigma(\sum^n_{j=1}w_{ij}x_j +b_i)$  Many thanks  Sources: functions taken from: Context to distinguish "we" inclusive versus exclusive How can I use JUnit4 idiomatically to test that some code throws an exception?  While I can certainly do something like this:  @Test public void testFooThrowsIndexOutOfBoundsException() {   boolean thrown = false;    try {     foo.doStuff();   } catch (IndexOutOfBoundsException e) {     thrown = true;   }    assertTrue(thrown); }   I recall that there is an annotation or an Assert.xyz or something that is far less kludgy and far more in-the-spirit of JUnit for these sorts of situations. How to copy a dictionary and only edit the copy Express partial derivatives of second order (and the Laplacian) in polar coordinates $z=f(x,y)$ where $x=rcosθ$ and $y=rsinθ$  Find $ \frac{\partial z}{\partial x}$ and $ \frac{\partial^2 z}{\partial x^2}$  I'm having big troubles with using chain rule, in particularly the second derivative. Spent 2 hours on this already. What I have...  $ \frac{\partial z}{\partial x}=\frac{\partial r}{\partial x}\frac{\partial z}{\partial r}+\frac{\partial z}{\partial θ}\frac{\partial θ}{\partial x}$. So I'm guessing that $\frac{\partial z}{\partial r}$ and $\frac{\partial z}{\partial θ}$ are unkown? And I will need to use them to differentiate again. Any help is really welcome. This is simply only part of a bigger question.   Full Question: Diplomacy Attacking a Territory as they move Long names cut off in questions and answers The Unhandled Exception's name is cut off in this  and in the answer too. The last 'n' looks like an 'r'.  Using Firefox 3.6.6.  Examples: SPSite.Exists returning true for a just deleted site collection Short story - I have a process that creates some sitecollection, so to test it I keep deleting and recreating the same site over and over. The process includes a check with the istruction SPSite.Exits, done to check if the sitecollection is present or should be created.  Sometime, soon after I delete the site collection, SPSite.Exists will report it as still available. Is this a cache related problem? What's the reason I can't create generic array types in Java? Why are there no line numbers in the code listings? Would it make discussing code easier if you could simply refer to a particular line or range, or am I wrong? How can i make a little line under the name of the part. My trial is   \part*{PART I} \addcontentsline{toc}{part}{{\huge \textbf{PART I}} \\ \hrule}  but this falis, and here is a screenshot including the part. Thanks in advance. Boy asks 'How about pie?' I am looking for the title of a 1950s science fiction movie, involving an astronomer trying to decode some extraterrestrial signal, where the juvenile (male) character asks 'how about pi?' which all the adults interpret as a foolish 'how about pie?' question. I know the so-called textbook definition of unit tests and integration tests.  What I am curious about is when it is time to write unit tests... I will write them to cover as many sets of classes as possible.  For example, if I have a Word class, I will write some unit tests for the Word class.  Then, I begin writing my Sentence class, and when it needs to interact with the Word class, I will often write my unit tests such that they test both Sentence and Word... at least in the places where they interact.  Have these tests essentially become integration tests because they now test the integration of these 2 classes, or is it just a unit test that spans 2 classes?  In general, because of this uncertain line, I will rarely actually write integration tests... or is my using the finished product to see if all the pieces work properly the actual integration tests, even though they are manual and rarely repeated beyond the scope of each individual feature?  Am I misunderstanding integration tests, or is there really just very little difference between integration and unit tests?