I want to do something simple, a page that has 0 buttons when loaded, then every click I add a button in a line. when I click any of these buttons it removes it.  I tried to   $(":button").click(function(){ })   but it cant seem to get the button that have been clicked, if I start the page with these buttons already in it , it works. am i missing anything ?
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.
Overloading getter and setter causes a stack overflow in C# I've got a question about how to drive the car in Europe on Highways. In the US, I can overtake another car on either side, and I am fine.  In Europe I was told that I have to drive on the right side (Germany), and to overtake on the left side of the other driver.  Now I had following situation, and I did not know how to handle this properly: I was driving along on the right lane, the Autobahn was 3 lanes wide on my side, and was going around 110 km/h. Someone overtook me, but he stayed on the middle lane, and suddenly got slower. He wasn't really in front of me, so I could not change to the left lane, but I was told I may not overtake on the right side.  Would I have to brake in such a situation, or should I just ignore it, and overtake him again on the right side?  (I overtook him, and he was on the phone, so I guess that was why he got distracted and slowed down that much). Ratio of Boys and Girls In a country where everyone wants a boy, each family continues having babies till they have a boy. After some time, what is the proportion of boys to girls in the country? (Assuming probability of having a boy or a girl is the same) What is the difference between varchar and nvarchar? When you energise a taut string, the following resonant modes of vibration occur:    Plotting on the frequency domain, you can see their corresponding frequencies:    But what is the underlying physical principle? Why does this happen?  Is there any way of explaining it that could be understood by a smart 15 year old?  EDIT: I'm going to give my best attempt so far. Here goes:   We can start with sympathetic resonance. Sounding a particular frequency, a pure sinewave.  And noticing the string resonates sympathetically at the frequency of each harmonic. Say this is explained and understood. Now imagine that plucking a string is equivalent to a burst of white noise, which contains frequencies all the way through the spectrum. This could be approached backwards, by starting with random frequencies and noticing that resultant wave produced looks like white noise.   If the above is scientifically correct, then it restricts the domain of the question.  I would really like to be able to understand it scientifically and also be able to explain it intuitively.  PS Images from Duplicate typeset index entries Remove entire row in a file if first column is repeated Create instance of generic type in Java? “Have you seen...” or “Did you see...?” In the US, when people work together, they may look for a colleague or any person to say something or for any other reason, asking colleagues or other people this type of question:         Have you seen Michael?   (OR)        Did you see Michael?          Which is considered right if the question refers to an activity (in our case "see") during the day and not in the past in general? Why is the Star Trek 2009 reboot called a reboot? How to delete file(s) in secure manner? Is there a way to make sure that a deleted file can not be recovered?   As you know, deleting a file by pressing shift-del or using trash doesn't mean that file is gone forever. It resides somewhere in the computer.  In day to day life, law enforcement or thieves use recovery programs to reveal our private data or something else.   They can recover all data that resides on hard disk, in RAM, and even USB.  To protect us from these people, what should one do? Which program should one use?  Note: I don't want an answer like first use a recovery program then erase that file with shred. With just one program, I want to erase all unused/deleted files on my computer. Cannot move std::unique_ptr with NULL deleter to std::shared_ptr? Is there any example that for cardinal numbers $\kappa &lt; \lambda$, we have $2^\kappa = 2^\lambda$?  My guess is that it only depends on whether GCH holds. Is it true? How to trigger Ajax forms machinery I'm working on ajaxifying a form which uses Hierarchical Select widget. I need to update a text field based on the value of HS and a couple of other fields. I want to use Drupal forms Ajax API. I followed the . Now the form is updated when user fills in the text fields. But I can't cope with HS.   I was told  HS doesn't support regular Drupal #ajax mechanism. I can easily attach the handler to HS update event. So all I need now is to manually trigger Drupal Ajax machinery from my own handler. How it's best to be done?   I see there is a global Drupal.ajax object but can't figure out how to make use of it. How did Asuna and Kirito survive? In the last episode of Aincrad arc of Sword Art Online, how did Asuna survive even though her avatar disintegrated after being attacked by Kayaba? Also Kirito was stabbed by Kayaba as well. How did he survive?  Was it in the novel on how they really survived? Here is the top output which I gathered:    I noticed that top is showing vlc's cpu usage is > 100%.  Can anybody please justify me why it is showing like this, whether this is a bug in top application or something else. Listings - Only highlight between delimiters I want to implement a function name color highlighting and I use the listings package. My 'regex' for this is def %s( where def (including space) is the first delimiter %s is the function name and ( is the second delimtier. Now my aim is to color only %s in purple. So basically I want to only touch the part between the delimiters and the delimiters should stay untouched.  Here is what I tried so far:  \documentclass{article} \usepackage{xcolor,listings} \usepackage[ngerman]{babel} \usepackage{fontspec} \setmonofont{Courier New}  \begin{document}  \lstset{language=Python,     escapebegin=\color{orange},     keywordstyle=\color{blue}\bfseries,     commentstyle=\color{orange!80!red},     stringstyle=\ttfamily\color{gray},     %moredelim = [is][\color{blue}\bfseries def \mdseries\color{purple}]{def\ }{(},     moredelim = [s][\color{purple}]{def\ }{(},     showstringspaces=false}‎ \lstset{literate=%    *{0}{{{\color{red}0}}}1     {1}{{{\color{red}1}}}1     {2}{{{\color{red}2}}}1     {3}{{{\color{red}3}}}1     {4}{{{\color{red}4}}}1     {5}{{{\color{red}5}}}1     {6}{{{\color{red}6}}}1     {7}{{{\color{red}7}}}1     {8}{{{\color{red}8}}}1     {9}{{{\color{red}9}}}1 }  ‎‎\begin{lstlisting}[basicstyle=\ttfamily,mathescape] def fancy_function_name(page_url = 'tex.stackexchange.com'):     return page_url.split('.')[0] \end{lstlisting}  \end{document}   This code will generate:   You can see that it matches the right place but is too greedy and colors the delimiters too. So I thought about the uncommented line: %moredelim = [is][\color{blue}\bfseries def \mdseries\color{purple}]{def\ }{(}, If I use this one and uncomment the line below I get this result:    It's nearly what I wan't but I cannot add the last, now missing ( in black color.  Does anyone has a solution for this without pretouching the code and add all the @@ symbols? Suppose $X,Y$ and $Z$ are multivariate normal with means and full covariance matrix. The conditional expectation $E(X | Y)$ is well know. What is the conditional expectation of $E(X | Y,Z)$ if $Y$ and $Z$ (and $X$) are correlated? Standard textbooks only seem to cover the case when $Y$ and $Z$ are uncorrelated. Difference between declaring variables before or in loop? Is color undefined I want to check whether a color has been previously defined, consider the below code which doesn't execute.  \documentclass{article}  \usepackage{xcolor} \newcommand{\colorprovide}[2]{\ifx\undefined{#1}\colorlet{#1}{#2}\fi}  \begin{document}     %Initial Definition     \colorprovide{mycolor}{red}     \textcolor{mycolor}{Test 1}      %Will overwrite     \colorlet{mycolor}{green}     \textcolor{mycolor}{Test 2}      %Should NOT overwrite as it exists     \colorprovide{mycolor}{red}     \textcolor{mycolor}{Test 3} \end{document}   In other words and analogous to \providecommand{...} not renewing an existing command if it exists, I need a macro which will will NOT redefine a color if the color has already been defined.  The above code throws an error as the logical checking part \ifx\undefined... is incorrect.