I want to modify the catcode of comma, with the following code  \documentclass{article} \AtBeginDocument{%   \catcode`\,=\active   \protected\def,{...}% } \begin{document} a,b,c $a,b,c$. \end{document}   I get the following error message:  ! Missing control sequence inserted. &lt;inserted text&gt;                  \inaccessible  l.6 \begin{document}   But with the following code, I get correct result:  \documentclass{article} \begingroup   \catcode`\,=\active   \protected\gdef,{...}% \endgroup \AtBeginDocument{%   \catcode`\,=\active } \begin{document} a,b,c $a,b,c$. \end{document}   I'm wondering what are the differences between these two ways. Why the first way causes problem?  Edit: Althougn David Carlisle give another related question, but I think this question maybe not the same as that question, since both examples contains  \AtBeginDocument{%   \catcode`\,=\active }   I could not understand why only one example causes problem.
I have a very simple question. When I do this:  \catcode`\@=0 \catcode`\\=11 @mycommand{a} @catcode`@\=0 \catcode`\@=11   It works perfectly and calls \mycommand correctly. However, when I try to define \mycommand with similar trickery:  \newcommand\mycommand[1]{   \catcode`\@=0   \catcode`\\=11   @textbf{Hello #1}   @catcode`@\=0   \catcode`\@=11 }   compilation stalls and gives me the * prompt. If I give it Ctrl+D, it terminates without producing any output. Indeed, it seems that changing the catcodes inside a command has no effect whatsoever, because the following works perfectly (whereas, from my understanding, it shouldn't):  \newcommand\mycommand[1]{   \catcode`\@=0   \catcode`\\=11   \textbf{Hello #1} }   Can anybody please explain to me what's happening?
Can you win a game of Splendor if you still have cards in reserve? Question mark and colon in JavaScript Who uses Dual_EC_DRBG? Recent news articles have suggested that the NSA may be involved in trying to influence the cryptography in public standards or commercially deployed software, to enable the NSA to decrypt the encrypted traffic.  For example, .  The New York Times article specifically mentions a 2006 NIST standard, where two Microsoft engineers later discovered a serious problem in the scheme.  The New York Times article explains how the standard was written by the NSA, who pushed the scheme hard:     Simultaneously, the N.S.A. has been deliberately weakening the international encryption standards adopted by developers. One goal in the agency’s 2013 budget request was to “influence policies, standards and specifications for commercial public key technologies,” the most common encryption method.      Cryptographers have long suspected that the agency planted vulnerabilities in a standard adopted in 2006 by the National Institute of Standards and Technology, the United States’ encryption standards body, and later by the International Organization for Standardization, which has 163 countries as members.      Classified N.S.A. memos appear to confirm that the fatal weakness, discovered by two Microsoft cryptographers in 2007, was engineered by the agency. The N.S.A. wrote the standard and aggressively pushed it on the international group, privately calling the effort “a challenge in finesse.”    After some sleuthing, I'm pretty certain this is a reference to the  pseudorandom number generator scheme described in NIST SP 800-90.  The weakness is that Dual_EC_DRBG appears to contain a backdoor, and anyone who knows the backdoor can totally break the PRNG.  The weakness was first described in  and was subsequently .  As a consequence, there are now good reasons to suspect that Dual_EC_DRBG contains a NSA backdoor, and the NSA might be able to spy on anyone who is using Dual_EC_DRBG.  My questions:   Who uses Dual_EC_DRBG? Do any commercial products use Dual_EC_DRBG? Does anyone use it? sed one-liner to delete everything between a pair of brackets? I am working with some text that is full of stuff between brackets [] that I don't want. Since I can delete the brackets myself, I don't need the one-liner to do that for me, but I do need a one-liner that will remove everything between them.  What about parentheses () instead of brackets? Can magnets rotate infinitely? There are many videos on youtube in which people arranged magnets in circle and rotated one placing in middle of that circle on a shaft, and the magnet (magnet motor) starts madly and continues its movement. Do they really rotate infinitely? If so, do they from where they get that extra energy to move so fast and infinitely?    EDIT: This question is about real world scenario  UPDATE: I am unable to find that particular video about which i talked about -- I added them to my favourites, but they are all now deleted :( -- there are hundreds of that that kind of videos. Some example videos links Why does WCF return myObject[] instead of List like I was expecting? I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize?   The standard rule you always hear:     “If a person knows which item you are talking about then use "the"   . . . doesn’t clear things up for me, as I have no idea whether or not they know. Where do the American and Japanese Transformers franchises meet? The original Transformers TV series was created by the American company Hasbro, and was adapted into Japanese as well. At some point, the Japanese franchise split off into its own continuity, launching its own set of sequels and spin offs.  The questions is: What part of the American franchise is considered canon by the Japanese one? Minor details such as name changes are not to be taken into consideration. in my bash loop over a list of some servers, if the ssh connects the bash script exits My Bash Prompt is currently setting the xterm titlebar using the following sequence:  PS1='\033]0;\u@\h&gt;\w\007'   Is there an easy way to display the current command in the titlebar. For example, if I am tailing a file using tail -f foo.log, I want my titlebar to say tail -f foo.log. Probability of complete coupon set in $K$ boxes where a box has $N$ distinct coupons? Degree of minimum polynomial at most $n$ without Cayley-Hamilton? I installed the VMware bundle on my Ubuntu 11.04 successfully but when I open it it gives me this window     and I don't know the path to this C headers. Is there any function that converts an escaped Url string to its unescaped form? System.Web.HttpUtility.UrlDecode() can do that job but I don't want to add a reference to System.Web.dll. Since my app is not a web application, I don't want to add a dependency for only using a function in an assembly.  UPDATE: Check  about the same issue. These two operators commute...but their eigenvectors aren't all the same. Why? Boxplot interpretation: is it correct that a boxplot is missing a whisker? In Portal, we are promised cake and a party at the end of our tests. However;       we soon discover that the cake is a lie.     Then, at the final scene;       there really is a cake (and my companion cube is waiting for me).   What's the meaning of this?  Was GLADOS not deceiving me? Her comments seem to suggest that;       ...she had the intention of killing me. Was the cake for us (player) and not for the character in the game? What is the "last" data that get's backed up, when running pg_dump on a live server? I'm wondering: If I start doing a pg_dump of a very large database (it would take hours), that is still running actively receiving writes, what is then the last data that goes into the backup? Is it:   The data as-it-was, at the point in time where the pg_dump command was initiated. The last changes that it encountered at some point where it was dumping that individual record. Something else.   Bonus question: If I'm trying to dump a database as part of trying to rescue it from corrupt data, will it then make any difference whether I use the directory format or the custom format? Default Class Accessibility in C# by default is a class:   private ? internal ?  sealed ? $(\Bbb R,+)$ is a topological group. Is there any other group structure on $\Bbb R$ such that it is still a topological group and this group is not isomorphic to $(\Bbb R,+)$ ?  Refer to  for the general problem. In that problem I have conjectured that there is no such group however I couldn't prove it.