I have a div with a button inside that must update the same div...  Example  &lt;div id="result"&gt;   &lt;a href="#" class="item" data-value="ok"&gt;click&lt;/a&gt; &lt;/div&gt;  $( "a.item" ).click(function() {   val = $(this).data("value");   alert(val);   $("#result").html('&lt;a href="#" class="item" data-value="ok"&gt;click&lt;/a&gt;'); });   but the button works only first time  This is jsfiddle
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.
When at home I use my 13" MacBook Pro hooked up to an 27" external monitor. When working on my 27" screen I prefer to have a visible dock at all times. I have enough screen real estate to afford this luxury.  When I'm on the road working on my 13" screen I prefer to automatically hide the dock as it really gets in the way when screen real estate is limited.  I now manually switch between enabling and disabling hiding (using ⌥⌘D) but I would prefer this to happen automatically. Can I enable hiding the dock on my MacBook monitor and disable hiding the dock on my external monitor? Execute command from file in current shell I want to executed command from file (which is script) in current shell in terminal.  Example: I have file ch_dir contains following:  #!/bin/bash cd /usr   Now if I execute file usually as following then it executes commands in different shell:  pandya@pandya-desktop:~$ ./ch_dir pandya@pandya-desktop:~$   Here cd /user is executed in different shell.  But I want to execute in Current shell. How do I do that?  Note: Here cd is only used to explain. Question's aim is to execute any command in current shell Why did the slaver in Astapor think Daenerys wouldn't do exactly what she did? Spoilers! (do I have to even say that here?)  I recently rewatched the episode of Game of Thrones where Daenerys is in Astapor. She makes the deal with the master slaver guy, where she trades him one of her dragons for 8,000 of his very tough slaves. I immediately thought this was stupid for two reasons:   Why would he think the dragon would immediately obey him rather than her? Maybe he doesn't quite believe the 'Mother of Dragons' lore, but it's still basically a pet at the very least. This one isn't as bad though, as... Why would he possibly think she wouldn't betray him and use her freshly bought slaves to take back her dragon? He just traded her literally all his slaves and he has not been kind to her so far. He has motivation to not go back on the deal -- he's running a business, basically... but she has no reason not to.   I guess you could argue that he was blinded by greed, but I think that would be poor writing -- he's in a vicious trade, I can't imagine he would've survived long thinking so naively.  Does anyone have a good explanation? Question 1: Why are irrational numbers uncountable and rationals countable?  I really struggle to understand this. I initially thought it had something to with the fact that between any two numbers there will always be a irrational number. But now it has come to my attention that the same holds for rational numbers. So I can't really see the difference between them. What is it that makes the difference? Why can we line up all rational numbers one-to-one with the natural numbers, but not the irrationals with the naturals?  Sorry for a perhaps basic question, but I really, really struggle with it. Thanks. I've got a road bike with brake lever shifters, and it's developed a small problem with age: sometimes, the shifter doesn't catch the first time or two I push it. It'll move easily, with no resistance, since it's not actually pulling on the cable, then after a few tries, catch and work normally. The colder the temperature, the more often this happens.  I don't know how the mechanism works internally, so I'm curious what would cause this, and also whether it's (as I suspect) gradual wear of some part of the mechanism, and if it's likely to fail catastrophically, or gradually worsen. Allow collapsing vote-count This is a minor, OCD driven, request but that's never stopped me before...  After showing the vote counts for a post, I would like to re-collapse to the regular view. So far the only way I know to get this is to refresh the whole page. I think that another click on the expanded vote count should re-collapse the votes to the normal total. How to change SQL Server collation How do I build a TRRS headphone jack with a jack that is detectable by an iPhone I have a circuit and I am trying to integrate it with an iPhone via a TRRS headphone jack's microphone input. I have a generic TRRS cord and am trying to send a signal through it. However, the iPhone does not detect that a mic is even plugged in. However, if I plug it into my Mac via line-in and record, I can record the signal I am sending perfectly.   I have read online that it needs to detect resistance between the ground and mic, which I have. Are there any other things I need to do? It seems like this is an issue that stems from Apple's proprietary technology, as the earbuds are from a Windows Phone before they were spliced.    Thanks so much! What is the antiderivative of $x^{x^{x^{x...}}}$? What is $\int{x^{x^{x^{x^{\dots }}}}dx}$? I managed to get it down to a complicated series after using $u$-substitution, but I want to see other methods of approach, or if my answer was right.   First I let $$u=x^{x^{x^{x^{\dots }}}}$$, and $du$ would be, in terms of $u$, $$du=  \frac{u}{\frac{1-ln(u)}{u}e^{ln(u)/u}}$$ This makes the integral of $$\int{x^{x^{x^{x^{\dots }}}}dx}=\int \frac{1 - ln(u)}{u}{e^{ln(u)/u} }du$$ Now making $w = ln(u), dw$ becomes $1/u$ and the integral becomes $$\int e^{w/e^{w}}(1-w)dw$$ From there, I distributed and made $2$ integrals of series, using the Taylor polynomial for $e^x$. From there, I integrated and back substituted. I was only trying to find the indefinite integral.   I'm still a junior in high school, so let me know if the answer is beyond my scope of understanding. Do I need a bus/train/plane ticket out of Thailand in order to get a Visa-on-Arrival? This is a special case of , which, I think, might have drawn little attention because it was too general. In this question, I would like to consider a specific case.  Take a classical system given by the action $$ S[x] = \int dt \left[ \frac{\alpha}{2} \ddot{x}^2 + \frac{\beta}{2} \dot{x}^2 + \frac{\gamma}{2} x^2 \right]. $$  This action is Lagrangian, but it is not what we are usually dealing with in physics, because the Lagrangian contains second time derivatives.  The equations of motion are:  $$ \alpha \ddddot{x} - \beta \ddot{x} + \gamma x = 0. $$  This can be solved as usual by employing Fourier transform:  $$ x(t) = a_1 e^{i \omega_1 t} + a_1^{*} e^{-i \omega_1 t} + a_2 e^{i \omega_2 t} + a_2^{*} e^{-i \omega_2 t}, $$  where $\omega_1^2$ and $\omega_2^2$ are the two roots of $\alpha \omega^4 + \beta \omega^2 + \gamma$, given by  $$ \omega_{1,2}^2 = \frac{- \beta \pm \sqrt{\beta^2 - 4 \alpha \gamma}}{2 \alpha} .$$  Now by definition the phase space is the space of solutions of equations of motion. In this case it is parametrized by two complex co-ordinates $a_{1,2}$, meaning that it is 4-dimensional.  I would like to know if there's a natural way to associate the symplectic structure (Poisson bracket) on this phase space. I.e.,  $$ \{a_1, a_1^{*}\} = ? $$ $$ \{a_1, a_2^{*}\} = ? $$ $$ \{a_2, a_1^{*}\} = ? $$ $$ \{a_2, a_2^{*}\} = ? $$ $$ \{a_1, a_2\} = ? $$ $$ \{a_1^{*}, a_2^{*}\} = ? $$ Polite or unrectified placement of the word please How to replace subscript symbols Let's assume that one has some modern HP printer and/or scanner which is not supported by HPLIP package from official repository. Currently Ubuntu versions have :  trusty (14.04LTS): 3.14.3-0ubuntu3.4 xenial (16.04LTS): 3.16.3+repack0-1 bionic (18.04LTS): 3.17.10+repack0-5 focal (20.04LTS): 3.20.3+dfsg0-2 groovy (20.10): 3.20.5+dfsg0-3build1 hirsute (21.04): 3.21.2+dfsg1-2   What can one do if printer is supported in newer version of HPLIP (checked this in )? You have already activated X, but your Gemfile requires Y Creating fishnet grid Shapefile in QGIS? How do I create a fishnet shapefile using QGIS?   The equivalent task of "Create Fishnet" in ArcGIS. I am trying to mimic the interesting proof from  to give a generating set of the ideal correspond to the $d$-uple embedding: We fix the notation $\Delta = \big\{ (\nu_0, \dots, \nu_n) \in {\mathbb{N}}^{n+1}_0 ~:~ \nu_0 + \dots + \nu_n = d \big\}$. The polynomial map is $\theta : k[y_\nu : \nu \in \Delta] \rightarrow k[x_0, \dotsc, x_n]$ given by $$ \theta ( y_\nu ) := x^{\nu_0}_0 \cdots x^{\nu_n}_n $$ and we know that ${\mathrm{ker}}~\theta$ is the ideal of the $d$-uple embedding, i.e., $\rho_d({\mathbb{P}}^n) = Z({\mathrm{ker}}~\theta)$ (cf. Exercise I.2.12 Hartshorne). Now let $W \leq k[y_\nu : \nu \in \Delta]$ denote the ideal $$ W := \Big\langle y_{\tau_1} y_{\tau_2} - y_{\tau^{\prime}_1} y_{\tau^{\prime}_2} ~:~ \tau_1, \tau_2, \tau^{\prime}_1, \tau^{\prime}_2 \in \Delta, \tau_1 + \tau_2 = \tau^{\prime}_1 + \tau^{\prime}_2 \Big\rangle $$ Clearly, $W \subseteq {\mathrm{ker}}~\theta$. Using the lemma in the above link, we need to produce a $k$-subspace $T \subseteq k[y_\nu : \nu \in \Delta]$ with the conditions $$ T + W = k[y_\nu : \nu \in \Delta], \hspace{.2in} \theta \lvert_{T} = {\mathrm{injective}} $$ After a few thoughts it seems reasonable to think of the following subspace as a candidate for $T$: First define the equivalence relation on $\Delta \times \Delta$ given by $(\tau_1, \tau_2) \sim (\tau^{\prime}_1, \tau^{\prime}_2)$ if $\tau_1 + \tau_2 = \tau^{\prime}_1 + \tau^{\prime}_2$. Let $\Omega \subseteq \Delta \times \Delta$ be a subset with a unique representative from each class of $\sim$. Now let $T$ be the $k$-span of the monomials $y^{\alpha_1}_{\tau_1} \dotsc y^{\alpha_r}_{\tau_r}$ (with the distinct elements $\tau_1, \dotsc, \tau_r \in \Delta$ and $\alpha_1, \dotsc, \alpha_r \geq 1$) such that $(\tau_i, \tau_j) \in \Omega$ for each $i \neq j$. Clearly, $\theta$ is injective if restricted to $T$. I got lost in the step : Each monomial $M$ of $k[y_\nu : \nu \in \Delta]$ satisfy $M \equiv b$ mod $W$ for some $b \in T$. Did I do anything wrong? I don't understand how quantum mechanics (and therefore also quantum computers) can work  given that while we work with quantum states, particles that this quantum state consist of cannot be observed, which is the most fundamental requirement.  If I am not mistaken, by "observed" we mean interaction with any other particle (photon, gluon, electron or whatever else). So my very important questions:   Aren't the particles this quantum state consists of interacting with each other? Why doesn't that cause the state to collapse? Aren't all particles in the universe interacting with Higgs field and gravitons etc? Why doesn't that cause every quantum state to collapse?   I feel there is something very fundamental in quantum mechanics that I am not aware of, hence I would be very pleased to have these questions answered. Let's say that you want to output or concat strings. Which of the following styles do you prefer?   var p = new { FirstName = "Bill", LastName = "Gates" }; Console.WriteLine("{0} {1}", p.FirstName, p.LastName); Console.WriteLine(p.FirstName + " " + p.LastName);   Do you rather use format or do you simply concat strings? What is your favorite? Is one of these hurting your eyes?  Do you have any rational arguments to use one and not the other?  I'd go for the second one. At the moment, I have created a code that retrieves data from the database and displays it. However, for some reason, I cannot see the files I want to retrieve on my page. My goal is that the data gets retrieved from the database, and is displayed on the webpage. I do not need to make a connection with the database since Wordpress does that automatically.  My code:  &lt;?php  global $wpdb; // this adds the prefix which is set by the user upon instillation of wordpress $table_name = $wpdb-&gt;prefix . "wpex_programma"; // this will get the data from your table $retrieve_data = $wpdb-&gt;get_results( "SELECT * FROM wpex_programma; " ); print_r($retrieve_data); ?&gt; &lt;ul&gt; &lt;?php foreach ($retrieve_data as $retrieved_data){ ?&gt; &lt;li&gt;&lt;?php echo $retrieved_data-&gt;column_name;?&gt;&lt;/li&gt; &lt;li&gt;&lt;?php echo $retrieved_data-&gt;another_column_name;?&gt;&lt;/li&gt; &lt;li&gt;&lt;?php echo $retrieved_data-&gt;as_many_columns_as_you_have;?&gt;&lt;/li&gt; &lt;?php  } ?&gt; &lt;/ul&gt;   My question: the data is not shown and I believe it is not retrieved. How can I fix that? The table name is correct, and I have data in my database tabel. The print_r($retrieve_data)returns the following: Array ( [0] =&gt; stdClass Object ( [id] =&gt; 35 [naam] =&gt; /public_html/wp/wp-content/plugins/AbonneerProgrammas/FilesUpload/Country Kickin 1.mp3 ) )  My query log:    My database structure:   New:  &lt;?php  global $wpdb; // this adds the prefix which is set by the user upon instillation of wordpress $table_name = $wpdb-&gt;prefix . "wpex_programma"; // this will get the data from your table $retrieve_data = $wpdb-&gt;get_results( "SELECT * FROM wpex_programma; " ); print_r($retrieve_data); ?&gt; &lt;ul&gt; &lt;?php foreach ($retrieve_data as $retrieved_data){ ?&gt; &lt;li&gt;&lt;?php echo $retrieved_data-&gt;id;?&gt;&lt;/li&gt; &lt;li&gt;&lt;?php echo $retrieved_data-&gt;naam;?&gt;&lt;/li&gt; &lt;?php  } ?&gt; &lt;/ul&gt;