When I click on a button, I want to get the id of the button that was clicked. How can I do that with JavaScript?  For example:  &lt;input type="button" id="1" class="buttonID" value="answer" onClick=myFunction() /&gt; &lt;input type="button" id="2" class="buttonID" value="answer" onClick=myFunction() /&gt; &lt;input type="button" id="3" class="buttonID" value="answer" onClick=myFunction() /&gt;
Is there any way to get the ID of the element that fires an event?  I'm thinking something like:    $(document).ready(function() {   $("a").click(function() {     var test = caller.id;     alert(test.val());   }); }); &lt;script type="text/javascript" src="starterkit/jquery.js"&gt;&lt;/script&gt;  &lt;form class="item" id="aaa"&gt;   &lt;input class="title"&gt;&lt;/input&gt; &lt;/form&gt; &lt;form class="item" id="bbb"&gt;   &lt;input class="title"&gt;&lt;/input&gt; &lt;/form&gt;     Except of course that the var test should contain the id "aaa", if the event is fired from the first form, and "bbb", if the event is fired from the second form.
In how many ways can we choose k items from n distinct items put in a circle.   Then further extension of the question, if I want to find out the number of ways to choose k items from n distinct items in a circle such that no 2 are together.  Thanks "going to come down" vs "going to have to come down" What is the difference between the following sentences?        This fence is going to come down.   This fence is going to have to come down.      I have doubt that when you are saying fence is going to have to come down, that is enough to say it right? but why I hear in movies saying fence is going to have to come down, is there a difference between them? Coefficient changes sign when adding a variable in logistic regression queries with db_select don't respect integers When I check "SHOW PROCESSLIST" in phpMyAdmin I can see lots of queries where argument-integers are being inserted as strings (with single quotation marks).  I'm wondering if this is due to the way phpmyadmin reports the queries (if it puts every argument between quotation marks) of if it is db_select that puts every argument between quotation marks.  An example of my code where integers are being used as arguments:  $select-&gt;join('taxonomy_index', 't_'.$key, 't_'.$key.'.nid = n.nid AND t_'.$key.'.tid = :tid_' . $key, array(':tid_'.$key =&gt; (int)$tid)); $select-&gt;condition('t_'.$key.'.tid', (int)$tid);   As you can see I explicitly write (int)$tid but in my query log I can see the following:  ... WHERE (t_0.tid = '10') ...   The big question is: How can I be sure that integers are being treated as integers in my queries? I don't want MySQL having to transform strings to integers. SSH welcome message on 17.04 shows notice about 12.04 I just did a do-release-upgrade going from Ubuntu 16.04 to 17.04. However, now when I login via SSH I have the following message   Welcome to Ubuntu 17.04 (GNU/Linux 4.10.0-20-generic x86_64)   * Documentation:  https://help.ubuntu.com  * Management:     https://landscape.canonical.com  * Support:        https://ubuntu.com/advantage  Ubuntu 12.04 LTS end-of-life was April 28, 2017 -- Upgrade your Precise systems!  $ sudo do-release-upgrade -m server  0 packages can be updated. 0 updates are security updates.   My question is, how can I remove the   Ubuntu 12.04 LTS end-of-life was April 28, 2017 -- Upgrade your Precise systems!  $ sudo do-release-upgrade -m server   it wasn't there prior the release-upgrade  I checked and I am on Zesty  lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 17.04 Release:    17.04 Codename:   zesty   My question is not, how can I remove this message, this I found. My question is more, is there a reason why this appears after a release-upgrade? Is this message something generic not taking into consideration the current version of Ubuntu? Or maybe my system is not updated properly? Proving at least 99 pairwise sums of the reals are non-negative Suppose, one hundred real numbers are given and their sum is 0.Then how can I prove that at least 99 of the pairwise sums of these hundred numbers are non-negative?  I tried this: Let the real numbers be $a_i$,$1\leq i\leq100$. By the given condition, $a_1+a_2+\dots +a_{100}=0$.Suppose for the sake of contradiction, that at most 98 of the pairwise sums of these given reals are non-negative.I just tried to examine the case when exactly 98 of them are non-negative. I labelled the sums $S_1$,$S_2,\dots S_{4950}$,WLOG assume that sums $S_1,S_2,\dots S_{4852}$ are negative, the rest are non-negative. $$S_1+S_2+\dots +S_{4950}=99(\sum_{i=1}^na_i)=0$$ Case I: $S_{4853}+a_{4854}+\dots +a_{4950}=0$.That simply means that $S_1+S_2+\dots +S_{4852}=0$.But, by the given condition, $S_1+S_2+\dots +S_{4852}&lt;0$,a contradiction.After that, I am not able to make any progress.  Can anyone please suggest a more efficient method to solve this problem.I feel this approach will involve enormous case work. Function that returns the second argument of Reap No output from goroutine How to clear the BIOS security password on this notebook? I recently got an Acer Aspire E11 (E3-112m) and in order to install another OS I had to set a Supervisor password, so I used a well known password to me, the problem is that such password contains a special character ! which the password prompt won't let me input, though it let me when I had to set the password (buggy prompt I believe). Now everytime I need to change something in the BIOS I have to fail 3 times and go to  to generate a master key.  I have already tried several different methods to clear it:   Removing the CMOS battery Looking for the reset jumper (which doesn't even exist).   I also noticed there were 2 weird buttons on the front and back sides of the motherboard, I don't know what they are for but I also pressed them (while both the CMOS and the regular battery were disconnected). All of this without luck, the password just won't reset (though the RTC did).  Are there other ways to reset the Supervisor/Admin password on this model? When I want to move a file to the Trash, Nautilus give me an message saying this:     You can't move example.file to the trash can. Do you want to remove it immediately?   I can give you this photo but it's in Spanish Geometric intuition for the tensor product of vector spaces How to calculate the difference between two dates using PHP? How to get battery status? How do I get the battery status on an iPhone? Let $f:\mathbb R \to \mathbb R$ be a continuous function such that $f(f(f(x)))=x,\forall x \in \mathbb R$ , then is it true that $f(x)=x , \forall x \in \mathbb R$ ? I can see that $f$ is bijective , hence strictly monotone . But I cannot progress further . Please help. Thanks in advance Does the following series have a closed-form expression:  $$\sum_{k=0}^{\infty} \frac{z^k}{(k!)^2}$$  I know that it must converge because:  $$\sum_{k=0}^{\infty} \frac{z^k}{k!} = e^z$$  and the $(k!)^2$ denominator obviously increases more quickly than the $k!$ denominator.  This problem came up in computing the probability of a draw in a football match with each team's goal scoring modeled as a Poisson process.  Thanks,  John $$\sum_{k=1}^{\infty} \frac{1}{k^{\ln k}}.$$  I have some problems with this sum, I have tried most of the common methods, such as the ratio/root test, integral test, etc. I do believe it looks like a problem easily solvable by a direct comparison with some p-series, however, I do not know how to formulate the inequality.   I did try using the common fact that $\ln(x) \ll x^p$ for large $x$ but that of course only bounds it from below with a convergent series saying nothing about ours. Also I tried rewriting the 'summand' as $e^{\ln(k^{\ln k})}=e^{\ln k \cdot \ln k}$ but this did not really yield anything.   Any answer or hint would be greatly appreciated. Fresh install of TL2018: no tikz graph drawing libraries found Using the quadratic formula, we have either 0, 1, or 2 solutions. I wonder if we could use it this formula for congruence? Or is there a formula to solve quadratic equation for congruence?  Edit Assume that $ax^2 + bx + c \equiv 0 \pmod{p}$, where $p$ is prime with $(a, p) = 1$, then is there a formula for this equation?    Thanks, Getting an error that a flow "was" activate and cannot be overwritten What's the full-form & significance of USS & ISS prefixes in name of Star Trek starships?