$('.product_name:radio').click(function() {get_products()} );   get_products() never gets called because this radio button was created after the page loaded.   I've tried the following, but they do not work.  $('.product_name:radio').on('click', function(){     get_products() });  $('product_name.body').on('click', '.product_name:radio', function(){     get_products()});   What is the correct way to do this?
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.
This morning, I had eggs for breakfast, and I was looking at the pieces of broken shells and thought "What is the surface area of this egg?" The problem is that I have no real idea about how to find the surface area.    I have learned formulas for circles, and I know the equation for an ellipse; however, I don't know how to apply that.   The only idea I can think of is to put an egg on a sheet of paper and trace it, and then measure the outline drawn, and then try to find an equation for that ellipse and rotate that about the $x$-axis.  Now, my problem is how I can find the equation of the ellipse from the graph, and will my tracing method really be the edge of the egg?  Also, can I use the ? Will I have to use some techniques to solve the integral that are not covered in the ?  There has to be a better method for finding the surface area. Please, help me understand how to find the surface area of an egg; i.e., how to use my mathematical knowledge for something other than passing exams. $\sum (-1)^n/n$ fails the p-series test, but passes the alternating series test? Using old version of numpy even with a newer version installed Fiction novel or movie about sentient dinosaurs I remember parts of a story about some researchers finding a society of sentient dinosaurs. I believe they lived underground. From what I recall there were some steam punk elements and I think crystals were important.  From what I recall (this might be wrong) there was a book and also a movie about that story.  In the process, humans lived with these dinosaurs. I am not sure if that was like that from the beginning or if that happened later.  Any idea what that story might be? When I used listings package to import C# code snippet from within my LaTeX file, I got an output as follows.    At the first line, there is an unnecessary white space because of the BOM (Byte Order Mark) that is intentionally added by Microsoft (R) Visual Studio.  I really want to remove it from the output rather than from the C# file, how to do that?   Here is my LaTeX code:  \documentclass{article} \usepackage{listings,xcolor} \lstset{% language={[Sharp]C}, backgroundcolor=\color{yellow!20}, basicstyle=\tiny, keywordstyle=\color{blue}, identifierstyle=\color{magenta}, breaklines=true}   \begin{document} \lstinputlisting{Program.cs} \end{document} Make \cite{my reference} show name and year I am trying to figure out how to make author's name and year show up every time I make a reference.  For example:  my_bibtex.bib has this entry:  @article{Franklin1999,  author = {Franklin Allen and Risto Karjalainen}, title = {Using genetic algorithms to find technical trading rules}, year = {1999}, volume = {51}, pages = {245-271}, journal = {Journal of Financial Economics}  }   If in my_paper.tex I use this line:  Important result has been found by \cite{Franklin1999}   My output looks like:  Important result has been found by [1]   But I want it too look like:  Important result has been found by Franklin 1999   I there a way to do it?  My bibliographystyle is set to plain  \bibliographystyle{plain}  \bibliography{my_bibtex} How to change the hostname of a RHEL-based distro? Some months ago I posted  about exporting Sentinel 1 scenes from a collection and was successful with help from .   I now have a new region of interest, which sits on the overlap between 2 scene footprints (sequential images in descending orbit). When I make a mosaic of the 2 scenes I get a small no data gap and lack of alignment between the 2 images:  // Create a geometry representing an export region. var roi = ee.Geometry.Rectangle([-62.67, -8.31, -63.25, -8.85]); var zoomPoint = ee.Geometry.Point([-62.35, -8.06])  // Load the Sentinel-1 ImageCollection. var sentinel1 = ee.ImageCollection('COPERNICUS/S1_GRD') .filterBounds(roi);   // Filter by metadata properties. var IW_H = sentinel1  // Filter to get images with VV and VH dual polarization. .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV')) .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH'))  // Filter to get images collected in interferometric wide swath mode. .filter(ee.Filter.eq('instrumentMode', 'IW'))  // Filter IWs to get High res. .filter(ee.Filter.eq('resolution', 'H'))  // Filter IW-Highs to get 10m res .filter(ee.Filter.eq('resolution_meters', 10));  // Filter to get images from different look angles var col_desc = IW_H.filter(ee.Filter.eq('orbitProperties_pass', 'DESCENDING'));  // Spatially mosaic the images in the collection and display var col = col_desc.mosaic(); var colVV = col.select(0) Map.addLayer(colVV, {min:-17, max:-3}, "VV"); Map.centerObject(zoomPoint, 20);   What am I missing?  Are these scenes not acquired sequentially? unable to reset root password of mysql I need to reset the root password of my local mysql installation but it woudln't let me. I've tried this:  $ sudo /etc/init.d/mysql stop  * Stopping MySQL database server mysqld                                                                                                              [ OK ]  [1]-  Exit 1                  sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking [2]+  Exit 1                  sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking reg@regDesktopHome:~$ sudo mysqld --skip-grant-tables &amp; [1] 13651 reg@regDesktopHome:~$ 140627 19:02:02 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.  reg@regDesktopHome:~$ mysql -u root mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) reg@regDesktopHome:~$ sudo mysql -u root mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) [1]+  Exit 1                  sudo mysqld --skip-grant-tables   How can I get the password reset? edit 1 I got this:  $ ps ax| grep mysql 16515 ?        Ssl    0:00 /usr/sbin/mysqld 16551 pts/23   S+     0:00 grep --color=auto mysql reg@regDesktopHome:~/semios/v3upgrade$ sudo kill -9 16515 reg@regDesktopHome:~/semios/v3upgrade$ ps ax| grep mysql 16678 ?        Ssl    0:00 /usr/sbin/mysqld 16715 pts/23   S+     0:00 grep --color=auto mysql reg@regDesktopHome:~/semios/v3upgrade$ mysql -u root ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)   looks like a process is automatically restarting mysql as soon as I kill it... How do a tile with diagonal lines in Photoshop? How does one draw a tile with diagonal lines that can seamlessly tiled with Photoshop? Ampere's law and external currents In Ampere's law, the current outside the curve taken is not included in the expression. Does it mean that the magnetic field calculated by using the law gives the contribution of only the currents crossing the area bounded by the curve? If banks offer a fixed rate lower than the variable rate, is that an indication interest rates may head down? This is one of the major banks in Australia:   At present time, the variable rate is 7.80% but the fixed rate is 6.99% for one year.  And it seems most banks in Australia, if you fix the rate (at the moment), you will get a lower rate.  Is this an indication that in the eyes of the banks, that they believe the interest rates are going to down? I just ask because it seems most people in the media think the rates are going up and they've risen about 6 times in a row now.  Could it be that the banks are secretly preparing for rates to drop? I've generated some JSON and I'm trying to pull it into an object in JavaScript. I keep getting errors. Here's what I have:  var data = '{"count" : 1, "stack" : "sometext\n\n"}'; var dataObj = eval('('+data+')');   This gives me an error:   unterminated string literal   With JSON.parse(data), I see similar error messages: "Unexpected token ↵" in Chrome, and "unterminated string literal" in Firefox and IE.  When I take out the \n after sometext the error goes away in both cases. I can't seem to figure out why the \n makes eval and JSON.parse fail. I've searched online, but I have not found any clear instructions how to permanently add .sty files to my TeXShop installation. I'm using a Mac with OSX (TeXShop is a mac only program).  What is the best way of doing this? The one comprehensive set of instructions I found .   I've got as far as extracting the files (running LaTeX on the .ins and . dtx files) but after that I don't know what to do. I also don't understand how to update the index of my distribution, and whether there are particular OSX specifics (the instructions are for Windows). So I am currently making a minecraft custom map (for 1.9). I want to make the player "say" something using /tellraw commands. I did figure out how to make the player name come up using /say commands, but still have no idea how to do it using the /tellraw command.  How do I do that? Stripped out bottom bracket The bottom bracket of my bike was completely stripped to the point that when you push the left side crank arm, the right crank moves and you can see the bottom bracket lock move out the frame. The bike shop tried putting Teflon tape but it's temporary. It's a 26' xc hard tail. For all I know both sides of the bottom bracket(square tapered) are stripped clean hence the Teflon tape put by the previous owner. Can I fix the problem by changing into a hallow tech cranks because it works like a thread less bb, or should I just buy a thread less square tapered bb? Any suggestion on what to do? Why was Peeves in Hogwarts? Peeves was a poltergeist. It generally irritated people and rather then helping them as well as making fun of them.   Why was Peeves in the school? What is/was the job or work assigned to Peeves? I get double question marks when referring to labels inside figures Do the -ing and to-infinitive "verbs" that follow catenative verbs always take the grammatical function of "noun"? I'm wondering whether or not the verb form that follows a catenative verb has the grammatical function of a noun or of a verb, and whether or not it depends on the first catenative verb.  "I like to run" "I like running"  the -ing and the to infinitive can easily be switched in this sentence, and it seems to be implying "I like [the act of[running]]", so both the infinitive and the gerund are nouns.  "I like to run marathons"/"I like running marathons"   These seem like they might still be nouns but need "verb powers" to take the object, and then these sentences really turn into "I like [the act of [running marathons]]"/ "I like [to be in the state of [running marathons]]".  Is this true for both the -ing (and so it would be a gerund) and the to-infinitive? Are they, sort of, initially verbs so that they can take the object, and then the verb + object becomes a noun phrase?  If this is true, I'm also wondering if the same rules apply for a catenative verb such as "start".  "I started to run in the mornings" "I started running marathons in 2008"  "start" is a catenative verb that isn't a cognitive/emotion verb, and specifically suggests action. So what is the grammatical function of the to-infinitive and -ing verb forms? are they verbs? are they nouns? It just seems incorrect to say that their grammatical function is a noun, but everything I've seen on the internet is pretty vague. I've also seen that to-infinitives are never verbs, but only from one source and it just doesn't seem right to me.  So any ideas on the true grammatical function of the -ing and the to-infinitive after a catenative verb? And is it universal across catenative verbs, or does it depend on the verb category? I'm using an unsigned repo in Ubuntu 16.04 from Debian multimedia:  deb http://www.deb-multimedia.org jessie main   To install deb-multimedia-keyring, I'm running:  apt-get update &amp;&amp; apt-get install deb-multimedia-keyring -y   This gives an error:  W: GPG error: http://www.deb-multimedia.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5C808C2B65558117 E: The repository 'http://www.deb-multimedia.org jessie InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.