I can't get my head around the MySQL I need; I want insert a row only if the variety is unique against plant_id in the same table. My example is: id  plant_id  variety 1   1         cara 2   1         rocket 3   2         money maker 4   2         crimson crush  So.... plant_id = 1; variety = cara  - I don't want this to be added as there is already as it is duplicate on both fields. plant_id = 2; variety = cara  - I do want this to be add as there isn't record with the plant_id = 2 and a variety of cara I tried to make a composite key but this failed because neither of the fields will be unique in themselves. I'm not a SQL guru so be kind to me, but quiz me if this make no sense! :)
I have a table:  table votes (     id,     user,     email,     address,     primary key(id), );   Now I want to make the columns user, email, address unique (together).  How do I do this in MySql?  Of course the example is just... an example. So please don't worry about the semantics.
As the title, I was asked to show that $2^{44}-1$ is divisible by $89$.  My first attempt is to change the expression into $(2^{22}-1)(2^{22}+1)$.  Then further simplified it into $(2^{11}-1)(2^{11}+1)(2^{22}+1)$, I used my calculator and was able to show that $2^{11}-1$ is divisible by $89$ but then I don't know how to show it with modular arithmetic. I do think that it is quite similar to the form where we can use the Fermat's little theorem. $(\sqrt{2})^{88}-1$. (Though I do understand Flt can only be applied to integer.)  Can someone tell me whether I can take square root in modular arithmetic as well? I am still pretty new to the modular arithmetic. Thank you very much. Prove that $\int_0^\infty \frac{x\,\log x}{(1+x^2)^2} = 0$ I have been asked to prove that $$\int_0^\infty \frac{x\,\log x}{(1+x^2)^2}\,dx = 0$$  I tried proceeding as follows: \begin{align} \int_0^\infty \frac{x\,\log x}{(1+x^2)^2}\,dx &amp;= \int_0^1 \frac{x\,\log x}{(1+x^2)^2}\,dx + \int_1^\infty \frac{x\,\log x}{(1+x^2)^2}\,dx \\ &amp; = \int_0^1 \frac{x\,\log x}{(1+x^2)^2}\,dx + \int_{u=1}^0 \frac{u\,\log u}{(1+u^2)^2}\,du\quad (\text{where }u=1/x) \\ &amp;= \int_0^1 \frac{x\,\log x}{(1+x^2)^2}\,dx - \int_0^1 \frac{u\,\log u}{(1+u^2)^2}\,du \\ &amp;=^? \int_0^1 0 \,dx \\ &amp;= 0 \end{align}  But I think that I should first show that the improper integral $\int_0^1 {x\,\log x}/{(1+x^2)^2}\,dx$ is convergent.  Do I need to show it? If yes, how to do so?  (I have been taught basic methods such as comparison, limit comparison and Dirichlet test.) How can I disable animation when switching desktops in Lion? I would very much like to disable the sliding animation that occurs when switching desktops via ctrl+&#x2192;/&#x2190; or ctrl+[number] in Lion.   This was previously accomplished in previous versions with this command:  defaults write com.apple.dock workspaces-swoosh-animation-off -bool YES &amp;&amp; killall Dock   This new animation is even more slow than in Snow Leopard - nearly 1 second to switch - a real productivity killer.  Any help greatly appreciated! I find that the minimum in-call volume on my HTC Desire is still far to loud on some calls.  Since I got the phone, I have flashed several different custom ROMs, radio updates, etc, and have had the issue throughout.  Do you know of any way (setting, hack, app, whatever) to reduce the minimum volume?  My device is rooted and I am currently running one of the CyanogenMod 7 (Gingerbread) nightly builds. Where can I find a standalone installer for Windows 7 Service Pack 1? How to print a string at a fixed width? What is the difference between center of mass and center of gravity? What is the difference between  and ?  These terms seem to be used interchangeably.  Is there a difference between them for non-moving object on Earth, or moving objects for that matter? Why is negative times negative = positive? I just can't find a decent (and free) one. What can I use? Parse JSON with R What is $i^i$ and $(i^i)^i$ What is $i^i$ and $(i^i)^i$. I fond some answers  but is there a clearer explanation of this? Maybe something help me to understand. linear dependence proof using subsets Does "make offline" option in Google Maps works with applications that utilize Google Maps? In newer Google Maps I can make area available offline.  Do other applications that rely on Google Maps (utilize Google Maps Android API) use offline maps? How do I get a substring of a string in Python? Is there a way to substring a string in Python, to get a new string from the third character to the end of the string?  Maybe like myString[2:end]?  If leaving the second part means 'till the end', and if you leave the first part, does it start from the start? Interview question: three arrays and O(N*N) In a Discord call on the desktop app and my voice cannot be heard by others. When I use Discord  through browser I can be heard. Any help appreciated. View my questions with unaccepted answers There is this new acceptance rate feature that appears beneath my signature card when I ask a question.  How do I display all my questions with unaccepted answers? How can I easily see the list of questions that have not been checked as accepted? Frequency dependence of electromagnetic reflection I was surprised to see that the Fresnel equations for reflection depends on refractive index and angle of incidence, but they do not depend on frequency. Why is this case? Are they restricted to regions that do not show frequency dependence? Using crontab to execute script every minute and another every 24 hours Everyone knows that Wolverine's adamantium claws are super-sharp — sharper than even a razor — and virtually indestructible. What puzzled me the first time I saw Wolverine is: how do the claws stay in his body?  As it is shown, Wolverine's flesh and skin are human in strength, but the healing factor makes it superhumanly durable and strong. Still, when Wolverine slashes something, or someone, extremely hard, dense, or thick (as he has to use great amount of force), the claws don't tear through his hand and leave his hand through the opposite side of the palm (because of the action having equal and opposite reaction).