Jquery select on change I have a select box (Specie) and a typeAhead input field(Breed), Which i need to update on the change of selectbox, I have the following code.  &lt;div class="col-lg-4 col-md-4 col-sm-12 col-xs-12 profile-fields-margin-bottom"&gt;     &lt;select class="form-control select_field_style specie-breed" id="species" name="species" required&gt;         &lt;option disabled selected&gt;Select a Species&lt;/option&gt;         &lt;option value="Dog"&gt;Dog&lt;/option&gt;         &lt;option value="Cat"&gt;Cat&lt;/option&gt;         &lt;option value="Horse"&gt;Horse&lt;/option&gt;     &lt;/select&gt; &lt;/div&gt;  &lt;div class="col-lg-4 col-md-4 col-sm-12 col-xs-12 profile-fields-margin-bottom"&gt;     &lt;input id="breed" type="text" class="form-control charsonly" name="breed" placeholder="Breed"&gt; &lt;/div&gt;   $(document).on('change', '.specie-breed', function() {     let specie = this.value;     $('#breed').typeahead({         source:  function (query, process) {             return $.get('/get/breeds/' + specie, { query: query }, function (data) {                 console.log(data);                 return process(data);              });         }     }); });   Its working but for the first time, The second time change doesn't change the values of the typeahead,  What am i missing here ?
Event binding on dynamically created elements? 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.
403 error after upgrading to apache2.4 After upgrading from Ubuntu 13.04 server, the www pages won't display themselves.     Error 403 Forbidden You don't have permission to access / on this server.   I've changed access control saves from apache2.2 to apache2.4, but that didn't work. What else could I do? I have to try to add a field called 'Name' to a bunch of different feature classes using python, and then access the name of the feature class to fill in the field. I have no idea how to even start this! I know I need a loop but that's all I know. It looks like Ubuntu 11.04 will come with  by default. I do like them, but I don't like the current mix of scrollbar types as many applications don't yet use those overlay scrollbars.  Is there a way to disable overlay scrollbars (without removing the overlay-scrollbar package)? What system monitoring tools are available? I am looking for system monitoring tools which are GUI and CLI or web-based which include basic functions such as:   CPU Usage Ram Usage Swap Usage Disk Usage ( Space / I/O ) Heat Monitoring   I know there are many tools I can use, but I am looking for a single tool that has these basic functions. Proof of Funds for Canadian Visa I am a Romanian citizen.  Our co-national friends who are established in Canada will provide me and another person free accommodation and food. We are both EU citizens and we will stay in Canada 1 month.  These days we are gathering documents for our online visa application and we need to prove that we have enough money to spend there.   How much money is generally required in order to be sure we are eligible? We don't plan to spend more than 1000 EUR, but I intend to bring at least 2000 CAD. Is it enough? A screen of mine burnt out, and was replaced with a screen of lower resolution. It works in safe mode as that is in 800x600 resolution, but when I try to boot to normal mode, it fails. Is there a way to change the resolution for normal mode in safe mode? Automatically capitalise the first word in each sentence Often floats may land quite a bit later in the document than the point they are created, sometimes after a section break.  Is there a way to force a new section to start on a new page, after any unplaced floats? What is this colored fiber in my chicken? I smoked a whole chicken. When I cut into the breast I found this:    What is it and is my chicken ruined? Discount for Roles I am using Drupal Commerce and I would like to know if it is possible to have discounted prices for registered users and much better for roles.  For example, the nomral price is $100 but when a user logs in that belongs to Role1 for example, he will see different prices with the percentage discount that I will have assigned to that role.  How can I accomplish such a feature? I have used so many things like url removal request and deleted the pages etc., but still the errors are shown in my webmaster tools.  How can I remove the urls completely from Google? Houston, we have a porblem Since  in titles, and there's not even a way  (or ) we all know users just get around that filter by typing various permutations of the word "problem".  The filter has . The bottom line there was:     "Hacking around" the filter is in fact very very rare.   I beg to disagree. I tried searching Stack Overflow for the following variations of the title:  problme probelm probeml probmle probmel prolbem prolbme prolebm prolemb prolmbe prolmeb proeblm proebml proelbm proelmb proembl proemlb   These are just a couple of permutations from 5040 possible ones. I also tried searching for variations with left out letters, like proble, or prblm. Here's just a graph of a subset from maybe 20 searches—but in reality, there might be more ways to get around the filter:    Was this ever intended? I know it saves a lot of bad titles from being created, but on the other hand it enforces even worse titles as well. 3% based on the  aren't much, but they're 3% crap the filter actively provokes.  Now, my questions up for discussion are:   What are we going to do about this large number of porblematic posts? It seems almost impossible to fix all those. We now have a really good review system that allows people to dig through low quality posts the entire day, so that'd be a way to address this of course. Are there any plans of getting rid of the filter again? This, at least, would give you a good indicator of poor quality. If a post title contains the word "problem" you instantly know something's off. Why not have it reviewed? I understand that some people will choose a better title after being blocked, but I don't even want to start looking at the number of those who merely did a s/problem/issue, or even worse, just used "problems" (because that's not blocked, just sayin').   In the end I'm just thinking if there was a way to clean up the back log on this, or how to prevent more posts of this sort in the future, even with a title filter in place if it has to be. What is the reason that the value "47" is so popular in electrical engineering? We often see component values of 4.7K Ohm, 470uF, or 0.47uH.  For example, digikey has millions of 4.7uF ceramic capacitors, and not a single 4.8uF or 4.6uF and only 1 listed for 4.5uF (specialty product).  What's so special about the value 4.7 that sets so far apart from say 4.6 or 4.8 or even 4.4 since in the 3.. series we usually 3.3,33, etc.  How did these numbers come to be so entrenched?  Perhaps a historical reason? Add warning when changing display name How to execute a program or call a system command from Python How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script? Nobody owner (99 99) in FTP caused by php functions? Revert new tab page behavior in Google Chrome 29+ Let's say we have a cloud of dust which is a lightyear across and someone shoots a beam of light from point A to B , why it is not possible for an observer far far away to see the light while it travels through the cloud at the speed of light? "Thanks for having me" Recently, I finished my phone job interview with the phrase "Thanks for having me". It was a reply to the other person's "Thank you for your time". So, does "thanks for having me" sound alright in this context? How to prove that the set $A = \left\{ {p:{p^2} < 2,p \in {\Bbb Q^+}} \right\}$ has no greatest element? More specifically, I have to find a $q$ in $A$ such that $q$ is larger than any $p$ in $A$.  The only thing I can think of is using (${2 - {p^2}}$) somehow, or ${(p+x)^2}&lt;2$, but other than that I don't know how to proceed. This exercise is taken from the very first chapter of Walter Rudin's Principles of Mathematical Analysis. Quoting the exercise:     To do this, we associate with each rational $p &gt; 0$ the number:     $$q = p - \frac{{{p^2} - 2}}{{p + 2}} = \frac{{2p + 2}}{{p + 2}}$$   But he didn't explain how he came up with that number.   The only thing I've thought of is the following procedure:  $$\eqalign{   &amp; {p^2} + (2 - {p^2}) = 2 \Rightarrow {p^2} + (\frac{{2 - {p^2}}}{2}) &lt; 2,{\text{ and since }}2 - {p^2}{\text{ is always positive,}}  \cr    &amp; {p^2} &lt; \left[ {{p^2} + (\frac{{2 - {p^2}}}{2})} \right] &lt; 2  \cr    &amp; {\text{Therefore, let }}q = \sqrt {{p^2} + (\frac{{2 - {p^2}}}{2})} ,{\text{ then:}}  \cr    &amp; p &lt; q &lt; \sqrt 2  \cr} $$  However, my result doesn't necessarily belong to ${\Bbb Q}$. I wonder how did he obtain the value of $q$ in the book.  EDIT: Feel free to point out if there are more appropriate tags for this question.