I use Qt Creator 4.8.2.   I already have a working program 'A' and added a subproject 'B' for testing.  I am trying to do a unit test using qtest.  How can I measure test coverage for Project 'A'?  If you have examples, please comment it.
What is code coverage and how do YOU measure it?  I was asked this question regarding our automating testing code coverage. It seems to be that, outside of automated tools, it is more art than science. Are there any real-world examples of how to use code coverage?
We add negative numbers and zero to natural sequence to make it closed under subtraction, the same thing happens with division (rational numbers) and root of -1 (complex numbers).  Why this trick isn't performed with division by zero? I was thinking about something the other day (that is probably stupid), and thought this would be a good place to talk about it.  If someone wanted to draw its family tree over the last 1000 years, he'd write a binary tree with a depth of about 40 (counting 25 years on average between each generations). This tree would have 240 leaves, or about 1012 ancestors on the deeper level. That is obviously much more than the total world population and a stupid figure when you think about it.  The only explanation that I can think of is that a real genealogy tree must have "linked" branches at several levels that change the actual number of ancestors. Anyway, for an average person, how many ancestors would that make? Could one assume that all or nearly all of the persons that lived in its country or world region a 1000 years ago would be part of its ancestors? is a one-by-one-matrix just a number (scalar)? I was wondering. Clearly, we cannot multiply a (1x1)-matrix with a (4x3)-matrix; However, we can multiply a scalar with a matrix. This suggests a difference.  On the other hand, I was, for example, in an econometrics lecture today, where we had for a (Tx1)-vector $\underline{û}=\left( \begin{array}{c} û_1\\ \vdots\\ û_T\end{array}\right)$:     $S_{ûû}:= \sum_{i=1}^T û_i^2$ shall be minimized. We see see that   $S_{ûû}=\underline{û}^T\underline{û}$.   Well, formally, shouldn't it be $(S_{ûû})=\underline{û}^T\underline{û}$ or $S_{ûû}=\det(\underline{û}^T\underline{û})$, to ensure that we stay in the space of matrices and not suddenly go to the space of scalars? So here, the professor (physicist) not only treats $\underline{û}^T\underline{û}$ like a scalar, but also calls it a scalar. Is this formally legit or a wrong simplification (though it does not seem to have any impact, and surely makes life easier)? What happens to the human inside the titan when the titan dies? Just to be clear I'm NOT talking about those who where swallowed.       We know that titans used to be humans and then somehow they transformed into titans.   When they kill a titan it completely Vaporizes and nothing is left. So what happens to the human inside them?     Could it be like when Eren was testing his limits and each time he fused more with the titan body? If so, why could Ymir live in titan form for over 60 years and still transform back into human? Why would I open a low-rate 9 month CD instead of a higher rate savings account? One specific (popular online) bank is offering a 9 month 1.25% CD, while it's savings account is 1.90%.  There's no way I see interest rates tumbling in the next nine months, so why should I -- why should anyone -- get a 1.25% CD when savings accounts are paying 52% more interest?  (This question is not specific to this particular bank at this particular time.  It's about the general practice of buying low-rate CDs when savings accounts have a higher rate.) I often see questions on Stack Exchange sites which I presume are written by non-native English speakers who use the word "doubt" in place of the word "question". Is this a case of misunderstanding the correct meaning or are people being taught that this is correct usage? How to make a grid-to-sphere animation like this? Problems with Curve Modifier If I have random variables $X_1,X_2,\ldots,X_n$ that are Poisson distributed with parameters $\lambda_1, \lambda_2,\ldots, \lambda_n$, what is the distribution of $Y=\left\lfloor\frac{\sum_{i=1}^n X_i}{n}\right\rfloor$ (i.e. the integer floor of the average)?  A sum of Poissons is also Poisson, but I am not confident enough in statistics to determine if it is the same for the case above. Conditionally use 32/64 bit reference when building in Visual Studio To show that $2$ | $x^{2n} - x^n$, $n \in \mathbb{Z^+}$ is the following adequate? Parameter Sniffing (or Spoofing) in SQL Server A while ago I had a query that I ran quite a lot for one of my users. It was still being evolved and tweaked but eventually it stablised and ran quite quickly, so we created a stored procedure from it.   So far, so normal.   The stored procedure, though, was dog slow. No material difference between the query and the proc, but the speed change was massive.   [Background, we're running SQL Server 2005.]  A friendly local DBA (who no longer works here) took one look at the stored procedure and said "parameter spoofing!" (Edit: although it seems that it is possibly also known as 'parameter sniffing', which might explain the paucity of Google hits when I tried to search it out.)   We abstracted some of the stored procedure to a second one, wrapped the call to this new inner proc into the pre-existing outer one, called the outer one and, hey presto, it was as quick as the original query.   So, what gives? Can someone explain parameter spoofing?   Bonus credit for    highlighting how to avoid it  suggesting how to recognise possible cause discuss alternative strategies, e.g. stats, indices, keys, for mitigating the situation How to generate a simple cartesian plane system? I need to make a cartesian plane for plotting the straight line joining the points (-3,1) and (6,-2). This is a very simple cartesian plane plotting. When I looked at the manual for tikz the graphics for cartesian planes are for more advance plotting, and what I need is very simple.  Something like this: How do trees lift water higher than 10 meters? The atmosphere pressure is 10 meters of water (approx). This means that it is impossible to lift water higher than 10 meters with vacuum or сapillary action (on Earth, under normal conditions).  There are trees higher than 10 meters.  How do they lift water to their tops?  UPDATE  In other words: how cohesion-tension theory can be true if it apparently contradicts the laws of physics?   UPDATE 2  Atmospheric pressure helps to rise the water, not resists rising. What is resisting is water weight. When water column is 10 meters high, then atmospheric pressure can't help anymore.   Any adhesion/cohesion mechanism can't help here too, because it acts only in thin molecular layer. To transfer action force further the pressure is required, which is insufficient at 10 meters.  UPDATE 3  If we had capillary small enough to rise water to 10 meters and then we will build smaller capillary which we expect will rise water higher, we will fail. Water column will break and does not climb higher than 10 meters.     Menisci acts like small piston and can't help rising water higher than 10 meters.  UPDATE 4  Common pressure distribution in capillary is follows:    $P_0$ is atmospheric pressure. As you see, right under menisci, the pressure is lowered by $2 \sigma / R$ where $R$ is the radius of menisci and $\sigma$ is surface tension. The entire term is called "Laplace pressure". As you see, it can't supersede atmospheric pressure, because water continuity will be broken in the case.  I.e. no any menisci can rise water higher than 10 meters.  The existence of higher trees PROVES that there are some other significant mechanisms, not adhesion/cohesion, not capillary.  UPDATE 5  Current version, as I understood it, is based on a declaration, that a water, if put into thin capillary, can behave like a solid body. Particularly, it can resist tension up to minus 15 atmospheres.   This is a tensile strength of concrete, so I don't believe that without additional proofs.  I think it is just not hard to make thin tube, put water into it and check, how high it can climb.  Was it done ever? In the spirit of a  I would like to know if there's a basis for understanding why there  that have non-zero electric charge but zero spin?  Can such a quantum theory be written down and self-consistent? Do the current symmetries of our present QFTs not allow such a particle? I'm using Drupal 7.  Is it possible to add a CC to a webform email?  I was using   function theme_webform_mail_headers($variables) {   $headers = array(     'X-Mailer' =&gt; 'Drupal Webform (PHP/' . phpversion() . ')',   );   return $headers; }   changing it with      function MYTHEME_webform_mail_headers($variables) {       $headers = array( 'CC' =&gt; 'ccmeail@domain.com', 'X-Mailer' =&gt; 'Drupal Webform (PHP/'. phpversion() .')',  );       return $headers;     }   It does not work, I've cleared all the chaches and it does not add the CC. How could I add the CC?  Thanks in advance. Evolving Pokemon based on CP vs Moves Many people are evolving their pokemons based on the CP. However, there's a growing number of people evolving based on Moves instead of CP. In other words, choosing pokemons that have the highest Moves to keep, even if it isn't necessarily the highest CP. I am new to pokemon and don't quite understand the difference between the two. Thus, which strategy is better? Why is $\langle \textbf R \rangle =Tr \rho R$ here $\rho$ is the state density matrix Do the -ing and to-infinitive "verbs" that follow catenative verbs always take the grammatical function of "noun"? I'm wondering whether or not the verb form that follows a catenative verb has the grammatical function of a noun or of a verb, and whether or not it depends on the first catenative verb.  "I like to run" "I like running"  the -ing and the to infinitive can easily be switched in this sentence, and it seems to be implying "I like [the act of[running]]", so both the infinitive and the gerund are nouns.  "I like to run marathons"/"I like running marathons"   These seem like they might still be nouns but need "verb powers" to take the object, and then these sentences really turn into "I like [the act of [running marathons]]"/ "I like [to be in the state of [running marathons]]".  Is this true for both the -ing (and so it would be a gerund) and the to-infinitive? Are they, sort of, initially verbs so that they can take the object, and then the verb + object becomes a noun phrase?  If this is true, I'm also wondering if the same rules apply for a catenative verb such as "start".  "I started to run in the mornings" "I started running marathons in 2008"  "start" is a catenative verb that isn't a cognitive/emotion verb, and specifically suggests action. So what is the grammatical function of the to-infinitive and -ing verb forms? are they verbs? are they nouns? It just seems incorrect to say that their grammatical function is a noun, but everything I've seen on the internet is pretty vague. I've also seen that to-infinitives are never verbs, but only from one source and it just doesn't seem right to me.  So any ideas on the true grammatical function of the -ing and the to-infinitive after a catenative verb? And is it universal across catenative verbs, or does it depend on the verb category? No input file specified