How come people say "I'm friends with sb." rather than "I'm a friend with sb."?
he became firm friend or friends?
Replacements for switch statement in Python? I want to write a function in Python that returns different fixed values based on the value of an input index.    In other languages I would use a switch or case statement, but Python does not appear to have a switch statement.  What are the recommended Python solutions in this scenario? series of young adult science fiction books from early 1980s about last of a race of martial experts that sees the destruction of his home planet I remember that the main character is trying to find the group that destroyed his home planet while he was on a mission. His planet was very difficult to live on and the people became expert in martial arts and were the best soldiers in the galaxy. They were mercenaries and often helped against tyrants. There was a very memorable section in at least one book about an initiation task that the main character had to do in that he had to survive in their wilderness for days. He was at some point surrounded in a old building by thousands of poisonous worm/snake creatures that he managed to survive until rescued by the leaders. Image with axis Sort order in Windows Explorer The behaviour described below occurs on Windows-7 systems and on Windows XP. We operate in a dual-language environment - English and Hebrew.  When in Windows Explorer we sort files by name, the order in which they are listed is not what we would expect. Here is a list of file names as sorted by Windows Explorer (all of the files have a .pdf suffix):   1G110033H-PP 19C050G-PP-ORB 19C050H-PPRM 19C100H-PPRM 19C-MBPS-PP 19C-MBPS-PP-1 29AAC050-PP 29AAC100-PP 29AAC100-PPUL   29B004064-PP 101AC050-PP 101AC100-PP 101B100-PPE 1091003G-PPFSUL 10108033G-PPSA 10125033H-PPM     It looks to me that first the items are sorted according to the position of the first alphabetic character in the name, and then, within those groups, they are sorted in "normal" alpha-numeric order.  That is, all the files with an alpha character in the first position are on top of the list, followed by those with the first alpha character in the second position, followed by those with the first alpha character in the third position, and so on.  An alternate way of looking at this is that, in a file name composed of numbers and letters, the sort treats the first group of numbers in the name as the major sort node, with the rest of the name being the secondary sort node.  Now that I understand the sequencing logic, it's not a big problem, but I was wondering why this happens? If we have a complex scalar $\phi$ we know that the gauge-invariant interaction with $A$ is given by $A^\mu J_\mu$, where $J$ is the Noether current of the $U(1)$ symmetry of the Lagrangian $$ J_\mu\sim \phi^\dagger\partial_\mu\phi-\phi\partial_\mu \phi^\dagger \tag{1} $$  If we have a real scalar instead, $J=0$ and the field doesn't couple to $A$: real particles aren't charged.  My question is: what if we took $$ J_\mu\sim \phi\partial_\mu\phi \tag{2} $$ to couple $\phi$ to $A$? The interaction is Lorentz invariant and renormalisable, but it is not gauge-invariant, which is probably a bad thing. At what point would this theory break down?  This is probably very naïve, but I think that the Feynman rules for this theory are straightforward. So I guess the theory makes sense at least perturbatively. The theory is probably flawed at a more fundamental level, but I cant't seem to find where (some kind of gauge anomaly perhaps?) I have 2 columns in Excel: the first contains a list of employee names who perform function A, and the second contains a list of employee names who perform function B.  What I want is to identify, in one cell, if there is one employee whose name appears in both the first and second columns. It does not have to show which name(s) appears in both columns, it just needs to identify IF there are any names that appear in both columns. How to backup all my data from a server? Finding the conjugate hyperbola Assume we are given a general proper hyperbola $  a_{11}x^2 + 2 a_{12} x y + a_{22} y^2 + 2 a_{13}x +2 a_{23}y + a_{33} = 0$ with  $D =\det \begin{pmatrix}   a_{11} &amp; a_{12} \\   a_{12} &amp; a_{22} \end{pmatrix} &lt; 0$ and $ A = \det \begin{pmatrix}   a_{11} &amp; a_{12} &amp; a_{13} \\   a_{12} &amp; a_{22} &amp; a_{23} \\   a_{13} &amp; a_{23} &amp; a_{33} \end{pmatrix} \neq 0$.  Is there an easy way to find the implicit description of the conjugate hyperbola?  I could translate and rotate the hyperbola and obtain a canonical representation of the form $\frac{x^2}{a^2} - \frac{y^2}{b^2} = \pm 1$, find the conjugate of the canonical one and the transform back. However, I'm looking for a more straightforward way to achieve this. I understand how Insight and Perception can be used passively: for the DM to determine if an enemy Deception or Stealth attempt is successful without alerting the players that someone is deceiving or sneaking.    But the Observant feat in the Player's Handbook states:      [...] You have a +5 bonus to your passive Wisdom (Perception) and passive Intelligence (Investigation) scores.     So in what situation would a DM be rolling something against the player's Investigation without letting them know? Simplify $\prod_{k=1}^5\tan\frac{k\pi}{11}$ and $\sum_{k=1}^5\tan^2\frac{k\pi}{11}$ My question is:  If $\tan\frac{\pi}{11}\cdot \tan\frac{2\pi}{11}\cdot \tan\frac{3\pi}{11}\cdot \tan\frac{4\pi}{11}\cdot \tan\frac{5\pi}{11} = X$ and $\tan^2\frac{\pi}{11}+\tan^2\frac{2\pi}{11}+\tan^2\frac{3\pi}{11}+\tan^2\frac{4\pi}{11}+\tan^2\frac{5\pi}{11}=Y$ then find $5X^2-Y$.  I couldn't find any way to simplify it. Please help. Thanks. Is the term "errored out" a grammatically correct phrase, or just a colloquial one? Command to italicize text with slanted numbers I often find myself adding a lot of \textsl{} around inside \emph{} or \textit{} blocks because I find italicized digits to look too "showoffy" and "baroque" and to hinder legibility (I'm using $$ when the number has a mathematical sense, but this situation occurs in less technical texts like CVs, and such.).  Could someone help me write a renewcommand to automate this, or better, a single low level command that makes \emph, \itshape, \textit and friends choose slanted over italic for numbers? I'm not too familiar with the low level latex font selection system nor with a way to detect digits from regular letters.  Edit: MWE of what I need and what I want to avoid  \documentclass{article} \begin{document} He thought: '\emph{Why 1234567890 apples?}' then he realized '\emph{ah yes, he has \textsl{1234567890} childs}' \end{document}   gives:   I find the italicized version (first one) of 2,3,4 and 7 to look especially bad. Finding the limit $ \lim_{x\to a^+} \frac{\cos(x)\ln(x-a)}{\ln(e^x-e^a)} $ Why can't humans throw objects at bullet speed when the force involved seems so small? The force that propels a bullet should at least be similar in intensity to the force experienced as recoil and the force exerted on the target. But these forces seem really low (the equivalent of a shove).  If all it takes to make a small object achieve bullet speed is the equivalent of a shove, why can't humans throw objects at these speeds? Deriving a QM expectation value for a square of momentum $\langle p^2 \rangle$ I already derived a QM expectation value for ordinary momentum which is: $$ \langle p \rangle=  \int\limits_{-\infty}^{\infty} \overline{\Psi}  \left(- i\hbar\frac{d}{dx}\right) \Psi \, d x $$ And I can read clearly that operator for momentum equals $\widehat{p}=- i\hbar\frac{d}{dx}$. Is there an easy way to derive an expectation value for $\langle p^2 \rangle$ and its QM operator $\widehat{p^2}$? So this is what I'm trying to do in Drupal 6:  Node type A is video, node type B is a person Nodetype A has a reference field where you can enter a reference to any Node from nodetype B  how can I create a block view which will be displayed on nodes from node type b, which will show all the nodes from node type A where the current node from node type B is referenced? What and how does Darth Vader see? Are there any sources that talk about  about Darth Vader's visual acuity?  His life-supporting armour is quite advanced but does it provide any useful augmentation to his visual abilities? The value of $\lim_{n \to \infty}\int_{0}^{1}nx^ne^{x^2}dx$ When I try to print a Unicode string in a Windows console, I get an error . UnicodeEncodeError: 'charmap' codec can't encode character .... I assume this is because the Windows console does not accept Unicode-only characters. What's the best way around this? Is there any way I can make Python automatically print a ? instead of failing in this situation? Edit:  I'm using Python 2.5.  Note: @LasseV.Karlsen answer with the checkmark is sort of outdated (from 2008). Please use the solutions/answers/suggestions below with care!!  is more relevant as of today (6 Jan 2016). Is the subset $[0, \sqrt2] ∩\mathbb{Q} ⊂ \mathbb{Q}$ closed, bounded, compact? Letting $\mathbb{Q}$ be equipped with the Euclidean metric.  What I can work out is that it is bounded as its contained in the closed ball of radius ${\sqrt2}/{2}$ centred at ${\sqrt2}/{2} $.  Its not compact as it can be expressed as union of the two disjoint open sets $[0,{\sqrt2}/{2}) $and$ ({\sqrt2}/{2}, \sqrt2)$ (though I'm not sure if this makes it not compact in $\mathbb{Q}$ or just $\mathbb{R}$).  And its not closed as the sequence of truncations of $\sqrt2$ in $\mathbb{Q}$ converges to $\sqrt2$