Why when i insert a figure in a section and then move on to a new section do my figures not stay where they are suppose to be
Keeping tables/figures close to where they are mentioned
I have a USB flash drive which is no longer recognized by my computer. Windows Disk Management and DiskPart report No Media with no storage space (0 bytes) on the drive and I cannot partition or format the drive:     If the drive appears in Windows Explorer, trying to access it returns an error message indicating that there is no disk inserted, such as the following:     Please insert a disk into drive X:.   Various disk partitioning and data recovery utilities don't recognize the drive or only give a generic name for the drive and cannot access the contents of the drive.  What can I do? How do I recover data from the drive?     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details. Migrating to full Ubuntu after dual installation on WinXP I previously ran 12.04 alongside WinXP to see how it performed on my mom's older laptop.  i also migrated her email to Thunderbird. If I now convert from dual WinXP/Ubuntu to only run Ubuntu will things like her Thunderbird emails be transferred as part of the Ubuntu full install? Or must I do something else? I am fairly tech aware, but not a full IT boffin! So far, I understand that I have to look at each Jordan block. How do I prove that for a Jordan block with a value of x, $J_n(x)$, the Jordan decomposition of $(J_n(x))^2$ is $J_n(x^2)$ ? I have a feeling this will lead me to the solution. Thanks for your time. Convert HTML to PDF in .NET I want to generate a PDF by passing HTML contents to a function. I have made use of iTextSharp for this but it does not perform well when it encounters tables and the layout just gets messy.  Is there a better way? I've got two branches that are fully merged together. However, after the merge is done, I realise that one file has been messed up by the merge (someone else did an auto-format, gah), and it would just be easier to change to the new version in the other branch, and then reinsert my one line change after bringing it over into my branch. So what's the easiest way in Git to do this? iOS app stalls phone when on weak wifi sign I've recently noticed a bug on the Stack Exchange IOS app. When I open the Stack Exchange app on weak wifi, it hangs on the blue load screen as it launches and either crashes the app or the entire phone lags and didn't respond for about a minute.  I'm running iOS 8.4.1, I have the most up to date version of the app, and by 'weak' wifi I mean two out of four bars of strength. Beamer - place text of footnote in footline I must place footnotes and footcites at the bottom of the frames, like shown in the picture:   The line above the footnotes must always be there, and it must have a minimum distance to the bottom of lets say 2.5em.  So I see two possible solutions:   Add the footnote via \setbeamertemplate to the footline. Change the format of the footnoteline and let it always appear, even if no footnote was used.   For the last hours, I tried to accomplish point 1, but I had absolutely no success. Can you please help me? Otherwise I have to use *whisper* Powerpoint. ;)    EDIT: Do you know the phenomenon that only after you ask someone, you can get the right ideas? ;)  Here is a MWE of my current solution:  \documentclass[xcolor={dvipsnames}]{beamer}  \usepackage[absolute, overlay]{textpos} \usepackage{environ}   \usetheme{default} \setbeamertemplate{navigation symbols}{}%remove navigation symbols   \newcommand{\makemyrule}{%     \setlength{\unitlength}{14pt}%      minimum distance to bottom     \ifdim\footnoteheight&gt;\unitlength \setlength{\unitlength}{\footnoteheight} \fi%     check which distance is bigger     \begin{textblock*}{\linewidth}(0pt,\dimexpr\textheight-\unitlength)%    place with use of textpos         \textcolor{blue}{\rule{\paperwidth}{.3ex}}     \end{textblock*} }   \let\oldfootnote\footnote%      redefine the footnote command \renewcommand{\footnote}[1]{\Addheight{#1}\oldfootnote{#1}}  \newlength{\footnoteheight} \newsavebox{\mytext} \newcommand{\Addheight}[1]%     measure height of the text         {%                 \savebox{\mytext}{\small\strut\parbox{\textwidth}%                 {\hspace*{2em}\thefootnote#1}\strut}%       approximated by eye, not perfect!                 \addtolength{\footnoteheight}{\ht\mytext}%                 \addtolength{\footnoteheight}{\dp\mytext}%         }     \NewEnviron{myframe}[1]{%     \begin{frame}{#1}%     \setlength{\footnoteheight}{0pt}%     \BODY%     \makemyrule%     \end{frame}%     }    \renewcommand\footnoterule{}  \begin{document} \begin{myframe}{} \frametitle{Beamer example} using\footnote{Y LUSPIN, et al} footnotes\footnote{P. GHOSEZ, et al and a lot more information to create a linebreak} excessively \footnote{You do not need to read this, this is only blindtext to create even more and more text. Blindtext will go on forever, nobody can stop the allmighty blindtext. I think I am a blindtext author.} \end{myframe}{} \begin{myframe} \frametitle{Beamer example} using\footnote{Y LUSPIN, et al} footnotes\footnote{P. GHOSEZ, et al} \end{myframe}{} \begin{myframe} \frametitle{Another example} without footnotes\\ \end{myframe} \end{document}   What this does: At the beginning of each myframe-environment, the length \footnoteheight is reseted to zero. When a \footnote is placed, the height of the text is added to this length. At the end of each frame, via \makemyrule the bottom rule is created, which is above the footnote texts (my solution is not perfect) or, if there are no footnotes, at least 14pt above the bottom.  My wishes (not real problems, but I want it to work better) are   The height of the footnotetext is only approximated. I would like a solution where you can measure the height of the formatted footnote. The frame environment needs to be renamed to myframe. I would like a solution which works without changing the document. But it all failed, because I could not execute \makemyrule before \end{frame} automatically. Is it worth cleaning the registry? I have heard that you should keep the registry clean on Windows. Is this actually important or is it just myth? Newton's third law of motion states that every action has an equal and opposite reaction. That is the reason we do not sink into the earth, because when our weight exerts a force on the earth it also exerts an equal and opposite force on us.  But when we stand on quicksand or on fluids we can sink in. How is this possible? Does it not exert an equal and opposite force on us? Or are Newton's laws different in the case of fluids and substances of low densities? Let $X \sim Bin(n,p)$ show that $X/n \nsim Bin()$ Let $X \sim Bin(n,p)$   Part A.  Show that the argument      "Then $X/n \sim Bin()$ with $E[X/n]=p$and $Var[X/n]=pq/n$"    is false.   My book says we can prove this result using a moment generating function. But to me it makes no intuitive sense: We have Bin-distributed RV $X$ and if we rescale it with $1/n$ of course it will be Bin-distributed.  And we know from standard formulas that $E[aX]=aE[X]$ and $Var[aX] = a^2Var[X]$ so I think the argument is correct.   (For full disclosure, the argument we should falsify according to the book is "Let X be a binomial random variable with mean np and variance np(1−p). Show that the ratio X/n also has a binomial distribution with mean p and variance p(1−p)/n." But I think the argument is correct. )    Ok, now I get part A. Here is Part B. Prove it using the moment generating function of $X/n$.   Attempt: I get $$m_X(t)=E[\exp(tX/n)]=(m_X(t))^{1/n}$$ Convert a preprocessor token to a string I'm looking for a way to convert a preprocessor token to a string.  Specifically, I've somewhere got:  #define MAX_LEN 16   and I want to use it to prevent buffer overrun:  char val[MAX_LEN+1]; // room for \0 sscanf(buf, "%"MAX_LEN"s", val);   I'm open to other ways to accomplish the same thing, but standard library only. "Now" vs "by now" Consider these examples:   By now the desk should be looking significantly tidier!  By now, the failure of regulators to contain dangerous forces should be well accepted.  By now I own some forty copies of the magazine.  By now the blue of twilight is glowing.  He used leverage, but by now applied concerted discipline to contain his risks.    I wonder if I can use &quot;now&quot; instead of &quot;by now&quot; to convey the same meaning. I would think &quot;by now&quot; refers to a moment until now, but why not use past tense or present perfect tense in the these examples? How to loop the particle simulation indefinitely? I've made a simple snowfall particle simulation (using gandalf3's solution: ). Is there a way to loop the animation, so the transition between last frame and first frame is not visible? Is there a setting to do it? Let Y(1), Y(2), Y(3), Y(4), Y(5) denote the order statistics of a random sample of size 5 from a distribution having p.d.f. Help me to solve this problem please..  Let $Y_{(1)}, Y_{(2)}, Y_{(3)}, Y_{(4)}, Y_{(5)}$ denote the order statistics of a random sample of size 5 from a distribution having p.d.f. $f(y) = e^{(-y)}, 0 &lt; y &lt; \infty$, zero elsewhere. Show that $Z_1 = Y_{(2)}$ and $Z_2 = Y_{(4)} − Y_{(2)}$  are independent. Hint: First find the joint p.d.f. of $Y_{(2)}$  and  $Y_{(4)}$. Show $\operatorname{Aut}(C_2 \times C_2)$ is isomorphic to $S_3=D_6$ cgi and tomcat im trying to run a cgi script (.cgi) with tomcat. I am getting the below error and cant find out whats wrong. I know i should really use apache and mod proxy but this really isnt my area of expertise so im taking the easy way out!  Thanks for any help.   java.io.IOException: Cannot run program "perl" (in directory "C:\Java\tomcat\webapps\my_app_name\WEB-INF\cgi"): CreateProcess error=2, The system cannot find the file specified     java.lang.ProcessBuilder.start(ProcessBuilder.java:459)     java.lang.Runtime.exec(Runtime.java:593)     java.lang.Runtime.exec(Runtime.java:431)     org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServlet.java:1705)     org.apache.catalina.servlets.CGIServlet.doGet(CGIServlet.java:597)     javax.servlet.http.HttpServlet.service(HttpServlet.java:627)     javax.servlet.http.HttpServlet.service(HttpServlet.java:729)     org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)     org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:416) Find out BIOS Version from Windows The title says it all.  If I was on a bus at 60 km/h, and I started walking on the bus at a steady pace of 5 km/h, then I'd technically be moving at 65 km/h, right?  So my son posed me an interesting question today: since light travels as fast as anything can go, what if I shined light when moving in a car?  How should I answer his question? Appending to an ObjectOutputStream Excessive water when cooking scallops This is partly a continuation of  question, since that one was already closed, but my question is about a specific problem encountered the last time I cooked scallops.  I got the pan up to a reasonable temperature and put the scallops in, and as they were cooking, TONS of water came out of the scallops and filled the pan.  I poured it out, continued cooking, and more water came out.  Several iterations later, I thought they were done, but they were still very raw inside, so we ended up tossing the batch (it definitely wasn't sushi grade).  Where did all the liquid come from, and is there any way to avoid that the next time?