So I'm creating a simple javascript program that allows me to add text boxes and a remove button that when clicked removes the button and the text box next to it:   &lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="UTF-8"&gt; &lt;title&gt;Title&lt;/title&gt; &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="script.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt;  &lt;div id="space"&gt; &lt;div&gt;     &lt;input type="text" class="in"/&gt;     &lt;button class="btn" id="1"&gt;Remove&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;button id="add"&gt;Add&lt;/button&gt; &lt;br/&gt; &lt;button id="cacl"&gt;Calculate&lt;/button&gt; &lt;br/&gt; &lt;div id="container"&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt;   And here is the script   $(function () {     var i=2;     $("#add").click(function () {         $("#space").append('&lt;div&gt;&lt;input type="text" class="in"/&gt; &lt;button class="btn" id="'+i+'"&gt;Remove&lt;/button&gt; &lt;br/&gt;&lt;/div&gt;');         i++;     });      $(".btn").on('click', function () {         console.log("OK");         $(this).parent().remove();     }) });   However when I click on the remove button nothing happens it doesn't even log "OK".  Any ideas?
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
I was using Windows XP, I like Ubuntu, but I'm wondering,because as  I'm a professional photographer &amp; photo editor.  I do my work with Photoshop, so will photoshop work in ubuntu? Motivating the ansatz for the infinitesimal translation operator Hungerford's book of algebra has exercise $6$ chapter $3$ section $6$ [Probably impossible with the tools at hand.]:     Let $p \in \mathbb{Z}$ be a prime; let $F$ be a field  and let $c \in  F$. Then $x^p - c$ is irreducible in $F[x]$ if and only if $x^p - c$   has no root  in $F$. [Hint: consider two cases: char$(F) = p$ and   char$(F)$ different of $p$.]   I have attempted this a lot. Anyone has an answer? he or she vs their when using 'one' as a pronoun Mindfulness allows one to cope with their daily challenges.   Is "one" correct with "their" here?  I want to know if it is okay to user their (instead of he or she) when using 'one' as a pronoun. Our group has determined that buying (almost exclusively) money and points is the way to go.  Most kingdom cards are ignored, or are bought very sparingly. This has lead to games feeling 'samey' and has taken a lot of the fun out for us.  What strategies should we use to counter ""?  Or are house rules needed here? I have a shop created with drupal commerece modules,I enabled 2 currency in my shop , but only show one of them, I want to show price in 2 currency       something like this price :  10$  / 20 IRR I use multi currency module to achieve this job, but  I my problem is in payment  phase, I use multi currency module to achieve this job,in multicurrency  module's setting I don't want  use  synchronize method, if you want have two field in my product , one form $ and another for IRR, I did this job by this method     first enable IRR currency in  admin/commerce/config/currency  then in  admin/commerce/config/currency/handling under Enable dedicated price fields for Product check Iranian Rial  by doing this  another field added you my product ( ** Price for IRR** ), this is good , after this I enable  *currency selector * block ,in checking out process by switching the currency I don't see any change in current currency of billing and cart. :( why changing currency not changing cart currency? Should I flag/down-vote "Draft Answers"? Modelling with more variables than data points I'm fairly new to Machine Learning/Modelling and I'd like some background to this problem. I have a dataset where the number of observations is $n&lt;200$ however the number of variables is $p\sim 8000$. Firstly does it even make sense to consider building a model on a dataset like this or should one consider a variable selection technique to start with such as ridge regression or Lasso? I've read that this situation can lead to over-fitting. Is that the case for all ML techniques or do some techniques handle this better than others? Without too much maths a simple explanation on why the maths start to breakdown for $p&gt;n$ would be appreciated. How to get the environment variables of a subprocess after it finishes running? Two-Weapon Fighting & Bonus Actions How do I specify unique constraint for multiple columns in MySQL? I have a table:  table votes (     id,     user,     email,     address,     primary key(id), );   Now I want to make the columns user, email, address unique (together).  How do I do this in MySql?  Of course the example is just... an example. So please don't worry about the semantics. How does electricity propagate in a conductor? can't send email to addresses at my own domain A function $f: \mathbb{R} \to \mathbb{R}$ is said to have the intermediate-value property if for any $a$, $b$ and $\lambda \in [f(a),f(b)]$ there is $x \in [a,b]$ such that $f(x)=\lambda$.  A function $f$ is injective if $f(x)=f(y) \Rightarrow x=y$.  Now it is the case that every injective function with the intermediate-value property is continuous. I can prove this using the following steps:   An injective function with the intermediate-value property must be monotonic. A monotonic function possesses left- and right-handed limits at each point. For a function with the intermediate-value property the left- and right-handed limits at $x$, if they exist, equal $f(x)$.   I am not really happy with this proof. Particularly I don't like having to invoke the intermediate-value property twice.  Can there be a shorter or more elegant proof? Derivative of function with 2 variables I've leart in Calculus 1 that the derivetive of $f(x)$ is:  $$\lim_{h\to0} \frac{f(x+h) - f(x)}{h}$$.  suppose $f(x,y)$ is a function with 2 variables,  does $$f'(x,y) = \lim_{h\to0} \frac{f(x+h, y+h) - f(x,y)}{h}$$ ?  If not , what is the derivetive of function with 2 variables? How do you get the index of the current iteration of a foreach loop? Is there some rare language construct I haven't encountered (like the few I've learned recently, some on Stack Overflow) in C# to get a value representing the current iteration of a foreach loop?  For instance, I currently do something like this depending on the circumstances:  int i = 0; foreach (Object o in collection) {     // ...     i++; } Java FileInputStream ObjectInputStream reaches end of file EOF Reducing voltage with resistors I have been looking around for an easy way to convert 12V to 5V. I have seen some people saying that a simple resistor is all that is needed.  $$ Volts = Ohms \cdot Amps $$ $$ Amps  = \frac{Volts}{Ohms} $$ $$Ohms  = \frac{Volts}{Amps}$$  So applying a resistor will diminish the voltage of the circuit. That should mean that an appropriately sized resistor could simply be placed in the path of a 12V circuit, converting it to 5v.   If this is the case how would one reduce amps? Would series vs parallel make a difference in this area?   I have seen designs that include a regulator IC and some capacitors, but if a simple resistor/fuse/diode setup will do the trick, I would really prefer that. What is the remainder when $1! + 2! + 3! +\cdots+ 1000!$ is divided by $12$? What is the remainder when $$1! + 2! + 3! +\cdots+ 1000!$$ is divided by $12$.  I have tried to find the answer using the Binomial Theorem but that doesn't help. How will we do this?  Please help. Regular expression to match non-ASCII characters? What is the easiest way to match non-ASCII characters in a regex? I would like to match all words individually in an input string, but the language may not be English, so I will need to match things like ü, ö, ß, and ñ. Also, this is in Javascript/jQuery, so any solution will need to apply to that.