Find all values of $(x,y)$ where $x,y$ belongs to integers if:   $$x^2(y-1)+y^2(x-1)=1$$    I m a beginner so I do need some help.
Find all integer roots of: $x^2(y-1)+y^2(x-1)=1$   Obviously $(2,1)$ and $(1,2)$ are two answers. But I was unable to manipulate the equation algebraically giving a useful form for finding all other possible answers! I also tried to view it as a quadratic equation in terms of $x$, but forming the Delta of that equation didn't help much other than if $y=1$ then certainly Delta would be a square and equation would have answer for $x$...
How can I rotate about an arbitrary point in 3D (instead of the origin)? I have some models that I want to rotate using quaternions in the normal manner, except instead of rotation about the origin, I want it to be offset slightly. I know that you don't say, in 3d space, that you rotate about a point; you say you rotate about an axis. So I'm visualizing it as rotating about a vector whose tail is positioned not at the local origin.  All affine transformations in my rendering / physics engine are stored using SQT (scale, quaternion, translation; an idea borrowed from the book Game Engine Architecture.) So I build a matrix each frame from these components and pass it to the vertex shader. In this system, translation is applied, then scale, then rotation.  In one specific case, I need to translate an object in world space, scale it, and rotate it about a vertex not centered at the object's local origin.  Question: Given the constraints of my current system described above, how can I achieve a local rotation centered about a point other than the origin? Automatic upvote to anyone who can describe how to do this using only matrices as well :) I'm installing a brand new motion activated security light to an existing box on my garage. After removing the old light, I notice it only has white/black wiring while the new light fixture has of course white/black/green (ground) wires to attach. What do I do if no ground wire is available with the old box? Some areas of the mesh are dark (Shadow artefacts) I've been modeling a hermit crab and I don't know why but some areas of the mesh are really dark on some spots, like the legs and the claws.   I hope you can help me fix it. I was wondering if someone knows if there is a foot/feet symbol available in any of latex packages that I could use in my text? I would appreciate any hint.  I do really mean a foot/feet icon as in the picture below. How to convince airport security that I am not dangerous when having metallic parts in my body? Proof of Laplace transform of real number powers: $\mathcal{L} \{ t^n \} = \frac{n!}{s^{n + 1}}$ Why are images formed? How do rays of light getting focused at a point create an image?  How are the information of object's shape and dimensions expressed as an image when light rays converge?  Is it understandable by solving wave equation for light? Why pass parameters to CSS and JavaScript link files like src="../cnt.js?ver=4.0"? There are two vectors called $\vec{a}$ and $\vec{b}$. Vector $\vec{c}$ is the bisector and it can be given as  $$\vec{c} = |b|\vec{a} + |a|\vec{b}$$  How to prove that? I have used the dot product method. But there I can't find the angle between them. Then I tried to do this by using unit vectors. Then I got an answer like in the given picture. . Can you help me to get the correct answer How can I assign different random values to each row in a SELECT statement? Please look at this code:  create table #t1(   id int identity (1,1),   val varchar(10) );   insert into #t1 values ('a'); insert into #t1 values ('b'); insert into #t1 values ('c'); insert into #t1 values ('d');   Now, whenever you execute this  select *,      ( select top 1 val from #t1 order by NEWID()) rnd  from #t1 order by 1;   you will get a result with where all rows have the same random value. e.g.  id          val        rnd ----------- ---------- ---------- 1           a          b 2           b          b 3           c          b 4           d          b   I know a way using a cursor to loop throw the rows and get different random values, but that is not performant.   A clever solution to this is   select t1.id, t1.val, t2.val from #t1 t1     join (select *, ROW_NUMBER() over( order by NEWID()) lfd from #t1) as t2 on  t1.id = t2.lfd    But I simplified the query. The real query looks more like  select *,      ( select top 1 val from t2 where t2.x &lt;&gt; t1.y order by NEWID()) rnd  from t1 order by 1;   and the simple solution doesn't fit. I'm looking for a way to force repeated evaluation of  ( select top 1 val from #t1 order by NEWID()) rnd    without the use of cursors.  Edit: Wanted output:  perhaps 1 call  id          val        rnd ----------- ---------- ---------- 1           a          c 2           b          c 3           c          b 4           d          a   and a second call  id          val        rnd ----------- ---------- ---------- 1           a          a 2           b          d 3           c          d 4           d          b   The value for each row just should be a random value independent from the other rows  Here is the cursor version of the code:  CREATE TABLE #res ( id INT, val VARCHAR(10), rnd VARCHAR(10));  DECLARE @id INT DECLARE @val VARCHAR(10) DECLARE c CURSOR FOR SELECT id, val FROM #t1 OPEN c FETCH NEXT FROM c INTO @id, @val WHILE @@FETCH_STATUS = 0 BEGIN     INSERT INTO #res     SELECT @id, @val, ( SELECT TOP 1 val FROM #t1 ORDER BY NEWID()) rnd      FETCH NEXT FROM c INTO @id, @val END CLOSE c DEALLOCATE c  SELECT * FROM #res Using a variable in a SELECT statement? public static void handleCaseComment(CaseComment caseComment) {    User[] users = [SELECT LastName FROM User WHERE Id = caseComment.CreatedById LIMIT 1]; }   This gives me the following error:  unexpected token: 'caseComment.CreatedById'   How do I use the value of the variable caseComment.CreatedById in a SELECT statement? If $F:M\to N$ is a smooth embedding, then so is $dF:TM\to TN$. Obligatory: This is not a duplicate of , which is concerning the much older duplicate closure process.  Have a gander at . Notice anything weird?  The Community♦ user was invoked by the question asker to self-close as a duplicate (presumably of the comment below, which links to ), but the list of duplicates is entirely empty. So it would seem the question asker was able to close their own question as a duplicate of... nothing?  Screenshot, in case the post is altered later:    Any idea what happened here? Confusion between Voltage gain & Voltage gain in decibels (dB) The definition of voltage gain is \$V_{\text{out}}/V_{\text{in}}\$.  However, I read some articles about the gain in decibels, and I have a confusion now.  Here is an article about it:   Here, I understand the definition of Power gain in decibels, which is $$ \text{Gain} = 10 \log \left( {P_{\text{out}} \over P_{\text{in}}} \right)\text{ dB} $$  However, I can't understand why Voltage gain in decibels is $$ 20 \log \left( {V_{\text{out}} \over V_{\text{in}}} \right)\text{ dB} $$  If \$ 20 \log \left( {V_{\text{out}} \over V_{\text{in}}} \right)\text{ dB} \$ is derived from $$ 10 \log {\left( {V_{\text{out}}^2 \over R_{\text{out}}}\right) \over \left({V_{\text{in}}^2 \over R_{\text{in}}}\right) }\text{ dB} $$ then this is the power gain, not the voltage gain, isn't it? However, the Wikipedia says it is a formula for the Voltage gain in decibels. I thought the voltage gain in decibels would be \$ 10 \log \left( {V_{\text{out}} \over V_{\text{in}}} \right)\text{ dB} \$. Actually, the example section in that linked page uses voltage gain \$ V_{\text{out}} \over V_{\text{in}} \$.  Why did \$V^2/R\$ suddenly come out from the voltage gain in decibels? How should "do my homework" questions be closed? (Missing "demonstrate minimal understanding") Just recently,  question was posted. Here's the body of the question:     Write a function called highlight() that prompts the user for a string. Your code should ensure that the string is all lower case. Next, prompt the user for a smaller 'substring' of one or more characters. Then replace every occurrence of the substring in the first string with an upper case. Finally, report to the user how many changes were made (i.e., how many occurrences of the substring there were).      What would a script for this be?   This is basically a "do my homework for me" style question. In the past, I would have voted to close this question for lacking minimal understanding and moved on. However, it looks like this close reason was removed, and I'm having difficulty figuring out which alternative to use (if at all).  Here were some of the close reasons I was considering, and ultimately decided against since they didn't seem to precisely match:   Duplicate of    I sort of doubt there exists a precise duplicate of this question -- the question is a fairly specific request for some code. I could maybe link to a duplicate question that answers a part of the original (for example, checking if the string is lowercase), but it wouldn't answer every aspect of the problem. Problem that can't be reproduced/typographical error    This sort of matches, since it asks the user to produce a SSCCEE, but doesn't really match since there isn't even a problem to begin with (and closing a question because I couldn't "reproduce" a non-existent problem feels a bit silly to me) Unclear what you're asking    It's pretty obvious what the user is asking -- I could produce a 5 line script in about 20 seconds that precisely matches his spec. Too broad    The text for "Too broad" states that "There are either too many possible answers, or good answers would be too long for this format". This doesn't apply to this question -- once again, the answer I could give would be fairly short and would closely resemble solutions other people would give.   So, what should I do here? Am I misunderstanding how the close reasons should now be used? Should I use the "other" close reason and explain that the OP should have put in more effort? Should I simply downvote, perhaps leave a comment, and move on? Or is the new policy to embrace these kinds of questions and just post an answer? Inserting the value from Datetime field form I have a form where the user can input datetime and then I want to store it in the database. Here's my schema :     'start' => array(           'type' => 'varchar', 'mysql_type' => 'datetime',           'not null' => FALSE,         ),   The form :     $form['add']['start'] = array(         '#type' => 'datetime',   '#default_value' => $date,       );   When I hit submit button, it shows me :     db_insert failed. Message = SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value:...   What I got out of it was that the DateTime in Drupal is incompatible with MySQL's. Any suggestions or how should I process the value from the form so I can insert it into the db?  Alternatively, any way to convert DrupalDatetime into string?  (For what it's worth I also tried 'timestamp' as the MySQL type but it throws me the same error). If virtual particles sometimes add more mass/energy to a system then was inputed or comes out in the output, how do they not violate conservation of mass/energy. So far I've been using public void run() {} methods to execute my code in Java. When/why might one want to use main() or init() instead of run()? How can I require an optional Perl module if installed? I have Perl code which relies on Term::ReadKey to get the terminal width. My installation is missing this module, so I want to provide a default if the module isn't present rather than throw an exception. How can I conditionally use an optional module, without knowing ahead of time whether it is available. # but only if the module is installed and exists use Term::ReadKey; ...  How can I accomplish this? What is Skynet's ultimate goal after defeating the resistance?