public class test {     public static void main(String[] args) {             System.out.println(0.3+0.6); } }   The output of the above java code is 0.8999999999999999. Why is that?
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Optional argument after splat argument Why $\gcd(qb+r,b)=\gcd(b,r)$? Given: $a = qb + r$. Then it holds that $\gcd(a,b)=\gcd(b,r)$. That doesn't sound logical to me. Why is this so?    Addendum by LePressentiment on 11/29/2013: (in the interest of  and averting a duplicate)  What's the intuition behind this result? I only recognise the proof and examples solely due to algebraic properties and formal definitions; I'd like to apprehend the result naturally. Detecting structured data in Google Webmaster Tools I got this problem from my teacher as a optional challenge. I am open about this being a given problem, however it is not homework. The problem is stated as follows. Assume we have an infinite tetration as follows $$x^{x^{x^{.^{.^.}}}} \, = \, a$$ With a given $a$ find $x$. The next part of the problem was to discuss the convergence radius of a. If a is too big or too small the tetration does not converge. Below is my humble stab at the problem.  My friend said you would have to treat the tetration as a infinite series, and therefore could not perform algebraic manipulations on it before it is know whether it converges or diverges. However my attempt is to first do some algebraic steps, then discuss the convergence radius. I) Initial discussion At the start it is obvious that the tetration converges when $a=1$ (just set $x=1$) Now after some computer hardwork it seems that the tetration fails to converge when a is roughly larger than 3. II) Algebraic manipulation $$ x^{x^{x^{.^{.^.}}}} \, = \, a$$ This is the same as $$ x^a \, = \, a$$ $$ \log_a(x^a) \, = \, \log_a(a)$$ $$ \log_a(x) \, = \, \frac{1}{a}$$ $$ x \, = \, a^{\frac{1}{a}}$$ Now, if we let $a=2$ then $x = \sqrt{2}$. After some more computational work, this seems to be correct, which makes me believe this formula is correct. III) Discsussion about convergence By looking at the derivative of $ \displaystyle \large a^{\frac{1}{a}} $ we see that the maxima occurs when $a=e$, which also seems to correspond to the inital computational work. Now I think, that the minima of $\displaystyle \large a^{1/a}$ is zero by looking at its graph, studying its derivative and the endpoints. So that my &quot;guess&quot; or work shows that it converges when $$ a \in [0 \, , \,  1/e] $$ VI) My questions Can my algebraic manipulations be justified? They seem rather sketchy taking the a`th logarithm and so on . (Although they seem to &quot;magically&quot; give out the right answer) By looking at Wikipedia it seems that the tetration converge when $$ a \in \left[ 1/e \, , \, e \right] $$ This is almost what I have, why is my lower bound wrong? How can  I find the correct lower bound? How to run both Intel and Nvidia graphics card driver on dual monitor setup? I'm trying to get Intel and Nvidia graphics card working together with two monitors. One monitor should use the Intel card and the other the Nvidia card. Of course, I want to use only one keyboard and one mouse to switch between both screens. Bumblebee didn't work for me.  I don't want to use the xserver-xorg-video-all package because I need the Nvidia card for gaming and I can't use only one graphics card because I need one for KVM virtualisation and the other one for my Linux desktop  So I tried to install the drivers and to configure the Xserver manually. The Nvidia driver is working and I get a video output. But I don't get a video output with the Intel card.  I followed   The config files: UFW Allows 22 for IPv4 and IPv6 but SSH Disconnects When Enabling sudo ufw disable followed by sudo ufw enable kicks me out of SSH  DMESG reports  [UFW BLOCK] IN=eth0 OUT= MAC=30:........ SRC=192.168.1.me DST=192.168.1.server LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=15776 DF PROTO=TCP SPT=55640 DPT=22 WINDOW=253 RES=0x00 ACK URGP=0  I can log back in without having to change rules via the console (UFW still enabled).  This started after upgrading Xenial (16.04) from kernel 4.4 to 4.15 (HWE). Upgrading to 18.04.1 did not solve the issue.  Versions:   iptables v1.6.1 ufw 0.35 4.15.0-29-generic #31-Ubuntu Ubuntu 18.04.1 LTS   UFW status verbose is (some rules were omitted, but they are all ALLOW)  Logging: on (low) Default: deny (incoming), allow (outgoing), disabled (routed) New profiles: skip  To                         Action      From --                         ------      ---- 22                         ALLOW IN    Anywhere 22 (v6)                    ALLOW IN    Anywhere (v6)   Why is this happening, or at least, how to revert to the expected behavior?  I looked at , and I am not sure it applies, but here's /etc/ufw/before.rules  # # rules.before # # Rules that should be run before the ufw command line added rules. Custom # rules should be added to one of these chains: #   ufw-before-input #   ufw-before-output #   ufw-before-forward #  # Don't delete these required lines, otherwise there will be errors *filter :ufw-before-input - [0:0] :ufw-before-output - [0:0] :ufw-before-forward - [0:0] :ufw-not-local - [0:0] # End required lines   # allow all on loopback -A ufw-before-input -i lo -j ACCEPT -A ufw-before-output -o lo -j ACCEPT  # quickly process packets for which we already have a connection -A ufw-before-input -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A ufw-before-output -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A ufw-before-forward -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT  # drop INVALID packets (logs these in loglevel medium and higher) -A ufw-before-input -m conntrack --ctstate INVALID -j ufw-logging-deny -A ufw-before-input -m conntrack --ctstate INVALID -j DROP  # ok icmp codes for INPUT -A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT -A ufw-before-input -p icmp --icmp-type source-quench -j ACCEPT -A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT -A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT -A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT  # ok icmp code for FORWARD -A ufw-before-forward -p icmp --icmp-type destination-unreachable -j ACCEPT -A ufw-before-forward -p icmp --icmp-type source-quench -j ACCEPT -A ufw-before-forward -p icmp --icmp-type time-exceeded -j ACCEPT -A ufw-before-forward -p icmp --icmp-type parameter-problem -j ACCEPT -A ufw-before-forward -p icmp --icmp-type echo-request -j ACCEPT  # allow dhcp client to work -A ufw-before-input -p udp --sport 67 --dport 68 -j ACCEPT  # # ufw-not-local # -A ufw-before-input -j ufw-not-local  # if LOCAL, RETURN -A ufw-not-local -m addrtype --dst-type LOCAL -j RETURN  # if MULTICAST, RETURN -A ufw-not-local -m addrtype --dst-type MULTICAST -j RETURN  # if BROADCAST, RETURN -A ufw-not-local -m addrtype --dst-type BROADCAST -j RETURN  # all other non-local packets are dropped -A ufw-not-local -m limit --limit 3/min --limit-burst 10 -j ufw-logging-deny -A ufw-not-local -j DROP  # allow MULTICAST mDNS for service discovery (be sure the MULTICAST line above # is uncommented) -A ufw-before-input -p udp -d 224.0.0.251 --dport 5353 -j ACCEPT  # allow MULTICAST UPnP for service discovery (be sure the MULTICAST line above # is uncommented) -A ufw-before-input -p udp -d 239.255.255.250 --dport 1900 -j ACCEPT  # don't delete the 'COMMIT' line or these rules won't be processed COMMIT   PS: I didn't expect this to "fix" the issue but just for reference I changed the port SSHD listens on (and the corresponding rule) and the problem persists. I use a Full HD 24" external display besides my 15" MacBook Pro Retina, on which I use the option for most screen estate regarding the Retina display. In the display arrangement screen, the MacBook Pro is therefore a bigger rectangle than the external display. Is there a way to size these rectangles regarding their "real world size" instead of resolution? I'm annoyed by my cursor teleporting vertically whenever I move from one display to another. Solve $f(x)f(2x^2) = f(2x^3+x)$ What happens to the Matrix if Neo takes the blue pill? If Neo defies his fate and refuses to be removed from the Matrix (by taking the blue pill) what happens next?   Would another "The One" get selected by The Architect or The Oracle and is there anything to suggest that the current instance of The Matrix actually could have multiple "The One"'s (perhaps one of the 'potentials') in the event that the Chosen One manages to get himself killed or simply refuses to play ball? Incremental (delta) backup of a encrypted data I have several files that I need to keep encrypted on my home hard disk.  I currently use a TrueCrypt file container, currently around 100MB in size. I need to backup this file daily, and I'm looking for an incremental backup solution.  I read that on encrypted volumes even a small change in a file would change the whole volume and prevent the use of an efficient incremental backup solution. Any ideas how to backup in this case in an efficient way which would allow incremental solution?  I currently use TrueCrypt as my backup solution and CrashPlan as my backup utility, but I'm willing to experiment with alternatives. In my .bib file, I have two entries with exactly the same author names:  @article{Seshadrinathan2010A-Subjective-St,     Author = {K. Seshadrinathan and R. Soundararajan and A. C. Bovik and L. K. Cormack}, ....  @article{Seshadrinathan2009Study-of-Subjec,     Author = {K. Seshadrinathan and R. Soundararajan and A. C. Bovik and L. K. Cormack}, ....   When cited after each other, and typeset with the IEEEtran bibliography style, the .bbl file reads:  \bibitem{Seshadrinathan2010A-Subjective-St} K.~Seshadrinathan, R.~Soundararajan, A.~C. Bovik, and L.~K. Cormack, ``A   subjective study to evaluate video quality assessment algorithms,''   \emph{SPIE Proceedings Human Vision and Electronic Imaging}, 2010.  \bibitem{Seshadrinathan2009Study-of-Subjec} ------, ``Study of subjective and objective quality assessment of video,''   \emph{IEEE Transactions on Image Processing}, 2009.   As you can see, the author names have been replaced with ------. It looks like this in the final PDF:    Is this normal behavior? How to use the parskip package? (space in between paragraphs) Why would you put Identity Increment other than 1 in SQL? Computing $ \lim_{n\rightarrow \infty}\left(\frac{1^n+2^n+\cdots \cdots +n^n}{n^n}\right)$ One of the great 'coincidences' in physics is that the Sun happens to shine most brightly at exactly the wavelengths our eyes can see; it's an easy explanation that our eyes evolved to make the most out of what was available.  However, this spectral window is also , with Rayleigh scattering and the ozone layer protecting us from the UV and strong water vapour absorption in the IR until way into the radio range.  My question is: is this a coincidence? Were there geological factors that made it so? Or is it just lucky chance? (I also notice other planets in our neighbourhood weren't quite so lucky.) Or had atmospheric absorption been different our eyes would have tuned to whatever spectral window were brighter as a whole? In  (not feature request), :  ... if we find that people are abusing the system their accounts may get suspended. I would consider that kind of behavior abuse.  Well  sure qualifies. He has 11 Stack Exchange accounts and has in the last day spammed at least 8 of them to gain the Suffrage and sometimes Vox Populi badges. That's over 250 votes† in just a few hours! (And  -- while voting on other user's posts too.) I guarantee that he's not voting on those posts for/by their merits. Here's when he scammed the Suffrage badge per site (while also gaming the Vox Populi on some sites):                      - 2017-03-11 16:23:15Z                     - 2017-03-11 17:41:41Z                     - 2017-03-11 18:08:13Z                           - 2017-03-11 19:25:10Z                  - 2017-03-11 19:55:16Z                               - 2017-03-11 20:00:49Z               - 2017-03-11 20:03:13Z  - 2017-03-11 21:11:40Z  Note that he got the badge on three sites within an 8 minute span (but that might just be job run times). Please revoke badges gained through improper voting. And, maybe also warn/suspend such abusive voters.   † His account vote totals don't show all votes as some serial voting was reversed -- but none of the ill-gotten badges were. PHP: How do I loop through every XML file in a directory? I need to get the size of directory in terminal for signing purposes. I'm using following command:  du -s /path/to/dir   I'm multiplying the result by traditional UNIX block size (512 bytes) and get actual directory size in bytes. However, the Finder's "Get Info" dialog window shows the size slightly smaller than the one calculated with the terminal command. And it seems that it's reproducible on any folder/bundle. What am I missing? Short Story about interminable rain on Venus It's not All Summer in a Day.  This was a story about explorers on Venus, who are separated from their base (possibly they're lost, possibly they suffered equipment failure, possibly they're just traveling from base to base) and are slowly being driven insane because it never stops raining.  The story is old enough that Venus' clouds were still believed to indicate a wet climate.  I can't remember much more detail than that.  I have the impression that the narrator at one point either dreamed of or fantasized about walking into the destination base and being handed a very plush towel to dry off.  I can't remember the central plot points - only the (very wet) setting.  I would have read this in the late 1970's or early 1980's.  I thought it might be an H. Beam Piper short story but I've been through his catalog and don't see any likely suspects. Repeating the consonant in many words in a sentence or phrase In the movie 'V for Vendetta' you have for example (bold part):     Evey: Who are you?        V. : Who? Who is but the form following the function of what and what I am is a man in a mask.      Evey: Well I can see that.        V. : Of course you can, I’m not questioning your powers of observation, I’m merely remarking upon the paradox of asking a masked man who he is.      Evey: Oh, right.      V. : But on this most auspicious of nights, permit me then, in lieu of the more commonplace soubriquet, to suggest the character of this dramatis persona.      V. : Voila!   In view humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of fate. This visage, no mere veneer of vanity, is a vestige of   the “vox populi” now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin, van guarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta, held as a votive not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily this vichyssoise of verbiage veers most verbose, so let me simply add that it’s my very good   honour to meet you and you may call me V.       Evey: Are you like a crazy person?      V. : I’m quite sure they will say so.   What do you call sentences like these? And do you know some other ones?