I have the following code:    console.log("1-"+parseFloat($('#pval').text().replace(',','.')));  console.log("2-"+parseFloat($('#pvig').text().replace(',','.')));  console.log("3-"+parseFloat($('#potr').text().replace(',','.')));  var aux = parseFloat($('#pval').text().replace(',','.'))+parseFloat($('#pvig').text().replace(',','.'))+parseFloat($('#potr').text().replace(',','.')); console.log("4-"+aux);   Which returns :      1-1.5      2-2.52      3-0.18      4-4.199999999999999 //&lt;-This is the problem   Why is this simple sum, losing 0.000000000001 ? How should I repair it? I already tried  aux=Math.round(aux*100)/100;  But itsn´t actually working.  Any help will be preciated.     The values of those camps  id(pval)=1,5  id(pvig)=2,69  id(potr)=0,18
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Continuous function whose right hand derivative equals 0 is constant? How to edit command line in full screen editor in ZSH? can anybody tell me which one of these is the correct one? I have been searching all over the internet but I have still got no answer.  Types of books Types of book Why choose a low latency kernel over a generic or real-time kernel? What regular expression will match valid international phone numbers? I am a kid trying to teach myself Calculus in order to prepare for next year.   I have the expression  $$\lim_{x\to 2}\frac{\cos(\frac \pi x)}{x-2} $$  There is a hint that says to substitute t for $(\frac \pi2 - \frac \pi x)$ and WolframAlpha evaluates this expression as $\frac \pi4$. However, I got the answer of $1$. Can someone clarify the steps to solving this problem. Understanding UNIX permissions and file types Is there a way to format a UTC time into any arbitrary string format I want in java?  Basically I was thinking of having some class take the timestamp and I pass it is string telling it how I want it formated, and it returns the formatted string for me.  Is there a way to do this? More section headings? I am a novice in LaTeX and I have one question.  Can someone tell me what if you want more heading's in LaTeX. Like 5 or 10 or even 15. Is there a package for that? Finding my house in minecraft My Realtek NIC in my Windows Home Server (essentially w2k3) box refuses to run at 1000Mb/s even if I change the driver settings from Auto Negotion to 1000Mb/s full duplex. I've installed the latest driver and tried changing the speed setting but I'm having no luck. Not sure what to try next. Any ideas?  I have a Netgear GS605 v2 Switch supports 10/100/1000 D Link DIR 655 router.  All my machines bar one/2 have 1000Mb/s NICs (Old laptop/Xbox being the exceptions)  The reason I noticed the problem was because I was copying files between two machines and maxing one NIC out and only seeing 10% on the other machine. I do have a fairly lengthy cable between the switch and the router (maybe 20m) could that be the issue? I am using Adobe CC(2015) latest version and the behaviour of the smart objects isn't normal. When I paste a vector from Illustrator to Photoshop, the vector looks low quality or rough.   ORIGINAL  IN PHOTOSHOP   However, if I click over the smart object layer(in Photoshop)and this is opened in Illustrator, the vectors looks as the original one.   VECTOR OPENED IN ILLUSTRATOR FROM PHOTOSHOP SMART OBJECT   How can I solve this? How do I change text on the submission button in the node form? Backup with duplicity on Google Cloud Storage I have already set a backup routine that backups all my files to Amazon S3 using duplicity. I would like to create a similar backup routine with Google Cloud Storage. Is it possible to get duplicity to work with GCS? I see that there a number of questions (, , , , ) on best practices, none of them answer the issue I am going to talk about.  We all need to prepare large documents (or slides) from time-to-time. And once you have reached a certain number of pages, you find that compiling the whole document takes a substantial time, which you need to do to check that the part you have written is error free, specially if it contains a number of images.   To circumvent the situation, I have used the following practices over years to keep compile time at minimum.   Divide the document in to many chapters: The chapters are put in separate files. Only the one I am working one is uncommented.  \documentclass{book}  \begin{document}  %\input {chapterone.tex} \input {chaptertwo.tex} %\input {chapterthree.tex} %\input {chapterfour.tex}  \end{document}    The above technique can also be used for \include.   Keep a preamble replica of the main file in a temporary file (build file): I use this technique when I am preparing a presentation with many slides, say a hundred. Prepare a main file, copy it to another build file. Delete everything between  \begin{document} and \end{document} in the build file. Prepare a slide (or a group of slides) in the build file. Cut and paste the contents between \begin{document} and \end{document} in the build file to relevant location in the main file only when satisfied with the output (image locations, overfull boxes etc.)     We can hear your inputs about the best practices you practice when a you are preparing a document or presentation from scratch.    Now, I have failed to find a good answer in the case when you have finished the whole document or presentation and now you need tweaking the small things, may be edit a text here, add an image there. What will be your best practice?  Perhaps, again keeping only one chapter uncommented will be usable here. But what about large presentations? May be adding a \end{document} just after the point-of-change will be beneficial, but only if you can put that before midpoint of the file.  Commenting a part of the file will also work, but that is error-prone, at least for me. I'm trying to identify a song by a female 80's pop group.   Here are the lyrics I remember:     It's the story of my life if you want to know   a play where everything is meant to be   you're the story of my life and I can't let you go When can a (finite) group be written as the quotient of some other group by its center? So if I'm given $H$, when I can conclude there is a group $G$ such that $H\cong G/Z(G)$? It's easy to show that non-trivial cyclic groups are not of this form. More generally, any group with the property that all finitely generated subgroups are cyclic (e.g. $\mathbb{Q},\mathbb{Q}/\mathbb{Z}$) cannot be of this form. Are there are any others? There is a $C > 0$ such that $\vert f(z)-f(w)\vert \leq C\vert z-w\vert$ for a holomorphic map into $B(0, R)$. Let $0&lt;\delta&lt;r$ and $R&gt;0$, and $a\in\mathbb C$. I want to show that there exists $C&gt;0$ such that for all holomorphic functions $f\colon B(a,r)\to B(0,R)$, we have $$ \vert f(z)-f(w)\vert\leq C\vert z-w\vert $$ for $z,w\in B(a,\delta)$.  I'm not sure how to approach this. I was wondering if I could use that $$ \left\vert\frac{f^{(n)}(a)}{n!}\right\vert\leq\frac{\Vert f\Vert_{C(a,\rho)}}{\rho^n} $$ for some $0&lt;\rho&lt;r$. I also have an expression from biholomorphic maps from $B(0,1)$ to itself, but I'm not sure if I could use that here. Any hints? I have a bash script which must call another bash script which varies per-user in order to get some configuration information, like so:  somescript:  #!/bin/bash ${HOME}/.ssconfig echo "Hello, ${VARIABLE}!"   ~/.ssconfig  #!/bin/bash VARIABLE=world   Which, instead of giving me Hello, world! as expected, gives me Hello, ! How can I pass variables up from a script to the one that called it? What are the differences between executing shell scripts using "source file.sh", "./file.sh", "sh file.sh", ". ./file.sh"? Have a look at the code:  #!/bin/bash read -p "Eneter 1 for UID and 2 for LOGNAME" choice if [ $choice -eq 1 ] then         read -p "Enter UID:  " uid         logname=`cat /etc/passwd | grep $uid | cut -f1 -d:` else         read -p "Enter Logname:  " logname fi not=`ps -au$logname | grep -c bash` echo  "The number of terminals opened by $logname are $not"   This code is used to find out the number of terminals opened by a user on the same PC. Now there are two users logged on, say x and y. I am currently logged in as y and there are 3 terminals open in user x. If I execute this code in y using different ways as mentioned above the results are :  $ ./file.sh The number of terminals opened by x are 3  $ bash file.sh The number of terminals opened by x are 5  $ sh file.sh The number of terminals opened by x are 3  $ source file.sh The number of terminals opened by x are 4  $ . ./file.sh The number of terminals opened by x are 4   Note: I passed 1 and uid 1000 to all these executables.  Now can you please explain the differences among all these?