I asked  and it was put on hold as opinion based in less than an hour. A few months ago, I asked another question about good practices and it got squashed quickly as well. I didn't realize good practices were so opinion based. I thought it was an agreed upon set of standards (unique to each language) that seasoned programmers agreed on.   I'm trying to learn programming, and the Stack Exchange sites are a big source of help. Books don't offer a lot of help about specific best practices. So I figured this would be a good place to get the information from people that write code regularly and really know what is expected and allowed in production code.  Are questions about best practices on topic for Stack Exchange? And if not, why?
I've written a few questions on Stack Overflow before that have been closed due to being "not constructive" or "not a real question".  Now, after scanning the FAQ for the site a few times, I understand that my questions were indeed closed for good reason.  However, even after reading the FAQ, I still don't understand why a question of "what's the best practice here?" is a bad thing.  I feel as though if you properly explain your situation as thoroughly as possible, then it shouldn't be a bad question at all.  Questions like "what's the best language?" or "which framework should I use?" are indeed bad questions initially, but I feel if you specify in the post (or preferably in the title itself) what the context is, shouldn't that be deserving of some kind of an answer?  In  I asked what would be "best practice", and naturally my question was closed.  So I read the FAQ and learned how to make a more constructive question, of which I've now re-edited in an attempt to be less vague.  I understand the desire to avoid debate and lengthy discussion over a question, but I also feel as though sometimes there are certain questions which should be asked if proper context is given.  Why is a question over "best practice" always a bad question to ask?
Can I have dynamic custom variables in Word? I'm basically trying to create a variable in a document, let's say the name of a person, so that I can change the value in a single place and it updates through the whole document.  I've been reading about Fields and about a DOCVARIABLE, but I can't find where to edit the value (right clic didn't show an "edit" option). I'm using Word 2011 for Mac (that's what we have at work right now) so I'm wondering whether this version of Word is just not intuitive, or I cannot have variables like that in Word and I'm misinterpreting the documentation.  This is what I intend to do:  Hello, my name is PERSON_NAME, I have PERSON_AGE years old.   You get the idea.  PS: We actually want to modify the variables' values from our app, rather than from Word itself, kind of like injecting values to a .*docx file. The Problem  Currently if I flag a post, I cannot check the status of the flag unless I have prior helpful flags. This means, for example, that a new user who wants to check the status of his first flag cannot do so while it is pending (active).  This feature request is based on my experience on MSO, where I wanted to check the status of my flag but could not get to the summary page without cheating (tweaking my SO link to work with MSO). It also stems from this question, where the OP indicates he had the same issue:   My Proposal  If I have flagged any post, then show me a "flags" link (red arrow in image below). If I have any helpful flags, then the number of helpful flags should be displayed (blue arrow). If I have not flagged anything, then neither should be displayed (as with current site functionality). Isomorphism between $\mathfrak o(4,\mathbb R)$ and $\mathfrak o (3,\mathbb R) \oplus\mathfrak o (3,\mathbb R) $ Can we have a way to edit bounty custom message? Is there an IDictionary implementation that, on missing key, returns the default value instead of throwing? The indexer into Dictionary throws an exception if the key is missing.  Is there an implementation of IDictionary that instead will return default(T)? I know about the TryGetValue() method, but that's impossible to use with LINQ. Would this efficiently do what I need?: myDict.FirstOrDefault(a =&gt; a.Key == someKeyKalue);  I don't think it will as I think it will iterate the keys instead of using a Hash lookup. How do I grep for lines containing either of two words, but not both? I'm trying to use grep to show only lines containing either of the two words, if only one of them appears in the line, but not if they are in the same line.  So far I've tried  grep pattern1 | grep pattern2 | ... but didn't get the result I expected. The axiom of extensionality is:  ${\forall}a({\forall}b({\forall}c(((c{\in}a){\iff}(c{\in}b)){\iff}(a=b))))$  The definition of $(P{\iff}Q)$ is:  ${\lnot}((P{\implies}Q){\implies}({\lnot}(Q{\implies}P)))$  or, in other words  $(P{\land}Q){\lor}({\lnot}P{\land}{\lnot}Q)$  In the case of the statement $((c{\in}a){\iff}(c{\in}b))$, this leads us to two options: $((c{\in}a){\land}(c{\in}b))$ and $({\lnot}(c{\in}a){\land}{\lnot}(c{\in}b))$. So far nothing weird. Now, let's see all the possible results of the axiom.  1.$((c{\in}a){\land}(c{\in}b)){\land}(a=b)$ 2.${\lnot}((c{\in}a){\land}(c{\in}b)){\land}{\lnot}(a=b)$ 3.$({\lnot}(c{\in}a){\land}{\lnot}(c{\in}b)){\land}(a=b)$ 4.${\lnot}({\lnot}(c{\in}a){\land}{\lnot}(c{\in}b)){\land}{\lnot}(a=b)$  Coincidentally, they are also all possible statements regarding the statements $((c{\in}a){\land}(c{\in}b))$ and $(a=b)$: both parts are true, the first part is true and the other is false, the second part is true and the first is false and neither is true. The axiom seems not to state anything new, because rephrased it's just produces a list of all possible options regarding the two parts of the statement. Worse, it doesn't seem to say anything about equality, since it allows for $a=b$ with both $(c{\in}a){\land}(c{\in}b)$ and ${\lnot}((c{\in}a){\land}(c{\in}b))$. So, what is the point of this axiom? And in what way does it say anything about equality? What kind of questions can I expect to see on a qualifying exam? I am comfortable with the different sizes of infinities and Cantor's "diagonal argument" to prove that the set of all subsets of an infinite set has cardinality strictly greater than the set itself. So if we have a set $\Omega$ and $|\Omega| = \aleph_i$, then (assuming continuum hypothesis) the cardinality of $2^{\Omega}$ is $|2^{\Omega}| = \aleph_{i+1} &gt; \aleph_i$ and we have $\aleph_{i+1} = 2^{\aleph_i}$.  I am fine with these argument.  What I don't understand is why should there be a smallest $\infty$? Is there a proof (or) an axiom that there exists a smallest $\infty$ and that this is what we address as "countably infinite"? or to rephrase the question "why can't I find a set whose power set gives us $\mathbb{N}$"?  The reason why I am asking this question is in "some sense" $\aleph_i = \log_2(\aleph_{i+1})$. I do not completely understand why this process should stop when $\aleph_i = \aleph_0$.  (Though coming to think about it I can feel that if I take an infinite set with $\log_2 \aleph_0$ elements I can still put it in one-to-one correspondence with the Natural number set. So Is $\log_2 \aleph_0 = \aleph_0$ (or) am I just confused? If $n \rightarrow \infty$, then $2^n \rightarrow \infty$ faster while $\log (n) \rightarrow \infty$ slower and $\log (\log (n)) \rightarrow \infty$ even slower and $\log(\log(\log (n))) \rightarrow \infty$ even "more" slower and so on).  Is there a clean (and relatively elementary) way to explain this to me?  (I am totally fine if you direct me to some paper (or) webpage. I tried googling but could not find an answer to my question) Layover at Narita, Japan. Do I need a transit visa? Using a keyboard shortcut to paste text I have seen many softwares such as Update Manager and Synaptic Package Manager, they wait if some other program is using the /var/lib/dpkg/lock and is locked. How can we do this through the Terminal? I saw apt-get's manual but didn't find anything useful. For every $p\in [1,\infty)$, consider the set $\ell^p$ of real sequences $x=(x_n)=(x_1,x_2,\ldots)$ such that $\sum_{n=1}^\infty |x_n|^p&lt;\infty$. This is a Banach space with the norm $\Vert x\Vert_p=(\sum|x_n|^p)^{1/p}$.  I have the following problem:     Is it true that $\ell^p=\bigcup_{1\leq q&lt;p}\ell^q$ for $p&gt;1$?   I don't think it is true, but I'm having problems to show this. Clearly, the statement is true for some $p&gt;1$ iff it is true for every $p&gt;1$.  I'm trying to find a sequence $(a_n)$ such that $\sum |a_n|^s$ converges iff $s\geq 1$. I've tried many sequences (such as $(n^{1+1/n})$, involving $\log$, etc...), but none of them worked. Prove that : $\displaystyle \lim_{n\to \infty} \frac{1}{n+1}+\frac{1}{n+2}+\frac{1}{n+3}+\cdots+\frac{1}{2n}=\ln 2$    the only thing I could think of is that it can be written like this :  $$ \lim_{n\to \infty} \sum_{k=1}^n \frac{1}{k+n} =\lim_{n\to \infty} \frac{1}{n} \sum_{k=1}^n \frac{1}{\frac{k}{n}+1}=\int_0^1 \frac{1}{x+1} \ \mathrm{d}x=\ln 2$$  is my answer right ? and are there any other method ?(I'm sure there are) Typsetting the Ponny Today, once again, the  came to my attention and I have decided to try to  using XeLaTeX. The result is far from perfect, worse even than Chrome's rendering.  Is there a way I can improve the result? Is XeLaTeX and LuaLaTeX incapable of handling the Ponny?  :  \documentclass[]{article} \usepackage{lmodern} \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \usepackage{fontspec} \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} \IfFileExists{upquote.sty}{\usepackage{upquote}}{} \IfFileExists{microtype.sty}{\usepackage{microtype}}{} \usepackage[normalem]{ulem} \setmainfont{Doulos SIL}  \title{html - RegEx match open tags except XHTML self-contained tags - Stack Overflow} \date{} \author{StackOverflow}  \begin{document} \maketitle  Rege̿̔̉x-based HTML parsers are the cancer that is killing StackOverflow \emph{it is too late it is too late we cannot be saved} the trangession of a chi͡ld ensures regex will consume all living tissue (except for HTML which it cannot, as previously prophesied) \emph{dear lord help us how can anyone survive this scourge} using regex to parse HTML has doomed humanity to an eternity of dread torture and security holes \emph{using rege}x as a tool to process HTML establishes a brea\emph{ch between this world} and the dread realm of c͒ͪo͛ͫrrupt entities (like SGML entities, but \emph{more corrupt) a mere glimp}se of the world of reg​\textbf{ex parsers for HTML will ins}​tantly transport a p\emph{rogrammer's consciousness i}nto a w\emph{orl}d of ceaseless screaming, he comes\sout{, the pestilent sl}ithy regex-infection wil​\textbf{l devour your HT}​ML parser, application and existence for all time like Visual Basic only worse \emph{he comes he com}es \emph{do not fi}​ght h\textbf{e com̡e̶s, ̕h̵i}​s un̨ho͞ly radiańcé de\emph{stro҉ying all enli̍̈́̂̈́ghtenment, HTML tags \textbf{lea͠ki̧n͘g fr̶ǫm ̡yo​͟ur eye͢s̸ ̛l̕ik͏e liq}​uid p}ain, the song of re̸gular exp​re\sout{ssion parsing} will exti\emph{​nguish the voices of mor​\textbf{tal man from the sp}​here I can see it can you see ̲͚̖͔̙î̩́t̲͎̩̱͔́̋̀ it is beautiful t​}he f\texttt{inal snuf}fing o\emph{f the lie​\textbf{s of Man ALL IS LOŚ͖̩͇̗̪̏̈́T A}}\textbf{LL I​S L}OST th\emph{e pon̷y he come}s he c̶̮om\sout{es he co}\textbf{\sout{me}s t\emph{he} ich​}or permeat\emph{es al}l MY FAC\emph{E MY FACE ᵒh god n\textbf{o NO NOO̼}}\textbf{O​O N}Θ stop t\emph{he an​*̶͑̾̾​̅ͫ͏̙̤g͇̫͛͆̾ͫ̑͆l͖͉̗̩̳̟̍ͫͥͨ}e̠̅s\texttt{ ͎a̧͈͖r̽̾̈́͒͑e} n\textbf{​ot rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆ ZA̡͊͠͝LGΌ ISͮ̂҉̯͈͕̹̘̱ T}O͇̹̺ͅƝ̴ȳ̳ TH̘\textbf{Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝}S̨̥̫͎̭ͯ̿̔̀ͅ  \end{document}   UPDATE  Using the Doulos SIL font gets me something closer to what Firefox renders but still far from perfect. How do I get the source code for eglibc in a format that will allow stepping through the source with gdb?    I have tried using apt-get source libc6-dev and that works for getting the source code, but I think that since the pre-processor directives were not applied that the line numbers that gdb has does not match with the source I downloaded. This makes it less useful when trying to step through the source and look at how functions in libc are working. Left/Right across multi-line equation I have a multi-line equation that I want to have matching sized parentheses. The advice I read online was to use \left( equation \right. \\ left. rest-of-equation \right) . However, this syntax leaves first half of the equation unaware of what is in the second half. For example, if you include a square root term after the break, the second parenthesis will be larger than the opening parenthesis. When you are using the aligned environment to split a long equation this can look somewhat offputting.    Compare the top equation to the bottom one. The parentheses match in size for the bottom equation, but the left hand parentheses for the top one is  noticeably smaller.  Top Code:   \begin{aligned}[t]   \gamma_{\text{u}} + \frac{1}{108}   \left(57\gamma_{\text{er}} \right. &amp;+  38\gamma_{\text{se}}\\ &amp; {}\pm  \left.\sqrt{2601 \gamma_{\text{er}}^2 + 3648  \gamma_{\text{er}}\gamma_{\text{se}} + 1444 \gamma_{\text{se}}^2}  \right)   \end{aligned}   Bottom Code:  \begin{aligned}[t] \gamma_{\text{u}} + \frac{1}{16} \left(9\gamma_{\text{er}}  +  6\gamma_{\text{se}} \pm  \sqrt{49 \gamma_{\text{er}}^2 + 76 \gamma_{\text{er}}\gamma_{\text{se}} + 36 \gamma_{\text{se}}^2} \right) \end{aligned} I have an Ubuntu Server 10.10 32-bit in my home. I'm making SSH connections to it from my PC via Putty.  The problem is, sometimes I'm able to login seamlessly. However, sometimes it gives me an error like this: Network error: Connection refused.  Then, I dont't change anything, try to login a few times more, wait a while and try again. Sometimes I can log in, sometimes I cannot. It seems pretty random to me.  What can I do to solve this?  Edit:  And Sometimes, Putty gives Network error: Software caused connection abort error after displaying login as: text.  Here is the ping -t output:  Pinging 192.168.2.254 with 32 bytes of data: Reply from 192.168.2.254: bytes=32 time=6ms TTL=64 Reply from 192.168.2.254: bytes=32 time=65ms TTL=6 Reply from 192.168.2.254: bytes=32 time=88ms TTL=6 Reply from 192.168.2.254: bytes=32 time=1ms TTL=64 Reply from 192.168.2.254: bytes=32 time=3ms TTL=64 Reply from 192.168.2.254: bytes=32 time=1ms TTL=64 Reply from 192.168.2.254: bytes=32 time=1ms TTL=64 Reply from 192.168.2.254: bytes=32 time=1ms TTL=64 Reply from 192.168.2.254: bytes=32 time=1ms TTL=64     I turned off firewall of router, and everything seems to work now. Except for that, I still can't enter my web server by typing external IP from my PC. I followed Mike's solution from my first question:    My next question is how to add entries (for the abstract and acknowledgements pages) into the table of contents. Check if all elements in a list are identical