Consider the code...  double first = 19.99; double second = 19; double firstPlusSecond = first + second; Console.WriteLine("Result: " + firstPlusSecond);   The output of this is "Result: 38.99" - which is what I expect  However...inspecting firstPlusSecond in debug, the number is actually 38.989999999999995  Which is messing with calculations elsewhere in the program.  What...?  What have I missed?
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Display solution/file path in the Visual Studio IDE I frequently work with multiple instances of Visual Studio, often working on different branches of the same solution.   used to display the full path of the current source file in its title bar, but Visual&nbsp;Studio 2005 doesn't appear to do this. This makes it slightly more awkward than it should be to work out which branch of the solution I'm currently looking at (the quickest way I know of is to hover over a tab so you get the source file's path as a tooltip).  Is there a way to get the full solution or file path into the title bar, or at least somewhere that's always visible, so I can quickly tell which branch is loaded into each instance? This is a small exercise that I just can't seem to figure out. When I see it I'll probably go 'ahhh!', but so far I haven't made any progress.  I'd like to prove that any linear functional $\phi$ on $\ell^\infty$ that is positive, i.e. for any $(x_n) \in \ell^\infty$ such that $x_n \geq 0$ for all $n \in \mathbb{N}$ we have $\phi((x_n)) \geq 0$, is a bounded linear operator and has $\|\phi \| = \phi((1,1,...))$.  Nothing I have tried worked so far, so any hints would be appreciated, thanks! This may be a silly question, but I ask it still. If I have declared a shebang  #!/bin/bash    in the beginning of my_shell_script.sh, so do I always have to invoke this script using bash  [my@comp]$bash my_shell_script.sh   or can I use e.g.  [my@comp]$sh my_shell_script.sh   and my script determines the running shell using the shebang? Is it the same happening with ksh shell? I'm using AIX. Left-pad printf with spaces How can I pad a string with spaces on the left when using printf?  For example, I want to print "Hello" with 40 spaces preceding it.  Also, the string I want to print consists of multiple lines.  Do I need to print each line separately?  EDIT: Just to be clear, I want exactly 40 spaces printed before every line. Any open subset of $\Bbb R$ is a countable union of disjoint open intervals Let $U$ be an open set in $\mathbb R$. Then $U$ is a countable union of disjoint intervals.    This question has probably been asked. However, I am not interested in just getting the answer to it. Rather, I am interested in collecting as many different proofs of it which are as diverse as possible. A professor told me that there are many. So, I invite everyone who has seen proofs of this fact to share them with the community. I think it is a result worth knowing how to prove in many different ways and having a post that combines as many of them as possible will, no doubt, be quite useful. After two days, I will place a bounty on this question to attract as many people as possible. Of course, any comments, corrections, suggestions, links to papers/notes etc. are more than welcome. MySQL SELECT LAST_INSERT_ID() for compound key. Is it possible? Can I get the LAST INSERT ID() for a compound key in MySQL? Why should the "H" option not be used in floats? How to change the list of file types which Safari will open immediately after download? As mentioned in the , Ubuntu 18.04 LTS will not have a 32 bit Desktop Image Installer. But in the  it has  32bit Desktop Images.  This is little off topic, but I'm confused. Why is the \bf command applied to more than I asked? MWE:  \documentclass{article}  \usepackage{bm}  \begin{document} $$x(t), \bf{x}(t), \bf{x(t)}$$ \end{document}   Result:    Question:  Why are the second and third x(t) typeset the same? In the second  expression, it was asked to apply \bf to only x.  EDIT:  I had not payed attention to it when asking the question, but I would like to have a bold and italic x. Evaluating $\int \frac{\sin\left(x\right)}{1+x^2}dx$ $$\int \frac{\sin\left(x\right)}{1+x^2}dx$$  I have tried to integrate by parts but it doesn't work. How do I evaluate it? Any advice, hint or well-thought solution will be appreciated. Cool Text Highlighting in LaTeX How do I get the difference between two Dates in JavaScript? I'm creating an application which lets you define events with a time frame.  I want to automatically fill in the end date when the user selects or changes the start date.  I can't quite figure out, however, how to get the difference between the two times, and then how to create a new end Date using that difference. Why do I get a segmentation fault when writing to a "char *s" initialized with a string literal, but not "char s[]"? Kelvin Source Terminal on MOSFETs On MOSFETs with multiple source pins, is the so-called &quot;Kelvin-connected source pin&quot; connected any different internally? Or is it just like every other source pin?   EDIT: Just to be clear, I am not asking what the Kelvin connection is for. I'm asking whether it is physically implemented any differently than the other source pins or whether it is just an extra regular, old source pin. Not enough reputation - wanting to answer/comment I've seen a few questions I'd like to comment on or give a different answer, but seeing how I don't have 50 reputation (I've been a lurker for years, finally decided to participate) do I really need to ask a few questions before I can comment/answer other people's stuff? Or am I missing something here?  Sorry if this has been answered before, but with a few search tries I couldn't find any similar stuff, even tried google just for "50 reputation stackoverflow" but that didn't give me anything either. Official ESTA application website and are the others scams? A quick search for ESTA application returned many results. According to , the official site to apply for an ESTA is .  Are the others scams, legitimate third party resellers or "added value" services?    (defunct - domain is for sale circa 2020)     Can anyone confirm either way?  Updated 2020: The above have better "not affiliated with the U.S. Government" warnings now, but beware there are newer more sneaky sites starting all the time:        And fortunately more official guidance about this issue: Show that $\arctan(n)$ is irrational for all $n \in \mathbb{N}$ If $f'(x)\le g'(x)$, prove $f(x)\le g(x)$ I have to do the following exercise:     Let $f$ and $g$ two differentiable functions such that $f(0)=g(0)$ and $f'(x)\leq g'(x)$ for all $x$ in $\mathbb{R}$. Prove that $f(x)\leq g(x)$ for any $x\geq0$.   Now, I know this is true because the first derivative of a function is the angular coefficient of the function in a point $x$. So, $f'(x)\leq g'(x)$ means, in other words, that the function $g(x)$ grows faster than $f(x)$. I think this is the base for a more formal proof, could someone help me to figure out a more formal proof? Do not allow giving minus one for new user questions I always see Stack Overflow users giving -1 to new users' questions. This is not how you welcome a new user to the community. A new user does not know the rules yet.    I suggest that if one wants to give -1 to a new user, you prevent that and ask the downvoter to write a comment instead. new user = 2 first questions    I see the credit rating on my question is now at -9?  My question, is she not well formed or formatted? If you don't agree with the content of a question do you down-rate it? If an Ubuntu user asks a question that might not be reasonable, will you also down-rate it?  No. You post an answer that will present your thinking and correct him? I think that is part of the problem. When you first go to a community like Facebook, and you don't know the faces, you don't feel like any of those people are your relations. Newbies exist here as well, especially in a professional community.    First, welcome the new user in more appropriate way. And most importantly, force them to see/read how to post a good question.