\begin{figure}[h] \centering \label{fig:serviceworker} \includegraphics[width=\textwidth]{img/sw} \caption{Service workers en HTTP Requests} \end{figure}  In Figuur \ref{fig:serviceworker} wordt er getoond hoe de service worker als een brug functioneert tussen de website en de server waar de applicatie zijn data van haalt. Op deze manier kan de service worker toch nog informatie teruggeven aan de website als de verbinding met de server niet kan gemaakt worden. Dit zorgt er dus voor dat je de applicatie kan blijven gebruiken bij  geen of een slechte internetconnectie.   The problem is that the figure has number 3.1. But when I try to reference it in the text it shows as (Figure 3.2). What am I doing wrong here?
\documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.
Is it okay to use my US visa after a name change? I'm in the following situation: In 3 months, I'll finish my PhD in theoretical physics, and I'm certain that I want to pursue an academic career. However, I'm just as certain that my PhD research is a dead end. (My advisor doesn't think so, but I disagree with him.) Thus, I seek to change the direction of my research, but I need a few months to obtain the necessary skills. Anyway, I missed the main application period for post-doc positions (in the US).  Given the following options (feel free to expand this list), which do you think provides the best perspective of leading me to a interesting post-doc position?   Finish my PhD. Get any post-doc position. Do the work I'm required to do there. Work hard in my spare time to teach myself the stuff I want to. After 1-2 years, find a post-doc position I'm really interested in. Finish my PhD. Get a well-paying job in the software industry. Do the work I'm required to do there. Work hard in my spare time to teach myself the stuff I want to. Work harder to keep publishing papers. After one year, find a post-doc position I'm really interested in. Abort my current work. Find a new subject and a new PhD advisor. Live on unemployment money as long as possible. Work hard in my spare time to teach myself the stuff I want to. Work harder to keep publishing papers. After one year, find a post-doc position I'm really interested in.   Pros:   Get the PhD title sooner. Stay in the scientific community. Get the PhD title sooner. Earn lots of money (6 figure). In a 9-to-5 job, have more spare time for private research than on a post-doc position, where work is never finished. Go to a foreign country. It's what I should've done 2 years ago. I'll have the education I want when I finish my PhD, not later (but be older anyway). No immediate advantages over the other options.   Cons:   If a logical continuation of my PhD work, I'll suffer from demotivation. My next advisor will not want me to work on other topics that I'm not paid for. Might have to stay for 2 years. I'll move out of the scientific community for some time. I know it's hard to get back in. I'll be even older when I finally get my PhD. Not sure if I would find another advisor. Open fight with my current advisor. I don't want to live on unemployment money for long.   A particular question concerning the options above: Does being out of academia for a year kill your prospects of obtaining a postdoc position later?  I do have some collaborators who will help me to keep publishing, provided that I put enough work into my research. Also, I'm willing to familiarize myself with other topics on my own (a prerequisite for an academic career anyway).  The next application period will be from October to December 2013, which isn't far away. I'm sure I'll have most of the skills I want by then (and a paper published proving that), but still would have to work until summer 2014 wherever I am applying now.  Please give me honest answers, even if they hurt. I'll provide more information as soon as possible, if anyone has questions. How can I rename many files at once? I use \includegraphics command to insert image to the document. But how can I add a border around this image w/o any margin between border lines and image? It seems to be very easy, but I can't find it in the documentation. QGIS calculates main soil type of polygons from another polygon layer Should I be offered the option to upgrade to 18.04.1? How to prove $\cos \frac{2\pi }{5}=\frac{-1+\sqrt{5}}{4}$? I would like to find the apothem of a regular pentagon. It follows from   $$\cos \dfrac{2\pi }{5}=\dfrac{-1+\sqrt{5}}{4}.$$  But how can this be proved (geometrically or trigonometrically)? How do I run an executable using Lua? MAC OS for Intel based PCs I have an Intel dual core PC with 4GB of RAM and Graphics card. For on of my student Assignment I need to install Latest possible MAC OS on my system as a secondary OS.  Like on boot it asks me that which OS i want to boot with Win 8.1 or Mac Os..  I searched on the internet and found two conflicting opinion some people said there are few MAC OS Version which can be directly installed on Intel PCs some says there aren't?   I am here to get rid of the confusion that is an official latest possible MAC OS version for Intel based PCs? If not what are my options if I want to run MAC OS on my PC.   Please not that Virtualization options won’t work for me, it has to be working as full OS not an os inside another. When closing a question as a duplicate there is a text box which says: "search, or enter a question link or numeric id". You can copy and paste a question link into here, but this fails if the URL starts with https:// instead of http://, with the message "Your search returned no matches; please try a different search". Use chown to set the ownership of all a folder's subfolders and files? How can I use the chown command to change the ownership of all a folder's subfolders and files? Add the Same Modifier to Multiple Objects at Once? What potions actually grant fame or glory, or put a stopper in death? Are there any? ‘You are here to learn the subtle science and exact art of potionmaking,’ [Snape] began. He spoke in barely more than a whisper, but they caught every word – like Professor McGonagall, Snape had the gift of keeping a class silent without effort. ‘As there is little foolish wand-waving here, many of you will hardly believe this is magic. I don’t expect you will really understand the beauty of the softly simmering cauldron with its shimmering fumes, the delicate power of liquids that creep through human veins, bewitching the mind, ensnaring the senses ... I can teach you how to bottle fame, brew glory, even stopper death – if you aren’t as big a bunch of dunderheads as I usually have to teach.’&#185;   Philosopher's Stone - page 102 - Bloomsbury - chapter 8, The Potions Master   Are there any canon potions that actually grant fame or glory, or stopper death? I'm looking for specific canon-based answers from sources such as the Harry Potter books, interviews with J.K. Rowling, or information from Pottermore. Maybe because it's early I'm overlooking the obvious, but offhand I can't think of any canon potions that fit this criteria exactly.   &#185;I edited in the entire paragraph that I can teach you how to bottle fame, brew glory, even stopper death comes from for clarity. Hopefully this will be helpful and provide a better context for the comment in question. Series convergence or divergence how to test I have the following series defined.   $$\displaystyle\sum_{k=1}^{n} \cos \left( {\frac{\pi}{2}} k \right) \frac{k}{k+1000} \frac{1}{\sqrt{k}}$$ where $n = 1,2...$  How to test whether this series converges or diverges ? URL to load resources from the classpath in Java How do I reset a lost administrative password? Programming pattern to generate VGA signal with micro-controller? SUMIF Horizontal I am searching for a column header and return a value under it.  Example:  _|A|B|C  1|X|Y|Z  2|1|2|3   If the value is Y, it must return 2. I tried =SUMIF(A1:C1,"B", A2:C2), but realized that IFSUM does not support searching horizontal.  I would appreciate an alternative solution! Cardinality of cartesian product of an infinite set with N Got NODATA issue: 'NODATA' (does the network require authentication?)