Enum to String C++
Is there a simple way to convert C++ enum to string?
Natbib -- change author conjunction in citation call-out from 'and' to '&' I'm using natbib, german babel and natbib creates output of the form   Foo and Bar (1337)   I would like to get   Foo &amp; Bar (1337) for citet and (Foo &amp; Bar 1337) respectively for citep. rsync two existing directories copying everything I have two file servers in two locations. Currently both have the same data, which generally is unmodified (used for read only access).When the second server was set up (the one I'm sshing to) the data was copied over LAN and has since been moved geographically.  I'm trying to use rsync for the first time on the required directories. An example command;  sudo rsync -avz --ignore-existing -P --dry-run /media/Storage/OSs/ user@mydomain:/mnt/Storage/OSs/   I've tried using -c -t -u (Additionally went on the remote server and updated the timestamps to today) also but every time I execute a dry run it wants to copy everything!  Additionally the user is the same for both machines with the same UID.  *Edit  After playing around a bit more, I've found that rsync does not like the whitespace in the subdirectory names; For instance if I use ' to escape local shell &amp; \ to escape remote shell     sudo rsync -avz --ignore-existing -P '/media/Storage/OSs/Windows/Windows server 2011/' 'user@mydomain:/mnt/Storage/OSs/Windows/Windows\ server\ 2011/'   Then all is well, my theory is then that rsync does not like the subdirectories with whitespaces. I have thousands of subdirectories; the only solution I can think of is to write a small python/shell script to run each sub directory separately but is undesirable. How to maximize any of the views in quad view? I am new to blender. Pressing &#9096; Ctrl&#9095; AltQ opens the quad view. How to maximize any one of the four views of the quad view? Text gets stretched or disappears when scrolling When scrolling in the Stack Exchange Android app, the text gets stretched vertically, code disappears, and sometimes the entire post content disappears.  This doesn't make the app completely useless, but it's pretty close.   Motorola Razr MAXX, Android 4.0.4. 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. I've read  about how some publishers (e.g., Springer) allows authors to submit to arXiv before journal submission, but they make authors wait for a year after acceptance to submit to arXiv.   My question is: Is it okay to submit to arXiv during the time when the paper is under consideration by the journal, for example after it has been "revised and resubmitted" but before final decision? Derangements with repetitive numbers I have a very simple problem.  Lets assume that I have a well shuffled deck of 52 cards. I start drawing the top card always and when the card matches its rank I lose. J=11 Q=12 K=13.  If there were only 13 cards I could easily use the $\ \frac{!n}{n!}$ for derangements in order to solve this. The problem is that there are 52 cards so when I pass 13 I start from 1 again so I don't know what is the probability to win. Example of the game     1st card: 4 - Continue   2nd Card: A - continue   3rd Card: K - Continue   4th Card: K - Continue   5th Card: 6 - Continue   6th Card: 9 - Continue   7th Card: 10 - Continue   8th Card: A - Continue   9th Card: J - Continue   10th Card: 3 - Continue   11th Card: 2 - Continue   12th Card: 8 - Continue   13th Card: A - Continue   1st card: 5 - Continue   2nd Card 2 LOSE   So actually I have to count from 1 to 13 4 times and if I draw all 52 cards then I win. What's the probability? Suppress Chrome 'Failed to load resource' messages in console $N$-body simulation in General Relativity How would one perform an $N$-body simulation in General Relativity (GR) for something like galaxy formation or galactic dynamics?  Suppose one wants to simulate the rotation curve $v(r)$ for galaxies with an $N$-body simulation, and wants to do it in the framework of GR / the Einstein equations. I know that the Windows copy dialog (in Windows&nbsp;XP) stores the copy in memory first, and it is still copying after the dialog closes, so the time is off, but why is the estimation of the time it will take to make a copy so inaccurate, even when memory copying has been disabled (in Vista and Windows&nbsp;7)? It seems so arbitrary! How does the whole copy procedure work, and why can't Windows estimate it correctly? A sequence of real numbers such that $\lim_{n\to+\infty}|x_n-x_{n+1}|=0$ but it is not Cauchy How do I give myself an item that can only be placed on a block with a certain damage value? Expanding code in etoolbox's \ifblank I am trying to use the etoolbox \ifblank (and its cousin \notblank), but I want to expand any macros in its test statement.  For example:  \documentclass{article} \usepackage{etoolbox}  \begin{document}  \newtoggle{longformt} \newcommand{\longform}{\toggletrue{longformt}} \newcommand{\iflong}[2]{\iftoggle{longformt}{#1}{#2}}  \newcommand{\quoteifnotblank}[1]{%     \notblank{#1}{``#1''}{}% }  % Try commenting this line. \longform  This should be completely blank if the form is short: \quoteifnotblank{\iflong{Some long quoted text}{}}  \end{document}   The problem here is that \notblank sees its argument of \iflong{Some long quoted text}{} as a string, not as code to be expanded, so the quotes always appear.  How do I expand arguments before they are passed to \notblank? How to create a YouTube playlist from a list of links? I have very long lists of YouTube links/bookmarks. I want to create playlists for my YouTube channel with them. Is there any way to do it automatically without having to add each individual URL to a playlist? Prove continuous functions $f$ and $g$ are equal Suppose $f,g$: $\Bbb R$ → $\Bbb R$ are continuous functions such that $f(r) = g(r)$ for all $r$ in $\Bbb Q$. That is to say, $f$ and $g$ are equal on the rational numbers.   Prove that  $f(x) = g(x)$  for all $x$ in $\Bbb R$ How to change background and maintain realistic effect? I have like 30 different photos to process like this, but I want to know key things to maintain realistic photo by changing it's background, or maybe just modify background so it would be more pleasing to eye.(If you know tutorial related to my problem, please do provide it to me)  Here is the photo:   Here is my step 2:   Here is background:   Here is the result:   As you can see, it isn't any close to realistic feel. I fooled around with levels, but all I got was this and still it doesn't feels right.  First try:   Second try:   Update  Different background: We are currently working on a windows based application where users capture data. Some data is captured in a table where other data is captured in text blocks. Im currently faced with the dilemma of how to align contents specifically decimal values.  Editable cells in a grid are indicated with a pencil icon which disappears once in edit mode. You will notice that the table consists of various field types, decimals and text. So what should I do and why?  A> right align all cell content  B> left align all cell content  C> right align only decimal values in cells  D> Whatever else you can suggest Cannot remove a repository that complains it has no public key How to use WiFi and Ethernet at the same time Brief Description:  I need my Ethernet card (en0) to see all traffic under 192.168.2.xxx.  However I also need to use WiFi card (en1) for all other traffic.  OS: OS X Lion    I am using a separate network location to deal with this specific use (since this is a for a robotics project that communicates via Ethernet). Ethernet (en0) had to be set up as a static IP (192.168.2.10) per the requirements for the device I am connecting to. All connections on the Ethernet card (en0) should be 192.168.2.xxx as specified above. WiFi (en1) is set up as DHCP to a router since their is no point in assigning it as a static for general purpose traffic. Ethernet (en0) is set up as priority over WiFi (en1).  I would also like to keep this under the network location preferences if at all possible since I do not require this feature to be on all the time.  I would really appreciate your help on this. No one I have talked to knows how to solve this. What does: Error Broken count >0 mean?