I hope this question is not a trivial one, but I was not able to find any answer to that.  I found out that sometimes when I put an \hfill command in order to align some text to the right, there is a line break after the first word of the right-aligned text, even though there is surely enough space from the text on the left.  After playing with it a bit, it seems to me that it happens after there was a line break within a word in the paragraph.   I can't see any reason for that, but yet again I might not have a full understanding of how line breaking and \hfill work.  Here is a minimal example:  \documentclass{article} \begin{document}  If there is a line break within a word as a result of some verymuchsuperlongword,  then the text after hfill breaks: \hfill Some words.  If there isn't a line break within a word as a result of some very much super long word,  then everything looks fine: \hfill  Some words.  \end{document}   And that's how it looks:    Does anyone have any idea what might be the problem and how I can avoid it?
I a chat discussion it was suggested that \hspace*{\fill} (with a space before it to allow for a line break) was sufficient to always get the text following aligned to the right. And indeed, it is aligned to the right.    However, in one case it is inserting an additional line  break where one should not be required as illustrated by the last example here.  I want the text bumped to the next line if and only if (iff ) there is no room:    If I remove the space before the \hspace*{\fill}, there are cases (second and third) where a new line should have been inserted but is not:    Related Question:      I have tried the suggestions at the related question and:   Martin Scharrer's suggestion of using \hbox{}\hfill results in the text being on the left for the last case. Herbert's \When macro exhibits a similar problem for the last case. Thorsten Donig's \signed macro does yield the correct number of lines, but portions of the file name for the middle two cases show up on the second line when they easily fit in the first line.     Notes:  I believe that this is unrelated to the problem, as I was able to reproduce the problem without it.  But, am mentioning it here in case it causes an issue with the proposed solution.  I am using \texttt for the file name. This resulted in an additional complication which I initially thought was the cause of the problem.  So, my actual use case is commented out below and it incorporates a solution from        Code:  \documentclass{article} \usepackage[paperwidth=7.0cm,showframe]{geometry} \usepackage{xcolor} \usepackage{xparse}   \newcommand*{\FillLine}[2]{% \noindent\parbox{\linewidth}{%     \raggedright     File:~#2 % &lt;-- Need space here     %Space before \hspace* allows for a break before it     \hspace*{\fill}\texttt{\small CONFIDENTIAL}%  }% }  %\newcommand*{\EnableHyphenationInTexttt}{\hyphenchar\font=45\relax} % %\newcommand*{\FillLine}[2]{% %    \noindent\parbox{\linewidth}{% %       \raggedright %       File:~\texttt{\EnableHyphenationInTexttt#2} % &lt;-- Need space here %       %Space before \hspace* allows for a break before it %       \hspace*{\fill}\texttt{\small CONFIDENTIAL}%  %    }% %}  \begin{document} \FillLine{Name}{Value}  \bigskip \FillLine{Name}{A-Long-Value}  \bigskip \FillLine{Name}{iiiiiii-iiiii-iiiiiii}  \bigskip \FillLine{Name}{Some-Really-Really-Long-Value} \end{document}
Python argparse: default value or specified value It's so cool that the notification reminds you of the colour of badge you've earned. But I am a little puzzled by the symbols:      Is it feasible to use the symbol from the earned site? At the moment it uses the symbol from the site I happen to be on (as you can see by looking to the left of the dropdown in each case.) Flex-box: Align last row to grid How do you change from icon to list view in 20.4 I think this is a very recent design change, because I've not seen it before:    Where before a small box with the bounty value dislocated the title a couple of characters to the right, now the additional text saying how long until it expires dislocates the title by about a quarter of the width of the column.  I find that this makes it much harder to read the title, and is counterproductive to the goal of attracting attention. Computer keeps restarting by itself Prevent monitor from losing signal after screen saver / lock activates After the screen saver activates, or after I manually lock the screen via Ctrl+Alt+L, I see a blank black screen with just the date / time in the upper right corner. A few seconds after that, my HP flat screen monitor(s) lose the video signal and display ugly hopping "No Input Signal" boxes.  I'd like to keep the blank black screen (It's less distracting, consumes about as much power, and allows me to unlock faster, as the monitors don't have to re-sync), so Ubuntu should keep driving the video output while the screen is locked.  How can I configure this? I'm using Ubuntu 14.04.3 LTS with the Gnome Classic Fall-back. Graphics card is NVIDIA with the open source Nouveau driver, but I also see this with an external HP NL571AA USB graphics adapter. Should I follow what was mentioned in the “duration of stay” or in the "validity of the visa"? I'm from Tunisia and I got a Schengen visa from the Austrian Embassy for  28 days, the “duration of stay”, and the number of entries is 1. But the validity of the visa is from 02/08/2015 to 13/09/2015.  Do I have to stay only 28 days, for example from 02/08/2015 to 29/08/2015 or can I stay there until 12/09/2015 ?  And if I have got to stay only 28 days, then can I choose the days of stay, that's mean can I stay in Austria for example from 09/08/2015 to 05/09/2015? Consider a common proof of the uncountability of $(0,1]$, as presented  for example:  We assume that the reals can be arranged in a sequence $x_k$, represent every number in $x_k$ by its nonterminating decimal expansion, use the diagonal argument to create a sequence of decimal digits that differs from the nonterminating decimal expansion of each number in $x_k$ and then claim that this sequence of digits so generated must be the decimal expansion of some number not in $x_k$.  My problem is with this last step. Could it not be the case that the new sequence of digits is just the terminating decimal expansion of some number already in $x_k$?  Would it not be more correct to use the sequence $x_k$ to generate a sequence of all (both terminating and non-terminating) decimal expansion of all numbers in $[0,1)$ and then apply the diagonal argument? Python Script to Add Fields to Feature Classes I have to try to add a field called 'Name' to a bunch of different feature classes using python, and then access the name of the feature class to fill in the field. I have no idea how to even start this! I know I need a loop but that's all I know. $\mathbb{R}$ \ $\mathbb{Q}$ and $\mathbb{R}^2\setminus\mathbb{Q}^2$ disconnected? Proving that $A+A \not\subset 2A $ using a particular definition for sum of sets Let $X$ de a vector space and $A\subset X$. If we define $A+B :=\{a+b|a\in A, b\in B\}$ I am trying to show that    $$ \begin{equation} 2A \subsetneq A+A, \end{equation} $$  i.e., it might happen that $2A \neq A+A$. I was able to show that $2A \subset A+A$, but I am not able to come up with a counterexample to show that the converse is not necessarily true. If I assume $A+A\subset 2A$ and let $x\in(A+A)$, then by its definition we have $x=a_1 + a_2$ for some $a_1,a_2\in A$ I guess I could naively say that $a_1+a_2 = 2(a'_1+a'_2)$ where $a_i=a_i/2$ for $i=1,2$ and I guess $(a'_1+a'_2)$ might not be an element of $A$ in some concrete case but I am not able to come up with anything and I've spent more time than I would like to admit. Any suggestions?  Thank you. Numlock turned on on boot-up I have a desktop running ubuntu 10.04  I want numlock to be turned on initially.  What do I have to change to accomplish this?  ~~edit~~  I checked in my BIOS.  It was already set up to have the numlock turned on initially.  Yet it isn't being turned on initially.  I have a USB keyboard: would that break this functionality?   Or, should I ask elsewhere (superuser, perhaps) about how to get that BOIS setting working properly? For macro photography, how do I choose between a compact camera or a mirrorless interchangeable-lens camera (without considering a lens)?   What indicator(s) should I look for when making the choice? Circle-Rectangle collision detection (intersection) How can I tell whether a circle and a rectangle intersect in 2D Euclidean space? (i.e. classic 2D geometry) A Basic Question about Gravity, Inertia or Momentum or something along those lines Using Residue Theorem find $\displaystyle \int_0^{2\pi} \frac{1}{a^2\cos^2 t+b^2 \sin^2 t} dt \;; a,b&gt;0$.   My Try:  So, I am going to use the ellipse $\Gamma = \{a\cos t+i b \sin t: 0\leq t\leq 2\pi\}$.   On $\Gamma$, $z=a\cos t+i b \sin t$, so $|z|^2=z\bar{z}=a^2\cos^2 t+b^2 \sin^2 t$.   Now, $dz=-a\sin t+i b \cos t dt$.   Hence, the integral becomes $\displaystyle \int_\Gamma \frac{dz}{z(iab+(\sin t \cos t)(b^2-a^2))}$. I know that $\displaystyle \int_\Gamma \frac{dz}{z}=2\pi i$. Now, how do I get rid of $\sin t \cos t$ part? I am stuck here. Can somebody please explain how? What procedure should be followed post spilling fluids onto a MacBook keyboard? I know the first thing to do is dry with a towel the majority of the fluid. Next is to turn off the computer. Then flip over the laptop itself and whilst upside down cool dry the keyboard with a hairdryer for a few minutes. Also leave the computer upside down for a day or so. Is there anything I’m missing? Command line option to check which filesystem I am using? Is there a command that will show which file system (ext3, ext4, FAT32, ...) the various partitions and disks are using?   Similar to how sudo fdisk -l lists information about disks and partitions? How do I find the package that provides a file?