I have the following code:  SELECT &lt;column&gt;, count(*) FROM &lt;table&gt; GROUP BY &lt;column&gt; HAVING COUNT(*) &gt; 1;   Is there any difference to the results or performance if I replace the COUNT(*) with COUNT('x')?  (This question is related to a )
I have the following query:  select column_name, count(column_name) from table group by column_name having count(column_name) &gt; 1;   What would be the difference if I replaced all calls to count(column_name) to count(*)?  This question was inspired by .    To clarify the accepted answer (and maybe my question), replacing count(column_name) with count(*) would return an extra row in the result that contains a null and the count of null values in the column.
How are long-term capital gains taxed if the gain pushes income into a new tax bracket? I know there is a difference between assert and verify in Junit; the assert results in a runtime exception, causing test method execution to abort. To overcome this problem, we can have verify which will make test case fail, but allowing test execution to proceed rather than getting aborted.  I doubt there is any such built in approach in testNG. I do understand that best practices say, there should not be multiple asserts in same test case.  But, in practical world, we do come across scenarios where we need to have multiple checkpoints in one test case and we don't want our test method to abort because of one check point failure (test execution should proceed despite failure).  How can we use a soft assert mechanism, similar to verify, which will not abort test method when there is a checkpoint failure.  Example:  @Test(dataProvider = "getMailUrl") public void testMail(email,subject); Assert.assertFalse(subject.isEmpty);//1st checkpoint Assert.assertNotNull(email); //2nd checkpoint Assert.assertEquals(email, "feedback@yoursite.com"); //3rd checkpoint   Now, I want test execution to proceed, even if the 1st checkpoint (validation of subject being not empty) fails. Definitely we will be not be using assert (hard assert). We will need concept of soft assert similar to verify (facilitated by Junit).   I understand, we have to build a customListener implementing TestNG interfaces or extending existing listeners such as TestListenerAdapter. I am still struggling - how can we do this? Sum of odd Fibonacci Numbers Trying to prove that the sum of odd-index consecutive Fibonacci numbers is the next even-index Fibonacci number. I have a gap in my proof that I cannot figure out. I know that induction would be easier and I have already done it that way, I am looking to use alpha and beta. $$\sum_{i=1}^n F_{2i-1} = F_{2n}$$  $$\begin{align*} \sum_{i=1}^n F_{2i-1}&amp;=\sum_{i=1}^1  \frac{1}{\sqrt{5}}(\alpha^{2i-1}-\beta^{2i-1})\\ &amp;=\frac{1}{\sqrt{5}}\left(\sum_{i=1}^1\alpha^{2i-1}-\sum_{i=1}^1\beta^{2i-1}\right)\\ &amp;\;\;\vdots\\ &amp;=\frac{1}{\sqrt{5}}[(\alpha^n-\beta^n)(\alpha^n+\beta^n)]\\ &amp;=\frac{1}{\sqrt{5}}(\alpha^{2n}-\beta^{2n})\\ &amp;=F_{2n} \end{align*}$$ Exposing database IDs - security risk? I've heard that exposing database IDs (in URLs, for example) is a security risk, but I'm having trouble understanding why.  Any opinions or links on why it's a risk, or why it isn't?  EDIT: of course the access is scoped, e.g. if you can't see resource foo?id=123 you'll get an error page. Otherwise the URL itself should be secret.  EDIT: if the URL is secret, it will probably contain a generated token that has a limited lifetime, e.g. valid for 1 hour and can only be used once.  EDIT (months later): my current preferred practice for this is to use UUIDS for IDs and expose them. If I'm using sequential numbers (usually for performance on some DBs) as IDs I like generating a UUID token for each entry as an alternate key, and expose that. If $\mathfrak p \subset R$ is a prime ideal, prove that for every nilpotent $r \in R$ it follows that $r \in \mathfrak p$.   The only hint that my tutor gave me was to use induction. Can someone explain what he means by this?  Thanks for the help! Stack Overflow, Stack Exchange, Area 51: What's the difference in a nutshell? Stack Overflow, Stack Exchange, Area 51: What's the difference in a nutshell? I've read the faq's and they all seem to be the same to me - Just Q &amp; A on a variety of topics.  What's the difference in a nutshell? If I have a software engineering question, which site is best for me to use? show that $$\lim_{n\to \infty}\sin{(n^m)}$$  divergent,where $m\in N^{+}$  I have kown $$\lim_{n\to\infty}\sin{n^2}$$  to be divergent and dense in $[-1,1]$. This is very  famous problem,the problem is first is post $AMM$( The American Mathematical Monthly,1970-1975) problem,and after some years  $AMM$ post $\sin{(n^{14})}$ in $[-1,1]$ was dense? and this is open problem.so I Guess  $$\sin{(n^m)}$$ is dense in $[-1,1]$. For $V$ vector space of dimension $n$ under $\mathbb C$ and $T: V \to V $ linear transformation , show $V= \ker T^n \oplus $ Im $T^n$ fatal: bad ownership or modes for chroot directory component "/" in SFTP I've been trying to configure sftp in a debian server.sshd_config:  Subsystem sftp internal-sftp  UsePAM no  Match User sftpUser ChrootDirectory /users/sftp/sftpUser ForceCommand internal-sftp AllowTcpForwarding no X11Forwarding no   Directories:   drwxr-xr-x   3 root      root      4096 Oct 20 10:59 users   drwxr-xr-x   3 root      root      4096 Oct 20 11:00 sftp   drwxr-xr-x   2 root      root      4096 Oct 20 11:00 sftpUser   cat /var/log/auth.log  Oct 20 10:58:22 w1 sshd[24634]: Accepted password for sftpUser from 201.156.103.213 port 34106 ssh2 Oct 20 10:58:22 w1 sshd[24636]: fatal: bad ownership or modes for chroot directory component "/"   sftpUser no home, bin/falseand member of user group.  In the client side I'm getting the famous Write failed: Broken pipe and then the connection is dropped.  Commenting the ChrootDirectorycommand in sshd_config makes the connection, but get's the user loose.  What am I doing wrong ? Add an unnmbered section to the table of Contents in Lyx How do I use the chrome driver in Ubuntu 16.04? I have a string "1112224444' it is a telephone number. I want to format as 111-222-4444 before I store it in a file. It is on a datarecord and I would prefer to be able to do this without assigning a new variable.  I was thinking:  String.Format("{0:###-###-####}", i["MyPhone"].ToString() );   but that does not seem to do the trick.  ** UPDATE **  Ok. I went with this solution  Convert.ToInt64(i["Customer Phone"]).ToString("###-###-#### ####")   Now its gets messed up when the extension is less than 4 digits. It will fill in the numbers from the right. so  1112224444 333  becomes  11-221-244 3334   Any ideas? Why are there two tensions on my free body diagram? A man sits on a platform attached to a pulley and pulls himself up as shown (ignore the angle of the rope - it should be vertical). Apparently, the man/platform object has a force of 2T pulling it up. Why is it not just T?  Much appreciated! ${\rm Aut}(G)$ is cyclic $\implies G$ is abelian I would appreciate if you could please express your opinion about my proof. I'm not yet very good with automorphisms, so I'm trying to make sure my proofs are OK. Proof: Since ${\rm Aut}(G)$ is cyclic, ${\rm Aut}(G)$ is abelian. Thus for any elements $\phi, \psi \in{\rm Aut}(G)$ and some elements $g_i \in G$, $\phi\psi(g_1g_2)=\phi\psi(g_1)\phi\psi(g_2)=g_3g_4=\phi\psi(g_2)\phi\psi(g_1)=\phi\psi(g_2g_1)=g_4g_3$. Hence, $g_3g_4=g_4g_3\implies G$ is abelian. The proof seems to be quite straightforward, but I'd rather ask for advice. Is short-circuiting logical operators mandated? And evaluation order? Does the ANSI standard mandate the logical operators to be short-circuited, in either C or C++?  I'm confused for I recall the K&amp;R book saying your code shouldn't depend on these operations being short circuited, for they may not. Could someone please point out where in the standard it's said logic ops are always short-circuited? I'm mostly interested on C++, an answer also for C would be great.  I also remember reading (can't remember where) that evaluation order isn't strictly defined, so your code shouldn't depend or assume functions within an expression would be executed in a specific order: by the end of a statement all referenced functions will have been called, but the compiler has freedom in selecting the most efficient order.  Does the standard indicate the evaluation order of this expression?  if( functionA() &amp;&amp; functionB() &amp;&amp; functionC() ) cout&lt;&lt;"Hello world"; Is it possible to train a neural network without backpropagation? Many neural network books and tutorials spend a lot of time on the backpropagation algorithm, which is essentially a tool to compute the gradient.  Let's assume we are building a model with ~10K parameters / weights. Is it possible to run the optimization using some gradient free optimization algorithms?   I think computing the numerical gradient would be too slow, but how about other methods such as Nelder-Mead, Simulated Annealing or a Genetic Algorithm?  All the algorithms would suffer from local minima, why obsessed with gradient? How to pass multiple operator properties via UI layout? TV identification: Short-lived TV show about a time traveller with a super-computer disguised as a credit-card It might have only been a pilot or a made for TV movie, but I remember a male time traveller who was for some reason in 90s US from a semi-distant future. He had in his possession a super-computer disguised as a regular credit card, which could hack things and I think spoke to him in a female voice.   Note: Not Quantum Leap - the time traveller and "credit card computer" might be keywords that people would hit upon, but 'Ziggy' the computer in QL was non-speaking, operated by a hologram and did not resemble a credit card - this one had its own voice and was disguised as a CC. Proving the geometric sum formula by induction "Hail Mary", "Glory Be" in the plural Possible Duplicate:          In the rosary, a Catholic sacramental composed of prayer beads, there is a short prayer concluding each decade called "Glory Be" ("Glory be to the Father, Son and Holy Spirit...").  Would the plural be Glory Bes or Glory Be's?  Likewise, do you say 10 Hail Marys?