I want to delete the paragraph that jquery create when I click the paragraph.  &lt;p class="test"&gt;cutsom event&lt;/p&gt; &lt;button class="clcik"&gt;click&lt;/button&gt;   jquery:  $(function () { "use strict";  $(".test").on("click", function () {     $(this).hide(); });  $("button").on("click", function () {     $("&lt;p&gt;delet this paragraph&lt;/p&gt;").insertAfter($(this)); });  $("p").on("click", function () {     (this).hide(); }); });   update: @LinkinTED solved it, but dose there best practice for for that 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.
How to print the longest line in a file? I'm looking for the simplest method to print the longest line in a file. I did some googling and surprisingly couldn't seem to find an answer. I frequently print the length of the longest line in a file, but I don't know how to actually print the longest line. Can anyone provide a solution to print the longest line in a file? Thanks in advance. This is by far the weirdest problem I've come across,  My mac can perfectly access internet through safari web browser, but when I tried to do   ping www.google.com   through the terminal, it's requests is being timed out.  None of the other apps are able to reach internet either. Dropbox, Skype, Spotify all showing offline, except the browser itself  I'm guessing something bad with the DNS, but spend 2 hours trying to fix this with no luck How to prove Fibonacci sequence with matrices? A not free $\mathbb{Z}$-module From  I see that $\mathbb{Z}^{\mathbb{N}}$ is not a free abelian group. Someone can explain me why?  Thanks a lot! How do I resize partitions using command line without using a GUI on a server? I only have access to the server via a terminal and I can't use graphical tools such as GParted! I want to create a new partition from a part of the root (about 768mb) for swap.  # df -h Filesystem      Size  Used Avail Use% Mounted on /dev/vda         20G  1.3G   18G   7% / udev             10M     0   10M   0% /dev tmpfs           199M  4.9M  194M   3% /run tmpfs           100M   12K  100M   1% /run/user tmpfs           5.0M  4.0K  5.0M   1% /run/lock Difference between 'such as' and 'like' This one never ceases to confuse me. When to use 'such as' and when to use 'like' while giving examples? Is there any clear rule?        Metros like Mumbai, Delhi and Karachi are unsafe after dark.    Metros such as Mumbai, Delhi and Karachi are unsafe after dark.       (Before anyone points out, Delhi and Karachi are unsafe round-the-clock, but it's just an example.) Summation of Central Binomial Coefficients divided by even powers of $2$ Whilst working out  the following summation emerged: $$\sum_{m=0}^n\frac 1{2^{2m}}\binom {2m}m$$ The is equivalent to  $$\begin{align} \sum_{m=0}^n \frac {(2m-1)!!}{2m!!}&amp;=\frac 12+\frac {1\cdot3}{2\cdot 4}+\frac{1\cdot 3\cdot 5}{2\cdot 4\cdot 6}+\cdots +\frac{1\cdot 3\cdot 5\cdot \cdots \cdot(2n-1)}{2\cdot 4\cdot 6\cdot \cdots \cdot 2n}\\ &amp;=\frac 12\left(1+\frac 34\left(1+\frac 56\left(1+\cdots \left(1+\frac {2n-1}{2n}\right)\right)\right)\right) \end{align}$$  and terms are the same as coefficients in the expansion of $(1-x)^{-1/2}$.  Once the solution  $$ \frac {n+1}{2^{2n+1}}\binom {2n+2}{n+1}$$ is known, the telescoping sum can be easily derived, i.e.    $$\frac 1{2^{2m}}\binom {2m}m=\frac {m+1}{2^{2(m+1)-1}}\binom {2(m+1)}{m+1}-\frac m{2^{2m-1}}\binom {2m}m$$  However, without knowing this a priori, how would we have approached this problem? i just finished updating my Macbook pro to macOS Catalina and after the installation finished i got this error message that keeps reappearing. i do not know or have a file named "qnmqkmkrqwfq" (i tried searching for it) and when i press show in finder or ok it disappears for a second and then pops up again for no reason and i am not trying to open any files or apps. i searched and the only solution i found was setting "Allow applications downloaded from: Anywhere" but it did not work. Please Help. Can there be only one extension to the factorial? Usually, when someone says something like $\left(\frac12\right)!$, they are probably referring to the Gamma function, which extends the factorial to any value of $x$.  The usual definition of the factorial is $x!=1\times2\times3\times\dots x$, but for $x\notin\mathbb{N}$, the Gamma function results in $x!=\int_0^\infty t^xe^{-t}dt$.  However, back a while ago, someone mentioned that there may be more than one way to define the factorial for non-integer arguments, and so, I wished to disprove that statement with some assumptions about the factorial function.    the factorial   is a  for $x\in\mathbb{C}$ except at $\mathbb{Z}_{&lt;0}$ because of singularities, which we will see later. is a monotone increasing function that is concave up for $x&gt;1$. satisfies the relation $x!=x(x-1)!$ and lastly $1!=1$     From $3$ and $4$, one can define $x!$ for $x\in\mathbb{N}$, and we can see that for negative integer arguments, the factorial is undefined.  We can also see that $0!=1$.  Since we assumed $2$, we should be able to sketch the factorial for $x&gt;1$, using our points found from $3,4$ as guidelines.  At the same time, when sketching the graph, we remember $1$, so there can be no jumps or gaps from one value of $x$ to the next.  Then we reapply $3$, correcting values for $x\in\mathbb{R}$, since all values of $x$ must satisfy this relationship.  Again, because of $1$, we must re-correct our graph, since having $3$ makes the derivative of $x!$ for $x\in\mathbb N$ undefined.  So, because of $1$ and $3$, I realized that there can only be one way to define the factorial for $x\in\mathbb R$.  Is my reasoning correct?  And can there be only one extension to the factorial?    Oh, and here is a  to how I almost differentiated the factorial only with a few assumptions, like that it is even possible to differentiate.  Putting that in mind, it could be possible to define the factorial with Taylor's theorem? I am trying to grab the capital letters of a couple of words and wrap them in span tags. I am using  for extract and wrapping purposes, but it's not outputting anything.  preg_replace("/[A-Z]/", "&lt;span class=\"initial\"&gt;$1&lt;/span&gt;", $str) WhatsApp for Ubuntu Phone? Does someone know if there already is a WhatsApp Version for Ubuntu Phone? I decided to install Ubuntu on my Android, but I don't want to use my phone without WhatsApp. First of Tablet info :   Model number : Micromax P275  Android version : 4.0.4  Baseband version : v3.0  Kernal version : 3.0.8+ linda@SKYWORTHSERVER3 #52  Fri Sep 21 14:00:53 CST 2012  Build number : P275_HW.V0.1_V3.0_20120921  I dont know anything about android  now the issue is that the screen keeps randomly jerking and there are random touches that happen which will open apps and close apps randomly. this happens after few minutes since  Tablet turn on. When these things happen i cannot do anything. even if i try to power down by pressing the power key the dialog box disappears because of this random behavior.  i observer this behavior mainly when i travel in bus. so i'm thinking that the vibrations are affecting the accelerometer and thus causing the random movements. When i'm in a stationary place i rarely see this issue, but it has occured.  now i disabled  1)Auto rotate  2)Disabled all options in Developer options except Force hardware rendering.  the system update will happen and i cant turn it off(atleast i dont know).  my main useage in the Tablet are 1) pdf reading 2)videos 3)small c programmin(using CCtools).  please help me with this issue. its is very very frustrating. last thing,i brought this device 28 days ago. also i would like links on reinstalling android. How can I see flags I cast from all sites? This morning I flagged something on one of the sites where I have fairly low rep. Now I can't remember which site it was. I've checked my flag history on about half of them, even editing the URL for the site where I have no helpful flags, and I can't find this flag. I've been to my network profile and looked at the Activity tab, but it only shows public things like asking, answering, commenting, editing, and reviewing.  Is there a way to see my flagging history across sites? Can we have such a feature, if it's not possible? Why was "An Update to our Community and an Apology" deleted? Recently, Sara Chipps posted her message . After reading it, I wanted to compare it with . It turns out that she deleted it. Does anyone know why? It looks strange since (as far as remember) it was a sort of official position of SE. Why would such a statement be deleted? Given an instance of System.Reflection.Assembly. Why does changing the returned variable in a finally block not change the return value? Is it possible to make an EXACT ISO of my system to put on other computers? I am new to linux, but had a question. I am getting in the business of buying old computers, putting Linux on them, then donating them to students who don't have their own computer at home. I have gone through and installed Xubuntu on my system, installed/uninstalled all the software that I want/need, and now want to know if there is a way that I could make an ISO of my system, and put it onto ANOTHER computer, and still have all of my tweaks, and programs ready to go after the ISO has installed. That way I don't need to go through and spend an hour or two on every computer.   What programs would you recommend for creating an ISO like this?   Thanks, Tobin Inner join vs Where Is there a difference in performance (in oracle) between  Select * from Table1 T1  Inner Join Table2 T2 On T1.ID = T2.ID   And  Select * from Table1 T1, Table2 T2  Where T1.ID = T2.ID   ? What are SPF records, and how do I configure them? Self-Contained Proof that $\sum\limits_{n=1}^{\infty} \frac1{n^p}$ Converges for $p > 1$