Adding event listeners to dynamically added elements using jQuery
Event handler not working on dynamic content
Removing phone number from iMessage I'd like to remove my phone number from my iMessage account, but still have my phone enabled to receive messages sent to my email address (also used on iPad, Mac). Is there a way of doing this? Making pen and ink corrections on a UK visa form? After printing out a UK visa form, can you cross out planned arrival date with a pen and write a new one? Is it possible to add non-number characters on the left of a code block?  Specifically, I want to add ... to correspond with some source code (see image).    I am currently using commands to stop / start the line numbers. Here is the code:  \documentclass[12pt]{article}  \usepackage[a4paper, margin = 20mm, top = 30mm, bottom = 25mm]{geometry} \usepackage{xcolor, soul} \usepackage{listings}  \definecolor{codebackground}{rgb}{0.95, 0.95, 0.92}  \lstset {     frame            = tb, % hrule above and below     keepspaces       = true,     columns          = flexible,     basicstyle       = {\normalsize\ttfamily},     escapeinside     = {(*@}{@*)}, % for escaping     backgroundcolor  = \color{codebackground},     showstringspaces = false,     language         = C,     keywordstyle     = \color{blue},     stringstyle      = \color{red},     commentstyle     = \color{teal},     numbers          = left, % {none, left, right}     firstnumber      = 1,     numberstyle      = \scriptsize\color{black},     numbersep        = 5pt }  \let\origthelstnumber\thelstnumber \makeatletter % for stopping line numbers \newcommand*\stopnumber {     \lst@AddToHook{OnNewLine}     {         \let\thelstnumber\relax         \advance\c@lstnumber-\@ne\relax     } } % for starting line numbers \newcommand*\startnumber[1] {     \setcounter{lstnumber}{\numexpr#1-1\relax}     \lst@AddToHook{OnNewLine}     {         \let\thelstnumber\origthelstnumber         \refstepcounter{lstnumber}     } } \makeatother  \begin{document} \begin{lstlisting}[firstnumber = 456] int third_function(const int c) {     /* error checking */     if(c &lt; 0)     {         return;     } (*@ \stopnumber @*)      ...     (*@ \startnumber{512} @*)     /* other stuff */     int d = 4;     char* word = "third function"; (*@ \stopnumber @*)      ...     (*@ \startnumber{678} @*)     return (c * d); } \end{lstlisting} \end{document} One confusion over conditional expectation Suppose for two random variables $X_1$ and $X_2$ $\sigma(X_1) = \sigma(X_2)$. Why $E[Y | X_1] = E[Y | X_2]$ a.e. ?  the set where $X_1= X_1(\omega)$ can be different from the set $X_2= X_2(\omega) $. How can then conditional expectation conditioned on the event can be equal ? Where does the term "fun fact" originate?-- namely, not with the compositional meaning but rather with the idiomatic usage to introduce some sort of unusual, esoteric, absurd or otherwise "controversial" fact? While adding to an Answer to  question, I needed to use the above phrase, and I suddenly realised I was unsure whether to write "is" or "are".   There is more than one way to skin a cat. If there are more than one species of cat, we will flay each species differently.   I don't think that second example above sounds quite right to me (disregarding the meaning - sorry!), but in my original Answer I felt "is" would have been even worse.  Is "are" always wrong here? If so, what exactly is the rationale? If not, is there a case where it's unquestionably preferred – and why is that?    Note that in both the problematic Answer and my example attempting to mimic the same context more briefly, the writer doesn't know how many there are. There may be one, more, or even none.  Getting even more specific, the writer might have an opinion on how many there might be, and wish to convey his leanings by choice of verb form if language allows this to be done succinctly. Understanding the proof for showing that there are infinitely many $n\in\mathbb{Z}^+$ such that $n!+1$ is divisible by at least two distinct primes There is another post pertaining to this question; however, the other post does not address some specifics that concern me in the proof. Proof: Let $n=p-1, p \geq 7$. Then $p|(p-1)!+1$. We will show that $(p-1)!+1=p^n$ has no solutions. Suppose not. Suppose $(p-1)! + 1 = p^n$ has a solution for $p\geq 7$. Then $(p-1)! =p^n-1  = (p-1)(p^{n-1}+\cdots+p+1)$. So $(p-2)!\equiv n (\mod p-1)$. Now suppose that $(p-1)|n$. Then $p-1\leq n$. So $(p-1)!+1&lt;p^{p-1}\leq p^n$. Hence, there are no solutions. It remains to show that $(p-1)|(p-2)!$. But $p-1=2m$ means $2m|(p-2)!$. QED  Questions:  My understanding is that at the start of the proof, Wilson's theorem is used to show that at least one prime divides $n!+1$.  Why do we want to show that $(p-1)!+1=p^n$ has no solutions? The way I see it is that $p^n$ is composite, and we are basically saying that $p^n\nmid (p-1)!+1$, so no composite number divides $n! +1$. But how and where in the proof do we actually show that another prime $q \neq p$ divides $n!+1$?    Thanks in advance. I want wp_link_pages (mutli-page posts) to display the page numbers, the word "previous" before those numbers, and a "next" after those numbers.  It would look like this:  Prev 1, 2, 3, 4 Next  I'm attempting to do this without a plugin.  Here's what I've tried so far, but it isn't working, it is only displaying numbers.  &lt;?php wp_link_pages(array(     'before' =&gt; '&lt;span style="clear:both; display:block"&gt;Pages',      'after'  =&gt; '&lt;/span&gt;',     'next_or_number'=&gt;'number',     'previouspagelink' =&gt; 'previous',     'nextpagelink'=&gt; 'Next' )); ?&gt; Low Voltage AC Smoothing Capacitor Calculation I have a 9V AC source which will have a max load of 100mA.  I'm trying to figure the value of a smoothing capacitor with less than a 10% ripple.  I don't have a scope or else I'd just try a bunch out.  I'm just a hobbyist, but I'm trying to understand this.  Since I'm not sure if I'm doing this right, I'll just step through what I've done so far.  First I found this formula: $$V_{ripple}={V_p \over R_LC} \times \Delta T$$  I'm using 60Hz 9VAC that is full wave rectified and I want a 10% ripple so:  $$(9V \times .1)={9V \over R_LC} \times {1 \over 60Hz}$$  I'm calculating my resistive load with Ohm's law. $$R = {9V \over .1A} \quad R = 90 \Omega$$  So plugging that in I get: $$.9V={9V \over 90\Omega \; C} \times {1 \over 60Hz}$$  If I solve for C (admittedly using wolfram alpha), I get: $$C={1\over 540}F \quad C=1851 \mu f$$  1850µf seems pretty high to me...  And if I lower the ripple percent it get crazy high.  Is this the right way to find this?  Or did I screw up somewhere?  Also, my circuit has the capacitor between the full bridge rectifier's positive and negative outputs.  I've only seen this type of smoothing circuit, but maybe my circuit needs to change? Please add a reply button to messages in the pinned/starred section I've run into this a few times; I'll rejoin chat after being away for a while and notice something interesting in the starred section.  I'd like to reply directly to the message but there's no reply button.  Currently, the only ways to explicitly reply to one of those messages are either:-   find the message by scrolling up and looking for it, then click the reply button or; copy and paste the permalink, deleting all the way up to the fragment identifier and adding the colon at the start.   Please add a reply link, even if it just goes in the popup menu it's an improvement. I try to get rounded corners on a UIImage, what I read so far, the easiest way is to use a mask images. For this I used code from TheElements iPhone Example and some image resize code I found. My problem is that resizedImage is always nil and I don't find the error...  - (UIImage *)imageByScalingProportionallyToSize:(CGSize)targetSize {     CGSize imageSize = [self size];     float width = imageSize.width;     float height = imageSize.height;      // scaleFactor will be the fraction that we'll     // use to adjust the size. For example, if we shrink     // an image by half, scaleFactor will be 0.5. the     // scaledWidth and scaledHeight will be the original,     // multiplied by the scaleFactor.     //     // IMPORTANT: the "targetHeight" is the size of the space     // we're drawing into. The "scaledHeight" is the height that     // the image actually is drawn at, once we take into     // account the ideal of maintaining proportions      float scaleFactor = 0.0;      float scaledWidth = targetSize.width;     float scaledHeight = targetSize.height;      CGPoint thumbnailPoint = CGPointMake(0,0);      // since not all images are square, we want to scale     // proportionately. To do this, we find the longest     // edge and use that as a guide.      if ( CGSizeEqualToSize(imageSize, targetSize) == NO )     {          // use the longeset edge as a guide. if the         // image is wider than tall, we'll figure out         // the scale factor by dividing it by the         // intended width. Otherwise, we'll use the         // height.          float widthFactor = targetSize.width / width;         float heightFactor = targetSize.height / height;          if ( widthFactor &lt; heightFactor )             scaleFactor = widthFactor;         else             scaleFactor = heightFactor;          // ex: 500 * 0.5 = 250 (newWidth)          scaledWidth = width * scaleFactor;         scaledHeight = height * scaleFactor;          // center the thumbnail in the frame. if         // wider than tall, we need to adjust the         // vertical drawing point (y axis)          if ( widthFactor &lt; heightFactor )             thumbnailPoint.y = (targetSize.height - scaledHeight) * 0.5;          else if ( widthFactor &gt; heightFactor )             thumbnailPoint.x = (targetSize.width - scaledWidth) * 0.5;     }       CGContextRef mainViewContentContext;     CGColorSpaceRef colorSpace;      colorSpace = CGColorSpaceCreateDeviceRGB();      // create a bitmap graphics context the size of the image     mainViewContentContext = CGBitmapContextCreate (NULL, targetSize.width, targetSize.height, 8, 0, colorSpace, kCGImageAlphaPremultipliedLast);      // free the rgb colorspace     CGColorSpaceRelease(colorSpace);          if (mainViewContentContext==NULL)         return NULL;      //CGContextSetFillColorWithColor(mainViewContentContext, [[UIColor whiteColor] CGColor]);     //CGContextFillRect(mainViewContentContext, CGRectMake(0, 0, targetSize.width, targetSize.height));      CGContextDrawImage(mainViewContentContext, CGRectMake(thumbnailPoint.x, thumbnailPoint.y, scaledWidth, scaledHeight), self.CGImage);      // Create CGImageRef of the main view bitmap content, and then     // release that bitmap context     CGImageRef mainViewContentBitmapContext = CGBitmapContextCreateImage(mainViewContentContext);     CGContextRelease(mainViewContentContext);      CGImageRef maskImage = [[UIImage imageNamed:@"Mask.png"] CGImage];      CGImageRef resizedImage = CGImageCreateWithMask(mainViewContentBitmapContext, maskImage);     CGImageRelease(mainViewContentBitmapContext);      // convert the finished resized image to a UIImage      UIImage *theImage = [UIImage imageWithCGImage:resizedImage];      // image is retained by the property setting above, so we can      // release the original     CGImageRelease(resizedImage);      // return the image     return theImage; } Adding Multiple Maps in QGIS Composer? I want to update Acrobat Reader for Firefox, but the download has the .bin extension. How can I install it? Reusable functions in jQuery callback Can Ubuntu 32-bit access 8GB RAM? I need to use a large software package (Xojo) that requires the 32-bit architecture to run. Try as I might, I can't seem to install the 32-bit libraries on my 64-bit installation of 15.04.  I don't have a problem running a 32-bit version of Ubuntu (I'm only using this computer for Xojo) but the computer has 8GB of RAM and I'd like to be able to use it all. Is there a way to utilise all 8GB of RAM with a 32-bit Ubuntu install? Does Ubuntu do this out of the box? I know classical physics, quantum mechanics, special relativity, and basic nuclear physics. I would like to get into some particle physics.   Where can I find a good introduction? It might be useful to segment books by whether they require quantum field theory or not. Stuck at 0% [waiting for headers] On googling this error it seems that a lot of people are having this issue.  apt-get upgrade hangs at 0% [waiting for headers] apt-get install apache2 hangs at 0% [waiting for headers]. Some apt-get commands are working, but only certain packages.  Any ideas? I don't think this is an issue with slow repos because I've had it up for a long while and it hasn't budged from 0%. I have edited sources.list but I removed the lines I added when this issue presented itself and it hasn't made a difference.  Any clues would be really useful. How to test real network throughput between two points? What are some of the better tools/utilities for testing real bandwidth across a link?  In my case I am testing the real throughput across a wifi bridge. I am developing a set of scripts, which I want to be present for all users, when I set up a server. But I don't want them in the standard locations like /usr[/local]/[bin],[sbin] etc.  Is there some existing convention for where such scripts should be placed? The whole multi-continent aspect of A Song of Ice and Fire seems to be getting out of hand. Do the other continents suffer those long winters?  Can the Others harm the other continents?  In The Lord of the Rings there were other realms than Middle-earth, but Middle-earth was still all of humanity and dwarf population and hobbits.  Sure there are stories like Romeo and Juliet where the only thing that matters is whether those 2 are going have a chance to love.  But in these fantasy / sci-fi stories there's usually danger of world domination by evil.  It's not usually just one continent is going to be a terrible (or impossible) place to live but other civilizations will flourish.