I have main.aspx and second.aspx.The code in main.aspx:  &lt;form id="form1"&gt;     &lt;div id="main"&gt;     &lt;/div&gt; &lt;/form&gt;   And in second.aspx:  &lt;div id="second"&gt;     &lt;asp:Textbox runat="server" id="txt1"&gt;&lt;/asp:Textbox&gt;     &lt;input type="button" id="bttn" value="send"&gt;&lt;/input&gt; &lt;/div&gt;   At the run time I'm loading second.aspx page into main.aspx div id="main".  $("#main").load("second.aspx #second");   I'm trying to get the textbox value from main.aspx.But when I tried   $("#bttn").click(function(){     var t=$("txt1").val();     alert(t); });   It gives nothing.It seems to be never going into the function.How can get the value from the textbox.
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.
How to sort strings in JavaScript I have a list of objects I wish to sort based on a field attr of type string. I tried using -  list.sort(function (a, b) {     return a.attr - b.attr })   but found that - doesn't appear to work with strings in JavaScript. How can I sort a list of objects based on an attribute with type string? Postdoc before PhD completion I am in a situation where my PhD funding runs out in 5 months and I need to have secured a job regardless of whether I have submitted due to having a family.   Although I think I may be close to submitting by then, it may take longer. Is it worth applying for postdoc positions or would universities not consider you until you have completed the PhD? I assume that the pass rates of PhDs are very high if the candidate has got to the submission stage.   Edit: This question is aimed at the people that are are the submission stage but haven't yet defended their thesis. It is not a question asking if I can get a post-doc without a PhD. Given $a,b,c$ are the sides of a triangle. Prove that $\frac{a}{b+c}+\frac{b}{c+a}+\frac{c}{a+b}<2$ Is there a convenient way to import a schema into Oracle 11gR2 using a single new or different tablespace than where the data originated?  As an example, I have exported BLOG_DATA from OLDDB, where all user data is stored in the USERS tablespace.   On NEWDB, I would like to import the BLOG_DATA schema, but store the user objects in the BLOG_DATA tablespace, created specifically for this user.   I have created the BLOG_DATA user, created the BLOG_DATA tablespace and set it as the default tablespace for that user and added an appropriate unlimited quota.  CREATE TABLESPACE blog_data DATAFILE SIZE 1G;  CREATE USER blog_data IDENTIFIED BY secretpassword DEFAULT TABLESPACE blog_data QUOTA UNLIMITED ON blog_data;  GRANT connect,resource TO blog_data   The schema was exported from OLDDB with something like  exp blog_data/secretpassword@OLDDB file=blog_data.dmp    After reading Phil's excellent answer below, I found myself wondering:   Since data has no other place to go than the default tablespace - the only tablespace the user has a quota on - will this effectively force imp to put all user objects in that default tablespace?  imp blog_data/secretpassword@NEWDB file=blog_data.dmp   Would this then place the entire blog_data schema in the blog_data tablespace on NEWDB? Is there any reason why this wouldn't work or that I would run into problems with certain objects etc?  update:  I did a quick test and found this to be the case. Imp places objects in the default tablespace for that user, provided it can't place it in the original tablespace (eg. the tablespace does not exist). Full explanation:   Still, I suppose that using Data Pump like Phil suggests might be the preferred option. So today I woke up and noticed new item in inventory which was a booster pack containing 3 cards from L4D 2. From what I see on market these booster packs are new (graph only shows up to 19 of June). No matter the game it seems to always contain 3 cards. There are two actions I can do with it: unpack or sell. There is fancy animation when you unpack the booster ;)    I'm not exactly sure why I got it, I have few guesses:   I got new badge, power player - this could give me a booster? Because of new badge I reached level 10 - maybe every couple levels there are gifts? It just dropped randomly for everyone?   Maybe together we could rule out above guesses. It's also interesting from the point of market, to estimate how many boosters are there. With some games they seem to be more valuable than 3 cards separately, but that maybe only initial confusion. Finding the search terms behind 'not provided' My Young's slits experiment doesn’t work. I mean I tried to see wave effect of light but I didn’t see any thing expect particles! I’ve sent you a pic of my laser and a short video of the experiment. Is there any problem you think? Elastic collision in two dimensions Suppose a particle with mass $m_1$ and speed $v_{1i}$ undergoes an elastic collision with stationary particle of mass $m_2$. After the collision, particle of mass $m_1$ moves with speed $v_{1f}$ in a direction of angle $\theta$ above the line it was moving previously. Particle with mass $m_2$ moves with speed $v_{2f}$ in a direction of angle $\phi$ below the line which particle with mass $m_1$ was moving previously. Using equations for conservation of momentum and kinetic energy, how can we prove these two equations  $\frac{v_{1f}}{v_{1i}}=\frac{m_1}{m_1+m_2}[\cos \theta \pm  \sqrt{\cos^2 \theta - \frac{m_1^2-m_2^2}{m_1^2}}]$  and  $\frac{\tan(\theta +\phi)}{\tan(\phi)}=\frac{m_1+m_2}{m_1-m_2}$ ?  EDIT. Here is what I've done:  For the first one, set the $xy$ coordinate system so that the positive direction of the $x$ axis points toward the original path of the particle with mass $m_1$. So we have three equations:  $m_1v_{1i}=m_1v_{1f}\cos \theta + m_2v_{2f} \cos \phi$  $0=m_1v_{1f}\sin \theta - m_2v_{2f}\sin \phi$  $m_1v_{1i}^2=m_1v_{1f}^2+m_2v_{2f}^2$.  From the second one, we get:  $v_{2f}=\frac{m_1v_{1f}\sin \theta}{m_2 \sin \phi}$  Plotting this into third equation, we get  $v_{1i}^2=v_{1f}^2(1+\frac{m_1 \sin^2 \theta}{m_2 \sin^2 \phi})$ (1)  From the first equation, we have  $\cos \phi =\frac{m_1(v_{1i}-v_{1f}\cos \theta)}{m_2v_{2f}}$  which after applying the equation we have for $v_2f$ becomes  $\sin^2 \phi = \frac{1}{1+\frac{(v_{1i}-v_{1f}\cos \theta)^2}{\sin^2 \theta \times v_1f^2}}$  Plotting this into equation (1), gives us an equation in terms of $m_1$, $m_2$, $v_{1f}$, $v_{1i}$ and $\theta$, but it is too far from what I expected.  For the second one, assigning the $xy$ coordinate in a way that the positive direction of the $x$ axis points toward the final path of the particle $m_2$, will give us three equations (two for conservation of linear momentum and one for conservation of kinetic energy), but I don't know what to do next. What time zone do SO's servers operate in? What time zone do Stack Overflow's servers operate in?  I noticed that it couldn't be my time zone, or the ones before me (I'm in North American Eastern Time), because I logged into SO earlier today (around 12 pm), then I logged in just a few minutes ago (around 8 pm), then about a minute later I got the Fanatic badge (yay me!). "Whether" Vs. "If" How to get file creation & modification date/times in Python? Description of varieties in $\mathbb{P}^2\times \mathbb{P}^1$ If $[x:y]$ are coordinates of $\mathbb{P}^1$ and $[X:Y:Z]$ are coordinates of $\mathbb{P}^2$, what do the following varieties look like?   $V(x^2X+y^2Y+xyZ)\subset \mathbb{P}^2\times \mathbb{P}^1$ $V(x^2X^2+y^2Y^2+xyZ^2)\subset \mathbb{P}^2\times \mathbb{P}^1$   As of now, I don't quite know how to visualize these varieties. A detailed geometric picture would be especially welcome. Complete Statistic: Uniform distribution Take a random sample $X_1, X_2,\ldots X_n$ from the distribution $f(x;\theta)=1/\theta$ for $0\le x\le  \theta$.  I need to show that $Y=\max(X_1,X_2,...,X_n)$ is complete.  Now, I know I should multiply the sample distribution of $Y$ and multiply it with a function of $Y$, then integrate over the range of $\theta$ and equate them to zero. But how do I get the sampling distribution of $Y$? The nautilus-open-terminal package adds a menu/right-click option to open a terminal in the current directory.  I want to change this from opening gnome-terminal to opening terminator. , however these instructions do not appear to be valid any more, and I can't find any place in the system settings where the default emulator can be changed.  I also tried:  $ sudo update-alternatives --config x-terminal-emulator   choosing  * 0            /usr/bin/terminator               50        auto mode   But this does not appear to have any effect. Any idea how I can get this to work? Closing Reject Suggested Edit dialogue freezes review process If you go to review a suggested edit and close the Reject dialogue box, the button at the top-right will continue to say "Rejecting...". You will not be able to continue with the review process.  I have refreshed the page, and tried clearing my cache. If I refresh the page, I can continue reviewing the edit.  I'm using Chrome Version 31.0.1650.57 m. Prove $n!>2^n$ for $n\geq4$ using induction. I just want to know if my proof to this question is correct. First, I proved it was true for $n = 4$. $$4!&gt;2^4$$ $$24&gt;16$$ Then, I assumed that it was true for $n=k$. $$k!&gt;2^k$$ Afterwards, I tried to prove it for $n=k+1$. $$(k+1)!&gt;2^{k+1}$$ $$(k+1)k!&gt;(2)(2^k)$$ Since $k!&gt;2^k$, am I allowed to simply do $$(k+1)(2^k)&gt;(2)(2^k)$$ $$(k+1)&gt;2$$ and this is true for all $k\geq3$. Would the last two steps be illegal because I only assumed that $k!&gt;2^k$ is true? How to create a color of the same brightness and saturation? Let's consider three colors: Red, Green and Blue. For blue I created a specific shade, something like #F2F5F7. If you see this color, it has a certain level of shade, brightness and saturation value of blue.  I want to create the same equivalent color but for Green and Red, how to get that? I need to find a period-3 orbit for a tent map defined by $$T(x)=\begin{cases}2x &amp; 0\le x\le0.5 \\[2ex] 2-2x &amp;0.5 &lt; x \le 1 \end{cases}$$  So, what is a fast and efficient way of finding it? I only know how to do it by guessing-and-checking. For example, I picked a random point, $x = \frac{2}{7}$ and found that $$T\left(\frac{2}{7}\right)=\frac{4}{7}\\[4ex]T\left(\frac{4}{7}\right)=\frac{6}{7}\\[4ex]T\left(\frac{6}{7}\right)=\frac{2}{7}$$ which is a period-3 orbit. Is there any better way of finding a period-3 orbit , more specifically, a period-3 point? How should I use "eponym", "eponymous" and "namesake"? I was in London and visited the Tower Bridge. Afterwards, I went to a pub called The Tower Bridge. Just to be clear, the pub is named after the bridge.   Which of the following are correct?   The bridge is the eponym of the pub. The pub is the eponym of the bridge. From the pub, I could see the eponymous bridge. After I saw the bridge, I went to the eponymous pub. The bridge is the namesake of the pub. The pub is the namesake of the bridge. Is there a way to stop the gmail address field (on the login page) from displaying all the gmail addresses that you have ever typed in it?   When logging in with Google Chrome or trying to set up a new account, anything you type which starts with the same letter as the one that you are trying to use currently will show up in the auto-complete field, I don't want that.    I understand that this is a convenient feature in some cases, but the thing is--I know this shouldn't've happened, but it has actually happened more than once--I sometimes mistyped my password in the Gmail address field right after the address, mistakingly assuming that the prompt had already been moved to the password field, and then hit "Enter" without looking first. The next time I tried to enter my Gmail address, it popped up the address followed by my password as one of the entries on the list of email addresses that shows up, and I couldn't get rid of the entry.   Is there a way to remove these? The autofill feature in Chrome is a time saver, and so I don't really want to turn it off. It would be helpful to be able to edit out some of the typed info, though, so it won't show up again -- is this possible to do?