return value from function with post
Variable doesn't get returned from AJAX function
Binary search (bisection) in Python Contour integral for $x^3/(e^x-1)$? What contour and integrand do we use to evaluate $$ \int_0^\infty \frac{x^3}{e^x-1} dx $$  Or is this going to need some other technique? I am using Selenium 2/WebDriver for automation. I have a table and am trying to select a row in it. When the test runs, I can see the row become highlighted as if it is clicked, but then immediately I get the "org.openqa.selenium.StaleElementReferenceException: Element is no longer attached to the DOM" error and the test fails.  The code is the following:  @Test public void rowSelection() throws Exception {     SeleniumHelper helper = new SeleniumHelper();     action = new SeleniumActionHelper(driver);      helper.login();      String testUrl = navigateToUrl("option/listOptions.xhtml");     driver.get(testUrl);      WebElement table = findElementById("tableSection:dataTableWrapped_data");     List&lt;WebElement&gt; allRows = table.findElements(By.tagName("tr"));     for (WebElement row : allRows)         {             List&lt;WebElement&gt; cells = row.findElements(By.tagName("td"));             for (WebElement cell : cells)             {                 WebElement listName = cell.findElement(By.xpath("./* [text()='body_build']"));                 listName.click();             }         } }   I have put a Thread.sleep(2000) in front and after the listName.click() action, but neither has helped. Any help would be greatly appreciated. Analysing Bounce Rate and Time on Page I'm working on an eCommerce site and there's a perceived problem with the bounce rates on product pages. The best performing page (in terms of views), tends to have a very high bounce rate, at about 80%. This page is also targeted with Ads, but in both non-paid and paid traffic, the bounce rate stays high.  What's weird about it is that the time on this page is about 2 and a half minutes. The others pages have a slightly lower bounce rate (between 50% and 75%) with visit times between 1 minute and 2 minutes.  I'm not entirely sure about how to analyse this data. I've checked all the possible technical problems (faulty GA code, JS race conditions, breaks in the chain), and whilst there were some things that need improving, no technical fix budged the bounce rate at all.  The other thing we noticed was that the product pages were getting lots of traffic for very generic and brand based search terms. In these cases the pages come up as sitelinks, could this explain a high bounce rate too?  So in short :  If the page view time is so high, should I be worrying about the bounce rate at all? What's the chances of someone visiting the page and then leaving to compare prices? And how do sitelinks affect bounce rate on eCommerce sites? Limit of $n$th root of $n$! I am asked to determine if a series converges or not:  $$\displaystyle\sum\limits_{n=1}^{\infty} \frac{(2^n)n!}{(n^n)}$$  So I'm using the $n$th root test and came up with $\lim_{n \to {\infty}}\frac{2}{n}\times(\sqrt[n]{n!})$ I know that the limit of $\frac{2}{n}$ goes to $0$ when $n$ goes to infinity but what about the $(\sqrt[n]{n!})$? Dynamic loading of python modules Referring to correctly-styled algpseudocode procedure name in document Given an algorithm written in algpseudocode:  \documentclass{article} \usepackage{algorithm} \usepackage{algpseudocode} \begin{document} \begin{algorithm}   \caption{Part 1}   \begin{algorithmic}[1]     \Procedure {FooProc}{$G$}       \State ...     \EndProcedure   \end{algorithmic} \end{algorithm} \end{document}   How can I now refer to FooProc in my document (outside of the algorithm environment) such that it has the same typeset as in inside the algorithm environment? "Welcome to the Jones__": Plural or Plural Possessive? When making a welcome sign, what form of the name Jones would you use?  ("Welcome to the Jones__") A coin is tossed three times: The probability of zero heads is 1/8 and the probability of zero tails is 1/8.  And my question is: What is the probability that all three tosses result in the same outcome?   So, if P(zero heads)= 1/8 , then that should be the same of p(all tails)?  If so, we could use the Addition Rule which is $P(A \cup B) = P(A) + P(B)$  where A and B are disjoint events, i.e. $A \cap B = \emptyset$, A is the event of tossing all heads and B is the event of tossing all tails.  I'm not sure how to continue after that... would the complement be used? BJT as a switch: what am I doing wrong? How to assess the similarity of two histograms? Given two histograms, how do we assess whether they are similar or not?  Is it sufficient to simply look at the two histograms? The simple one to one mapping has the problem that if a histogram is slightly different and slightly shifted then we'll not get the desired result.  Any suggestions? Boot screen in low graphics/text mode My ubuntu boot screen shows up in a strange low resolution, almost text mode, instead the usual and sleek white "ubuntu" over dark background. It's not a big issue because when GDM loads everything becomes ok, but If there's an easy way to fix it I would like to give it a try. How to enable or disable services? I read about how to enable and disable services in Ubuntu and it seems that there are different possibilities to manage them.  The first method I found is update-rc.d to add new services to startup, which aims on the /etc/init.d folder and its contents.  The other one I found is to edit .conf files in the /etc/init folder.  What's the recommended way to enable / disable / add services and why?  Could you please give a short bulletproof step by step example on how to add a service in Ubuntu and enable and disable it? Big Parenthesis in an Equation I have an equation contained inside \[...\], which automatically makes a \sum with sub- and superscripts turn big--so that the summation sign looks awkward inside parenthesis.  Any idea how to make the parenthesis completely enclose the whole summation?  \documentclass{article} \begin{document} We have: \[ \sum_{i=1}^n i = (\sum_{i=1}^{n-1} i) + n = \frac{(n-1)(n)}{2} + n = \frac{n(n+1)}{2} \] \end{document} As much as I have tried, it doesn't seem possible to use separate labels when using a casesconstruction (from the amsmath package).  Ideally, I would like to be able to write something like  \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} f(x)=\begin{cases}   1&amp;x\geq0\label{positive}\\   0&amp;x&lt;0\label{negative} \end{cases} \end{equation} \end{document}   and later refer to both cases at different places. What would be the best way to achieve this result? Configure mouse speed (not pointer acceleration!) Is there way to increase the mouse speed in KDE4? I don't want any pointer acceleration, it's just the mouse speed that I want to change.  Edit: Unfortunately, editing the xorg.conf is not an option for me, because I want the users to be able to configure the mouse speed themselves and it is company policy do deny users permission to change the xorg.conf. Custom macro for multicolumn with & without xparse The following example has two normal LaTeX \newcommand macros and two xparse \NewDocumentCommand for specifying multicolumn text. The only difference between each pair of commands is one has the alignment character as part of the macro and one does not.  However, the xparse version that requires the alignment character to be outside of the macro does NOT work and results in Misplaced \omit. error.  \documentclass{article} \usepackage{xparse}  \newcommand{\MulticolumnA}[3]{&amp;\multicolumn{#1}{#2}{#3}} \newcommand{\MulticolumnB}[3]{ \multicolumn{#1}{#2}{#3}}  \NewDocumentCommand{\MulticolumnX}{m m m}{&amp;\multicolumn{#1}{#2}{#3}} \NewDocumentCommand{\MulticolumnY}{m m m}{ \multicolumn{#1}{#2}{#3}}  \begin{document} \[ \begin{tabular}{lllllll}     {a} \MulticolumnA{4}{l}{A-abcdefghijkli}\\     {a}&amp;\MulticolumnB{4}{l}{B-abcdefghijkli}\\     {a} \MulticolumnX{4}{l}{X-abcdefghijkli}\\     %{a}&amp;\MulticolumnY{4}{l}{Y-abcdefghijkli}\\     {col1}&amp;col2&amp;{col3}&amp;{col4}&amp;{col5}\\ \end{tabular} \] \end{document}   Above compiles as is, but does not compile if the one line is uncommented. Because of a former error in our ASP.Net application, created by my predecessor and undiscovered for a long time, thousands of wrong URLs where created dynamically. The normal user did not notice it, but Google followed these links and crawled itself through these incorrect URLs, creating more and more wrong links.  To make it clearer, consider the url     example.com/folder   should create the link     example.com/folder/subfolder   but was creating     example.com/subfolder   instead. Because of bad url rewriting, this was accepted and by default showed the index page for any unknown url, creating more and more links like this.     example.com/subfolder/subfolder/....   The problem is resolved by now, but now I have thousands of 404 errors listed in the Google Webmaster Tools, which got discovered 1 or 2 years ago, and more keep coming up.  Unfortunately the links do not follow a common pattern that I could deny for crawling in the robots.txt.  Is there anything I can do to stop google from trying out those very old links and remove the already listed 404s from Webmaster Tools? How can I utilize the whole terminal, like htop or emacs do? I want to write a program that can "draw" in the terminal the same way as htop or emacs. By that I mean "get rid of the prompt and make the output dependent on the current size of the terminal".   To make this a bit more clear:   I want to use the terminal this way:     in stead of this way: LWC Get Pick-list Field Values In LWC, is it possible to get a pick-list field's possible values?  I'm writing a component that is embded into a lightning record page. I need my component to be able to load the record from the page, get data from the fields and use that data to pre-populate my search form with default values.  I have this working with city/state and checkbox fields. Right now the city/state fields are built pull data from an aggregate query of contacts to find all possible state/city combinations (I know this is doomed to fail when the records reach over 50k contacts but Its good enough for now).  I have a pick-list field on my object called skill level, I need to be able to build a combo box that has all the possible values for skill level and set the default value to the value on the associated record.  I'd like to avoid hard-coding the available options if possible.  In LWC, is it possible to get a pick-list field's possible values?