using .NET Regex.Replace() to replace expression more than once
My regex is matching too much. How do I make it stop?
Where are the necessary places to be appended with % to remove unwanted spaces? I have  experience where empty spaces cause unwanted effects. It is not easy to trace the cause of these unwanted effects. In order to eliminate any doubt, I often overuse % as follows.   \usepackage% [% left=3cm, right=3cm% ]% {geometry}   or  \newcommand{\mycommand}% {% This is my command.% }   I got an extreme example that will break what Leo Liu said     In fact, only spaces which would be   output have to be removed by comment.   The following code does not produce output, but we cannot remove the % and leave a blank line between two elements of a list below.  \newpsstyle{gridstyle} { gridwidth=0.4pt, % griddots=0 }   Shortly speaking, where are the necessary places to be appended with % to remove unwanted spaces? To make Latin-letter variables bold I can use e.g. \mathbf{a}, but while putting Greek letters or symbols such as \nabla inside \mathbf doesn't cause any errors or warnings, it also doesn't do anything else.  What is the best way to make bold math symbols, in particular Greek letters and \nabla? How to use GCC 4.7 in place of 4.6? So I'm working on a project and I wanted to use some C11 features for C. To use those features GCC 4.7 is required, so I went to synaptic and looked up 4.7, and I found the packages gcc-4.7-base so I installed it[1].   So now that gcc-4.7-base is installed I expected to be able to use 4.7, but no, when I do gcc --version it still shows 4.6.3 even more, when I try to directly call 4.7(via /usr/bin/gcc-4.7) it doesn't exist, though a gcc-4.6 executable does exist.  How do I "activate" GCC 4.7? I read , you do some crazy stuff with update-alternatives, but it doesn't work for me as the gcc-4.7 executable doesn't actually exist on my machine.   Notes: 1. I also saw gcc-4.6-base, so I figured I'd uninstall it, but synaptic attempted to remove every package I had installed and install a Java runtime, so for obvious reason I decided not to remove it. $127$ has an interesting property: It is the $31$st prime number and its rank ($31$) is also a prime. $31$ is the $11$th prime so its rank is also a prime. $11$ is also a prime number with a rank ($5$) that is also a prime. $5$ is the 3rd prime number and and so its rank ($3$) is also a prime. And finally $3$ is the $2$nd prime so its rank is also a prime... Is there a name for primes whose rank (index in the prime series) is also a prime? That is:     If $a_i$ is the $i$th prime number, then $i$ is a also a prime.   How about numbers like $127$ where going down ranks of ranks always produce prime numbers (down to rank $2$ of course)? The first $11$ :-) primes in this (infinite) series would be:  $3, 5, 11, 31, 127, 709, 5381, 52711, 648391, 9737333, 174440041, \dotsc$  Many thanks! At the moment I'm working with the . For this I read the following paper: .  But I have some mathematical problems with this formalism. I don't really see why this is a variation principle since it is opartor-valued.   The action principle is defined by: $\delta S  = G_1 -G_2$, where $S$ is the action operator $S = \int_{t_1}^{t_2} dt ~L$ and $G$ the generator operators of the transformations.  What does it mean that the action principle is operator-valued? For the classical action where $S$ is real we search for a stationary point but for operators? I also have a problem that $\delta S \neq 0$. What interpretation has this additional term $G_1 - G_2$? I had this question:    All 3 responses were rated at 1 when the bounty expired. Nothing got selected as the "best answer", and I can't even manually select an answer. Turn off automatic preview in apple mail Prove that $\frac{ 5^{125}-1}{ 5^{25}-1}$ is a composite number This is supposed to be related to the  (my justification for the independence tag). In Williams' Probability with Martingales, 2BCL is proven and then the following is given as an exercise:  Prove $S \doteq \sum_{n=1}^\infty p_n &lt; \infty \implies \prod_{n=1}^\infty (1-p_n) &gt; 0$ assuming $0 \leq p_n &lt; 1$. Hint: Show that $S &lt; 1 \implies \prod_{n=1}^\infty (1-p_n) \geq 1 - S$.   Proving the hint: I tried to find $\{a_n\}$ s.t. $$\prod_{n=1}^\infty (1-p_n) \geq \prod_{n=1}^\infty e^{a_n} = e^{\sum_{n=1}^\infty a_n} \geq 1 - \sum_{n=1}^\infty a_n \geq 1 - S &gt; 0$$ That is, find $\{a_n\}$ s.t.: 1a. $1 - p_n \geq e^{a_n}$ 1b. $a_n \leq p_n$ I thought of $a_n = \ln(1-p_n)$ (a reason why $p_n &lt; 1$, I guess) Is that right? Edit: Actually, assuming my proof is right, is $S &lt; 1$ used in the proof? If so, where?  From Williams book: Getting opencv error in c++ Is it possible to prevent LUDecomposition from pivoting? The PHB states: "A familiar can’t attack, but it can take other actions as normal."  What can a familiar do? Can it use a potion of healing on a character? Can it drop caltrops? How to send parameter from jsp page to jasper file Number of automorphisms of a direct product of two cyclic $p$-groups Suppose I have some theorem in the paper  Section 1 Theorem 1.1. Let ...  And then later in the paper I want to recall the theorem by reprinting it  Section 4 We recall Theorem 1.1: Theorem 1.1. Let ...  What's the proper way to do this? Why do close votes expire? I nominated  to be closed as a dup. I see that two other people upvoted my comment, so they might have voted to close it as well. Now, we didn't gather enough votes, and all close votes expired ... and I can't re-vote to close. What is the motivation behind expiring close votes ... especially for close-as-duplicate? Update: Please take into consideration:  Beta Stack Exchange sites have a smaller community, and fewer people with voting privileges Closing as a duplicate is &quot;usually the right thing&quot; IMHO - much less controversial than closing as off topic. After a vote is reset, the original users can't vote again. On a small site, this makes it even harder to get a consensus of five votes. Any idea why the piece of code below does not add the script element to the DOM?  var code = "&lt;script&gt;&lt;/script&gt;"; $("#someElement").append(code); Proof that disjoint cycles commute I'm trying to prove that in a symmetric group two disjoint cycles commute. But I suspect that something is not right about my proof (a sense of vagueness). Some hints would be appreciated.  Here's my proof:  Let $\sigma=(s_1 s_2 ... s_n)$, $\tau=(t_1 t_2 ... t_m)$ for some integers $m, n$. That is, $s_i \neq t_j$ for any $i \in [1, n]$, $j \in [1, m]$. Now, $\sigma\tau=(s_1 ... s_n)(t_1 ... t_m)$ is a cycle of disjoint permutations, which cannot be represented by any other disjoint permutations. Thus $\sigma\tau=\tau\sigma$. Was Mjolnir ever used for building something? In the movie Thor (2011), while he was about to crown Thor as the next king of Asgard, Allfather Odin describes the mighty hammer Mjolnir as the following:      So long entrusted with this mighty hammer, Mjolnir. Forged in the heart of a dying star, from the sacred metal of Uru. Only one may ift it. Only one is worthy. Who wields this hammer commands the lightning and the storm. Its power has no equal -- as a weapon, to destroy, or as a tool, to build. It is a fit companion for a King.   We know Mjolnir as a weapon of destruction but are there references where it is used to build something? Multiple Linked Objects with unique Materials / Group Materials override