I have navigation with add tab function while, adding a tab the content div gets populated with a select box. Now from the options of the select box on changing will call respective forms and get appended to the page.  index.php   &lt;ul id="myTab" role="tablist"&gt;           &lt;li role="presentation"&gt;&lt;a href="#q1"  role="tab" &gt;Form 1&lt;/a&gt;&lt;/li&gt;           &lt;li&gt;&lt;a href="#" class="add-contact" &gt;Add Forms&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;   Above nav adds tab and creates the below div in index.php  &lt;div class="tab-content"&gt;      &lt;div role="tabpanel" class="tab-pane fade in active" id="q1"&gt;       &lt;form id="id1" class="form-horizontal" method="post"&gt;           &lt;select id="" class="form-control" name=""&gt;              &lt;option value="form1"&gt;Form 1&lt;/option&gt;              &lt;option value="form2"&gt;Form 2&lt;/option&gt;           &lt;/select&gt;&lt;form&gt; &lt;/div&gt;    The content in the div tab-content gets dynamically created   $( document ).ready(function() { $('select').bind('change', function(){       $.ajax({      url: "htmlforms.php",      context: document.body,      success: function(html){     $("#contentForm").append(html);   }}); });});   Now what i need is on changing the options i need to add the form using ajax call and get appended in the div tab-content.
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.
Hiding some slides in student handouts in Beamer I am preparing lecture slides for a class. I would like to hide some of the slides from the students. As an example, I would like to be able to compile students.pdf which has only student slides 1 and 2 (i.e., "teacher slide" is hidden); but teacher.pdf which has all three slides.  \documentclass{beamer}  \begin{document}  \begin{frame}{Student slide 1} blah blah blah \end{frame}  \begin{frame}{Teacher slide} secret stuff not to be shared with students \end{frame}  \begin{frame}{Student slide 2} blah blah blah \end{frame}  \end{document}   How would I do this in beamer? In a regular document, e.g., article, I would use the comment environment.  I feel that the approach in  is overkill for my needs. I have a 2-D probability distribution along the lines of this plot:  I know how to find the confidence interval for a 1-D probability distribution (by the definition of standard deviation or the 68-95-99 rule) but I don't know how to generalize that to 2-D to get a confidence region. I've been looking at Principle Component Analysis and covariance matrices, but most explanations or examples are for a 2D distribution of random vectors rather than a probability distribution so I'm not quite sure how to generalize it. How would I find the 1-$\sigma$/2-$\sigma$ regions for a 2D probability distribution? Edit: The question that was linked in the duplicate message refers to random vectors, whereas what I have is a probability distribution from data, with a continuous 2-D probability function as opposed to random vectors. As such, I cannot find the covariance matrix between two vectors because I DO NOT HAVE TWO VECTORS, and therefore cannot apply the process described in the linked question. If I were to analogize to 1-D, my issue is the difference between the standard deviation for a random distribution of samples, $\sigma=\sqrt{\frac{1}{N}\sum (x_{i}-\bar{x})^{2}}$, and the standard deviation for a probability distribution $\sigma=\sqrt{\sum (x_{i}-\bar{x})^{2}P(x_{i})}$. As far as I can tell, the method involving the covariance matrix is a generalization of the former. I need a generalization of the latter. If I'm wrong in my understanding, please let me know, but I don't think the other question gives me what I need. How to prove this sequent using natural deduction? In my  I was printing a double using cout that got rounded when I wasn't expecting it.  How can I make cout print a double using full precision? In set theory, if natural numbers are represented by nested sets that include the empty set, how are the rest of the real numbers represented as sets?    Thanks for the answers. Several answers basically said for irrational numbers that  A Dedekind cut is a pair of sets of rational numbers $\{L, R\}$. The set of real numbers is defined to be the set of all Dedekind cuts, where a Dedekind cut is a pair of sets of rational numbers $\{L, R\}$ which have no elements in common, and where all the elements of $L$ are less than any element of $R$.  Each Dedekind cut is a real number. This is where I have a problem - surely that can’t be correct. The set $L$ is a set of all rationals, and there must be a rational in the set $L$ that is greater than all other rationals in that set, even if we have no method of determining it. And similarly, there must be a rational in the set $R$ that is less than all other rationals in that set, even if we have no method of determining it. If every irrational number has a corresponding set $L$, then each irrational number has some such corresponding largest element of that set $L$, and then each irrational number has some corresponding rational number. And that would mean that the irrational numbers are countable. So, with Dedekind cuts,  the only conclusion is that there must be irrational numbers $x$ which are either greater or lesser than some irrational cut $y$ of the rationals, and between $x$ and $y$ there is no rational number.  But that is impossible, so that the Dedekind cuts cannot be the correct representation of the real numbers.  Surely the problem with Dedekind cuts is in using sets of rationals that include all rationals up to a certain rational. But there is an alternative method of representing irrationals can be defined in terms of infinite sets of rational numbers. For example, in binary notation, the non-integer part of $\pi$ is $.00100100\ 00111111\ 01101010\ 10001$. You define a set by: if the nth digit is a $1$, then  the natural number $n$ is in the set. And then we have that, for the real numbers between $0$ and $1$, that the set of real numbers is simply the set of all subsets of natural numbers. Each subset corresponds to some real number between $0$ and $1$.  And in this way, all real numbers can be considered to be some set based only on nested sets of the empty set.  But I still haven’t got a satisfactory answer for how negative numbers can be represented in terms only of sets containing the empty set. Any ideas? Why are the dineutron and diproton unbound? It is known that there are no diproton or dineutron nuclei.  Does this mean that two protons or neutrons are not actually attracted to each other? Even if the attraction was weak, wouldn't it cause bound states anyway?  Related: Find a non-negative function on [0,1] such that $t\cdot m(\{x:f(x) \geq t\}) \to 0$ that is not Lebesgue Integrable How do I set Windows to boot as the default in the boot loader? Right-click on Touchpad not working after update to 18.04 LTS I have a Lenovo Yoga 910-13IKB. I was running Ubuntu 17.10 with no issues. I upgraded to 18.04 LTS and now my right-click on my touchpad does not register. I can only left-click.  I already tried the steps listed , but they did not fix the issue.  Does anyone know how to fix this?  Thanks. How can you combine all lines that end with a backslash character? Using a common command line tool like sed or awk, is it possible to join all lines that end with a given character, like a backslash?  For example, given the file:  foo bar \ bash \ baz dude \ happy   I would like to get this output:  foo bar bash baz dude happy How do I print out the contents of a vector? How to select the architecture to download? Notes:  Answers will occasionally be moved to the  when there are too many of them. When using them to report bugs, keep an eye on the post.    This site, Meta Stack Exchange, is usually used as a &quot;test bed&quot; for pending changes happening to the way text is rendered on all network sites. Changes to text rendering that are going to be rolled out to the network are usually deployed here first to test them out and fix any potential glitches. Currently, there are no such changes pending, but if there were, keep in mind that text posted here may render differently from the other sites until the changes roll out to them as well.    As per Jeff's suggestion in : You can use this question as a formatting sandbox. You can:  edit  itself ( questions such as this one require only 100 reputation to edit instead of 2,000) post answers to this question (This question might be , requiring earning 10 reputation on this site to answer) post comments to this question or its answers test suspected bugs with the editor or the rendering post ponies (only when mods are asleep)   Beware that since the  in December 2010, and  added in March 2011, no syntax highlighting is applied unless the question's tags or an inline hint enable it. So, to test highlighting here in the sandbox:  , you can use GitHub-flavor fenced code blocks in your posts, specifying the language after the opening fence: ```html While not hinted otherwise: &lt;html&gt;&lt;/html&gt; source &lt;b&gt;goes&lt;/b&gt; &quot;here&quot;. ```  ```js var a = 3; while (not (a &gt; 0)) {     alert(&quot;JavaScript code &lt;b&gt;goes&lt;/b&gt; here.&quot;); } ```   Or:  Create code blocks in any way (using the fence notation above, the four-space indent form, or using HTML &lt;pre&gt;&lt;code&gt; tags).  Save your post.  Use your browser's developer tools to edit the resulting HTML. To open developer tools, press F12, or ⌥⌘ I on Mac.  Find the &lt;pre&gt; element and add the attribute class=&quot;prettyprint&quot;, or change it into one of the valid syntax hints linked above, like class=&quot;lang-vb prettyprint&quot;.  Run the following in the location bar: javascript:prettyPrint(); or prettyPrint() in the console.     Answers that are considered annoying or obnoxious, or that cause breakage for users, will be deleted. This is . How to only perform LTS upgrades? removing event listener Please have a look at this sentence:     We haven't gotten a lot of Finnish groups that we liked here at Bananas but I'm pretty happy with this four tracker from Helsinki, apparently recorded in the same place where the Ramones played in the 70's.     The first verb is in present perfect (up to now) and the second is in simple past tense. I don't understand the simple past for the second verb.  Why "like" is not in its present perfect form as the first verb is? Should moderators be allowed to decline flags on their own comments? I think I just witnessed a moderator decline a flag raised on his own comment. (I'm hesitant to discuss specifics unless I have to, as I don't mean to put anyone in a negative light.)  Since there are at least 2 other moderators per site, I'm not sure this should be allowed—I feel that either   only uninvolved moderator(s) should be able to view and handle flags on co-moderators' posts, or moderators should be able to view all flags, but a flagged moderator should not be allowed to decline a flag against him- or herself.   I have no personal issue with this moderator. I just felt in this case that there was truth in both sides (the moderator's as well as the flagging user's), and sought a win-win solution, i.e. by improving the disputed answer. Coming back an hour later to see that the moderator unilaterally declined the user's flag—that didn't seem fair to the user...  I am making some assumptions based on the "Last Seen" stat in the moderator tools, so if I'm simply mistaken on what happened, I apologize in advance. How can I detect mouse events on sprites in a canvas? I'm making an HTML 5 game. I want mouse clicks on sprites drawn in a canvas element cause events that my code can react to. At the moment, I'm doing it by checking through all of my sprites in a for-loop on each click.  Is there a way to do that by adding an event listener to a sprite so it would respond just like that?  Are Javascript's custom events useful in this situation? I know it's possible with KinectJS, but I don't have any experience with it and really I'd like to learn how to do this myself without the help of a library. Change running heads in longtable (or other "long table" package) I have a rechargeable vacuum cleaner with NiMH batteries, 1800mAh and 14.4 volts, 12 cells. The charger is 18v 200mA. The batteries have now died.  Can I replace the batteries with 4 cell Li-ion in series?   That will be 14.4 volts, if considered 3.7v each. Of course, I know it will be roughly 4 volts when fully charged.  Li-ion batteries in my mind: 18650, 2500mAh.  Also, can I charge them with the same charger?