Why does this have a syntax error   DELETE FROM `print_mailing_request` pmr INNER JOIN `person` p   ON p.id = pmr.person AND p.email LIKE '%@TEST.COM' WHERE  pmr.sent_to_fulfiller != 'y'   when this works correctly without error?  SELECT * FROM `print_mailing_request` pmr INNER JOIN `person` p   ON p.id = pmr.person AND p.email LIKE '%@TEST.COM' WHERE  pmr.sent_to_fulfiller != 'y'
Here is the script to create my tables:   CREATE TABLE clients (    client_i INT(11),    PRIMARY KEY (client_id) ); CREATE TABLE projects (    project_id INT(11) UNSIGNED,    client_id INT(11) UNSIGNED,    PRIMARY KEY (project_id) ); CREATE TABLE posts (    post_id INT(11) UNSIGNED,    project_id INT(11) UNSIGNED,    PRIMARY KEY (post_id) );   In my PHP code, when deleting a client, I want to delete all projects posts:  DELETE  FROM posts INNER JOIN projects ON projects.project_id = posts.project_id WHERE projects.client_id = :client_id;   The posts table does not have a foreign key client_id, only project_id. I want to delete the posts in projects that have the passed client_id.  This is not working right now because no posts are deleted.
IntelliSense not working but it is enabled This problem is really proving to be a tricky one (and quite annoying).  In SQL Server Management Studio 2008, up until a few days ago my IntelliSense was working great.  Then all of a sudden it stopped.  The icon as it as enabled on the toolbar menu, and under Tools -> Options -> Text Editor -> T-SQL -> IntelliSense it says it is enabled there.  I have tried refeshing the IntelliSense cache with Ctrl-Shft-R but that doesn't work either.  Any ideas what happened to my IntelliSense and what I need to do to get it back? I used VIRTUALBOX to install Ubuntu 12.04 on my windows pc. I used apt-get to install Python 2.7 that shipped with 12.04. I followed the directives I saw on this site to install Numpy, Scipy, Matplot all failed. I download tar source file of these modules. How do I install them manually? Someone pls help, I'm getting frustrated. Obviously, this suggested edit should never have been approved. Because it's very, very minor.  Is it acceptable for me to "rollback" this edit? Does the suggested editor lose the +2 rep when I roll it back? Should I comment on one of his questions, explaining not to make too minor edits like this?  Is there anything I should do to notify the reviewers that approved  too minor suggested edit? What is the name of this theorem, and are there any caveats? For random variable $X$ that follows some distribution, $f(x)$ is the probability density function of that distribution if and only if $$\mathbb{E}[\phi(X)] = \int_{-\infty}^\infty \phi(x) f(x)dx$$ for all functions $\phi$.  Context: My professor used this in lecture to demonstrate a way to find the distribution of $cX$ given random variable $X$ that follows a specific distribution.   What is the name of this theorem? Have I missed any qualifications/caveats? I am in particular curious about whether "for all functions" is correct. My professor mentioned "positive, bounded, deterministic functions," but I am not sure what he meant by that. Where can I find a proof of this theorem? Regression without intercept: deriving $\hat{\beta}_1$ in least squares (no matrices) If you go to  and are a 4k+ user on Anime.SE, you will see the following:        There is one reopen vote on this question, but the reopen vote count is displayed on a different line than the word "reopen". This is slightly silly, and would perhaps benefit from converting reopen (1) to reopen&amp;nbsp;(1), and likewise for close and delete votes. (Or any other way of preventing a line break between the vote type and the vote count.)  A repro (the close link) from here on Meta: So yesterday I dropped my iPhone into the toilet, it was literally submerged for less than 15 seconds and after taking it out I left it in my airing cupboard overnight to dry. Today the phone seems to be completely functional other than a very dark screen (changing brightness won't help).   Was wondering what the best course of action would be and if this is fixable. Ruby block and unparenthesized arguments I extracted simple example:  require 'pp' x = 1..3 pp x.map do |i| {:value =&gt; i, :double =&gt; (i*2)} end pp x.map { |i| {:value =&gt; i, :double =&gt; (i*2)} }  pp(x.map do |i| {:value =&gt; i, :double =&gt; (i*2)} end) pp(x.map { |i| {:value =&gt; i, :double =&gt; (i*2)} })   I am wondering why first pp produces:  [1, 2, 3]   While all the oders are giving:  [{:value=&gt;1, :double=&gt;2}, {:value=&gt;2, :double=&gt;4}, {:value=&gt;3, :double=&gt;6}]   I assume it has something to do with operator precedence. Where can I find good explanation? Why does the One Ring make the wearer's clothes invisible? The One Ring turns invisible the person wearing it.  Is there an explanation for how it does this? It seems that direct contact with the skin activates the Ring's invisibility effects;  why would it also affect the person's clothing, weapons, etc, as well? The Invisible Man's clothing is visible, so why aren't Frodo's clothes visible?  The Hobbit makes it clear that Bilbo's clothing is invisible, since Smaug doesn't see it.  Is there any possiblity that this varies from character to character? How do I disable 'Activities' hot corner in GNOME shell? GNOME shell has the so-called feature "hot corner", that opens the dashboard  if the mouse touches the top-left corner of a monitor screen.  I want this disabled I used to have a GNOME shell extension, yet the repository is not found anymore:  git clone git@github.com/Ahrak/gnome-shell-extension-disable-hot-corners.git fatal: repository 'git@github.com/Ahrak/gnome-shell-extension-disable-hot-corners.git' does not exist Finding a conformal map from the intersection of two disks to the unit disk. Prove that $u\cdot v = \frac{1}{4}||u+v||^2 - \frac{1}{4}||u-v||^2 \forall u,v \in \mathbb{R^n}$ I am trying to prove the above statement but I'm not sure if my proof is correct. My proof is as follows,  Given $u\cdot v$, we know by the C-E Inequality that $|u \cdot v| \leq ||u|| \ ||v||$  Consider $\frac{1}{4}||u+v||^2 - \frac{1}{4}||u-v||^2$  We can manipulate this as follows $$\frac{1}{4}(||u+v||^2 - ||u-v||^2) = \frac{1}{4}(||u+v||- ||u-v||)(||u+v||+||u-v||)$$ Using the triangle inequality the above can be written as follows, $$...\leq \frac{1}{4}(||u|| +||v|| -||u||+||v||) (||u|| +||v|| +||u||-||v||) = \frac{1}{4} (4||u||||v||) = ||u||||v||$$  As such both $u\cdot v$ and $u\cdot v = \frac{1}{4}||u+v||^2 - \frac{1}{4}||u-v||^2 \forall u,v \in \mathbb{R^n}$ are $\leq ||u|| ||v||$  I'm not sure whether I've proven this correctly because I ended up proving that both sides of the equation are less than or equal to something entirely different (the magnitude of v multiplied by the magnitude of u). Is this acceptable? I don't think it is, since if both can be less than or equal to the magnitudes multiplied then they do not necessarily have to be equal to each other. If this is the case, can someone give me a hint on how to move forward with this proof? Can an illusion give a player partial cover? I'm in an argument with a player at my table, he says hiding behind some bushes while shooting arrows at my monsters gives him partial cover because they can only see his head and shoulders. So they're limited in what they can even aim at. I accepted that. And now he's trying to use minor illusion to create fake bushes/walls and continuing to claim he has partial cover.  I thought cover was based on having a solid obstacle between you and the target... Like, if a magical attack, or penetrating attack can pass through your cover, wouldn't that negate the AC bonus from partial cover? Or is it about "aiming"? Array List count to users Using regex inside if clause in bash Look at this if block:  #!/bin/bash  str="m.m" if [[ "${str}" =~ "m\.m" ]]; then     echo "matched" else     echo "not matched"     exit 1 fi  exit 0   This should print "matched", but it doesn't. Where am I going wrong? How to create an empty file from command line Can HTML checkboxes be set to readonly? I thought they could be, but as I'm not putting my money where my mouth was (so to speak) setting the readonly attribute doesn't actually seem to do anything.  I'd rather not use Disabled, since I want the checked check boxes to be submitted with the rest of the form, I just don't want the client to be able to change them under certain circumstances. Stars and pins are retained when chat messages are moved! In the chat system, stars and pins are retained when moved to another room. This is probably a bug. Here a picture:  When a room owner pins a message, they can move it to another room, and they cannot unpin it. However when a starred message is moved to another room, the user can unstar it in the room it was moved to. Conversation source:  * is irrelevant and does not have to do with this bug report. Many thanks to . Can you restore log file backups to a mirror database after failure? Purely a theoretical question as I've been considering possible DR scenarios...  In this scenario:   The link between a principle and a mirror server becomes unavailable for a period of time (e.g. network outage) Incremental log backups are still being taken during this time Then the principle database fails and is unrecoverable   Is it possible to restore the incremental log backups onto the mirror to bring it up to date and back online, or would you need to start from scratch with a restore of a full backup?  Depending on the size of the database the difference could be hours of downtime so it would be nice to know.  I'm predominantly interested in SQL Server 2008 R2 and 2012 but other people may be interested in other versions if there's a difference. There are several distinct usages:   kernel density estimation   kernel trick   kernel smoothing   Please explain what the "kernel" in them means, in plain English, in your own words.