When I create new TASKs the "edit" (to save changes) and "delete" links stops working. What it wrong here?  I am using .on() but it doesn't work with new elements.  html:  &lt;ul id="incomplete-tasks"&gt;  &lt;li&gt;       &lt;input type="checkbox"&gt;&lt;label&gt;Pay Bills&lt;/label&gt;       &lt;input type="text"&gt;       &lt;button class="edit"&gt;Edit&lt;/button&gt;       &lt;button class="delete"&gt;Delete&lt;/button&gt;  &lt;/li&gt;  &lt;/ul&gt;   jQuery:   //Add new TASK  $('#addButton').click(function(){  $("#incomplete-tasks").append('&lt;li&gt;&lt;input type="checkbox"&gt;&lt;label&gt;' + $('#new-task').val() + '&lt;/label&gt;&lt;input type="text"&gt;&lt;button class="edit"&gt;Edit&lt;/button&gt;&lt;button class="delete"&gt;Delete&lt;/button&gt;&lt;/li&gt;')  });   //Show edit mode  $("#incomplete-tasks").on("click", ".edit", function() {   //show  $(this).parent().toggleClass('editMode');   //Add label value = edit field text  var $label = $(this).children().find('label').text();  $(this).children().find('input[type=text]').val($label);  });   //Save changes when "edit"is clicked again   $('.edit').on("click", function() {  var value = $(this).parent().find('input[type=text]').val();  $(this).parent().find('label').text(value);  });   //delete task   $('.delete').on("click", function() {  $(this).parent().hide();  });   FULL CODE -
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.
What would be the easiest way to UV map a complex object? I'm attempting to make a texture for a model i've been working on, so i've been trying to get a decent UV map, However whenever I do it usually ends up either very distorted or a lot of unrecognizable pieces or several different UV maps. What are some easier ways of unwrapping/UV Mapping? Best way to list files in Java, sorted by Date Modified? I want to get a list of files in a directory, but I want to sort it such that the oldest files are first.  My solution was to call File.listFiles and just resort the list based on File.lastModified, but I was wondering if there was a better way.  Edit: My current solution, as suggested, is to use an anonymous Comparator:  File[] files = directory.listFiles();  Arrays.sort(files, new Comparator&lt;File&gt;(){     public int compare(File f1, File f2)     {         return Long.valueOf(f1.lastModified()).compareTo(f2.lastModified());     } }); Is it possible to overload the null-coalescing operator for a class in C#?    Say for example I want to return a default value if an instance is null and return the instance if it's not. The code would look like something like this:     return instance ?? new MyClass("Default");     But what if I would like to use the null-coalescing operator to also check if the MyClass.MyValue is set? If $n$ vectors are linearly independent, is their span $\mathbb{R}^n$? Have $n$ vectors in $\mathbb{R}^n$.  If the $n$ vectors are linearly independent, can we conclude that their span is $\mathbb{R}^n$? Where did Harry's parents get all of their money from? What category does the 'the recent perfect' belong to? A scholar has said that there are 4 usages of the present past tense:   The Universal sense of the Perfect, used to indicate that a state of affairs prevailed throughout some interval stretching from the past into the present       I've known Max since 1960.  The Existential sense of the Perfect, used to indicate the existence of past events     I have read Principial Mathematica five times.  The Stative/Resultative sense of the Perfect, used to indicate that the direct effect of a past event still continues     I can't come to your party tonight - I've caught the flu.  The Hot News sense of the Perfect, used to report hot news     Malcolm X has just been assassinated.    To what category does the recent past belong? Evaluating the infinite product $\prod\limits_{k=2}^\infty \left ( 1-\frac1{k^2}\right)$ Evaluate the infinite product $$\lim_{ n\rightarrow\infty }\prod_{k=2}^{n}\left ( 1-\frac{1}{k^2} \right ).$$  I can't see anything in this limit , so help me please. The future of meta.stackoverflow and meta.stackexchange Historically this site, , has been the place to ask questions about not just Stack Overflow, but the functioning of the entire Stack Exchange (2.0) network, including Area 51 and stackexchange.com and careers.  (Yes, there was a , but that dealt with the old legacy Stack Exchange 1.0 sites. It was deprecated a while ago, and currently redirects here.)  Now that we've gotten many, many months under our belt from the SE 1.0 days, I think it's time that we gave Stack Overflow its own, true per-site meta, and moved the higher level network meta discussions to meta.stackexchange.com.  Over time, it's begun to bug me more and more that requests for Stack Overflow, the site, kind of get buried here on meta.stackoverflow under the avalanche of network issues. Retag requests, synonym requests, things truly specific to Stack Overflow, the site, not the network. This is unfair to our vastly largest and flagship Q&amp;A site, and it's unfair to the Stack Overflow users to mix their requests in with network level concerns.  It's also odd that Stack Overflow is the only network site without a proper, dedicated per-site meta, where its meta has its own reputation system not tied to the parent site in any way.  This is mostly a quirk of history more than anything else, and I believe it is now an appropriate time to split into two sites:   , a proper per-site meta for Stack Overflow with integrated rep , a global network meta with its own reputation system   Yes, this will be painful. But I believe it is a good, necessary, and healthy step both for the future of the network and the future of Stack Overflow.  Some things to discuss:   which questions should be migrated from here to meta.so? Obviously site-specific things like the retag-requests, and perhaps questions with the  tag. Anything that is 100% wholly specific to Stack Overflow and not generalizable to the rest of the network should be moved over. This may be a pretty small, narrow list of questions, and that's OK. Should we do some meta spring cleaning in our transition? Which questions / tags should be blown away as no longer relevant, referring to ancient versions of Stack Overflow or issues that have long since ceased to exist and aren't instructive for any future visitors? Your meta reps will generally be unaffected, except insofar as we delete for spring cleaning, or move site-specific things to meta.so. We still plan to have a distinct reputation system for the new meta.se site, just like here.   I do not have a timeline for this change, that is up to Jarrod and David to decide. It may be months away. However, we feel pretty strongly that this is something that we need to do to clean things up and pave the way for the future -- so I expect it will happen in the next few months, giving us lots of time to decide how we want to do it, per the above.  Update  . Set keyboard caret position in html textbox Does anybody know how to move the keyboard caret in a textbox to a particular position?  For example, if a text-box (e.g. input element, not text-area) has 50 characters in it and I want to position the caret before character 20, how would I go about it?  This is in differentiation from this question:  , which requires jQuery. Getting Started With Java EE I am about to start a web project and have been working almost exclusively with a LAMP stack for the past 5 years.  I would like to build something larger and more scalable and hence have been looking into Java EE.  The division of logic between JSP and EJB seems ideal for what I want to do.  Can anyone recommend resources for getting familiar with Java EE?  And perhaps if anyone knows of technologies that are more scalable than PHP that I should consider as well, I'm all ears.  Thanks a lot! nginx support for .htaccess / rewrite rules? Differences from Apache? I just wrote a question before this one and had trouble uploading a screenshot. The drop your image dialog throws no warning or error, but after uploading it won't show.  I also noticed that other questions won't load their images. Could this be some issue with imgur or similar?  Example:     When opening the image in a separate tab, Chrome gives a "too many redirects" error:    This might be linked to How to send parameter from jsp page to jasper file G acts on X transitively, then there exists some element that does not have any fixed points Let $X$ be a transitive $G$-set. ($G$ acts on  $X$ transitively.) If $X$ is finite and has at least two elements, show that there is some element $g$ $\in$ G which does not have any fixed points; that is, such that $g$$($$x$$)$ $\ne$ $x$ for all $x$ $\in$ $X$  I am trying to use contradiction, but it is not very clear to me why this is true. extended stars-and-bars problem(where the upper limit of the variable is bounded) The problem of counting the solutions $(a_1,a_2,\ldots,a_n)$ with integer $a_i\geq0$ for $i\in\{1,2,\ldots,n\}$ such that $$a_1+a_2+a_3+....a_n=N$$ can be solved with a stars-and-bars argument. What is the solution if one adds the constraint that $a_i\leq r_i$ for certain integers $r_1,\ldots,r_n$?  e.g. for $n=3$, $N=6$ and $(r_1,r_2,r_3)=(3,3,2)$, the tuple $(a_1,a_2,a_3)=(2,3,1)$ is a solution, but $(2,1,3)$ is not a solution because $a_3=3&gt;2=r_3$. Need help in the longtable with the figure Install 0bda:f179 Realtek Semiconductor Corp. (rtl8188fu), or Netgear rtl8812au USB WiFi adapters 19 DEC 2019 - I really, really wanted to use the Cinnamon desktop to set up a new system my 83-year-old Dad could navigate. I struggled to get any USB WiFi device working with Debian using Cinnamon, gave up and installed Ubuntu, but still struggled (I think) because I had immediately changed to the Cinnamon desktop before attempting to get the WiFi device set up.  It just kept prompting for the password, no matter what fixes I tried. Not sure if Cinnamon was the problem, or if I just hadn't found the right solution online. Let $\mathbf{Y}$ be a random vector. Are $k$th moments of $\mathbf{Y}$ considered? I am self-learning on linear model theory right now, and one thing I find surprising is that although $\mathbb{E}[\mathbf{Y}]$ is defined for a random vector $\mathbf{Y} = \begin{bmatrix} y_1 \\ y_2 \\ \vdots \\ y_n\end{bmatrix}$, there is no mention of further moments besides the covariance matrix.  Google searching hasn't turned up much. Are $k$th (raw) moments of $\mathbf{Y}$ considered, or is there a different idea I don't know about?  I am learning from the text  (the TOC starts in p. 17 of the linked file). By "considered," what I mean is is there such a thing as $\mathbb{E}\left[\mathbf{Y}^k\right]$, and if so, how would such a concept be defined? The book I have only covers the first raw moment, and I find it a bit strange that there is no mention of how to define $\mathbb{E}\left[\mathbf{Y}^k\right]$ given my experience in univariate probability, nor do I have the expertise to define it.  Furthermore, if $\mathbb{E}\left[\mathbf{Y}^k\right]$ isn't defined, is there perhaps a related concept that I don't know about that is used instead? Two rotating discs with same angular momentum when brought in contact completely stop. Why is the angular momentum not conserved in this case? Two discs mounted on different thin, lightweight rods oriented through their centres are made to rotate about their axes seperately such that the angular momentum of the two about their respective axes is same in both magnitude and direction. When both are brought in contact, they stop due to force of friction. Why is the angular momentum not conserved about their axes in this case?(Was positive before contact, but zero after the process completes, no external force present either) Identifying a short story about advertising