I am running this code on Python (both 2.7, 3.x):  &gt;&gt;&gt; 1.1 + 2.2 3.3000000000000003 &gt;&gt;&gt; 1.1 + 2.3 3.4   Could someone explain how does it work and what is happening?
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
What is this shell/Bash syntax: someVariable=someValue someCommand One of my coworkers has provided me with a Bash syntax that I am unfamiliar with.  My Google foo has failed me on figuring out what it does and why/when I should use it.    The command that he sent me was of this form:  someVariable=something command   Initially, I thought that this was equivalent to the following:   someVariable=something ; command   Or  someVariable=something  command   But this doesn't appear to the be case.  Examples:   [Jan-03 11:26][~]$ # Look at the environment variable BAZ. It is currently empty [Jan-03 11:26][~]$ echo $BAZ  [Jan-03 11:27][~]$ # Try running a command of the same format     [Jan-03 11:27][~]$ BAZ=jake echo $BAZ  [Jan-03 11:27][~]$     [Jan-03 11:27][~]$ # Now, echo BAZ again. It is still empty:     [Jan-03 11:27][~]$ echo $BAZ  [Jan-03 11:27][~]$     [Jan-03 11:28][~]$     [Jan-03 11:28][~]$ # If we add a semi-colon to the command, we get dramatically different results: [Jan-03 11:28][~]$ BAZ=jake ; echo $BAZ jake [Jan-03 11:28][~]$ [Jan-03 11:28][~]$ # And we can see that the variable is actually set: [Jan-03 11:29][~]$ echo $BAZ jake [Jan-03 11:29][~]$   What does this syntax do?  What happens to the variable that has been set?  Why does this work? I am having a tough time building a half cylinder and have not found any tutorial showing me how to do that. I found some articles related to this, but they were not sufficient for me. I want to know how the localhost works and why is it the same on many different machines?   How does the localhost block the access to the website when we use it in the host file to block the website? So, somehow over the weekend, my 1GB USB flash drive has managed to become write-protected.  There is no switch on the stick, so I'm concluding that something has corrupted at some point.  Obviously I can't format it or remove.  The output from dmesg | tail is:  Buffer I/O error on device sdb1, logical block 328168 lost page write due to I/O error on sdb1 sd 73:0:0:0: [sdb] Unhandled sense code sd 73:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 73:0:0:0: [sdb] Sense Key : Data Protect [current] Info fld=0x0 sd 73:0:0:0: [sdb] Add. Sense: Write protected sd 73:0:0:0: [sdb] CDB: Write(10): 2a 00 00 05 08 00 00 00 01 00 Buffer I/O error on device sdb1, logical block 328200 lost page write due to I/O error on sdb1   I think the second and final lines are a giveaway to corruption, but I don't know how to interpret this output.  Could someone help to see if this output gives any indication?  I usually eject the drive before removing it, but I may have been lax once or twice.  The data isn't critical, it's just bugging me.  Any suggestions on how to fix it (if the drive even can be) would be greatly appreciated. How do you find the value of $\sum_{r=0}^{44} \tan^2(2r+1)$? Problem:   Find the value of $$\sum_{r=0}^{44} \tan^2(2r+1)$$  Note: The angles here are in degrees.    I don't know how to solve this question because trigonometric simplifications didn't get me anywhere. I think there was a method to solve this question using complex numbers which I no longer remember. Any hint/help will be appreciated. I've been reading about a lot of different types of philosophies, religions, ways of thinking etc. I was wondering what are the most recently created philosophical ways of looking at the universe? Where can one find out about new cutting edge ideas?  Example: Before we had Marxism, Communism, Zen, Christianity etc. Now X,Y, and Z have been created building on and evolving the ideas of A,B,C.   Everything I read about are ideas that were created a long time ago. What is new and updated? Non-EU spouse of UK citizen Schengen visa requirements I'm a British citizen and my wife is in the UK on a spouse visa. She holds a BRP card. We're planning to visit Germany and some other Schengen countries, and I've got a question around visa requirements/supporting documents.  I've read in few places (i.e ) that the visa requirements are more relaxed if the applicant is a spouse of a UK citizen, and is travelling with the UK citizen.  How relaxed are the requirements? Does my wife need to submit supporting documents for accommodation, finances, flight booking, etc.? Or is it simply submitting the application form alongside the passports and BRP? (i.e standard documentation for Schengen visa application section from ) I think that all the zeros of the Riemann-Zeta function ${\zeta}( z ) = \frac{1}{1-2^{1-z}} \sum_{n = 0}^{\infty} \frac{1}{2^{n+1}} \sum_{k = 0}^{n} (-1)^k \binom{n}{k} (k+1)^{-z}$  have real part smaller than 1, but I don't know how to prove it. If Re(z) > 1 than  ${\zeta}( z ) = \sum_{n = 1}^{\infty} \left( \frac{1}{n} \right)^z$ We all know that in an idealised world all objects accelerate at the same rate when dropped regardless of their mass.  We also know that in reality (or more accurately, in air) a lead feather falls much faster than a duck's feather with exactly the same dimensions/structure etc.  A loose explanation is that the increased mass of the lead feather somehow defeats the air resistance more effectively than the duck's feather.  Is there a more formal mathematical explanation for why one falls faster than the other? has been edited by .   , see revisions 3 to 4.   Now what he did is totally inexplicable to me, as a matter of fact he destroyed the answer. The new version is neither syntactically valid nor does it make any sense.  Still, the edit got "peer-reviewed" and nodded off.  Is there any way to deal with these kinds of things, other than sighing heavily and rolling back the edit?  Rhetorical side question: Could this be a side-effect of people grinding for reviewer badges? Problems installing xpatch I need to install the xpatch package to make changes to my biblatex setup. The readme file in the install package simply says to run “latex xpatch.ins.” I've moved the xpatch folder (including xpatch.ins and xpatch.dtx files) to the /usr/local/texlive/2011/../texmf-local/ folder. When I run the command above, I get the output Generating file(s) ./xpatch.sty  ! Cannot find file xpatch.dtx. \readsource ...ot find file \uptospace #1 \qStop }                                                   \else \processedLines \z@ ... l.34 ...xpatch.sty} {\from{xpatch.dtx} {package}}}   I've checked, and the .dtx file is in the folder. Any ideas what the problem is? Perform feature normalization before or within model validation? A common good practice in Machine Learning is to do feature normalization or data standardization of the predictor variables, that's it, center the data substracting the mean and normalize it dividing by the variance (or standard deviation too). For self containment and to my understanding we do this to achieve two main things:   Avoid extra small model weights for the purpose of numerical stability. Ensure quick convergence of optimization algorithms like e.g. Conjugate Gradient so that the large magnitude of one predictor dimension w.r.t. the others doesn't lead to slow convergence.   We usually split the data into training, validation and testing sets. In the literature we usually see that to do feature normalization they take the mean and variance (or standard deviation) over the whole set of predictor variables. The big flaw I see here is that if you do that, you are in fact introducing future information into the training predictor variables namely the future information contained in the mean and variance.  Therefore, I do feature normalization over the training data and save the mean and variance. Then I apply feature normalization to the predictor variables of the validation and test data sets using the training mean and variances. Are there any fundamental flaws with this? can anyone recommend a better alternative? How can I list installed packages by installation date?  I need to do this on debian/ubuntu. Answers for other distributions would be nice as well.  I installed a lot of stuff to compile a certain piece of code, and I want to get a list of the packages that I had to install. When are you supposed to use escape instead of encodeURI / encodeURIComponent? When encoding a query string to be sent to a web server - when do you use escape() and when do you use encodeURI() or encodeURIComponent():  Use escape:  escape("% +&amp;=");   OR  use encodeURI() / encodeURIComponent()  encodeURI("http://www.google.com?var1=value1&amp;var2=value2");  encodeURIComponent("var1=value1&amp;var2=value2"); has the following ability:     Whenever a creature you control with a +1/+1 counter on it dies, return that card to the battlefield under your control at the beginning of the next end step.   I had a number of creatures on the battlefield, including Marchesa herself, with one or more +1/+1 counters on them when  was played, destroying each creature on the board.  When Marchesa and several other creatures would be killed simultaneously,   Does Marchesa's ability trigger for herself? Does Marchesa's ability trigger for the other creatures under my control with +1/+1 counters?   In attempting to resolve the issue, we tried to look things up, leading to , which cites Rule 603.6d as proving that Marchesa's ability should trigger both for herself and for each other creature with +1/+1 counters.  Unfortunately, none of us could actually understand Rule 603.6d, aside from this example:     Two creatures are on the battlefield along with an artifact that has the ability Whenever a creature dies, you gain 1 life. Someone plays a spell that destroys all artifacts, creatures, and enchantments. The artifacts ability triggers twice, even though the artifact goes to its owners graveyard at the same time as the creatures.   The example certainly seems analogous to me, but without understanding the actual rule, rather than just the example, we weren't too sure.  A complete answer has to not only answer the question, but back up that answer with citation and explanation of the official rules on the matter. "There Is"/"There are" depends on plurality of the first list element or not? I have been thinking about the following formulation of the Axiom of Choice.:     For any relation $R$, there is a function $H$, which is a subset of $R$, and such that $\operatorname{dmn}H=\operatorname{dmn}R$.   At first, it seemed surprising to me that this did not follow from Comprehension (i.e., from the schema  $\forall x_1, x_2, ..., x_n \forall C\exists B \forall x ( x \in B \Leftrightarrow x \in C \land \phi )$, where $B$ does not occur free in $\phi$).    I thought that for any relation, it seems that we should be able to define a subset of it with the same domain meeting a "functional condition".  But when I tried to do this, I couldn't.  However, I felt like I was getting close when I let $B$ be free in $\phi$, i.e., when I let myself say that $w$ is in $R$ and also anything in $H$ meets such and such conditions, where $H$ is the set (function) whose existence I'm trying to prove.    But my understanding is that Choice does not even follow from Naive Comprehension.  So, I wondered if someone could explain the following precisely.   Why does the above formulation of Choice does not follow from regular Comprehension? Why does it not even follow from Naive Comprehension (assuming that it does not)? Workflow for converting LaTeX into Open Office / MS Word Format How much willpower do gravely wounded soldiers lose? The text says they suffer a permanent reduction? How can one derive Schrödinger equation? The  is the basis to understanding quantum mechanics, but how can one derive it? I asked my instructor but he told me that it came from the experience of Schrödinger and his experiments. My question is, can one derive the Schrödinger equation mathematically?