If t is a quadratic residue mod p, how can I efficiently solve the equation $x^2=t \pmod {p}$?
How to find the smallest $n$ such that $n^a\equiv 1 \pmod p$
What does the term saturating nonlinearities mean? I was reading the paper  and in section 3 were they explain the architecture of their Convolutional Neural Network they explain how they preferred using:     non-saturating nonlinearity $f(x) = max(0, x). $   because it was faster to train. In that paper they seem to refer to saturating nonlinearities as the more traditional functions used in CNNs, the sigmoid and the hyperbolic tangent functions (i.e. $f(x) = tanh(x)$ and $f(x) = \frac{1}{1 + e^{-x}} = (1 + e^{-x})^{-1}$ as saturating).   Why do they refer to these functions as "saturating" or "non-saturating"? In what sense are these function "saturating" or "non-saturating"? What do those terms mean in the context of convolutional neural networks? Are they used in other areas of machine learning (and statistics)? What are C++ functors and their uses? I keep hearing a lot about functors in C++. Can someone give me an overview as to what they are and in what cases they would be useful? Sometimes a question I ask will get answers that don't help me, or maybe it doesn't receive any answers at all.  How about making a notification when somebody links to my question?   It could be something like this:     New information regarding your question might be available at {link}   It might help me getting an answer from related questions that weren't there when I first asked the question. Integrate JavaScript in JSF composite component, the clean way Visiting two Schengen countries, coming back home in between, do I apply for single-entry or multiple-entry visa? I am a resident of Turkey and I will go to Austria for 6 days beginning of June and then I will come back to Turkey. After staying 10 days I will go to Italy for 11 days at the end of June. Do I need two single-entry visa, or a multiple-entry visa, and which country do I apply to? (My first destination is Austria but I will stay more in Italy) Ant-Man, shrinking, and weight How might a corrupt partition in TempDB result in DBCC CHECKDB reporting no issue? Geometric intuition for the tensor product of vector spaces Can a satellite remain directly over a city? Is it possible to put an artificial satellite into an orbit in such a way that it will always remain direct over a city (I mean at any specific place)? When is $2^n \pm 1$ a perfect power Is there an easy way of showing that $2^n \pm 1$ is never a perfect power, except for $2^3 + 1 = 3^2 $?  I know that   gives the result directly, but I'm hopefully for a more elementary method.    I can show that it is never a square, except for $2^3 + 1$.  Proof: Cases $n=1, 2, 3$ are easily dealt with. Henceforth, let $n\geq4$.  $2^n -1 \equiv 3 \pmod{4}$ hence is never a square.     If $2^n +1 =x^2$, then $2^n = (x-1)(x+1)$ and both of these are powers of 2. Thus we must have $(x-1) = 2, (x+1) = 4$. This gives the solution of $2^3 + 1 = 3^2$.    Let's now do an odd prime.  Say $2^n +1 = x^p$. Then $2^n = x^p - 1 = (x-1)(x^{p-1}+x^{p-2} + \ldots +1)$, so both terms are powers of 2. We have $ x = 2^m+1$ is odd. But the other term is the sum of $p$ odd numbers, hence is odd. Since this is clearly greater than 1, we get a contradiction.  Say $2^n -1 = x^p$. Then $2^n = x^p + 1 = (x+1)(x^{p-1} - x^{p-2} + \ldots -x +1 )$, so both terms are powers of 2. We have $x = 2^m -1$ is odd. But the other term is the sum of $p$ odd numbers, hence is odd. Since $x^p + 1 \neq x+1$ except for $p=1$, this means that the term is greater than 1. Hence we get a contradiction. Compound literals in MSVC How do I use regular expressions in bash scripts? I want to check if a variable has a valid year using a regular expression. Reading the  I understand I could use the operator =~  Looking at the example below, I would expect to see "not OK" but I see "OK". What am I doing wrong?  i="test" if [ $i=~"200[78]" ] then   echo "OK" else   echo "not OK" fi xcode4 doesn't support Perforce? Can a massless rope accelerate? How to cleanup deadlinks I was reading some answers about ruby and there are a lot of links to _why's sites.  and took all his sites with him.  Almost every introduction question about ruby will include at least one or two links to one of his sites. Examples:          With a bit more effort I could probably find more questions with a lot of deadlinks.  My suggestion for discussion was, what would be a good way to solve deadlinks in the answers/comments? Not every site _why created has resurfaced somewhere else, but some could be replaced by new links.  But I wanted the discussion to go beyond this specific problem of deadlinks in the ruby answers, an automatic solution would be to let the links be scanned in a batch and when found dead be replaced by a google cache or webarchive version of the page, and perhaps mark it so that the community can replace the link with an alternative? How to check if file exists on FTP before FtpWebRequest Find $ P(Z>X+Y)$ where $X,Y,Z \sim U(0,1)$ independently I'm trying to follow a line in a derivation for $P(Z&gt;X+Y)$ where $X,Y,Z$ are independent continuous random variables distributed uniformly on $(0,1)$.  I've already derived the pdf of $X+Y$ using the convolution theorem, but there's a line in the answer that says:  $P(Z&gt;X+Y) = \mathbb{E}[\ P(Z&gt;X+Y\ |\  X+Y )\  ]$ where $\mathbb{E}$ is the expectation.  I'm not familiar with this result. Could anyone give a pointer to a similar result if one exists?  Thanks. If $ua = au$, where $u$ is a unit and $a$ is a nilpotent, show that $u+a$ is a unit.   I've been working on this problem for an hour that I tried to construct an element $x \in R$ such that $x(u+a) = 1 = (u+a)x$. After tried several elements and manipulated $ua = au$, I still couldn't find any clue. Can anybody give me a hint? Removing elements with Array.map in JavaScript How to calculate a confidence interval for estimating a proportion when the population is very small? I plan to execute a little study on whether dentists tend to grant privately insured patients (PRIV) a sooner appointment compared with publicly insured patients (PUB). I want to restrict this study to the dentists of a single town in Germany.  In this town there are about 500 dental practices and I am willing to call maximum 100 practices (twice, once as a PUB and once as PRIV). (A sample without replacement of size up to 100)  So the result of this examination would be a list of up to 100 practices with an associated value of 1 - if the appointment for the PRIV was more than two days sooner - and a 0 - if not. The proportion of 1s is what I want to estimate.  Now the sources I have been reading always assumed a much larger population with a finite population correction close to 1. This is why I doubt that blindly using a conservative or approximate confidence interval would lead to a statistically meaningful result.   So my first question is, of course, whether it is reasonable at all trying to estimate the proportion using a confidence interval in this case? And if yes, then what statistical technology/method (leading to a CI) would be a good choice for this use case?   One idea that comes to mind is using a sample size of 25 f.x., in that case the FPC would be 0.95 - "close enough" to 1. But it seems stupid trying to improve the quality of an estimation by reducing the information used for the estimation.