So basically, I'm making a website with a form inside a modal. After that form submits the data to script.php, whatever script.php sends back is appended to the modal body like so:  // Function to submit data to php $("#formModificarArticulo").on("submit", function(e) {      var postData = $(this).serializeArray();     var formURL = $(this).attr("action");      $.ajax({         url: formURL,         type: "POST",         data: postData,         success: function(data, textStatus, jqXHR) {             $('#divModificarArticulo .modal-header .modal-title').html("Resultado");             $('#divModificarArticulo .modal-body').html(data);             $("#submitFormModificar").remove();             reloadDataTable();         },         error: function(jqXHR, status, error) {             console.log(status + ": " + error);         }     });      e.preventDefault(); });  $("#submitFormModificar").on('click', function() {     console.log("Submit presionado");     $("#formModificarArticulo").submit(); });   So, basically, when the user sends data using the form inside the modal, the modal changes to show something along the lines of "Data sent to server successfully".  After the result from script.php is showed to the user and the user closes it, the modal is supposed to revert back to its original state with the form. This is the function where that magic happens:  // Function to reset modal (function(){      var template = null;      $('#divModificarArticulo').on('show.bs.modal', function (event) {         if (template == null) {             template = $(this).html();         } else {             $(this).html(template);         }          $('#divModificarArticulo').modal({ show: false});     })  })();   The thing is, I can send data pressing the Submit button on the form, the modal brings me the back the results from the server and when I open the modal for a second time the form is back to its original state. For some reason, however, when I press the Submit button for a second time, it doesn't do anything. It's like it's not even pressed.  I'd really appreciate if someone could help me out.
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.
Most modern texts spend some time deriving the  that connects S matrix elements to time ordered field correlation functions. It seems essential, and really helps clear up what you are calculating. Yet some earlier texts and even some modern texts (e.g.  by R. Klauber) seem to skip right past this, working everything out in the "interaction" picture. It seems there must be something going wrong with this latter procedure, but I am not quite able to put it together. sort() and reverse() functions do not work Content replacement from external website 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? Lighter in CPU/Memory Usage: Lubuntu or Xubuntu I am looking for an Ubuntu version that consumes less Memory and CPU. I have read both Lubuntu and Xubuntu (The homepages, wikipedia, phoronix and other sites comparing both). But from experience, which one uses less memory and is less CPU intensive. I need to install them in very old hardware and want to persuade the owner of the hardware of the benefits of Ubuntu.  in this case I want to install 11.10 or 12.04 when it comes out. How are each behaving in those versions?  The 2 PCs I will be installing either Xubuntu or Lubuntu are:  Granpa PC:  CPU - Pentium 2 450Mhz RAM - 64MB DIMM Video - 16MB Used for - Documents and Internet. No listening to music, no looking at videos. Just using it for document writing.  The other old meat:  CPU - Pentium 3 550Mhz RAM - 128MB DIMM Video - 16MB Used for - Documents and Internet also but they want.. or maybe they are wishing for it to use it to see movies and listen to music. This one has internet. The other one does not.  UPDATE  Wanted to update this question with the test results for over 8 months worth of using Lubuntu and Xubuntu. When it comes to very old hardware, am talking about 64 MB, 128 MB or even 256 MB of RAM computers, Lubuntu is better than Xubuntu when comparing Memory usage. When it comes to CPU usage, both are the same.  This will not improve I/O Disk performance which will be the bottleneck for old computers. Also the difference in performance between Xubuntu and Lubuntu is about 10% to 20% percent in memory usage. Again, CPU usage is the same.  Now, when it comes to how responsive the Desktop is, LXDE (Lubuntu) has a much better response time than XFCE (Xubuntu). I would say about 50% or just simply noticeable to the eye. Lubuntu is similar to how Windows XP looks while Xubuntu is more like how Gnome 2 looked.  The computers (The old ones mentioned here) and 2 more are still working in excellent conditions thanks to the Ubuntu family. I also want to add I am using 13.10 for both distros. Replace arbitrary characters in the middle of an IP address string with sed I need to find and replace either one or two numerical characters in strings in a file.  The strings are IP addresses of the form:   10.xx.y.z    Where xx can be one or two characters.    I want to replace the xx with the single character 0, so I have  10.0.y.z    preserving the values of y and z.   The string may appear multiple times in the file.  What is the sed invocation to do this? If HTML, CSS, and Javascript are client-side, why are they components of a PHP file? Which graphics cards are supported by the new AMDGPU driver in Ubuntu 16.04? The new open source AMDGPU driver pre-installed in Ubuntu 16.04 should support all the "Volcanic Islands" cards out-of-the-box. This means that AMD Radeon R9 285, R9 380/380X and R9 Fury/FuryX graphics cards will be supported out-of-the-box if Ubuntu 16.04 LTS is installed.  However I read that the open source AMDGPU driver has an experimental support for the "Sea Islands" graphics cards (HD7790, R7 260, R9 290, R7 360, R9 390). Is this support enabled by default on Ubuntu 16.04, or will these graphics cards use the Radeon driver?  Thanks Storing C++ template function definitions in a .CPP file I have some template code that I would prefer to have stored in a CPP file instead of inline in the header.  I know this can be done as long as you know which template types will be used.  For example:  .h file  class foo { public:     template &lt;typename T&gt;     void do(const T&amp; t); };   .cpp file  template &lt;typename T&gt; void foo::do(const T&amp; t) {     // Do something with t }  template void foo::do&lt;int&gt;(const int&amp;); template void foo::do&lt;std::string&gt;(const std::string&amp;);   Note the last two lines - the foo::do template function is only used with ints and std::strings, so those definitions mean the app will link.  My question is - is this a nasty hack or will this work with other compilers/linkers? I am only using this code with VS2008 at the moment but will be wanting to port to other environments. How to sample a function non-uniformly? See this example code:  \documentclass{article}  \usepackage{pgfplots} \pgfplotsset{compat=1.10} \begin{document}   \begin{tikzpicture}     \begin{axis}[                  xmin=-0.1,                  xmax=1.1,                  ymin=-1.1,                  ymax=1.1,                  domain=0:1,                  samples=30                 ]       \addplot[blue] {sqrt(x)};       \addplot[purple] {-sqrt(x)};     \end{axis}   \end{tikzpicture} \end{document}   The result appears acceptable far from zero, but near zero it's too much undersampled:    Increasing samples value makes the plot nice, but it considerably slows down processing. As a workaround I could just plot the inverse in a parametric plot (i.e. (y^2,y)), but in my actual code it'd require quite a bit of additional work.  Is there a way to provide a custom sampling function or specify different density of samples in different parts of the domain? Suppose $X$ is binomial $B(n,p)$. How can I find the probability that $X$ is even ?  I know $$P(X = k ) = \frac{ n!}{(n-k)!k!} p^k(1-p)^{n-k} $$  where $X=1,....,n$. Are they just asking to find $P(X = 2m )$ for some $m &gt; 0$ ? What is $\sum_{r=0}^n \frac{(-1)^r}{\binom{n}{r}}$? Find a closed form expression for $$\sum_{r=0}^n \dfrac{(-1)^r}{\dbinom{n}{r}}$$ where $n$ is an even positive integer.  I tried using binomial identities, but since the binomial coefficient is in the denominator, I can't do much. Also, I'm seeking a non-calculus, elementary solution, if possible. Thanks. In which Comic Book series is Batman actually Thomas Wayne? I've heard people say that there is a series of comics where Batman is actually Thomas Wayne instead of his son, Bruce.   Where can I find this? What is the series called? Linked server returned message "Query timeout expired." We have two separate SQL Servers. On one server we have a data warehouse (DWH), on the other we have sales information database.  Now on the DWH server there is an ETL job that collects the information from the sales server. The job runs daily after midnight. The DWH collects the information via linked server from the sales database.  Now, the most time the ETL job runs without any problems. But sometimes it fails because of query timeout. We have found out, that there is a specific pattern: The failure happens every 11th day. So on the 11th day the ETL job fails to collect information.   The following error occurs:     SQLNCLI11 for linked server “my linked server” returned message “Query timeout expired.”   Note: The job fails usually 10 minutes after start.  We have searched everything and could not found out what this issue causes. Also we know that the amount of data is every time, almost the same. Also there is no any scheduled job that runs all 11 days or something.  The remote query timeout on the linked server is set to 0.  Our next step will be, to turn off the antivirus programm on the sales server, to check if this causes the problem.  Does anyone have any clue or idea, where i can search further to find the problem? sstatic.net SSL certificate is for an incorrect domain $\lim_{x \to 0} f(x)=\frac{\tan 3x}{\tan 2x}$ without L'Hospital How is it possible to use the GNU find command to match several file types at a time (one search command)?  The man page says:  -type c     File is of type c:     b      block (buffered) special     c      character (unbuffered) special     d      directory     p      named pipe (FIFO)     f      regular file     l      symbolic link; this is never true if the -L option or the -follow            option  is in  effect,  unless  the  symbolic link is broken.  If            you want to search for symbolic links when -L is in effect, use            -xtype.     s      socket     D      door (Solaris)   and I want to search for files (f) and symbolic links (l) and pipe it to another process. How can I search for both at the same time?  I have tried  find -type fl | … find -type f -type l | … find -xtype f -type l | …   I know a workaround would be to use a subshell  (find -type f; find -type l) | …   but I just want to know if it is possible. Are bicategories and lax 2-categories the same? Where are packages stored installed with APT in Ubuntu 16.04? I am studying General Relativity and some basic QFTs. It bothers me a lot that different books use different metric signatures, i.e. $(-+++)$ and $(+---).$ Can anyone tell me the advantages of using both of them, or why some people prefer the former while some prefer the latter? I would like to know which one should I while tackling different problems.