I was trying to execute an INSERT query which ensures that only 1 row is inserted and avoid duplicate insertions/ here is my SQL string that i used inside my PHP file:  $sql = "INSERT INTO `users`( `user_name`,`email`,  `password`, `active`) VALUES (:name, :email, :pass, :active) LIMIT 1";   I got this following error:  Calling BeforeException -&gt; string(211) "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 1' at line 1"    i think MariaDB Insert command do not use LIMIT syntax.  please suggest.Thanks
While executing an INSERT statement with many rows, I want to skip duplicate entries that would otherwise cause failure. After some research, my options appear to be the use of either:  ON DUPLICATE KEY UPDATE which implies an unnecessary update at some cost, or INSERT IGNORE implies an invitation for other kinds of failure to slip in unannounced.  Am I right in these assumptions? What's the best way to simply skip the rows that might cause duplicates and just continue on to the other rows?
Omitting "and" in a sentence He called her, emailed her, texted her, tweeted her—all to no use.   Strictly speaking, I would need to write texted her and tweeted her, but I'm omitting and to convey a rhythm and sense of urgency. What do you call this kind of construction, and is it accepted grammar (at least for creative writing, if not in an academic context)? An example of the nucleus of an atom being in an excited state is the , which was a theory devised by the Astronomer Fred Hoyle to help describe the vast quantities of carbon-12 present in the universe, which wouldn't be possible without said Hoyle State.  It's easy to visualise and comprehend the excited states of electrons, because they exist on discrete energy levels that orbit the nucleus, so one can easily see how an electron can excite from one energy level into a higher one, hence making it excited.  However, I can't see how the nucleus can get into an excited state, because clearly, they don't exist on energy levels that they can transfer between, but instead it's just a 'ball' of protons and neutrons.  So how can the nucleus of an atom be excited? What makes it excited? I have read lots of information about page caching and partial page caching in a MVC application. However, I would like to know how you would cache data.  In my scenario I will be using LINQ to Entities (entity framework). On the first call to GetNames (or whatever the method is) I want to grab the data from the database. I want to save the results in cache and on the second call to use the cached version if it exists.  Can anyone show an example of how this would work, where this should be implemented (model?) and if it would work.  I have seen this done in traditional ASP.NET apps , typically for very static data. probability of $k$ boxes contain exactly $1$ ball Prove that $ a $ divides $1^{a^{n}} + 2^{a^{n}} + ... + (a-1)^{a^{n}}$? Change default shell for Terminator I am trying to include long URLs in a bibliography, but those often overflow into the margin of the document.  I have seen a number of questions about breaking URLs in bibliography, but after trying every solution, I have not found anything that completely solves my problem. There are apparently a number of ways to allow LaTeX to break line at different places in URLs. But in my case, even though LaTeX breaks line at some places, I still get overflow for some URLs.  Here is the code I am using:  \usepackage[hyphens]{url} \usepackage{hyperref} \hypersetup{breaklinks=true}  \urlstyle{same} \usepackage{cite}   and with these bibliography entries:  @misc(webrtc,     organization={W3C WebRTC Working Group},     title={WebRTC 1.0: Real-time Communication Between Browsers},     howpublished={\url{http://www.w3.org/TR/2012/WD-webrtc-20120821/}} )  @misc(android_javascriptinterface,     organization={Android Open Source project},     title={Android WebView addJavascriptInterface reference},     howpublished={\url{http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object, java.lang.String)}} )   I'm getting this, for example:     The entry about Android overflows in the border: my column should end where you can read "browsers." on the first line or "http:" on the third line.  Edit: when trying to create a minimal example for my problem, I noticed that this only occurs when using the IEICE template file. You can find it here: , but if you do not want to have to extract the archive and locate the correct file, I have put it there also:   Here is my minimal example:  .tex file:  \documentclass[paper]{ieice}  \usepackage[hyphens]{url} \usepackage[hidelinks]{hyperref} \hypersetup{breaklinks=true} \urlstyle{same} \usepackage{cite}  \title{Test document} \begin{document}  this\cite{upnp_spec} is a test\cite{android_javascriptinterface}  \bibliographystyle{plain} \bibliography{refs_min}  \end{document}   and refs_min.bib file:  @misc(android_javascriptinterface,     organization={Android Open Source project},     title={Android WebView addJavascriptInterface reference},     howpublished={\url{http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object, java.lang.String)}} )  @misc(upnp_spec,     organization = {UPnP Forum},     title = {UPnP Device Architecture 1.1},     howpublished = {\url{http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf}} )   Is there any way I can fix this ? Different batteries connected in parallel If we have 2 batteries one of emf x and the other is of emf y and we connect them in series we get an effective emf of x+y.  But what if we connect them in parallel, how to calculate the emf now? Oracle: how to UPSERT (update or insert into a table?) The UPSERT operation either updates or inserts a row in a table, depending if the table already has a row that matches the data:  if table t has a row exists that has key X:     update t set mystuff... where mykey=X else     insert into t mystuff...   Since Oracle doesn't have a specific UPSERT statement, what's the best way to do this? How much memory can a 32 bit process access on a 64 bit operating system? Missing new file in Ubuntu 13.04 The New file operation is missing in Ubuntu 13.04. How can I fix it?  I have only &quot;New Folder&quot;. How can I add the New File option again? Gaussian-like integral : $\int_0^{\infty} e^{-x^2} \cos( a x) \ \mathrm{d}x$ Scaling in object and edit mode My question is: why do Object mode scaling and Edit mode scaling seem to be incompatible? I'm quite new to blender, so I may not know sth important about these modes. The actual case is:  I create a cube, which is 2×2×2 metres in metric units by default  (it's also shown under 'dimensions')    Then, with the cube selected, I switch to Edit mode, and enable 'Edge info: Length' under 'Mesh display'    And it shows the cube's measurements, which are 2m on each edge.  Now I use the scale tool in Edit mode, making the edges 2.244m    That's good so far. Changing back to Object mode, the changes can be seen under 'dimension'    However, when I use the scale tool in Object mode, the scale and dimensions also change, but changing back to Edit mode, the measurements shown remain the same      So the question is, why does the scale tool work differently and have different effects in Ojbect mode and Edit mode? Also, how can I enter the desired size of my cube manually to get an accurate result, without using the scale tool in Edit mode, and without changing the scale ratio in object mode? What do you recommend as an optimal point and orientation for mounting a rear-view mirror? I'm open to handlebar-, glasses-, or helmet-mounted.  Some of the considerations, as I understand it, are:   Ease of mounting. View provided. Vibration. Likelihood of breaking. Robustness for repeated off and on (for glasses-mounted).   I've got a hybrid bike with flat handlebars.  I'd also welcome specific product recommendations and recommendations about other aspects to look for in a mirror. What is a good introductory book on quantum mechanics? I'm really interested in quantum theory and would like to learn all that I can about it. I've followed a few tutorials and read a few books but none satisfied me completely. I'm looking for introductions for beginners which do not depend heavily on linear algebra or calculus, or which provide a soft introduction for the requisite mathematics as they go along.  What are good introductory guides to QM along these lines? How can I look at my character? Is there a way I can inspect my character's face at any point in the game after creating it during the bathroom scene?  I am playing on PlayStation 4 and rotating with the right stick in 3rd-person view obviously does not show the face. I haven't found any mirrors or shiny objects to use the reflection either.  The reason for this is that I forgot what she looks like and also I want to share my monstrous creation with others but I have already left the vault! I have written a C++ program and complied it to produce a.out file. However, whenever I try to run it, I get Permission Denied. I read that we can use sudo, but I can't quite get it to work. I use something like, sudo "./a.out" but that too doesn't work.  Edit:  Here is the message I get when I try "./a.out".  bash: ./a.out: Permission denied Are Ubuntu packages security audited? Prove that the polynomial $(x-1)(x-2)\cdots(x-n) + 1$, $ n\ge1 $, $ n\ne4 $ is irreducible over $\mathbb Z$ I try to solve this problem. I seems to come close to the end but I can't get the conclusion. Can someone help me complete my proof. Thanks          Show that the polynomial $h(x) = (x-1)(x-2)\cdots(x-n) + 1$ is irreducible over $\mathbb Z$ for all $n\ge1$ and $ n\ne4$.      Suppose $h(x) = f(x) g(x)$, then we must have $f(i)g(i) = 1$ for all $i = 1,2,...n$. So both $f(i)$ and $g(i)$ are $1$ or $-1$. In either case, $m(x) = f(x) - g(x)$ has degree smaller than $n$ and have $n$ different roots ($1,2,...,n$). So we must have $m(x) = 0$. Then $h(x) = f(x)^{2}$. So $n$ must be even. Let $n = 2k$. Because $f(x)$ has degree $k$, there are $k$ values from $\{1,2,...,2k\}$ at which $f(x)$ is $1$ and $k$ values at which $f(x)$ is $-1$.  This is where I got stuck. Hope some one can help me solve this. Thanks. Note: This is intended to become a canonical post.  I got a dedicated graphics card of type XXX and it claims I need at least a YYY Watt PSU.   How big does my PSU really need to be?