jQuery click function not working with setInterval I'm calling an internal web page to my div every second with setInterval (that is to say reloading div). It's working fine but users should click a button inside of that reloading div and it fails.   This is my code:  HTML:  &lt;ul class="folio-list" id="buttons"&gt;&lt;/ul&gt;   JavaScript:     &lt;script type="text/javascript"&gt;     window.onload = function() {       setInterval(function(){ $("#buttons").load("&lt;?php echo site_url('buttons'); ?&gt;"); }, 1000);     };     &lt;/script&gt;   And this is the calling page's HTML:   &lt;li class="tile-large pink"&gt;             &lt;div id="time"&gt;               &lt;h2 class="Hours"&gt;30 Minutes &lt;/br&gt; 1 BTC&lt;/h2&gt;                 &lt;br /&gt;               &lt;div class="timer"&gt;                   &lt;div class="col-xs-4"&gt;                     &lt;div class="form-group"&gt;                       &lt;input type="text" class="form-control" id="hrs" value="0"&gt;                       &lt;label for="firstname" class="col-sm-2 control-label"&gt;Hrs&lt;/label&gt;                     &lt;/div&gt;                   &lt;/div&gt;                     &lt;div class="col-xs-4"&gt;                     &lt;div class="form-group"&gt;                       &lt;input type="text" class="form-control" id="mnt" value="0"&gt;                       &lt;label for="firstname" class="col-sm-2 control-label"&gt;Mnt&lt;/label&gt;                     &lt;/div&gt;                   &lt;/div&gt;                     &lt;div class="col-xs-4"&gt;                     &lt;div class="form-group"&gt;                       &lt;input type="text" class="form-control" id="sec" value="0"&gt;                       &lt;label for="firstname" class="col-sm-2 control-label"&gt;Sec&lt;/label&gt;                     &lt;/div&gt;                   &lt;/div&gt;                &lt;/div&gt;               &lt;br /&gt;               &lt;h3 class="winner-name"&gt; Nobody &lt;/h3&gt;               &lt;button class="btn btn-success pay" data-id="2"&gt;Get Ticket!&lt;/button&gt;             &lt;/div&gt;           &lt;/li&gt;   I'm trying to make this part clickable  &lt;button class="btn btn-success pay" data-id="2"&gt;Get Ticket!&lt;/button&gt;   with this JavaScript code below:  &lt;script type="text/javascript"&gt; $('.pay').click(function() {    var id = $(this).attr('data-id');    $.ajax({      url: "&lt;?php echo site_url('pay'); ?&gt;" + "/" + id,      type: 'POST',      success: function(answer) {              $('#answer').html(answer);          }    });  });  &lt;/script&gt;   When I disable reloading thing, button working fine. I'm sure that the problem is setInterval part.  Thanks in advance.
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.
I accidentally killed a noble, now every guard wants to kill me. Is there any way I can get rid of the bounty? Is there a missing definite article before caliph in 'the group's leader, XYZ, as (the) caliph'? I read news on the BBC (on its website) this morning. When I was reading the news I noticed the definite article the was missing in a sentence. As per my opinion, the reporter missed the article the. But I also thought that the reporter also had some point as he did not use the article there. So I just wanted to confirm so landed here to get some help on it.     On the website:      It also proclaimed the group's leader, XYZ  (name), as caliph and   "leader for Muslims everywhere".      As per my opinion it should have been:      It also proclaimed the group's leader, XYZ  (name), as the caliph and   "leader for Muslims everywhere".   Source link: I'm searching for applications where the distribution of the eigenvalues of a unitary matrix are important. Example properties of the eigenvalues could be that the eigenvalues are clustered, that they live in some half plane, that, in the case that the matrix is orthogonal, that a certain fraction are 1, etc. No notification (+15) for accepted answer How to arrive at $\int_{0}^{1} f^3(x) \, dx < (\int_{0}^{1} f(x) \, dx)^2$? Define $f : [0,1] \to \mathbb{R} $ differentiable satisfying $f(0)=0$ and $0&lt;f'(x)&lt;1$. Prove:  $\displaystyle\int_{0}^{1} f^3(x) \, dx &lt; \left(\displaystyle\int_{0}^{1} f(x) \, dx\right)^2$ I found the following answer,  Define $F(x)=\displaystyle\int_{0}^{x} f^3(t) \, dt - \left(\displaystyle\int_{0}^{x} f(t) \, dt\right)^2$ We have $$F'(x)=f^3(x)-2 \left(\displaystyle\int_{0}^{x} f(t) \, dt\right)f(x)=f(x)\left[f^2(x)-2 \left(\displaystyle\int_{0}^{x} f(t) \, dt\right)\right]$$ and $$\left[f^2(x)-2 \left(\displaystyle\int_{0}^{x} f(t) \, dt\right)\right]'=2f(x)\left[f'(x)-1\right]$$ from which we can arrive at the conclusion.  But I felt a little confused. In the past I usually proved the inequality by classical inequalities and something like Taylor expansion to use the condition about derivative. But this answer is little out of my expectation. Do we have other proofs or ideas to arrive at $\displaystyle\int_{0}^{1} f^3(x) \, dx &lt; \left(\displaystyle\int_{0}^{1} f(x) \, dx\right)^2$? And other thoughts about solving these types of issues? I think when we talk about $\left(\displaystyle\int_{0}^{1} f(x) \, dx\right)^2 &gt;\ldots \,$ it's a little difficult to deal with. I don't quite know what tools to use. How does extra damage work for critical hits? Assign z values to depth curves in QGIS I'm new to QGIS and working with GIS in general (student of architecture), so please bear with me.  I have obtained shapefiles with topographic curves of an ocean floor. My intention is to export these as CAD files and render as 3D models of the ocean floor in Revit. I have done this procedure earlier with terrain shapefiles. My problem now is that these files mapping depth does not contain z values, so when exporting them into CAD they are completely flat rather than 3D models.  The depth information in meter exists as attributes in the file (see attached image). What I want is to transform this depth value into real z coordinates for each line so that the curves have different heights when importing as CAD file in Revit.  Thankful for any pointers in the right direction. Typo in First Posts queue If you go to the First Posts review queue, and if there's an answer in the queue and if you hover with your mouse over "No Action Needed", then you get a tooltip "this answers seems to be valid":  But it should be "this answer seems to be valid". If cooking meat kills bacteria, and bacteria are responsible for problems with eating meat which has been left out, then why is it dangerous to eat meat which has been left out at room temperature and then thoroughly cooked?   mentions that "Even if the bacteria is dead, toxins can remain if the food was out too long, causing problems".  However, there's no further detail given.  Are these toxins as dangerous as the bacteria themselves?  How long does meat have to be left out to accumulate a dangerous level of toxins and thus be dangerous even if thoroughly cooked?  Are these toxins the reason for the usual guideline of keeping meat unrefrigerated for a maximum of 2 hours?  update  The revelation, courtesy of Aaronut, that e. coli is actually dangerous because of its toxins — which cannot be denatured at temperatures which will leave meat in an edible state — has pretty much answered this question.  And also given me further incentive to stop eating meat altogether :)  Our discussion (see the comments on hobodave's answer) has progressed into the realm of microbiology.  Some highlights from my ongoing research:  .  These seem to be the reason for the importance of keeping meat at a high temperature for a period of time.  .  This also provides fascinating insight into how bacteria evolved immunity to antibiotics.  Fungi. Masking problems I am working with masking. Here is my node setting with the mask.   And here is my node settings  And what am i getting is this.    I tried invert node and many settings. It just doesnt work. Where am i going wrong Comparing object properties in c# This is what I've come up with as a method on a class inherited by many of my other classes. The idea is that it allows the simple comparison between properties of Objects of the same Type.  Now, this does work - but in the interest of improving the quality of my code I thought I'd throw it out for scrutiny. How can it be better/more efficient/etc.?  /// &lt;summary&gt; /// Compare property values (as strings) /// &lt;/summary&gt; /// &lt;param name="obj"&gt;&lt;/param&gt; /// &lt;returns&gt;&lt;/returns&gt; public bool PropertiesEqual(object comparisonObject) {      Type sourceType = this.GetType();     Type destinationType = comparisonObject.GetType();      if (sourceType == destinationType)     {         PropertyInfo[] sourceProperties = sourceType.GetProperties();         foreach (PropertyInfo pi in sourceProperties)         {             if ((sourceType.GetProperty(pi.Name).GetValue(this, null) == null &amp;&amp; destinationType.GetProperty(pi.Name).GetValue(comparisonObject, null) == null))             {                 // if both are null, don't try to compare  (throws exception)             }             else if (!(sourceType.GetProperty(pi.Name).GetValue(this, null).ToString() == destinationType.GetProperty(pi.Name).GetValue(comparisonObject, null).ToString()))             {                 // only need one property to be different to fail Equals.                 return false;             }         }     }     else     {         throw new ArgumentException("Comparison object must be of the same type.","comparisonObject");     }      return true; } Compare 1st column of the 1st file and 2nd column of the 2nd file and matching What are the mechanics by which Time Dilation and Length Contraction occur? What's difference between shadowing and overriding a method in C#? Ought we only form beliefs based on sufficient empirical evidence? In , John Loftus often makes statements like:  Faith, as I argue, is an irrational leap over the probabilities. Probabilities about such a matter are all that matter. We should think exclusively in terms of them. (19) If God created us as reasonable people, then the correct religious faith should have sufficient evidence for it, since that’s what reasonable people require. (22) Because science is the only game in town. It works. It produces the goods. There isn’t a better alternative. (119)  Loftus' attitude seems representative among many atheists; while I'm aware that there are other views, it is this kind of view which leads to the title of this question: Ought we only form beliefs based on sufficient empirical evidence? Here are some sub-questions which may help guide answers:  How can we get an ought from an is, given that evidence only describes what is? Reformulating the title as a hypothetical imperative doesn't seem to help, because the scientific method doesn't seem to ever make a hypothetical imperative binding. And yet, surely those who would agree with the quoted text would find certain hypothetical imperatives binding?  Given that the scientific method includes &quot;basic arithmetical truths and also certain truths about formal provability&quot;,  seems to apply: a given axiomatic formulation of the scientific method will be unable to imply certain (virtually all, it turns out) truths. To say that science is complete—there are no other methods of knowing things—seems to imply that science is inconsistent. Is this 'seems' an illusion?  Does the scientific method require that we make observations prior to forming hypotheses? It could be argued that probabilistically, trying to come up with hypotheses before making a 'sufficient' number of observations will result in a failed hypothesis too much of the time. Is there evidence to support this which can probabilistically rule out all other kinds of hypothesis-forming?  Must we accept any unfalsifiable claims? The answer seems to be 'yes', given e.g. the example of crystal structure discussed by Michael Polanyi in  (43-48, 1984 paperback). A set of geometries seemed to well-describe many crystals found in nature, and even if some crystals aren't well-described, that doesn't falsify the instances in which it does. This opens up the question of which unfalsifiable claims we ought to accept.  If we model human reasoning as , we can ask what is meant by 'sufficient' by what the 'probabilities' are, prior to any observations: what  ought we start with? I am tempted to say &quot;the most effective one&quot;, but that presupposes a purpose; are we given an objective purpose?   I am left with the suspicion that one ought to only follow the scientific method to the extent that one only wants to predict one's future observations—this smells like a tautology. It seems to beg the question to say that the most important area of 'truth' is objective reality, a question which cannot be answered with the scientific method. A 'yes' answer to the main question would seem to fall prey to something like  of .  I was tempted to phrase my question as:  Is science the only source of truth?  I believe this is a bad question, for a few reasons:  We care about whether a method can reliably arrive at truth/knowledge. The terms 'truth' and 'knowledge' would possibly stir a debate about , which may not be a prerequisite for the answer to my question. My question makes explicit that we are talking about what one ought to do, which is not explicit in the above formulation. Formatting should not count towards the character limit on comments This is a minor frustration, but I have a  that I put italics and bold into (using asterisks.)  Now I know I just just be happy that I could do it at all, but it seems to me that those should not count toward my comment char limit. How to show the transfer progress and speed when copying files with cp? Otherwise, is there any alternative command line utility that can achieve this? I'm giving training to a large group of people remotely and will be covering a number of application shortcut keys.  I've seen 's on-screen display of keystrokes; is there a similar product for Windows?    The other features of MousePose (fancy mouse pointers, etc.) aren't really useful to me, just the OSD of key presses. I used node textures in a mesh I exported to .FBX.  I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine.  Is there something I'm doing wrong or is it Blender? What are the technical advantages and disadvantages of mirrorless? The main doubt one can have about mirrorless is, I think that they do not provide ttl viewfinder. Is this a big disadvantage? In what way is it worst (or best) than classical reflex system?  What are the others advantages and disadvantages of a mirrorless compared to a reflex?  Have mirrorless a chance to replace reflex (at least for non pros) in the future?