I track links clicked on my page with some jquery like so:  // Track when a visitor clicks a link $( document ).ready(function() {      // Add an event handler to all body anchor links     $( "body" ).find("a").click(function() {           ga('send', 'event', document.title, 'Link: ' + this.innerHTML, '');     });       });  This works very well for static page content.  However, some of my pages load in partial page content dynamically from elsewhere on my site using Jquery load() method.  e.g. $( "#result" ).load( "ajax/test.html" );  I have noticed that when I click on a link on this dynamic content, the link isn't getting tracked in GA.   I guess this makes sense, the link event handlers are added when the page is initially loaded, any content pulled through after this won't have these event handlers registered...    So my question is, how do i track links clicked for content that is added dynamically after the page has loaded? Should I add my event handler code (above) to a function which i can call on page load then after any dynamic content has been added, telling it to scan the page again?  Will that cause a conflict with any original event handlers or will it override them?  thanks
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.
In a Silverlight application I'm trying to find out when a property on a usercontrol has changed. I'm interested in one particular DependencyProperty, but unfortunately the control itself doesn't implement INotifyPropertyChanged.  Is there any other way of determining if the value has changed? How exactly is Arda supposed to be an ancient Earth? As most Tolkien fans know, Arda (Tolkien's world) is supposed to be Earth in its past, and all its stories are supposed to have happened long ago on this very same planet. Of course, this is fiction, so this is not supposed to be actually true.  But, if one wanted to roll with it... how could it possibly make sense from a geographical standpoint? All maps of Middle Earth (before or after the destruction of Beleriand and Numenor) just don't match anything on Earth, even when considering continental drift.  Of course, one could simply say "the Valar reshaped it (again)", but not only this is a bit unsatisfactory, it also doesn't make much sense in context, as Valar are well known for not wanting to meddle with Arda unless absolutely needed, and even then, as little as possible.    Update:  Hey, please calm down, guys. Mine was not a rant at all. And I know perfectly well this is fiction (and I've stated it plainly). The sense of my question was: "If one wanted to follow this line of thought and assume Arda should be related to Earth as Tolkien said, then how could this relationship be explained?". Sydney Airport international airline transfer My dad is flying to Christchurch, New Zealand, for the first time and I booked him tickets with 1 stopover in Sydney. I booked with Qantas and I just realized that his connecting flight in SYD is operated by Emirates (codeshare). He is flying from MNL with Qantas and arrives in SYD at 6:10AM and yhe next flight to CHC is at  7:50AM with Emirates. He only has 1 hour and 40 minuted before his next flight, assuming the flight is on time.  I have never been in SYD myself so I don't know how it works. PS: I won't be applying for a transit visa for him as he won't be leaving the airport and I assume it's not a case of separate tickets but airline codeshare. My questions are:   Will Qantas allow luggage check-in straight to CHC?  If the answer is yes, can he take his boarding pass to CHC at the Transfer Desk to avoid long queues at Emirates check-in counter? If answer to #1 is NO, obviously he will have to claim baggage to check in with Emirates.  How long will it take to go through customs and Immigration? I am worried that 1 hour and 40 minutes won't be enough. Can he skip the queue and ask people to let him pass? Is there any desk at the Sydney airport I can contact to assist him? I cannot afford the Meet and Greet services offered by some companies at the airport. I am wondering if I can call the Sydney airport concierge to help my dad get to his next flight. I am willing to pay but not as much as the airssist or fasttrack charges.   Thanks. Constructing a circle through a given point, tangent to a given line, and tangent to a given circle While browsing around about problems similar to , I have found references to constructions of all types of circles. For example, not only is it possible to construct a circle tangent to three given circles, but one can construct a circle through any three points, tangent to any three lines, passing through two given points and tangent to a line or circle, passing through a given point and tangent to two given lines or circles, etc. Pretty much any combination of criteria regarding points, lines, and circles, with repetition.  Can we have one of each? I haven't found any resource saying whether it's possible or not to construct a circle through a given point, tangent to a given line, and tangent to a given circle. Is such a construction possible? Thanks. How to convert a unix timestamp (seconds since epoch) to Ruby DateTime? How to rename a group of files with what looks like a Windows file path in their names I got a bunch of files with the filename messed up. All the file names have the same beginning which appear to be windows file directories. The problem is there are 700+ files and I really don't want go through and manually rename all of them. These are examples of the file names (Note: None of these have file directories):  G:some\really\long\file\path\then\the\name1.jpg G:some\really\long\file\path\then\the\name2.png G:some\really\long\file\path\then\the\filename.txt G:some\really\long\file\path\then\the\file_name.mov ...   The important take away is that each file has G:some\really\long\file\path\then\the\ before the file name that I would like.   So I would want the above files to look like:  name1.jpg name2.png filename.txt file_name.mov   I've tried the rename command and was not successful. I am still new with Linux and really am not sure on how to go about it or really what to google. Any help would be appreciated. What are our policies regarding self-harm and suicide? What should I do as a Moderator when I encounter situations regarding self-harm and suicide? How do I take great HDR photos of moving objects? By moving objects, I mean cities with cars, ocean with moving water, malls with people moving by.  I tried it on moving people and had noticeable ghosting, using bracketed shots at + and - 2ev.  What's the basic technique on getting sharp looking HDR photos in areas that are moving? I'm assuming it's not bracketed shots but a single shot with exposure editing? Java has a convenient split method:  String str = "The quick brown fox"; String[] results = str.split(" ");   Is there an easy way to do this in C++? I did some mathematical induction problems on divisibility   $9^n$ $-$ $2^n$ is divisible by 7. $4^n$ $-$ $1$ is divisible by 3. $9^n$ $-$ $4^n$ is divisible by 5.   Can these be generalized as $a^n$ $-$ $b^n$$ = (a-b)N$, where N is an integer? But why is $a^n$ $-$ $b^n$$ = (a-b)N$ ?  I also see that $6^n$ $- 5n + 4$ is divisible by $5$ which is $6-5+4$ and $7^n$$+3n + 8$ is divisible by $9$ which is $7+3+8=18=9\cdot2$.  Are they just a coincidence or is there a theory behind?  Is it about modular arithmetic? Are all oscillatory motions periodic motions? For example, if a pendulum system in the real world oscillates its amplitude and period will eventually decrease. Does that still count as a periodic motion? Since the motion doesn't have the same amplitude at equal time periods. Which resources are available to self-study GAP? Background: This year I'll do another Group Theory course ( Open University M336 ). In the past I have used Mathematica's AbstractAlgebra package but (although visually appealing ) this is no longer sufficient (i.e. listing subgroups of $S_4$ takes ages). So, I want to learn more about GAP. I worked through beginner tutorials that I found via the . Currently, I am not making much progress with GAP. The  does not help me much at this stage.  Question: Which resources are available to self-study GAP? How does one become proficient in GAP? What ( books, tutorials ) should you study? How can I achieve the correct garden tap orientation when threading it in? I'm installing an external tap using a wall plate like this one:    And a tap like this one:    This might be a stupid question, but if I screw the tap into the wall plate it will end up at a certain angle. I can install the wall plate with that angle and the tap will end up with the correct orientation (i.e. pointing down). But what if I want to put another tap in later that has its thread cut slightly differently? How do I prevent it ending up upside-down or whatever? Are all the threads cut exactly the same in these taps?  This seems like a stupid design. Matlab arrays operation To show that $\sum a_nb_n$ is absolutely convergent Pacman option to assume "yes" to every question? When installing software in debian systems we can put something like this:   sudo apt-get install -y chromium-browser  that way the installation occurs automatically, whitout asking to confirm installation [Y/n]. Can i do the same with pacman? $V$ be a vector space , $T:V \to V$ be a linear operator , then is $\ker (T) \cap R(T) \cong R(T)/R(T^2) $? Let $V$ be a vector space , $T:V \to V$ be a linear operator , then is it true that   $\ker (T) \cap R(T) \cong R(T)/R(T^2) $ ( where $R(T)$ denotes the range of $T$ ) ?    I know that the statement is true when $V$ is finite dimensional as I can show that if $V$ is finite   dimensional , then $\dim (\ker (T) \cap R(T))=rank (T) - rank (T^2)=\dim R(T)/R(T^2)$ ,   but I don't know what happens in general . Please help . Thanks in advance Key Presses in Python If $f(0)=0$ then prove that $|f(z)+f(-z)| \leq 2|z|^2$ Let , $\Delta = B(0,1)$.  If $f:\Delta \rightarrow \Delta$ is holomorphic, and $f(0)=0$, prove that $|f(z)+f(-z)| \leq 2|z|^2$.  My attempt so far:  $\displaystyle f(z) = \sum_{n=0}^{+\infty} a_n z^n = \sum_{n=0}^{+\infty} a_{2n} z^{2n} + \sum_{n=0}^{+\infty} a_{2n+1} z^{2n+1}$  $\displaystyle f(-z) = \sum_{n=0}^{+\infty} a_n (-z)^n = \sum_{n=0}^{+\infty} a_{2n} z^{2n} - \sum_{n=0}^{+\infty} a_{2n+1} z^{2n+1}$  Then, $\displaystyle f(z)+f(-z) = 2  \sum_{n=0}^{+\infty} a_{2n} (z^2)^n =: 2 g(z^2)$  If $g(\Delta) \subset \Delta$, as $g(0) = 0$, I can invoke Schwarz Lemma and I win. However, I don't know how to prove this. Could anyone help me? Thanks! Why does Javascript getYear() return 108? Why does this javascript return 108 instead of 2008? it gets the day and month correct but not the year?  myDate = new Date(); year = myDate.getYear();   year = 108?