Producing a customized object in Javascript
How can I merge properties of two JavaScript objects dynamically?
++ is dangerous for C programmers Number of solutions to the congruence $x^q \equiv 1 \mod p$. Let $p, q$ be distinct odd primes, I would like to compute the number of solution $\mod p$ to the congruence $x^q \equiv 1 \mod p$. (Show that it's $gcd(q, p - 1))$  If $x^q \equiv 1 \mod p$, since $q$ is prime, this must mean that $x$ is either $1$ or has order $q$.   Hence, the problem reduces to finding the number of elements of $U_p$ which is either $1$ or has order $q$.  If $ q \nmid  p - 1$, then there is only one element, namely $1$.  If $q \mid p - 1$, then the number of elements of order $q$ is $\phi(q) = q - 1$, and so the number of solutions to the congruence $\mod p$ is $q - 1 + 1 = q$, and in either case the number of solutions is $\gcd(q, p - 1)$.  Does this look fine? Just posted a bug report, and found another one :p    (lame hand-drawn cursor coz windows doesn't capture the real cursor)  Oh yeah, I'm on Firefox. Change the default editor when sudo visudo When doing sudo visudo, the default editor is nano. I want to change it to vi or vim.     I already made vim the default editor, and use it as a substitute for gedit to open php, .txt, .c and .h files, by placing a vim.desktop file in ~/.local/share/applications/ and by correctly editing either  ~/.local/share/applications/mimeapps.list or /etc/gnome/defaults.list. However apparently this does not apply to nano.    Any clue ? For any triangle with sides $a$, $b$, $c$, prove the inequality $$a^2b(a-b)+b^2c(b-c)+c^2a(c-a)\ge 0 .$$   This is IMO 1983 problem 6.  I tried substituting $a=x+y$, $b=y+z$, $c=z+x$ but well it doesn't help in any sense except wasting 3 pages that lead to nothing (please don't mind the joke). Using $a=2R\sin A$, $b=2R\sin B$, $c=2R\sin C$ also didn't lead to anything for me. Could you give me a hint for finding the proper substitution? Taylor's polynomial uniqueness proof - why are these limits inferable? So I'm viewing a short proof on the uniqueness of Taylor polynomials.     Uniqueness of Taylor polynomial:   Let $f:]a,b,[ \rightarrow \mathbb{R}$ $n$ times continuously   differentiable and $x_0 \in ]a,b,[$. If $p$ is $n$th degree polynomial   function for which       $$f(x)-p(x)=o(|x-x_0|^n), \space \text{when} \space x \rightarrow x_0$$  then      $$p(x)=T_{n, x_0} f(x)$$   Proof starts like:  $$\frac{p(x)-T_{n, x_0}f(x)}{(x-x_0)^n} = \frac{p(x)-f(x)}{(x-x_0)^n}+\frac{f(x)-T_{n, x_0}f(x)}{(x-x_0)^n}$$  then   $$\frac{p(x)-f(x)}{(x-x_0)^n} \rightarrow 0 \space, when \space x-x_0 \rightarrow 0$$  $$\frac{f(x)-T_{n, x_0}f(x)}{(x-x_0)^n} \rightarrow 0 \space, when \space x-x_0 \rightarrow 0$$  Now my problem is, how can one actually say that the above approach $0$ if the denominator approaches $0$? Twist shifter cannot shift down – what might be the cause? My son's bike is stuck on 7. When we try to shift down to 1, there are no clicks. It just shoots right back to 7. This is a dial/twist/grip shifter, not a trigger shifter. I do not think it has anything to do with the derailleur, but want to confirm. Adding Grids in Project Manager of QGIS I am using QGIS 3.12. I am new to QGIS after having worked with ArcGIS Desktop for a while. I am having issues with adding a grid to my project. I am using CRS ESPG:3587 WGS 84 / Pseudo-Mercator and noticed that the grid is showing the wrong coordinates and have included the parameters I have set for the grids. How Get Parent Field in Attachment? Please Help me...  Account sObject is Parent of Attachment. Now I want to bring Read-only Field Custom field (isReadOnly__c).  SELECT Id, Name, Account.isReadOnly__c FROM Attachment   How It Gets ?  Thanks in Advance  Manu Does an increasing sequence of reals converge if the difference of consecutive terms approaches zero? Scheduling a team based activity with 10 different teams and X different games. Every team must meet each other ONCE but never twice, Hi there I am planning a ”Scavenger hunt”-like activity (I have no other words for this event), and I am having trouble creating the schedule.   The idea of this hunt/run/game/competition is that 10 teams will battle each other at X different mini games. The games on are team vs. team based, meaning that there will always be two teams on each post and one winner and one loser.  I require that every team fights every other team. Meaning that team 1 will have to meet team 2, 3, 4, 5, 6, 7, 8, 9, and 10, and team 2 will have to meet team 1, 3, 4, 5, 6, 7, 8, 9, 10 (and so forth). The amount of mini games must be so, that every team only meets the other teams ONCE each, but still they have to meet every team.  How many posts do I need to create, and how could I schedule the overall activity? (A table of rounds and teams would be much appreciated). How to specify an arbitrary (possibly non-integer) font size in LaTeX I may be wrong, but it seems to me that I cannot obtain non-integer (or non-preloaded) font sizes (say, 9.876pt) using \fontsize.  If this is true, how do I do this in LaTeX?  Do I have to resort to the \font ... at ... primitive?  (The reason I need this is that I'd like to implement a more LaTeXy way to do the \diminuendo macro from .) bash: alias: alias: not found When should a verb be followed by a gerund instead of an infinitive? How does a circular lens produce rectangular shots? Nice looking progress bar in java What causes javac to issue the "uses unchecked or unsafe operations" warning A line is drawn through the point $A(1,2)$ to cut the line $2y=3x-5$ in $P$ and the line $x+y=12$ in $Q$. If $AQ=2AP$, find the coordinates of $P$ and $Q$.  I found the lengths of the lines $AQ$ and $AP$ in terms of $x$ and $y$ and used $AQ=2AP$ to get this equation $11x^2-40x-16=0$  Working: $AP=\sqrt{(x-1)^2+(\frac{3}{2}x-\frac{9}{2})^2}=\sqrt{\frac{1}{4}(13x^2-62x+85)}$  $AQ=\sqrt{(x-1)^2+(-x+10)^2}=\sqrt{2x^2-22x+101}$  $AQ=2AP\Rightarrow \sqrt{2x^2-22x+101}=2\sqrt{\frac{1}{4}(13x^2-62x+85)}$  $\Rightarrow 2x^2-22x+101=13x^2-62x+85\Rightarrow 11x^2-40x-16=0$  Using the quadratic formula I found $x=4,x=-\frac{4}{11}$  I then substituted these values into the two equations in the question to get the coordinates $(4,\frac{7}{2}),(-\frac{4}{11},-\frac{15}{11})$ or $(4,8),(-\frac{4}{11},\frac{136}{11})$  But the answers in the book are $(4,\frac{7}{2}),(7,5)$ or $(\frac{2}{5},-\frac{19}{10}),(\frac{11}{5},\frac{49}{5})$  I don't know where I went wrong in my method.  Edit: Found some errors in my method and calculation.  Using $x=4$ in $2y=3x-5$ gives $P(4,\frac{7}{2})$  Line with points $AP$ has equation $y-2=\frac{\frac{7}{2}-2}{3}(x-1)\Rightarrow y=\frac{1}{2}x+\frac{3}{2}$  $Q$ lies on the same line. Therefore, the intersection between $y=\frac{1}{2}x+\frac{3}{2}$ and $y+x=12$ is the point $Q$. Working: $\frac{1}{2}x+\frac{3}{2}=-x+12\Rightarrow x=7$ Therefore, $y=-7+12=5$. Point Q has coordinates $(7,5)$.  But $x=-\frac{4}{11}$ is not the other $x$ coordinate of $P$ according to the answers in the book. I have no idea where I went wrong at this point. How do I unlock the Dream Suite in Animal Crossing New Leaf? Highlight whole TreeViewItem line in WPF