I am putting together a big document based in many other small ones, and, as it is, I have a lot of references, much more than I wish to order by hand.   Is there a way to number these references by order of their appearance and not in the order I wrote them in the bibliography?  Let's say something like this:  ...  The code is amazing (\cite{FirstGuy}) because it rules (\cite{SecondGuy}) and this is proven in \cite{ThirdGuy}  ...  \begin{thebibliography}{99}   \bibitem{ThirdGuy} \textbf{G. Third}. \emph{Consistent proves of amazing code} \bibitem{FirstGuy} \textbf{G. First}. \emph{Comments on amazing code} \bibitem{SecondGuy} \textbf{G. Second}. \emph{Code that rules}   should produce something like this:  ...  The code is amazing ([1]) because it rules ([2]) and this is proven in [3]} ...  [1] G.First. Comments on amazing code. [2] G.Second. Code that rules. [3] G.Third. Consistent proves of amazing code.   Is there a way to achieve this without using BibTex or similar tools? (because the effort required to import them is similar to sorting them by hand).  Thanks!
Can thebibliography be sorted by citation order? Or is there a solution with an inlined bibliography that can be sorted?  Not having an additional .bib file would be preferable.  My current bilbiography is inluded in the rest of the article inside a thebibliography block.  \begin{document} \section{Example} The citations in\cite{ne} the bibliography should\cite{flowers} be ordered  according which order they appear in the text.   \begin{thebibliography}{9}  \bibitem{fetebok} \emph{Internal Combustion Engine Fundamentals}  \bibitem{ne} \emph{Förbränningsmotorer}  \bibitem{flowers} \emph{HCCI Research Towards Development for Stationary Power  Applications}  \end{thebibliography}   Should output:  The citations in[1] the bibliography should[2] be ordered  according which order they appear in the text.   Bilbiography [1] Förbränningsmotorer [2] HCCI Research Towards Development for Stationary Power Applications [3] Internal Combustion Engine Fundamentals
How do I enumerate the properties of a JavaScript object? How do you join or create a server in multiplayer? I have seen this a lot but i ran into this question today:    And the answer (while good) has 83 upvotes which seemed a little over the top.  I see dozens of answers of this caliber every week that only seem to get a few upvotes.    Was there some sort of SO policy that encouraged people to upvote more during this period?  Am I just imagining that answers from this period received more votes than comparable ones now? Pattern in Isomorphisms between $\mathbb Z_m \times \mathbb Z_n$ and $\mathbb Z_{mn}$ In general, the group $\mathbb Z_{mn}$ under addition $\bmod mn$ is isomorphic to the direct product $\mathbb Z_m \times \mathbb Z_n$ if and only if $\gcd(m,n)=1.$ This is easy to see since $\mathbb Z_{mn}$ is generated by the element $(1,1)$, and if $\gcd(m,n)=1$, then this will only be zero if it is multiplied by itself $mn$ times (resulting in the cyclic group).   However I'm interested in constructing an isomorphism between the two groups as an explicit expression. I've been playing around a bit with some examples, one of which is the function $\phi : \mathbb Z_2 \times \mathbb Z_3 \to \mathbb Z_6$ where $\phi(a,b) = 3a + 4b \pmod 6$, which gives us the desired isomorphism. I'm interested here in the relationship between the integers $2$, $3$, and the coefficients $3, 4$ of $a$ and $b$. After playing around in Wolfram|Mathematica, I managed to obtain the following isomorphisms $\phi_{m,n} : \mathbb Z_m \times \mathbb Z_n \to \mathbb Z_{mn}$ for coprime $m,n$ in $\{1, 2, \dots, 10\}$.   First of all, the following results seem to hold in general.  $$\phi_{1, n}(a, b) = a + b \qquad \text{for all $n$}$$  $$\phi_{m, 1}(a, b) = a + b \qquad \text{for all $m$}$$  $$\phi_{2, n}(a, b) = na + (n + 1)b \qquad \text{for all $n$}$$ $$\phi_{m, n}(a, b) = K a + L b \iff \phi_{n,m}(a, b) = L a + K b \qquad \text{for all $m, n$}$$  Beyond this point, I could not spot a general pattern. The isomorphisms I obtained are:  $$\phi_{3, 4}(a, b) = 4a + 9b$$ $$\phi_{3, 5}(a, b) = 10a + 6b$$ $$\phi_{3, 7}(a, b) = 7a + 15b$$ $$\phi_{3, 8}(a, b) = 16a + 9b$$ $$\phi_{3, 10}(a, b) = 10a + 21b$$ $$\phi_{4, 5}(a, b) = 5a + 16b$$ $$\phi_{4, 7}(a, b) = 21a + 8b$$ $$\phi_{4, 9}(a, b) = 9a + 28b$$ $$\phi_{5, 6}(a, b) = 6a + 25b$$ $$\phi_{5, 7}(a, b) = 21a + 15b$$ $$\phi_{5, 8}(a, b) = 16a + 25b$$ $$\phi_{5, 9}(a, b) = 36a + 10b$$ $$\phi_{6, 7}(a, b) = 7a + 36b$$ $$\phi_{7, 8}(a, b) = 8a + 49b$$ $$\phi_{7, 9}(a, b) = 36a + 28b$$ $$\phi_{7, 10}(a, b) = 50a + 21b$$ $$\phi_{8, 9}(a, b) = 9a + 64b$$ $$\phi_{9, 10}(a, b) = 10a + 81b$$ If you want to try and generate a few yourself, here is the Mathematica function I implemented. I'm sure it can be optimised, but for the first 10 coprime integers it sufficed.  isomorphism[{m_, n_}] :=       Module[{x = Null},       For[i = 1, i &lt; m*n,           i++, (If[#[[2]] == Table[i, {i, 0, m*n - 1}],           x = ToString[#[[1]][[1]]] &lt;&gt; "a+" &lt;&gt; ToString[#[[1]][[2]]] &lt;&gt;          "b"; Break[]] &amp;) /@       Table[{{i, j},       Mod[i #[[1]] + j #[[2]], m*n] &amp; /@       Table[{Mod[i, m], Mod[i, n]}, {i, 0, m*n - 1}]}, {i, 1,      m*n}, {j, 1, m*n}][[i]]]; x];   I'd appreciate if anyone can help me find the pattern to determine $\phi_{m, n}$ in general. Mining cryptocurrencies with Ubuntu and sgminer What are the steps for setting up a Ubuntu machine for mining of crypto-currencies?  I am looking for a full guide to follow - from installing Ubuntu to how to config and start the miner itself. Heterogeneous vs. inhomogeneous Forecast total for a year given monthly time series I have a monthly time series (for 2009-2012 non-stationary, with seasonality). I can use ARIMA (or ETS) to obtain point and interval forecasts for each month of 2013, but I am interested in forecasting the total for the whole year, including prediction intervals. Is there an easy way in R to obtain interval forecasts for the total for 2013? Make all new files in a directory accessible to a group Suppose I have two users Alice and Bob and a group GROUPNAME and a folder foo, both users are members of GROUPNAME (using Linux and ext3).   If I save as user Alice a file under foo, the permissions are: -rw-r--r-- Alice Alice. However, is it possible to achieve that every file saved under some subdirectory of foo has permissions -rwxrwx--- Alice GROUPNAME (i.e. owner Alice, group GROUPNAME)? Landscape figure in LaTeX I have a figure I'm trying to insert which is in landscape and I'm using the following (snipped) code:  \documentclass[12pt, oneside]{book} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{lscape} \usepackage{rotating} \usepackage{epstopdf}  \begin{document}  \begin{figure}[ht]     \includegraphics{../figures/pics/DivLibPropProfile}     \caption{Property profile of the diverse library compared to the compound pool.}     \label{fig:PropProf} \end{figure}  \end{document}   When I compile this with pdfLaTeX the output behaves as I'd expect – page in portrait with the caption at the bottom but the figure in the "wrong" orientation.  However when I compile using LaTeX, the page is turned landscape with the figure now in the correct orientation but with the caption at what is now the left of the page rather than under the figure, which you should get using \begin{landscape}.    When I do use the landscape environment and compile with LaTeX the caption the whole page is turned upside-down and everything is wrong.  Any ideas how I can get the correct orientation of landscape figure on landscape page with the caption under the  (attached for reference)?  I also need to use LaTeX rather that pdfLaTeX for another package to function. Where can I get a device with 'Ubuntu for phones' pre-installed? Canonical has recently announced , which is Ubuntu with a specific interface for mobile devices.  Where can I get phones with this version of Ubuntu pre-installed? If no devices are available yet, where can I pre-order one? Directing Domain to Hosting Directory I just purchased a domain on Dreamhost, let's say foo.com. I already have hosting, let's say at 123.4.56.789, and have setup a directory foo.com which is accessible at 123.4.56.789/foo.com/. I can set the DNS to point foo.com to that IP, but how do I route it to that folder once it's there? My hosting has a really bad cPanel that gives me almost no help. Can I use .htaccess, or something else? What's the best way to accomplish this?  Edit in response to comment(s): It's VPS hosting, so I have access to http.conf and other system files. Also, yes it's Apache. Would this look natural:     StackExchange is a helluva site! I found out about this site at Facebook.    Or should we use the preposition on:     StackExchange is a helluva site! I found out about this site on Facebook.    Or are both okay?   (Inspired by a ) How do I iterate over the words of a string? I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include &lt;iostream&gt; #include &lt;sstream&gt; #include &lt;string&gt;  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss &gt;&gt; subs;         cout &lt;&lt; "Substring: " &lt;&lt; subs &lt;&lt; endl;     } while (iss); }   Is there a more elegant way to do this? Salesforce1 on focus scroll to the top SSH login without password with kerberos When do I apply Significant figures in physics calculations? I'm a little confused as to when to use  for my physics class. For example, I'm asked to find the average speed of a race car that travels around a circular track with a radius of $500~\mathrm{m}$ in $50~\mathrm{s}$.  Would I need to apply the rules of significant figures to this step of the problem? $$ C = 2\pi (1000~\mathrm{m}) = 6283.19 $$  Or do I just need to apply significant figures at this step? $$ \text{Average speed} = \frac{6283.19~\mathrm{m}}{50~\mathrm{s}} = 125.664~\mathrm{m}/\mathrm{s} $$  Should I round $125.664~\mathrm{m}/\mathrm{s}$  to  $130~\mathrm{m}/\mathrm{s}$ since the number with the least amount of significant figures is two? Why are mathematical proofs that rely on computers controversial? There are many theorems in mathematics that have been proved with the assistance of computers, take the famous  for example. Such proofs are often controversial among some mathematicians. Why is it so?  I my opinion, shifting from manual proofs to computer-assisted proofs is a giant leap forward for mathematics. Other fields of science rely on it heavily. Physics experiments are simulated in computers. Chemical reactions are simulated in supercomputers. Even evolution can be simulated in an advanced enough computer. All of this can help us understand these phenomena better.   But why are mathematicians so reluctant? Migrate hard drive with Windows 7 to new laptop? I have a Dell D630 laptop that has Windows 7 Professional on it that was in dire need for replacement so I recently picked up an HP G62 laptop that comes with Windows 7 Home Premium. I don't need both laptops and I'd rather spare myself the time reinstalling all my programs and making sure I didn't forget to migrate any of my data over by simply swapping hard drives from the Dell to the HP.  Well, I tried just that and my HP laptop instantly BSOD'd on startup.  I'm currently running 'Startup Repair' but it's been sitting there for over 20 mins saying &quot;Attempting repairs...&quot; and nothing is really happening so I don't have much faith in this. The good news is that before I swapped the drives I made an Acronis image of the Dell drive and stored it on my NAS so I can pretty much try anything with this drive and still get back to where I was if need be. I find it hard to believe that what I want to do would be rather difficult, although it sure is looking that way.  I'd appreciate any advice in making this happen. Thanks Edit All the answers were great, so thank you.  I accepted djechelon's answer because the Win7 migration tool saved me quite a bit of time. Feed can show entries for deleted posts, which viewing them fails Just noticed this:  Someone @replied to me in a question which appropriately showed up in my feed.  I go to click on that notice in the feed, and it presents me with "Loading the question failed."  I'd show a picture, but I don't think that it's entirely relevant - I believe it's reproducible if an answer is posted, someone makes a reply, the answer is removed, then that someone else goes back in the feed to try and revisit the post.  Alternatively, why not synchronize the interface between what a 10K user sees on the site, and what they see in the app?  As a 10K user, I would expect to see deleted questions and answers. Rendering order in an Entity System Say I use a , and also inside Systems I hold lists of all entities that Systems are required to process.  How do I maintain this list of entities in desired rendering order, i.e. for a dumb 2D RenderingSystem?   I saw , and what they suggest is to do something like Z ordering - what I would probably do is just to store a "layer" int in DrawableComponent and then, inside RenderingSystem, just sort entities by mentioned "layer" whenever the entity list for RenderingSystem changes.  They also say we could just delete and recreate the entity whenever we want it on the top, but it seems too inflexible to me.  How is this problem usually solved?