I have a table, exposure, which looks like this:  +------------+---------------+------+-----+---------+-------+ | Field      | Type          | Null | Key | Default | Extra | +------------+---------------+------+-----+---------+-------+ | src        | varchar(20)   | NO   |     | NULL    |       | | instrument | varchar(10)   | NO   |     | NULL    |       | | result     | decimal(12,3) | NO   |     | NULL    |       | | instant    | bigint(20)    | NO   |     | NULL    |       | +------------+---------------+------+-----+---------+-------+   This table is used to store historical exposure values, and is expected to contain the occasional gap. I'm trying to select, for a given src and instant, all (instrument, result, instant)'s either at that target instant or at the largest instant smaller than the target instant. The following SELECT statement does exactly that.  SELECT * FROM exposure AS e      WHERE e.instant = (SELECT MAX(instant) FROM exposure          WHERE instant &lt;= 1396985195077          AND src = 'testSrc')       AND e.src = 'testSrc';   However, when I try to specify the columns I wish to select as in the following query, MySQL responds with ERROR 1241 (21000): Operand should contain 1 column(s). I suspect it is confusing the inner and outer queries.  SELECT (e.instrument, e.result, e.instant) FROM exposure AS e      WHERE e.instant = (SELECT MAX(instant) FROM exposure          WHERE instant &lt;= 1396985195077          AND src = 'testSrc')       AND e.src = 'testSrc';   My MySQL version string is: Server version: 5.5.34-0ubuntu0.13.04.1 (Ubuntu).
I tried running the following statement:  INSERT INTO VOUCHER (VOUCHER_NUMBER, BOOK_ID, DENOMINATION) SELECT (a.number, b.ID, b.DENOMINATION)  FROM temp_cheques a, BOOK b WHERE a.number BETWEEN b.START_NUMBER AND b.START_NUMBER+b.UNITS-1;   which, as I understand it, should insert into VOUCHER each record from temp_cheques with the ID and DENOMINATION fields corresponding to entries in the BOOK table (temp_cheques comes from a database backup, which I'm trying to recreate in a different format). However, when I run it, I get an error:  Error: Operand should contain 1 column(s) SQLState:  21000 ErrorCode: 1241   I'm running this in SQuirrel and have not had issues with any other queries. Is there something wrong with the syntax of my query?  EDIT:  The structure of BOOK is:  ID  int(11) START_NUMBER    int(11) UNITS   int(11) DENOMINATION    double(5,2)   The structure of temp_cheques is:  ID  int(11) number  varchar(20)
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. Can an inanimate thing lift Mjolnir? Can an inanimate thing can lift Mjolnir without the help of a living being (unworthy)  Scenario 1  Mjolnir in a very light car with a sail attached to it, then a very strong wind blew and moved the car uphill.  It is possible or not?  Scenario 2  Can upward wind alone lift the Mjolnir? Google map signed api key errors in Android Misplaced/Overlapping Navigation Item Text on iOS 10 The bug displayed in the attached screenshot occurs consistently for me while running the developer beta of iOS 10 using v1.5.2 of the Stack Exchange app on an iPhone 6.  I was able to recreate this by simply tapping on any question or answer in my feed with a long title. This doesn't appear to be a bug with iOS 10 itself since I haven't seen it in other apps, but I could be wrong. When I use the listings package with frame in my code the frame "breaks" when the page ends and it is open in the end of the page. I want the frame to be complete with four sides and continue in the next page again with all four frame sides complete. How can I do this? Why does the frame "breaks"? This question is asked in various forms here but the question boils down to:  I know shrinking a database is risky. In this case, I've removed so much data and I'll never use it again.   How can I shrink my database? What files do I shrink?  What should my considerations be while doing this?  Should I do anything after? What if it is a large database? Can I shrink it in smaller increments? How to do binary calculation？ Shell scripting: Way to parse parameters from command line myscript [-a a-arg] [-c c-arg] [-b] [-e] somedirectory   Given that I want my shell script be invoked at the command line using the above parameters - where [these brackets] denote that they are optional - what is the best method to parse them? Book series about preparation for a war at the Singularity I am looking for a book series (almost certainly a trilogy) that starts with some humans in a space station being abducted by a small funny-looking alien and taken to a prison planet. They find out that the way space travel works is by creating copies of the passengers, and the originals remained on the space station. This is actually good for the aliens since they believe every sentient being will resurrect at the Singularity and will be forced to fight a battle, so the more the merrier.  The one other detail I remember is that the world economy has a rampant inflation, so people take any cash they have at the end of the day and buy 20th-century memorabilia that doesn't devalue as much. I'm having problems with an exercise from Apostol's Introduction to Analytic Number Theory.     Given $x$ and $y$, let $m=ax+by$, $n=cx+dy$, where $ad-bc= \pm 1$. Prove that $(m,n)=(x,y)$.   I've tried to give a proof, but I suspect it's wrong (or at least not very good). I would be very thankful for any hints/help/advice!  My proof:     We observe that since $ad-bc= \pm 1$, $ad=bc \pm 1$, and $(ad,bc)=1$.   Now, $(a,b) \mid m$ and $(c,d) \mid n$ but      $$(a,b) = ((d,1)a,(c,1)b)=(ad,a,bc,b)=(ad,bc,a,b)=((ad,bc),a,b)=(1,a,b)=1.$$      Similarly, we determine $(c,d)=1$. So, $1=(a,b) \mid m$ and $1=(c,d) &gt; \mid n$. But $(x,y)$ also divide $m$ and $n$. Since $(x,y) \geq (a,b)=(c,d)=1$, this implies that $(x,y)=m,n$. Hence   $(m,n)=((x,y),(x,y))=(x,y)$. Is Force lightning from the feet plausible? In all the canons of Star Wars, there has not been one instance of a Force-user projecting Force lightning from their feet. Why? Is it implausible? Is it correct to say "What was your name?"? The reason I am asking this is, generally the name of the person will not change. One should say "What is your name?" Does getting disconnected from an SSH session kill your programs? Powering a WS2812B strip Keyboard key stuck or not being recognized; how to fix This is an attempt to write a canonical QA for this issue, as per the Meta post:   I expect it to be periodically edited with the goal of becoming a comprehensive information resource.  I have a MacBook Pro that has a key(Shift, Return,   Command, P, etc.) that doesn’t respond when pressed or is stuck in the down position.    It's possible that my favorite beverage was spilled (or some other liquid damage).  It's also possible that I have no idea what happened.  It was working yesterday and suddenly today it's no longer working.  Is there any way to bypass or remap the key?  Can I  have the system ignore it completely?  (This question can also apply to external USB keyboards or the Bluetooth keyboards) Why do we use residuals to test the assumptions on errors in regression? Suppose that we have a model $Y_i = \beta_0 + \beta_1X_{i1} + \beta_2X_{i2} + \dots + \beta_kX_{ik} + \epsilon_i$.  Regression has a number of assumptions, such as that the errors $\epsilon_i$ should be normally distributed with mean zero and constant variance. I have been taught to check these assumptions using a normal QQ plot to test for normality of the residuals $e_i = Y_i - \hat{Y}_i$ and a residuals vs. fitted plot to check that the residuals vary around zero with constant variance.  However, these tests are all on the residuals, not the errors.  From what I understand, the errors are defined as the deviation of each observation from their 'true' mean value. So, we can write $\epsilon_i = Y_i - \mathbb{E}[Y_i]$. These errors cannot be observed by us. *  My question is this: how good of a job do the residuals do in mimicking the errors?   If the assumptions appear to be satisfied on the residuals, does this mean they are satisfied on the errors too? Are there other (better) ways to test the assumptions, like fitting the model to a testing dataset and getting the residuals from there?    * Furthermore, does this not require that the model is specified correctly? That is, that the response really does have a relationship with the predictors $X_1, X_2,$ etc. in the way specified by the model.  If we are missing some predictors (say, $X_{k+1}\ \text{to}\ X_p$), then the expectation $\mathbb{E}[Y_i] = \beta_0 + \beta_1X_{i1} + \beta_2X_{i2} + \dots + \beta_kX_{ik}$ would not even be the true mean, and further analysis on an incorrect model seems pointless.  How do we check whether the model is a correct one? What can cause a question to be "bumped" to the first page in the Active tab of a Stack Exchange site? (Changing the "Last Active" date.)  . How can I fix/repair a corrupted PDF file? Choice function for collection of arbitrary finite sets. AC required? I want to change the key bindings on some of the keys on my keyboard.  I want some to run commands and others to activate different keys.  What applications can I use to do this?      Index:       (from within System Settings)             I'm still looking for answers using dconf and any other method.