How to get a random number in a specific range
How do I generate random integers within a specific range in Java?
GeoServer cutting off symbols close to tile edges? Combinatorial proofs: having a difficult time understanding how to write them out Can someone explain how combinatorial proofs work?  I've included an example questions that's been giving me a hard time.  Any insight on the topic would be great.  $$\sum_{k=1}^{n}k{n \choose k} = n2^{n-1}$$  Another one:  $${2n \choose 2} = 2{n \choose 2} + n^2$$  The solution says:  LHS: Pick two people from a pool of n men and n women. RHS: Pick two women, pick two men, and pick one of each.  But I don't see how this applies.  How does $n^2$ show that we're picking "one of each?"  Thanks for the help :) Integration of the cardinal sine It is said that the integral of the cardinal sine is $1$. How do I integrate the cardinal sine? $$ \int_{-\infty}^{\infty} \frac{\sin(a)}{a} \, {\rm d} a $$ Add layer to a QGIS group using Python I am trying to add new layers into a specific group which I can get to work if I know the index, but how can I get Python to find the index of a group so it can load the new layer into the group wherever it is in the TOC?  qgis.utils.iface.legendInterface().moveLayer( layer, index ) Error in if/while (condition) {: missing Value where TRUE/FALSE needed Double integral of an function odd with respect to $y$ over a domain symmetric with respect to $x$ axis Let $D$ be a region given as the set of $(x, y)$ with $$a \leq x \leq b\quad\text{and}\quad-\Phi(x) \leq y \leq \Phi(x)$$ where $Φ$ is a nonnegative continuous function on the interval $[a, b]$.  Let $f(x, y)$ be a function on $D$ such that $$f(x, y) = - f(x, - y)$$ for all $(x , y) \in D$.  Argue that $$\displaystyle \iint_D f(x, y) dA = 0.$$ Vortex in liquid collects particles in center How do you add CSS rules (eg strong { color: red }) by use of Javascript? I noticed that Dolores Umbridge was born during the first Wizarding War, so it's very likely she wasn't a Death Eater then (but she is pretty evil -- who knows?).  After that Voldemort was not around in a way that could affect many people, and most wouldn't know he was planning to rise again.  During that time, and up through Voldemort's return (in Goblet of Fire), did Umbridge have any connection with the Death Eaters or with Voldemort?  Was she doing what she did on her own, or was it because of an association with Voldemort or his allies? I'm participating in the  and wanted to refer to the on- and off-topic questions on the  proposal.  However, I couldn't find a link to it anywhere in the SE site.  If I'm not missing the obvious, could we have one? Can anyone can suggest where I can freely download ArcObjects SDKs for ArcGIS?  I am using version 10.2. I recall :    It was one that I knew could use a bit more spit and polish, but I didn't have the inclination or energy to edit it myself, so I skipped it.  I wander my way over to  (10K only), and look at the listing...    ...so, when did I approve this again? I skipped the question; that doesn't mean I gave my tacit approval, does it?  Seems like the dashboard needs to agree with the suggested edits view. $y'=$ ${-x+\sqrt{(x^2+4y)}}\over 2$ , $y(2)=-1$ Prove that the solutions $y_1$ and $y_2$ for the initial value problem   $y'=$${-x+\sqrt{(x^2+4y)}}\over 2$ , $y(2)=-1$  are:  $y_1=1-x$  $y_2={{-x^2}\over 4}$  And explain why the two solutions not contradiction with the theory of existence and uniqueness.  ( sorry I don't speak English well )  My answer:  For the initial condition :  $y_1=1-x$ Satisfy the initial condition  $y(2)=-1$  $y_1=1-2=-1$   And Satisfy the differential equation  ${y_1}^{\prime}=-1$  ${{-x+\sqrt{x^2+4y}}\over 2}={{-x+\sqrt{x^2+4(1-x)}}\over 2}$  $={{-x+\sqrt{(x-2)^2}}\over 2}$  $={{-x+x-2}\over 2}=-1$  L.h.s.=R.h.s.  $y^{\prime}={{-x+\sqrt{x^2+4y}}\over 2}$  Also $y_2$ Satisfy the initial condition  $y_2={{-x^2}\over4}={-4\over4}=-1$   And satisfy the differential equation.   $y_2^{\prime}={-x\over 2}$  ${{-x+\sqrt{x^2+4y}}\over 2}={{-x+\sqrt{x^2+4({-x^2\over 4})}}\over 2}={-x\over 2}$  And for second part of exercise:  ${\partial f\over \partial y}={1\over \sqrt{x^2+4y}}$  and this not defined when $x=2, \ y=-1$  So $f(x,y)$ no satisfy lipshtize condition in any rectangular has (2,-1), Lipshtize condition including uniqueness of solution, so no contradict with the existence and uniqueness.  True ?  If this also wrong I well be delet it , I answered by the same way of my teacher :( Why would I want to install a snap if I can install via apt instead? Failed to resolve version for org.apache.maven.archetypes Suppose $X$ is a finite set and $f : X \to X$ is a function. Then $f$ is injective if and only if $f$ is surjective. Suppose $X$ is a set and $f : X \to X$ is a function.  If $X$ is a finite set, prove that $f$ is injective if and only if $f$ is surjective. Show that when $X$ is an infinite set, the statement is not true in general.   For that, let $X = \mathbb{R}$ and find a function $f: \mathbb{R} \to \mathbb{R}$ which is injective but not surjective, and a function $g: \mathbb{R} \to \mathbb{R}$ which is surjective but not injective  My attempt at the first part   Suppose that the function is surjective but not injective. Let $a,b \in X$ such that $f(a)=f(b)$ but $a \not =b$. Now since this is a finite set mapping to itself then there are not enough elements in $X$ to map to $X$ since two elements were used to map to one element, thus the function can't be surjective. Therefore if the function is surjective it is also injective.   Now suppose that the function is injective but not surjective. Let $a \in X$ such that $f(b)\not =a$ for all $b \in X$. Since the function was assusmed to be injective each $a \in X$ must map to an element of $X$, thus must have two elemetns in $X$ mapping to the same element in $X$. Hence the function can't be injective, therefore if the function is injective it must be surjective.   Would an exponetial function work for injective but not surjective since can't map to negative numbers. And an example of a function that is surjective but not injective could be a log function since none of the negative numbers get mapped to anything?   Also I'm having trouble seeing why it has to be finite for the first part to work. I understand it has something to do with the pigeonhole principle but its not that clear to me. What's the difference between &lt;b&gt; and &lt;strong&gt;, &lt;i&gt; and &lt;em&gt; in HTML/XHTML? When should you use each? On the , there is this line:      $p(\mathrm{height}|\mathrm{male}) = 1.5789$ (A probability distribution over 1 is OK. It is the area under the bell curve that is equal to 1.)    How can a value $&gt;1$ be OK? I thought all probability values were expressed in the range $0 \leq p \leq 1$. Furthermore, given that it is possible to have such a value, how is that value obtained in the example shown on the page? Can you explain the "Axiom of choice" in simple terms? When is $\phi(n)$ a prime number? I was thinking about this problem today. If $p$ divides $n$, then $p-1$ must divide $\phi(n)$. But $p-1$ is even for all primes greater than $2$, so must $\phi(n) = 2$ - the only even prime? I feel like this argument is shaky and not very rigorous!