PHP calculation issue 3348 became 3347.9999999999995
Is floating point math broken?
How to add PlotLegends in a Show function? 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. Assume that a person (not me, I only hold a single citizenship :) has a double citizenship in countries such as the US, Singapore, Australia, Japan, etc, which are eligible for 90/180 visa-free stays in the Schengen area. Could they officially remain in the Schengen area indefinitely by taking a trip to (say) the UK every 89 days? Optimization paramters read-only mysql 5.7 database? What's the best way to configure a MySQL database that is only read-only, and will never have any modifications made to it?  1) I have increased my innodb_buffer_pool_size to 70% of available RAM  2) Increase query cache size to 40mb  Running against a load generator, after some time the database starts bottlenecking to only 1000 statements per second.  The configuration is 2-cores, 8GB ram 50GB SSD. The database contains a single InnoDB 13 GB table with the same exact query running on two indexed columns.  We are using a vertx server to hit the database. The symptom we see is that the web service performance degrades after 15-20 minutes of heavy load.  Where can the bottleneck be? What parameters should we optimize? Fields - Proof that every multiple of zero equals zero This is one of my first proofs about fields. Please feed back and criticise in every way (including style and details).  Let $(F, +, \cdot)$ be a field. Non-trivially, $\textit{associativity}$ implies that any parentheses are meaningless. Therefore, we will not use parentheses. Therefore, we will not use $\textit{associativity}$ explicitly.  By $\textit{identity element}$, $F \ne \emptyset$. Now, let $a \in F$. It remains to prove that $0a = 0$. \begin{equation*} \begin{split} 0a &amp;=  0a +  0      &amp;&amp; \quad \text{by }\textit{identity element }(+    ) \\    &amp;=  0a +  a + -a &amp;&amp; \quad \text{by }\textit{inverse element  }(+    ) \\    &amp;=  0a + 1a + -a &amp;&amp; \quad \text{by }\textit{identity element }(\cdot) \\    &amp;= (0 + 1)a + -a &amp;&amp; \quad \text{by }\textit{distributivity   }        \\    &amp;= (1 + 0)a + -a &amp;&amp; \quad \text{by }\textit{commutativity    }(+    ) \\    &amp;=      1 a + -a &amp;&amp; \quad \text{by }\textit{identity element }(+    ) \\    &amp;=        a + -a &amp;&amp; \quad \text{by }\textit{identity element }(\cdot) \\    &amp;=  0            &amp;&amp; \quad \text{by }\textit{inverse element  }(+    ) \end{split} \end{equation*} QED  PS: Is "Let $(F, +, \cdot)$ be a field." ok? Besides, I would not want to call $F$ a field, because $F$ is just a set. Also, what do you think about using adverbs like "Now"? How would you have said the associativity-thing? Is there any way of making a Minecraft server lower than the current version? So me and my friends manged to make a server in Minecraft for us to play on and we would like to add mods. But the mods we want to add are a few versions lower than the updated version. Is there any way of making a server with a lower version of Minecraft that people can still play on? uname -r and available linux-headers- packages do not match obtain a three-term asymptotic solution In the simple harmonic oscillator model, we talk about the angular frequency and I understand that this tells something about the instantaneous angular velocity of the object. For example, a simple pendulum. But what does this mean when we apply this concept to an object attached to a spring that behaves as a simple harmonic oscillator? There is no instantaneous circular motion for the object, so how can we relate the angular frequency to a system like this? Setting "checked" for a checkbox with jQuery On all of the other SOFU sites a downvote means The question is unclear or not useful.  However, here on meta, a downvote has become a sign of I don't agree with the question, suggestion, feature request, bug, etc. being described in the question.   What does a downvote on Meta really mean? What other reasons do people downvote on Meta? Why is it okay for meta to redefine the meaning of the downvote?  The tooltips and instructions are all the same here on meta.   Note: I'm not saying I disagree with the practice, just curious. "None" as plural indefinite pronoun In my grammar book (English Grammar, HarperCollins Publishers), I read that none is occasionally treated as plural, but it is usually regarded as singular. Can you give me an example of sentence where none is used as plural pronoun? Why does a star beyond a certain mass limit (Chandrasekhar limit) only become a black hole? Why does a star beyond a certain mass limit () only become a black hole?   A star is first made of hydrogen, it undergoes nuclear fussion reaction combining into helium and releasing a large amount of energy. This process continues till star is made up of iron core as iron has largest value of binding energy per nucleon, after this if mass of the star is above the value of Chandrasekhar limit it becomes a black star, what is the reason for this and why is certain mass limit required? If shuffle-playing playlist &times;100 resulted in [10 13 10  3  2  2] different songs being repeated [1 2 3 4 5 6] times, what is the estimate for the total number of songs? (assuming shuffle play was completely random)  Update: (R code)  k &lt;- 50 # k number of songs on the disk indexed 1:k n &lt;- 100 # n number of random song selections m &lt;- 20 # m number of repeat experiments colnum &lt;- 10 mat &lt;- matrix(data=NA,nrow=m,ncol=colnum) df &lt;- as.data.frame(mat) for(i in 1:m){   played &lt;- 1+floor(k*runif(n)) # actual song indices (1:k) selected    freq &lt;- sapply(1:k,function(x){sum(played==x)})   # = number of times song with index x is being played   histo &lt;- sapply(1:colnum,function(x){sum(freq==x)});   for(j in 1:colnum){    df[i,j] &lt;- histo[j]   } } df   Resulting in: e.g. 20 distributions (V1=number of single plays, V2=number of double plays, etc):     V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 1  15 13 11  1  2  2  0  0  0   0 2  15 12 10  1  4  0  1  0  0   0 3  12 14  7  6  3  0  0  0  0   0 4  17 16  6  4  2  0  1  0  0   0 5  17 10 12  5  0  0  1  0  0   0 6  13 15 11  6  0  0  0  0  0   0 7  10 14  9  3  2  1  1  0  0   0 8  12 17  5  6  3  0  0  0  0   0 9   9 19  8  3  1  2  0  0  0   0 10 13  9 11  6  1  0  1  0  0   0 11 16  9 12  5  2  0  0  0  0   0 12 15  9 11  6  2  0  0  0  0   0 13 19  9  7  4  4  1  0  0  0   0 14 17 11  4  7  3  1  0  0  0   0 15 11 20  8  1  3  1  0  0  0   0 16 14 12 10  5  0  2  0  0  0   0 17  9 12  8  7  3  0  0  0  0   0 18 10 15  9  4  2  0  1  0  0   0 19 14 11 12  7  0  0  0  0  0   0 20 16 14 11  3  1  1  0  0  0   0   Now I need to get from here to the Poisson modelling--my R is a bit rusty (?lmer)...--Any help would be appreciated...  Attempted Poisson modelling: disappointing fit?!  plot(1:colnum,df[1,1:colnum],ylim=c(0,30),    type="l",xlab="repeats",ylab="count") for(i in 1:m){   clr &lt;- rainbow(m)[i]   lines(1:colnum,df[i,1:colnum],type="l",col=clr)   points(1:colnum,df[i,1:colnum],col=clr) }  df.lambda=data.frame(lambda=seq(1,5,0.1),ssq=c(NA));df.lambda for(ii in 1:dim(df.lambda)[1]){   l &lt;- df.lambda$lambda[ii]       ssq &lt;- 0       for(i in 1:20){         for(j in 1:10){           ssq &lt;- ssq + (df[i,j] - n*dpois(j,l))^2         }       }       print(ssq)       df.lambda$lambda[ii] &lt;- l   df.lambda$ssq[ii] &lt;- ssq     }     df.lambda     lambda.est &lt;- df.lambda$lambda[which.min(df.lambda$ssq)] lambda.est # 2.4 points(x &lt;- 1:10, n*dpois(1:10,lambda.est),type="l",lwd=2)  100*dpois(1:10,3) n/lambda.est   the estimated lambda stays around 2.3, with an n estimate of around 43; the fitted curve seems very discrepant, and seems to worsen with rising n !?  Doesn't this have to do with the fact, that our repeats are different from the 'classical' Poisson distributions: it's not just ONE event that repeats itself x number of times, but the sum of repeats of different items (songs)?! Path bar missing in file dialog after running software updater for Ubuntu 17.04 After running software updater, the path bar in the file dialog (for example the one you get when choosing Open File in in Google Chrome or Firefox) is missing. This is frustrating since it's no longer possible to copy a path from the terminal (for example) and paste it into the file dialog. Here is a screenshot of the dialog:     How can I get back the path bar? How do I access my Windows partition? Which shells don't support dollar-parenthesis expansion, and demand backticks? When you are writing Selenium/WebDriver automation scripts you will probably run into the exception NoSuchElementException. You think your selector is working, but somehow the element cannot be found.  What strategy should I take to analyse different reasons that this might be the case?   What should I research and how? Good answers would contain example situations and how to resolve them. (e.g. verify selectors, frames, waiting, etc) I run a guest ubuntu 12.04 on a host ubuntu 12.04, with VirtualBox, and the guest is much, much slower than the host (ALT+TAB takes 4-5 secs). I had a look around and I found contradicting opinions on VirtualBox versus VMware (free); so I thought to keep the former.   Both systems are updated, I installed the additions on the guest and I evenly split memory and video memory (64MB) between guest and host. I am running a Toshiba m200 laptop with 4GB ram and shared video memory. The host bios does not include a configuration option for machine virtualization. I have 2 cpus and I can't give them both to the virtual machine.  Is there anything I overlooked that could solve my problem?  Feel free to ask for more info, and thank you for any help.  EDIT Idling with the system monitor open the (single) guest cpu never gets below 55% and could rise to 80 - 90% just by moving the mouse around. Opening Firefox will cause the system monitor to show cpu usage 100% in the guest, while the host shows that both cpus are evenly working around 60%.  My cpu is Intel® Core™2 Duo CPU T5450 @ 1.66GHz × 2.  If this is not a configuration problem, does it mean my machine is too weak for virtualization? Apparently I inadvertently irked a moderator by creating a tag.  The moderator told me that my tag was "meta" and therefore not appropriate.  Having been a SO user for a long time (and a lurker on MetaSO), it was not clear to me what makes my tag "meta" and why meta tags would be inappropriate.  Many of the questions I see on SO aren't really about the topics in the title or the existing tag list.  For example, , isn't really about C++ or SetWindowText (or the Windows API as tagged).  It's simply somebody who had a bug, couldn't find it, and tried to outsource the debugging.  This seems to be a common category of question on SO.  So I started tagged questions like this with the label "findmybug".  Lots of frequent SO contributors regularly answer questions in this category rather than voting to close them as "Too Localized".  I took that as a cue that I should also try to answer rather than voting to close.  But leaving these questions open and tagged with "c++" and "winapi" even though the question isn't really about C++ or the Windows API seemed misleading.  Someone searching for answers on using SetWindowText from C++ probably isn't making exactly the same mistake and won't find that entry useful.  (In the end, the sample question was closed as "Too Localized", but this doesn't seem common for these types of questions.)  The Tags page says:     A tag is a keyword or label that categorizes your question with other, similar questions. Using the right tags makes it easier for others to find and answer your question.   It seems to me that the "findmybug" tag does group these similar questions together.  So from that perspective, it seems to fit.  Lots of users seem to enjoy answering these types of questions, so it makes sense they'd want a way to find them.  If you want to suggest that all the questions I would tag as "findmybug" should be closed as "Too Localized", that's fine.  But I'm trying to ask the more general question:  What makes a tag meta, and are meta tags inappropriate?