def fc_range(start, end, step=1.0):     while start &lt; end:         yield start         start +=step for x in fc_range(0, 1, 0.05):     print x # look the ans print list(fc_range(0, 1, 0.05)) # compare the ans now   and when I test this:  &gt;&gt;&gt; 0.1 + 0.05 0.15000000000000002   it seems like to be clear, but why when I use print the answer is not 0.15000000000000002 ?
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Why $\dim U+\dim U^\perp=\dim V$? Let $V$ be a vector space. Given $U\le V$, define $U^\perp=\{f\in V^\ast\mid f(u)=0\,,\;\forall u\in U\}$ and given $W\le V^\ast$, define $W^\perp=\{u\in V\mid f(u)=0\;,\;\forall f\in W\}$. This defines a Galois connection between subspaces of $V$ and subspaces of $V^\ast$. If $V$ is finite dimensional, why is $\dim U+\dim U^\perp=\dim V$? Unfortunately, I am not very comfortable with linear algebra. Any hint will be appreciated. Why are site stats graph for beta sites not available to public? Currently, on all beta sites, the current site stats is placed prominently on the front page, which is great for knowing how the site is currently doing.  However, it doesn't say anything about the trend of the numbers - whether the site is sailing or it is sinking compared to the last month. According to Madara Uchiha, our moderator on Anime &amp; Manga SE, . Disregarding data which are not already public, , I can't see any reason why we are not allowed access to graphical representation of public site statistics. In fact, there is already a third-party app that scraps the information from the home page and . Can we have a beautiful visualization on how our beta sites evolve over time, from pony to unicorn?   Images stolen borrowed from Bulbapedia Inverting direction of mouse scroll wheel Is there a way to make a mouse scroll wheel invert its direction? I'd like to scroll upwards and have that action scroll downwards and vice-versa. There is no setting on the Mouse control panel that makes this possible.   Any pointers to a hack or a particular mouse model that has such a setting would be appreciated. I am using Windows 7. What Does it Really Mean to Have Different Kinds of Infinities? Limit of $L^p$ norm when $p\to0$ Let ($\Omega$, $\cal{F}$, $\mu$) be a probability space and $f\in L^1(\Omega)$. Prove that  $$\displaystyle\lim_{p\to 0} \left[ \int_{\Omega}|f|^pd\mu \right]^{\frac{1}{p}}=\exp \left[ \int_{\Omega}\log|f| d\mu  \right],$$  where $\exp[-\infty]=0$. To simplify the problem, we may assume $\log|f|\in L^1(\Omega).$ For all $X \geq 1$,$\sum\limits_{1 \leq n \leq X} \mu(n) \left[\frac{X}{n}\right] = 1.$ I'm currently sitting with the following number theory problem:  Prove that for all $X \geq 1$, $$\sum_{1 \leq n \leq X} \mu(n) \left[\frac{X}{n}\right] = 1.$$  A few ideas I have tried: Using that $[x]=x - \{x\}$ which I couldn't make out to bring anything. Switching around on the summation variables, like $$\sum_{d \leq N} \mu(d) f\left( \frac{n}{d} \right) = \sum_{d \leq N} \mu \left( \frac{d}{n} \right) f(d)$$ but that didn't seem to bring anything.  I tried writing out the first few terms, which give $$\mu(1) [X] - \left[\frac{X}{2}\right] - \left[\frac{X}{3}\right] - \left[\frac{X}{5}\right] + \left[\frac{X}{6}\right] - \left[\frac{X}{7}\right] - \left[\frac{X}{8}\right]$$ but I can't seem to find a system where it simply reduces to one!  What do you think? Can anyone explain precisely what IOWait is? Ubuntu 16.04 sftp and vscode ssh not working Proving that free modules are flat (without appealing projective modules) Suppose $R\neq 0$ is a commutative ring with $1$. Let $M$ be a free $R$-module. I would like to prove that $M$ is a flat $R$-module. Everywhere I have looked (mostly online) this is proved by first proving that every free module is projective, and then proving that every projective module is flat. Unfortunately, Atiyah &amp; Macdonald's "Introduction to Commutative Algebra" (Chapter 2) does not discuss projective modules. But the result that every free module is flat comes very handy in the exercises.   So my question is,     Is it possible to prove that every free module is flat just by   definitions and without appealing to projective modules?   Thanks! Weird display on screen before swipe lock Samsung Galaxy s6 edge plus Zooming / Focusing certain parts of a chart in latex I am using pgfplot to draw graphs in latex. Now this is the problem I am facing:  \begin{tikzpicture}[scale=1] \begin{axis}[ybar,grid=major,bar width=2pt,width=8cm, height=8cm,xmin=1,xmax=540,ymin=1,ymax=240] \addplot [draw=black,fill=green]  table [x=size, y=cluster, col sep=comma] {sim-0.4-0.6.csv}; \end{axis} \end{tikzpicture}   It generates the following graph:    Since, I have values mainly between 0-50 on x-axis, I want to zoom there. After that, values comes around 500. S0, there are no graph points between 50 - 450. How should I do that? So I was searching for one of my own websites on Google: http://www.botlibre.com  and to my surprise found some clones of my website, like:  http://83waystowasteyourtime.adidas.com  and:  http:// mediaiq.astral.comm  My question are:   Why are they creating clones of my website?  Some kind of SEO scheme or what? What gain could they be getting? How do they have a URL at adidas.com and astral.comm?  I assume it's not Adidas steeling my content. How do I shutdown these sites and stop people from stealing my content? (on Tomcat) Why is Lamarck's evolutionary theory considered incorrect? Many sources postulate without much argumentation that Lamarck's evolutionary theory is "obviously incorrect". A classic example provided in such sources is the one with giraffes, in which Lamarck argued that the necks of these animals became long as a result of continually stretching to reach high foliage. This mechanism for adaptive change in response to the environment is considered wrong.  Now the counterargument to Lamarck's ideas comprises modern findings in genetics. So it is stated that organisms pass down traits through predetermined genetic information, not based on environmental adaptations during their lifetime. Furthermore, genetic research shows that living organisms cannot alter their genetic material as needed.   Doesn't the latter contradict the evolutionary theory itself, which states that nature (i.e. environment) shapes species through natural selection in the environmental milieu? If it is not the environmental/natural factor that is responsible for genetic evolution, then what is? If genetic material were to be unchangeable, then how would adaptation to the environment and consequent evolutionary change would ever be possible? The genotype (following this logic) would remain the same. And lastly, maybe giraffes do not develop long necks at such a rapid pace (as Lamarck probably thought) by simply stretching their necks in one generation; however, what, if not neck stretching, is responsible for their consistently longer necks throughout thousands or millions of years? Hadn't the environment gradually shaped their genotype? Similarly, if I run more often, maybe my children will not become more fit, but isn't it just a matter of time (thousands of years) that if all of us consistently run a lot, then our offspring will eventually become more fit? Wouldn't our voluntary efforts eventually enhance our genetics? I do not see any problem with Lamarck's logic at all, except probably the time frame. I'm learning about private/public IPs, port forwarding and NAT, and still fail to see the answer to a simple question:  Suppose two users on the same network are communicating with a single server outside their network (say, me &amp; my wife send http requests to yahoo.com).  The server sees both users as a single public ip, and often - as in this case - communicating on the same port.  How does the router route the packets according to the two different connections? Is there any routing info inside the packet beyond ip/port?  Is there some 'session table' maintained somewhere? By whom and what exactly does it include? I had a Windows 7 installation on my 1TB SSD laptop with 4 primary partitions. I wanted to install Lubuntu Linux but the process failed with an error which kind of said:     cannot write MBR   It gave me an option to put an MBR somewhere else or to boot without MBR. None of these options worked and it became a useless install. After this failed dual boot attempt, Windows would give a BSOD wit Code 007 ending - translated to inaccessible boot device. That is a huge NTFS partition and I don't think I have any other media to back it up before formatting it.  My only option is somehow rebuilding the old MBR. Hence I started creating a whole bunch of live USB boot environments  including Super GRUB Disk and MiniTool Partition Editor Live CD, but none of this could ever help me recover my lost MBR.  Win PE 4.0 reported the partition as bad disc and the latest version did not even have an option for MBR. I managed to create a live USB with Testdisk Running on Ubuntu. Whatever partition was seen as HPFS on quick  search was written in the MBR and after this the disc is totally unreadable. Earlier I could see my data through Linux and now I can see nothing.  Here are my questions:   When some data could be read (but Windows would not boot) the MBR was shown as dynamic MBR. As far as I know dynamic MBR is a Windows concept and my Linux attempt would not have converted it. While installing Linux I tried to delete 2 primary partitions which I found to be not really useful (I backed up their data first). So I am not sure what created the dynamic MBR.  Did my dual install convert those basic MBR to dynamic MBR? How did that happen? Here is a screenshot of my deep search attempt with TestDisk which is still in progress. I can see 4 NTFS partitions and one of these two system partitions should be the original MBR. When I tried to write both these system partitions (after stopping the deep search momentarily) I got an error like "partition not found". The file system utility showed me that there is no backup sector and that may be the reason why it cannot be read.  What other Resorts do I have, other than doing a plain format and then using some recovery tool to recover all my lost data? I am not even sure I will recover the folder names.  What other options should I be trying to restore my old MBR so Windows can boot?      Update  as of last I managed to create a live USB w/ W7  I used AOMEI Partition assistant 6.0 and on deeper  search I can see the 909 gb partition - it wont let me select it for recovery. I am sorry if my earlier Q was not clear. I referred to restoring an MBR from a partition . What happened earlier  - superficial search revealed all old partitions but NOT this one   and the later partitions showed up on Deep search &amp; I can select Other partitions for recovery but for this one. It wont let me select the partition I want  Here are some more screen shots    So in summary all that happened is   4 primary windows 7 partition -->  wanted to install Linux so I deleted 2 non bootable partitions after backing them up  ended up with BSOD ( inaccessible boot device ) and noticed that some windows partitions showed up as Dynamic MBR  (using Live USB Linux,gparted )  Use standard testdisk procedure to write MBR from the superficial NTFS-HDFS partition.  this is where I screwed up . Hindsight I should have really done a deep search and caught the 901gb partition to write MBR. I am not sure if I can undo this action  after this - life gets worse. I am  on a ventilator ! Now C is unreadable by windows and linux both and testdisk cannot list file ( see screenshots ) and I have been using a series of live USB's with some recovery s/w but no luck. ALL I want is to recreate that 901gb partition and the boot partition and put the MBR on the latter so I can get my windows 7 back again How can a particle's position be random and uncertain in quantum mechanics if it is already pre-determined in relativity? One whose solution never makes me happy is the following: $$y'(t)=\sin(y+t)\text{.}$$ I would start by substituting $z(t)=y(t)+t$ to get an ODE in $z(t)$, but then I'm not sure about how to substitute back my solution to check if it's correct or not$\dots$ What is the purpose of Jordan Canonical Form? Summation equation for $2^{x-1}$ How do I configure a new Ubuntu installation to accept ssh connections?