I have a query which when run provides a satisfactory result, this query is as follows: -  SELECT DISTINCT(cp.payment_ref),COUNT(cp.status) as 'Amount Declined',cp.*                 FROM client_payments as cp                 WHERE DATE(cp.payment_date) = CURDATE()                 GROUP BY cp.payment_ref                 HAVING COUNT(cp.status='Declined')=3   What I want to do is update the results of the query with a tag, so what I need to do is turn the query into an update query which will update the result set. I cant get it to work.. here is my best attempt  UPDATE client_payments SET retry_status = 'retry' WHERE id=(SELECT cp.id ,COUNT(cp.status)                 FROM client_payments as cp                 WHERE DATE(cp.payment_date) = '2018-09-24'                 GROUP BY cp.payment_ref                 HAVING COUNT(cp.status='Declined')=3)   This throws an error of #1093 - You can't specify target table 'client_payments' for update in FROM clause  Any ideas?
I have a table story_category in my database with corrupt entries. The next query returns the corrupt entries:  SELECT *  FROM  story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category INNER JOIN         story_category ON category_id=category.id);   I tried to delete them executing:  DELETE FROM story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category        INNER JOIN story_category ON category_id=category.id);   But I get the next error:      #1093 - You can't specify target table 'story_category' for update in FROM clause    How can I overcome this?
Big Endian vs. Little Endian in Qiskit I've noticed that Q# favors Little Endian. Meaning that most operations are designed for this type of encoding.  Is is it the same with Qiskit? How to parse hex values into a uint? uint color;  bool parsedhex = uint.TryParse(TextBox1.Text, out color);  //where Text is of the form 0xFF0000 if(parsedhex)    //...   doesn't work. What am i doing wrong? I am pretty sure that most of us here, or at least those do graphic design for living, have found themselves in following situation:   You agree with a client to do the design, agree on price, schedules, formats etc… You work hard, make adjustments, collaborate with client; everything goes well in the beginning. At some point you realise that the client does not listen your professional advice regarding design and prefers his/her own ideas that might not look so professional (choice of fonts, colors, odd choices of elements, shapes etc…). No matter how hard you try, the client is persistent and will not accept the designer’s advice. You get back to work, try to make the best out of it, and the final result is not so good, mainly because you had to stick to the client’s wishes. Work is shipped, payment done, and you don’t want to include this work in your portfolio because it is not good. After all, it is not your work, it is something that was physically created by you as a designer, but the ideas, concept, story, and message came out as a result of nonprofessional person, your client.   Ok, they pay for it, and as long as they are happy this is fine. But, the more compromises you make, the more time you spend working on bad design. If you are a young designer on a quest to get recognition, you don’t want to work just for the sake of money and then face the lack of good design in your portfolio.   Maybe at the beginning of your career you don’t care that much, but later if life this might be a big issue. At some point you will be approached by a big client that might offer you long-term contract, but first they will want to see your work. No point explaining to them what you did and why you made so many compromises.   They will not be interested in that.  Every project is precious as your time and you want to do use it wisely and produce great work.   How would you deal with such a situation? Axiom of Choice: Where does my argument for proving the axiom of choice fail? Help me understand why this is an axiom, and not a theorem. In terms of purely set theory, the axiom of choice says that for any set $A$, its power set (with empty set removed) has a choice function, i.e. there exists a function $f\colon \mathcal{P}^*(A)\rightarrow A$ such that for any subset $S$ of $A$, $f(S)\in S.$ Is this correct?  My question then is about proving this fact, so that we do not need to put it as an axiom. Now as per the research done on this single object- Axiom of Choice, I believe here that there should be some falsity in my argument. I do not find the mistake.  For any $S\in \mathcal{P}^*(A)$, since $S\neq \emptyset$, $\exists s\in S$. Define $f(S)=s$. Then $f$ is a choice function.  This was showing me that the axiom of choice is proved, but then why it had been put as an axiom? For example, in  book, the author asserts that      It is a metatheorem of mathematical logic that it is impossible to specify the function that assigns to each non-empty subset of $\mathbb{R}$, an element of itself.     There are several notes and books on axiom of choice, but here I am trying to understand through doing some argument for some problem, where problem actually arises. How to modify existing, unpushed commit messages? Add an image to an object I want to put a 2D image on a 3D object in Blender. How do I do that?  I have found the "textures" tab in the "properties" window, but I can't figure out what to do with it.  Preferably, I would like to click and drag an image off my desktop right onto the object. I do not have enough time to bake my bread.  Can I refrigerate it or let it sit on the counter and bake it later in the day? I'm using the official Stack Exchange mobile app for iOS or Android, and  My app crashed! It doesn't look good on my new smartphone. It won't run after I updated my device. I noticed another bug. I have an idea for a new feature which is currently not in the app.  How do I report bugs with or request features for the iOS and Android apps? Also:  I've used the built-in functionality of the app to report a bug or submit a feature request. Did I do the right thing? The app prompted me to post on Meta after an error occurred. Should I post about it here? I'm wondering why the latest version is from 2017. I've heard rumors that the apps are no longer supported; is that true? I can't find the app on my device's app store anymore! Where did it go?     We get a lot of bug reports from users about the mobile apps, which are unsupported, and at the moment, there is no centralized Q&amp;A pair for those to be closed as duplicates of (the relevant answers are spread across multiple unrelated questions). This question is an FAQ proposal, to serve as a directly-related duplicate target for those questions. Is an automorphism of the field of real numbers the identity map? In order to animate a character so that it grabs an object an throws it, I added a Child-Of constrained and keyframed its influence. In the F-curve Editor I can't set the curve which controls the influence to interpolation-mode Constant without changing the other curves (Which should be linear or bezier).   How can the interpolation mode of a curve changed independently? Why the default eth0 interface is down by default on CentOS? Here is the proof I tried to weave while trying to prove this theorem:     Theorem. Every infinite subset of a countable set is countable.      Proof. Let $A$ be a countable set and $E\subset A$ be infinite. Then $A\thicksim\mathbb{N}$. This implies that there is a sequence $\left\{x_{n}\right\}_{n\in\mathbb{N}}$ where $x_{n}\in A$. Construct a sequence $\left\{n_{k}\right\}_{k\in\mathbb{N}}$ where $x_{n_{k}}\in A$, $n_{1}$ is the smallest positive integer such that $x_{n_{1}}\in A$, and $n_{k+1}&gt;n_{k}$. Then      $$ E=\bigcup_{k=1}^{\infty}x_{n_{k}}, $$      and $E$ is countable, because $E\thicksim\mathbb{N}$. $\blacksquare$   Is it convincing? Java error: Implicit super constructor is undefined for default constructor Security importance of Key Schedule in Block Cipher Significance of assumption in competition inequality questions Refer to the problem below (IMO 2009 Shortlist)     Let $a, b, c$ be positive real numbers such that $$\frac{1}{a} + \frac{1}{b} + \frac{1}{c} = a + b+ c$$   Prove that    $$\frac{1}{(2a+b+c)^2} + \frac{1}{(2a+b+c)^2} + \frac{1}{(2a+b+c)^2} \leqslant \frac{3}{16} $$    In the solution given by the  (Pg 16), it states that      Without loss of generality, we choose $$a +b+c = 1$$.    Thus, the problem becomes    $$ \frac{1}{(1 + a)^2} + \frac{1}{(1 + b)^2} +\frac{1}{(1 + b)^2} \leqslant \frac{3}{16}(\frac{1}{a} + \frac{1}{b} + \frac{1}{c})$$    Applying Jensen’s inequality to the function $$f(x) = \frac{x}{ (1+ x)^2}$$   ,which is concave for $0 ≤ x ≤ 2$   and increasing for $0 ≤ x ≤ 1$, we obtain   $$α \frac{a}{(1 + a)^2} + β \frac{b}{(1 + b)^2} + γ \frac{c}{(1 + c)^2} \leqslant (α + β + γ) \frac{A}{(1 + A)^2}$$   , where $A =\frac{αa + βb + γc}{α + β + γ}.$   Choosing $α = \frac{1}{a} , β =\frac{1}{b},$ and  $γ = \frac{1}{c}$   , we can apply the harmonic-arithmetic-mean inequality   $$A =\frac{3}{\frac{1}{a} + \frac{1}{b} + \frac{1}{c}} ≤ \frac{a + b + c }{3} = \frac{1}{3} &lt; 1$$   Finally we prove:   $$ \frac{1}{(1 + a)^2} + \frac{1}{(1 + b)^2} +\frac{1}{(1 + b)^2} \leqslant ( \frac{1}{a} + \frac{1}{b} + \frac{1}{c}) \frac{A}{(1 + A)^2} \leqslant ( \frac{1}{a} + \frac{1}{b} + \frac{1}{c})\frac{A}{(1 + \frac{1}{3})^2} = \frac{3}{16}(\frac{1}{a} + \frac{1}{b} + \frac{1}{c}) $$   However,  (Pg 4) differs by having $a +b+c=3$ and setting $f(x) = \frac{1}{16x} - \frac{1}{(x+3)^2}$ and allowing Jensen to resolve the rest.   The questions are as follows;   How do you choose before hand which $a + b+ c =$ to choose?  Why particularly does the assumption differ between the 2 solutions? How does one know before hand the choosing of $α = \frac{1}{a} , β =\frac{1}{b},$ and  $γ = \frac{1}{c}$?  Where and how did $A =\frac{αa + βb + γc}{α + β + γ}$ come from?   Any help would be much appreciated. If I want to make a backup of everything I have done since the fresh install of Ubuntu, what are the possible options? What all should I backup? I want to get all the settings that I changed, all the packages I installed, etc. Keyboard shortcut to switch between applications in Mission Control Does Apple have keyboard shortcuts to switch between applications in Mission Control? (Instead of hovering over with the cursor)?  e.g., which key combination cal I press to get me from "preview" to "app store?" How do I pull from a Git repository through an HTTP proxy? Note: while the use-case described is about using submodules within a project, the same applies to a normal git clone of a repository over HTTP.  I have a project under Git control.  I'd like to add a submodule:  git submodule add http://github.com/jscruggs/metric_fu.git vendor/plugins/metric_fu   But I get  ... got 1b0313f016d98e556396c91d08127c59722762d0 got 4c42d44a9221209293e5f3eb7e662a1571b09421 got b0d6414e3ca5c2fb4b95b7712c7edbf7d2becac7 error: Unable to find abc07fcf79aebed56497e3894c6c3c06046f913a under http://github.com/jscruggs/metri... Cannot obtain needed commit abc07fcf79aebed56497e3894c6c3c06046f913a while processing commit ee576543b3a0820cc966cc10cc41e6ffb3415658. fatal: Fetch failed. Clone of 'http://github.com/jscruggs/metric_fu.git' into submodule path 'vendor/plugins/metric_fu'   I have my HTTP_PROXY set up:  c:\project&gt; echo %HTTP_PROXY% http://proxy.mycompany:80   I even have a global Git setting for the http proxy:  c:\project&gt; git config --get http.proxy http://proxy.mycompany:80   Has anybody gotten HTTP fetches to consistently work through a proxy?  What's really strange is that a few project on GitHub work fine ( for example), but others consistently fail ( for example). Reinstalling Ubuntu with a dual boot I was experiencing problems with Ubuntu Desktop like missing and broken system packages, missing Unity package and other problems. So I decided that the best solution (without touching Windows files) is just to reinstall Ubuntu.  I looked everywhere and found the way but got confused as some say that I supposed to choose "Erase Ubuntu and reinstall", others say that I supposed to choose "Something else" and just select it manually while installation. I thought the first option would be better and just safer as I don’t want any of Windows files to be touched but it says that it has a bug that erases all other partitions...   Current Ubuntu version: 17.04 desktop 32bit will be replaced with 16.04.0 desktop 32bit (as 32bit 17.04 version is no longer available)   What’s the safer option to choose? And if the second one is, how to make sure it’s Ubuntu partition? Determine if two rectangles overlap each other? I am trying to write a C++ program that takes the following inputs from the user to construct rectangles (between 2 and 5): height, width, x-pos, y-pos. All of these rectangles will exist parallel to the x and the y axis, that is all of their edges will have slopes of 0 or infinity.  I've tried to implement what is mentioned in  question but I am not having very much luck.  My current implementation does the following:  // Gets all the vertices for Rectangle 1 and stores them in an array -&gt; arrRect1 // point 1 x: arrRect1[0], point 1 y: arrRect1[1] and so on... // Gets all the vertices for Rectangle 2 and stores them in an array -&gt; arrRect2  // rotated edge of point a, rect 1 int rot_x, rot_y; rot_x = -arrRect1[3]; rot_y = arrRect1[2]; // point on rotated edge int pnt_x, pnt_y; pnt_x = arrRect1[2];  pnt_y = arrRect1[3]; // test point, a from rect 2 int tst_x, tst_y; tst_x = arrRect2[0]; tst_y = arrRect2[1];  int value; value = (rot_x * (tst_x - pnt_x)) + (rot_y * (tst_y - pnt_y)); cout &lt;&lt; "Value: " &lt;&lt; value;     However I'm not quite sure if (a) I've implemented the algorithm I linked to correctly, or if I did exactly how to interpret this?  Any suggestions?