The expected behaviour for this is to print 2949 is the magic number! when it hits 2949, yet the loop doesn't. The loop seems to start at 19, then jump to 513920 - why is this?  magicNumber = 2949  for x in range(0, 100000000):     if (x is magicNumber):         print(x, "is the magic number!")
Why does the following behave unexpectedly in Python?  &gt;&gt;&gt; a = 256 &gt;&gt;&gt; b = 256 &gt;&gt;&gt; a is b True           # This is an expected result &gt;&gt;&gt; a = 257 &gt;&gt;&gt; b = 257 &gt;&gt;&gt; a is b False          # What happened here? Why is this False? &gt;&gt;&gt; 257 is 257 True           # Yet the literal numbers compare properly   I am using Python 2.5.2. Trying some different versions of Python, it appears that Python 2.3.3 shows the above behaviour between 99 and 100.  Based on the above, I can hypothesize that Python is internally implemented such that "small" integers are stored in a different way than larger integers and the is operator can tell the difference. Why the leaky abstraction? What is a better way of comparing two arbitrary objects to see whether they are the same when I don't know in advance whether they are numbers or not?
I am trying to create a schema page in LaTeX. It shall look like this.   How can I create schema code which look like this image? There should be also a click to go function. When the user clicks on the user_schema link he should be redirected to that page.  What classes I can use for this? Any suggestions would be appreciated.    \documentclass{article} \usepackage[utf8]{inputenc}  \begin{document} \maketitle  \section{User schema} \mySchema{Users} {     _id: ObjectId - Id do registro     name: String - Nome do usuário     date: Date - Data de Cadastro     ren_date: Date - Data de renovação do Cadastro     email: String - Lorem ipsum dolorsitamet, consecteturadipisicingelit, sed do eiusmodtemporincididunt ut labore et dolore magna aliqua. Ut enim ad minimveniam, exercitationullamcolaborisnisi ut aliquipexeacommodoconsequat. Duisautereprehenderit in voluptatevelit esse cillumdolore eu fugiatnullapariatur. Occaecatcupidatat non proident, sunt in culpa quiofficiadeseruntmollit.     access_log: Array [          {              date: String - Data da ocorrência.             user: ObjectId - Usuário que executou.             action: String - Ação Executada.         }         {              date: String - Data da ocorrência.             user: ObjectId - Usuário que executou.             action: String - Ação Executada.         }     ]     \link{group}{group_id}: ObjectId - Id do grupo. } \end{document}   Here is the image how should it appear: Prove that if $f$ is a real continuous function such that $|f|\le 1$ then $|\int_{|z|=1} f(z)dz| \le 4$ I've encountered the following problem in complex analysis:  Prove that if $f$ is a real continuous function such that $|f|\le 1$ then $|\int_{|z|=1} f(z)dz| \le 4$.  I've decomposed $f$ to it's real and imaginary parts and got that it's enough to prove that:  $(\int_0^{2\pi}cos(\theta)g(\theta)d\theta)^2 +(\int_0^{2\pi}sin(\theta)g(\theta)d\theta)^2 \le 16$   Where $g(\theta)=f(e^{i\theta})$.   But now I'm stuck. Any ideas?  Thanks How can I install a package without root access? Why are all the textures in my file pink? Are there any tools in Blender that take irregular polygons and make them regular (approximate a circle)? I'm specifically looking for a solution that works with preexisting polygons. Also, it would be nice if it keeps the overall position after making it regular.    Irregular Polygons    Regular Polygons Why is the p-value written with a supremum? I noticed that there is a definition of the pvalue in my textbook is defined says the following:    I have no idea why it is written with a supremum. I've spent hours pondering this, does anyone have enough of a background to help me with this? Thank you! This question is regarding the minecraft Beta 1.8 prerelease -- I have a beautiful house in single player survival which I'd like to record while flying.  I want to be able to change the game mode of my survival map to creative to be able to fly through it without installing a mod. I know it is possible if you run the map on a multiplayer server via the command /gamemode &lt;user&gt; 0|1 but I want to achieve this in single player :)  I think this would be possible through editing your level.dat file as I think that's where the game mode for the map is stored. What is the variance of the weighted mixture of two gaussians? Say I have two normal distributions A and B with means $\mu_A$ and $\mu_B$ and variances $\sigma_A$ and $\sigma_B$. I want to take a weighted mixture of these two distributions using weights $p$ and $q$ where $0\le p \le 1$ and $q = 1-p$. I know that the mean of this mixture would be $\mu_{AB} = (p\times\mu_A) + (q\times\mu_B)$.  What would the variance be?    A concrete example would be if I knew the parameters for the distribution of male and female height. If I had a room of people that was 60% male, I could produce the expected mean height for the whole room, but what about the variance? Did Daenerys mess up regarding caravans? Run command whenever someone joins a Minecraft server If I said, &quot;I will run, not if it is snowing, if I my shoes are comfortable.&quot; Does the &quot;if my shoes are comfortable&quot; modify the &quot;I will run&quot; clause? I agree the sentence would be clearer with the addition of &quot;and&quot; in place of the comma. However, without the &quot;and&quot; is it still clear that the &quot;if my shoes are comfortable&quot; clause modifies the &quot;I will run&quot; clause? Do I have to move swap partition to the right side? According to  I just expand my sda4 to include unallocated space, my question is after create 2 new partitions sda7, sda8, do I need to move the swap partition to the most right of the disk? (I really don't know this, I saw  which moving the swap partition to the right side)  Thanks. Most of the recipes I'm using (mainly Modernist; stocks, caramelized vegetables, confit) suggest cooking at 15psi. My pressure cooker has two settings 12psi and 7psi. I've always had success just using 12psi in recipes where it says 15psi. However recently the 12psi mode has broken on my PC. I can now only cook at 7psi. How can I convert my recipes to use this lower pressure?  For example I would cook a chicken stock at 12psi for 90mins, I presume at 7psi the cooking time would need to be longer but by how much? How do I increase my code coverage, or why can't I cover these lines? Text spirals with TikZ I just ran across this, and I'm curious about whether it can be replicated in TeX...    Ideally one would have the spiral getting tighter and tighter as one got to the centre, as in    I know TikZ has the ability to fit text along a path, but I'm not sure how one might make text get smaller and smaller.  The closest I can find is , but that uses manually inserted font commands.  Edit: I got what I wanted using mwibrow's answer: No "Login using Google" option in Android app How to find vendor and model of unknown drivers I reinstalled windows on a new machine and the drivers are not present for the product network card.   When in device manager all I get is the question mark and I am unable to figure out the actual name of the vendor or model of the card. This is making my search to find the correct driver hard.   Anyone know how I to find out more about the hardware that does not have drivers? Why is $\sqrt{-x}*\sqrt{-x}=-x?$ I just can't find a decent (and free) one. What can I use? Detect which TeX engine is used How can I detect inside a TeX file which engine (pdftex/xetex/luatex) is used to compile the file? Is there a LaTeX package that provides this functionality?