26 light switches flipped by multiples of 1, 2, 3, 4 .... to 26. How many light switches are flipped on?
Prison problem: locking or unlocking every $n$th door for $ n=1,2,3,...$
What is the problem with nested environments using \BODY (environ package)? This question led to a new package:      I want to define some environments, which place their content into multiple different other environments. To access the contents I used the environ package, which introduces the \BODY command. However at some point pdflatex seemed to be stuck in an infinite loop.  I reduced it to a minimal example:  \documentclass{article} \usepackage{environ}  \NewEnviron{assertion}{Assertion: \BODY} \NewEnviron{outerassertion}{\begin{assertion}\BODY\end{assertion}}  \begin{document}  \begin{assertion} test \end{assertion}  \begin{outerassertion} test2 \end{outerassertion} \end{document}   Any ideas how to work around this problem? I guess, the problem is with the \BODY command since everything works fine as long as I use it in only one of the new environments. In .NET, which loop runs faster, 'for' or 'foreach'? In C#/VB.NET/.NET, which loop runs faster, for or foreach?  Ever since I read that a for loop works faster than a foreach loop a  I assumed it stood true for all collections, generic collections, all arrays, etc.  I scoured Google and found a few articles, but most of them are inconclusive (read comments on the articles) and open ended.  What would be ideal is to have each scenario listed and the best solution for the same.  For example (just an example of how it should be):   for iterating an array of 1000+ strings - for is better than foreach for iterating over IList (non generic) strings - foreach is better than for   A few references found on the web for the same:               [Edit]  Apart from the readability aspect of it, I am really interested in facts and figures. There are applications where the last mile of performance optimization squeezed do matter. Word for an event that will likely never happen again I've read , but none of them are what I am looking for. I once read a book that used a word to describe an event that has happened in the past, but the odds were so astronomical that it will likely never happen a second time. The context I read these words in were the creation of the first life on earth (without any theological ideas). Basically, the text said that the scenario for the creation of the first living organism happened on a planet where conditions were just right by complete chance, and that the odds of this were so astronomical that it would likely never happen again anywhere in the universe over any length of time.  Sample sentence: "The creation of the first organisms was incredibly unlikely, the event can be called a _________ event, or an event that will likely never happen again."   I can't pretend to understand the validity of the claims by the text, but the words they used to describe these events were quite clever (and scientific sounding) that it would make a fun hyperbole.  I thought it was something along the lines of singularity event, but that doesn't sound quite right. What do you call a person who keeps reminding others of one’s favors for them? When you fight with a person who then keeps telling you I did that I did this for you and so on. I want to tell them that it's inappropriate to remind others of the favors you did for them, especially if I appreciate those favors and try my best to return them. How do I extract all the external links of a web page and save them to a file? Let $X$ be a normed linear space, $x\in X$ and $r&gt;0$. Define the open and closed ball centered at $x$ as  $$ B(x, r) = \{y \in X : \Vert x − y\Vert &lt; r\} $$  $$ \overline{B}(x, r) = \{y \in X : \Vert x − y\Vert \leq r\}. $$ Then $B(x, r)$ and $\overline{B}(x, r)$ are convex.  I tried to prove this, but either my calculation is incorrect, or I am on the wrong path:  I aim to show for the closed ball $\overline{B}(x,r)$ (for open ball I assume the proof is similar). Suppose $y,z \in \overline{B}(x, r)$. Then $\Vert x − y\Vert \leq r$ and $\Vert x − z\Vert \leq r$. We must show that $t \in [0,1]$ implies $ty + (1-t)z \in \overline{B}(x,r)$. But $t \in [0,1]$ implies $$ \Vert ty + (1-t)z - x\Vert = \Vert t(y-z) + z - x\Vert \leq |t| \Vert y-z\Vert + \Vert z-x\Vert \leq |t|(\Vert y-x\Vert + \Vert x-z\Vert) + \Vert z-x\Vert &lt; |t|(2r) + r = r(2|t| + 1), $$ which is not necessarily $\leq r$. We probably wanted to end up with $&lt; |t|r$ or $\leq |t|r$ as our final inequality.  Thanks in advance. MediaElement not playing audio from stream WP7 I have come across this .  Has anyone tried anything similar or does it work for you? Can you tell if an email customer / user enters is correct &amp; exists? Attending an academic conference is what type of travel? I am planning to travel to Portugal to attend an academic conference and in that regard needed a short-stay Schengen visa. The visa application has a field "Purpose of Travel" with the following options:   - Business - Sports - Cultural - Other - Study - Visiting family or friends - Medical reasons - Official visit - Transit - Airport transit - Tourism   I am attending the conference to present the research I am conducting as a part of my PhD. So "Study" is the closest in my opinion. But I don't want the Embassy to misconstrue that it is for studying at a university in Portugal. In that case, would "Business" be the right option to choose? How can I know about the type of the airplane before booking How can I know the type of an airplane before reservation? I want to know if it is Boeing or Airbus and the model if it's possible. Can I use websites such as SkyScanner for this purpose? How much effect does the Bernoulli effect have on lift? I understand that the Bernoulli effect is a flawed explanation for the cause of lift, and does not cause much at all, but how much?   Is there any experimental data on the force caused by the Bernoulli effect? Maybe implicitly through data of the pressure difference between the top and underside of an aeroplane's wings. After that, I assume I could (crudely approximating the pressure to be acting perpendicularly to the flight direction) use $\Delta P A$ to work out the net force on the plane.    Perhaps there is another way to quantitatively analyse the extent to which the Bernoulli effect causes lift.  Edit: see  short cartoon (content similar to Mike Dunlavey's answer). "Disappear" as a transitive verb Yesterday I was copying a single, 8 GB file to a USB with a slow, 7 MB/s write speed, while my RAM is 3 GB. While copying the system froze, to the point where I couldn't even move the cursor.  I managed to log into the text console, and ran iotop, it showed that a process named kswapd0 was taking 99.99% of IO.  Are there workarounds so copying a large file doesn't make my system unusable? When studying systems of linear equations, it's nice to remind people that the last column of the coefficient matrix holds the constants.  This is often done in books by putting a vertical line between the last column and the next to last column.  What is a good way to do this in LaTex? Why is part of my model not being rendered? Why is the selected object displaying in the 3D view, but not rendering?  In object mode, it shows up:   However, it does not show up in render mode:   Why is this so and what causes it to hide in render mode? What is a Generic Handler in asp.net and its use? Showing that $G/(H\cap K)\cong (G/H)\times (G/K)$ Suppose that $H$ and $K$ are normal subgroups of a group $G$ such that $HK=G$. I need to show that  $G/(H\cap K)\cong (G/H)\times (G/K)$.  So from the second isomorphism theorem we have that:  $HK/H\cong H/(H\cap K)$ which gives that $G/H\cong H/(H\cap K)$  $HK/K\cong K/(H\cap K)$ which gives that $G/K\cong K/(H\cap K)$  So we must now show that:  $H/(H\cap K)\times K/(H\cap K)\cong G/(H\cap K)$  So consider the map $\theta:H/(H\cap K)\times K/(H\cap K)\rightarrow G/(H\cap K)$ such that $\theta(h(H\cap K)\times k(H\cap K))=hk(H\cap K)$  Now this is a homomorphism and is surjective. To check injectiviy we see that if:  $\theta(h_1(H\cap K)\times k_1(H\cap K))=\theta(h_2(H\cap K)\times k_2(H\cap K))$ then we have that:  $(h_1k_1(H\cap K))=(h_2k_2(H\cap K))$ so that $(h_1k_1)(h_2k_2)^{-1}(H\cap K)=(H\cap K)$ which gives that $h_1k_1(H\cap K)=h_2k_2(H\cap K)$ So we are done.  Is the above correct?  Thanks for any help Longtable: page breaks within row possible? I am editing a longtable. Some of my cells contain a lot of text. Page breaks seem to happen only where table rows end/begin. I'd like, however, for the rows to span pages; it's fine with me if, for example, the first few lines of a row are at the end of one page and the rest of the row's lines are on the next page. "1 out of 100 chickens is" or "1 out of 100 chickens are"? Change folder permissions and ownership