Why some examples are using &quot;endl&quot; instead of &quot;\n&quot;? I heard that processing time of &quot;endl&quot; is longer than &quot;\n&quot; because &quot;endl&quot; has some flushing process. But, there are so many examples using &quot;endl&quot; on the internet. I wanna know why they're using &quot;endl&quot; which thought to be inefficient. Sorry for the awkward English...... Thanks
15270
Many C++ books contain example code like this...  std::cout &lt;&lt; "Test line" &lt;&lt; std::endl;   ...so I've always done that too. But I've seen a lot of code from working developers like this instead:  std::cout &lt;&lt; "Test line\n";   Is there a technical reason to prefer one over the other, or is it just a matter of coding style?
54499
When should whilst be used instead of while?  For example, should I use the first or the second sentence?      They don't do this whilst they do that.   They don't do this while they do that.   Which would be correct?
43165
Both uses of the \let primitive often lead to the same result. Is this even true for every case? What was the thought process behind it. And if they are actually not equivalent, are there particular situations in which you can only use one or the other?  Addendum  Summary  As your plenty and nice answers show, there are cases in which you clearly have to respect one of the variations (for instance regarding assignments to '=' and macros that check for spaces). These were totally understandable points and they explain a lot. Now, @Werner's answer confirmed one ingenuous thought of mine:     "The use of = is purely to emphasize the fact that an assignment is being made [...]"   Moreover Knuth himself seem to have intended the synopsis including the '=', though he also used the other way. Why did he include it then? It will probabilly have to do with the exact meaning of the TeX source snippet cited by @Werner. To be honest, I don't know WEB either, but if there is someone who does, can he explain it (in very easy terms) by adding an edit to his answer? New answers are clearly welcome too.  Side Note  As an element of a gray area I found an example where using the syntax including the equal sign causes "difficulties":  If you have control sequences which need the 'csname-expandafter' mechanism, and you want to stick to the minimal exploitation of \expandafter by saying  \expandafter\let\csname foo1\expandafter\endcsname\csname bar1\endcsname   you can't add an equal sign because it would distract TeX from reading the \expandafters correctly. To get the equal sign work you would need to use the slightly unhandier version  \expandafter\let\csname foo1\expandafter\endcsname\expandafter=\csname bar1\endcsname
41583
I accidentally, discovered that using | in text mode produces an em dash. I did a quick search, but I could not find a reference where this is noted. I wonder if there is any difference between this and ---? Otherwise, it seems easier to just type one character instead of three.
67676
What is the correct way to center figures and tables (figure, table)?  \begin{center} ... \end{center}   or   \begin{centering} ... \end{centering}
59792
In several discussions about relatives merits of LaTeX v. xml, a xml supporter complained that in LaTeX sections, subsections etc are not properly closed, so it is hard to tell where a section ends.  Of course it is typically possible to recognize an end of a section, but there is actually a number of ways how a section can end: start of another section, start of the next chapter or part, start of \endmatter, bibliograpy, index, etc, or the end of document.  That makes it hard if you want to write a script that would in some way manipulate sections (change their order, write each of them into a separate file, ...).  The same is of course true for subsections, paragraphs etc.   One answer to that is that it is actually possible in LaTeX2e to use sectioning commands as environments, and write   \begin{section}{Blah blah}    ... \end{section}   and because of the way environments are handled in LaTeX2e, it will work.  I he recently seen several comments discouraging such use of regular commands as environments, and it seems that in LaTeX3 it will no longer be possible (on the other hand, it seems that you will be able to define a section environment without causing a conflict with the \section command).   I wanted to know what people think about using sectioning commands as environments.  Is it a good idea, is it OK, or should it not be done?
9464
I was having some thought about what would be the syntax to make the end point evaluation of derivatives or integrals. Such as making the | with the two end points of evaluation on the top an bottom of the line. Any suggestions would be wonderful.
20755
What is the difference between ( and \left( in LaTeX? Sometimes, when the content is small, it does not seem to matter which pair I use.  What is the best practice when it comes to which parentheses use?
107940
In school, we were taught to end each list item with a semicolon. But I have never actually seen this. Can somebody please confirm this? Should we end each list item with anything at all?  I've seen people use periods after each list item, colons, and even commas. But I've never seen a semicolon at the end of each item — and even if I have, it would be that rare that I've forgotten.  Example:   item; item; item; item
59676
What exactly do \csname and \endcsname do? What are their job? I have glanced at the Texbook and some other books, but none of them was clear enough to me. Can anyone please give a simple example to clarify this issue?
67046
I'm looking for the simplest method to print the longest line in a file. I did some googling and surprisingly couldn't seem to find an answer. I frequently print the length of the longest line in a file, but I don't know how to actually print the longest line. Can anyone provide a solution to print the longest line in a file? Thanks in advance.
96075
Here is a quick question, how to use tex to print this ' symbol? An example is shown below:  data 'a list = Nil | Cons (e, 'a list)   I tried to use ' or `, but they all looks bad.. I am sorry but I am not a native English speaker, so I don't even know the name of '..   Could anyone help me on this simple problem? thank you
21492
Using the following command, could someone please explain what exactly is the purpose for the ending curly braces ({}) and plus sign (+)?  And how would the command operate differently if they were excluded from the command?  find . -type d -exec chmod 775 {} +
50285
Is there a way to substring a string in Python, to get a new string from the third character to the end of the string?  Maybe like myString[2:end]?  If leaving the second part means 'till the end', and if you leave the first part, does it start from the start?
22978
When and how do we use the different kinds of brackets/parentheses&nbsp;— (){}[]&nbsp;— while writing English (not code)?
20003
There are two forms of redirection the standard output and standard error into standard output. But which one is better? and why the &amp;&gt; is considered the perfect?  I can't find what is the differences so that many tutorials and even bash manual state that  &amp;&gt; is better!   So Why shall I use &amp;&gt; and not 2&gt;&amp;1  Mainly using bash shell    EDIT: Thanks for commentors   Only >&amp; works in csh or tcsh  In ksh only 2>&amp;1 works.  dash use >file 2>&amp;1 redirection only  Then which one to use to ensure my script is compatible with other systems whatever the used shells are!
69390
Could someone explain to me the difference between &gt; and &gt;&gt; when using shell commands?  Example:  ps -aux &gt; log ps -aux &gt;&gt; log   It seems the result is the same either way.