I am studying Qt, I find it really amazing and a bit easier because I've already used MFC in Microsoft.  I've developed a scientific calculator for educational use. But what faced me is:  I want float high precision like in real-world calculators so after searching I've found this function:      long double ldRes =  std::sqrt(3);     QMessageBox m;     m.settext(QString::number(ldRes, 'g', 30));     m.exec();   The output:  1.73205080756887719317660412344   While the output, according the , of the same operation to the same precision, should be:  1.73205080756887729352744634151   So it is apparent that the result is not the same so can anyone advise me how to get correct float-precision in my applications using Qt? or any other library?  Should I use GMP MPIR MPFR?  Thank you!
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Get table names using SELECT statement in MySQL I was doing a package removal with apt-get remove but then realized I should have done a --purge along with it to remove the configuration files.  Can I remove the packages configuration files easily or do I need to reinstall the package and then remove with a --purge? I've tried to find any solution or proof for $$\langle x| x' \rangle=\delta(x-x'),$$ but I only came to this post:   So I got the information, that the vector $|x\rangle$ form a dirac-normalized basis for the Hilbert Space.   I know that the dirac-delta distribution is defined like this: $$\delta(x-x') = \begin{cases} 0 &amp;\mbox{if } x\neq x' \\ \infty &amp; \mbox{if } x=x' \end{cases},$$ this means that my x' is a point on my x axis where I have my infinite high peak. And also $$\int_{-\infty}^{\infty}dx\cdot \delta(x-x')=1.$$  But how actually correlate this with the scalar product of vectors x, x' in the Hilbert Space that form a so-called 'diracl-normailzed" basis of it?  Can you give me some tips on this please? Or maybe you actually know a link, where this is explained. Getting new files to inherit group permissions on Linux I am having a problem with permissions on a Linux server. I am used to BSD. When a directory is owned by a group the user who owns it isn't in such as www-data, files created in it will be owned by that group. This is important because I want files to be readable by the webserver (which I will not run as root) but so a user can still put new files in the directory. I can't put the users in www-data because then they can read every other users websites.   I want the webserver to read all websites, I want users to be able to change their own.  The permissions are set like this on the folders at the moment....  drwxr-x--- 3 john www-data 4096 Feb 17 21:27 john   It is standard behavior on BSD for permissions to work this way. How do I get Linux to do this? Are the known exoplanets representative of the population of exoplanets? An  states that most of the 715 newly announced exoplanets orbit very close to their host stars.   Do the theories predict that this is a representative sample and that most planets are very close to their host stars? Or is it just that our current detection techniques are predisposed to finding only those planets close to their stars (because the sensors look for dimming of the host star for example)? I updated to TeXLive 2017 and couldn't get newlfm.cls to work without errors.  Here is a minimal example:  \documentclass{newlfm} \begin{document} \begin{newlfm} \end{newlfm} \end{document}   LaTex is throwing undefined control sequence errors on \fancy@reset, \f@ncyolh, and \f@ncyorh.  What causes the errors?  What am I missing? I am trying to print a List of Appendices (LoA) for my thesis, separate from the Table of Contents (ToC).   I wish for my ToC to look like this, with depth up to subsections (2?):  CONTENTS  CHAPTER   I. Introduction......1    1.1 Section title...1     1.1.1 Subsection...1  Appendices ..... 2   and for an LoA on a new page, with depth 0, thus:  APPENDICES  APPENDIX A. Proof of Theorem 1...1 B. Proof of Theorem 2...1   I am trying to achieve this using the report class, in a way that allows me to type appendices using the hierarchy that I obtain from the chapter, section commands. This is as opposed to defining a custom myappendix command into which I insert my appendix content. (I realize that I only need the titles from the appendix chapters for the LoA, but I'd like for the appendix content to have such structure.)   For instance, this approach would solve my problem:   \chapter{Introduction} \section{Section title} \subsection{Subsection} % \begin{appendices} is also acceptable \appendix   % Some settings are changed now \chapter{Proof of Theorem 1} \chapter{Proof of Theorem 2} % \end{appendices} if environment is begun   whereas the following approach would not:  \chapter{Introduction} \section{Section title} \subsection{Subsection} \myappendix{Proof of Theorem 1} \myappendix{Proof of Theorem 2}   I realize several questions have been asked regarding this before, but none of them quite solved my problem. Notably,  defines a custom appendix command;  defines two custom commands to maintain some hierarchy, but I will have to do more work to handle the inclusion of another layer (subsection) into the appendix.    is the closest to what I want: it does give me a separate LoA, but it also adds appendices to ToC and I can't quite figure out how to suppress the entires in ToC. The moment I use   \addcontentsline{toc}{\setcounter{tocdepth}{-1}}   the line   \xpatchcmd{\@chapter}{\addcontentsline{toc}}{\addcontentsline{toa}}{}{}%   fails because I am not adding anything to the ToC anymore.   My approach: Since I was using titlesec and tocloft packages anyway, I tried to do the following:   Stop ToC once appendix command is issued Start a new counter for appendices using tocloft Using the &lt;after-code&gt; option of titlesec, add contents line after every chapter.    My MWE   \documentclass[a4paper]{report} \usepackage{lipsum} % for arbitrary text  \usepackage{tocloft,etoolbox,titlesec} \newcommand{\listappendixname}{List of Appendices} \newlistof{appendix}{apc}{\listappendixname}  \makeatletter \g@addto@macro{\appendix}{     \clearpage     \addcontentsline{toc}{chapter}{Appendices}     \addtocontents{toc}{\protect\setcounter{tocdepth}{-1}}     \titleformat      {\chapter}      [display]     {\huge\bfseries\filcenter}      {\Large \MakeUppercase{\@chapapp} \thechapter}      {1.5ex}{}     {\refstepcounter{appendix} \addcontentsline{apc}{appendix}{\protect{\@chapapp \thechapter}}} } \makeatother  \title{Title} \author{Author}  \begin{document} \maketitle \tableofcontents \clearpage \listofappendix  \chapter{Introduction} \lipsum[1] \section{Section} \lipsum[2] \subsection{Subsection} \lipsum[3]  \appendix  \chapter{Proof of Theorem One} \lipsum[4] \chapter{Proof of Theorem Two} \lipsum[5]  \end{document}   produces the following LoA:  List of Appendices  Appendix...... 5   It doesn't get the Appendix title or number, and fails after the first one.  Could you please help me obtain a separate LoA in a way that I can still use LaTeX's chapter, section, ... hierarchy? (I am okay with using different packages, the book class, or any approach other than mine.) Nikon d5100 producing extremely underexposed images Can you be sued for using publicly used images on a blog without copyright permission? Sometimes I use, $PROJECT_HOME/* to delete all files in the project. When the environment variable, PROJECT_HOME is not set (because I did su and the new user doesn't have this environment variable set), it starts deleting all files from the root folder. This is apocalyptic.  How can I configure bash to throw error, when I use an undefined environment variable in the shell? How to show that $\int_{0}^{\pi}{\sin^5 x\over 1+\cos^3 x}\mathrm dx=\ln 3?$ Given the integral $(1)$     $$\int_{0}^{\pi}{\sin^5 x\over 1+\cos^3 x}\mathrm dx=\ln 3\tag1$$   This integral seems to be quite tough, I can't even know where to start. I have try substitution $u=1+\cos^3 x$ and $u=\cos^3 x$, can seem to remove the x variables.  We have the following identities   $$\sin^5a={5\over 8}\sin a-{5\over 16}\sin 3a+{1\over 16}\sin 5a\tag2$$  $$\cos^3 a={3\over 4}\cos a+{1\over 4}\cos 3a\tag3$$  We may write $(1)$ as  $$\int_{0}^{\pi}{\sin x(1-\cos^2 x)^2\over 1+\cos x(1-\sin ^2 x)}\mathrm dx\tag4$$  $u=1-\sin^2 x\implies \mathrm du=-2\sin x\cos x\mathrm dx$ then $(4)$ becomes  $${1\over 2}\int_{0}^{1}{(1-u)^2\over \sqrt{u}+u^2}\mathrm du\tag5$$  $u=v^2\implies du=2vdv$ then $(5)$ becomes  $$\int_{0}^{1}{(1-v^2)^2\over v+v^4}\cdot{v\mathrm dv}\tag6$$ Simplify to  $$\int_{0}^{1}{(1-v)(1-v^2)\over 1-v+v^2}\mathrm dv\tag7$$  I guess using partial decomposition of fraction and integrate term by term, seem lengthy process  How else can we prove $(1)$? How do I make a program auto-start every time I log in? I frequently need to start several programs that I use every time I start my computer. How can I make it so that whenever I login the program is automatically launched? Inner automorphisms form a normal subgroup of $\operatorname{Aut}(G)$ For an arbitrary group $(G,\cdot)$ let $\operatorname{Aut}(G) = \{f: G \to G \mid f \text{ is an isomorphism}\}$ be the set of all automorphisms of the group $G$. We assume that $(\operatorname{Aut}(G),\circ)$ where $\circ$ is composition of mappings is a group.  1) Prove that for arbitrary $a \in G$ there is an automorphism $p_a: G \to G;\quad p_a(x) = a^{-1}xa$.  2) Prove, that $\operatorname{Inn}(G) = \{p_a \mid a \in G\}$ is a normal subgroup of $(\operatorname{Aut}(G),\circ)$. I am just looking for some clarification on this exercise:  Let $A = \{a,b,c,d\}$. Give an example of a relation $R$ on $A^2$ which is reflexive, symmetric, and not transitive.  I understand that if I was only dealing with $A$ and and not $A^2$ I could give an answer similar to:  $R = \{(a,a),(a,b),(a,d),(b,a),(b,b),(c,c),(d,a),(d,d)\}$  Here $R$ is reflexive, symmetric, and not transitive.  What is confusing me is the fact that we have $A^2$. I am not sure what I am missing here. I am looking through my book to see if I can figure this out, but if someone could help shed some light on this it would be appreciated.  Thanks,  Tony Creating a query that uses criteria from two tables? Is the function $\mbox{tr}(XAX')$ convex? Is the function $\mbox{tr}(XAX')$ convex, where $A$ is a positive semidefinite (PSD) matrix? I know that for a general $A$, the above trace function is not convex. But for a PSD $A$, is the function convex? How do you display a photo map tip in QGIS 3 on Windows?  As a new user I'm not sure if this is my lack of experience or a bug, so I've tried to simplify it as far as I can:  This is the contents of the Layer Display properties.    &lt;div style="width:400;height:400"&gt; &lt;p&gt;test&lt;/p&gt; &lt;div&gt;&lt;img src="C:\Local\aa.jpg" width="350" /&gt;&lt;/div&gt; &lt;/div&gt;   and this is how it appears:    C:\Local\aa.jpg is real file I'm using to try to figure out what the problem is. What am I doing wrong? How to remove trailing whitespaces with sed? In Ubuntu 13.04 I used to use the ppa:upubuntu-com/tor64  PPA to install the 64-bit Tor Browser Bundle. However, in Ubuntu 13.10 it doesn't work anymore. How do I install the Tor Browser Bundle in Ubuntu? Which Distribution Does the Data Point Belong to? I have two distributions which are derived from 2 separate sets of data. These distributions are not normal, and it is not clear at this point if they belong to any family of known pdfs (they are not symmetric either). Given a data point, I need to decide which distribution it is most likely to belong to. If these were normal distributions, I could do usual parametric tests and go from there, but in this case I am not sure how to proceed. I searched around a bit, but I couldn't find anything, probably because I am not using the right keywords. Any help is much appreciated.  Edit to clarify: I should have mentioned that it was univariate. I might as well explain the actual problem here as well. We have time-spent data for users on websites. We also have information on whether a user liked or disliked some of those sites (about 4% of all the sites). So we know the distribution of time spent for like and dislike. An obvious question, then, is for a random user who spent x amount of time, are they more likely to have liked the page or dislike the page. Our time spent information is based on seconds, so the distributions are really discreet, but in real life, they are continuous.