Detect unneeded headers in a C file - GCC
How should I detect unnecessary #include files in a large C++ project?
Let $p$ be an odd prime number. Prove that $$\left( \frac{1 \cdot 2}{p} \right) + \left( \frac{2 \cdot 3}{p} \right) + \left( \frac{3 \cdot 4}{p} \right) + \cdots + \left( \frac{(p-2)(p-1)}{p} \right) = -1$$ where $\left( \frac{a}{p}\right)$ is the Legendre symbol.  This seems to be a tricky one! I've tried using the property $\left( \frac{ab}{p} \right)=\left( \frac{a}{p}\right) \left( \frac{b}{p} \right)$ and prime factoring all the non-primes but to no avail. I had a quick thought of induction haha, but that was silly. I tried factoring the common Legendre symbols like $\left( \frac{3}{p}\right) \left[ \left( \frac{2}{p} \right) + \left( \frac{4}{p} \right) \right]$ but that didn't bring anything either. And I've been looking for pairwise cancellation with $1$ term leftover, but that does not seem to work.  Can you help? From :     "[...] the stress vector $T$ across a surface will always be a linear function of the surface's normal vector $n$, the unit-length vector that is perpendicular to it. [...] The linear relation between $T$ and $n$ follows from the fundamental laws of conservation of linear momentum and static equilibrium of forces, and is therefore mathematically exact, for any material and any stress situation. The components of the Cauchy stress tensor at every point in a material satisfy the equilibrium equations (Cauchy’s equations of motion for zero acceleration). Moreover, the principle of conservation of angular momentum implies that the stress tensor is symmetric."   What is the more detailed explanation for this, and/or where can I find it? I work with QGIS 2.10.1 on Windows 7 (x64). I have dissolved polygons from an attribute value and the polygons geometries being not perfectly joined together, I get some 'garbage' nodes I need to delete. I have tried to edit the layer and using nodes tool, selecting and deleting the nodes, but it seems impossible to do (nodes are not deleted at all!). Any idea on how to process this kind of clean-up?  EDIT : you can  for testing. Hyperref "enquotes" metadata EDIT: As Bill B. and Caramdir point out in their comments after Bill B. produced his results posted below, more information is needed in order to make a better call. To remedy, my output was produced using MiKTeX 2.8 pdflatex with no special command line flags or switches. My pdf viewer is Adobe Acrobat Pro 9.0. The platform is Windows 7. All software including hyperref is fully up to date against the latest rev levels and patches.  As I'm guessing that this is a pretty normal setup, at least in the Windows world, I'd be very interested (and grateful) in learning whether this problem affects other people or whether it's just some kind of rather weird one-off. My gut feel after seeing Bill B's results (and also after having traversed hyperref's code) is that the culprit is Adobe Acrobat or possibly MiKTeX pdflatex.    Can anyone corroborate? I'd be very grateful to know.    Original question:  I have a problem with hyperref; it "enquotes" Author and Keywords (but not Title or Subject) metadata if the data sent to these contain a comma or semi-colon (but not, say, a full stop or a colon).    I've included some figures and code that show this below.         \documentclass{article}  \newcommand*\metadata{% % uncomment all but one line below %  a  b  c%     &lt;-- no problem    a, b, c%     &lt;-- problem %  a; b; c%     &lt;-- problem %  a: b: c%     &lt;-- no problem %  a* b* c%     &lt;-- no problem }  \usepackage[   pdftitle={\metadata},    % never enquoted   pdfauthor={\metadata},   % enquoted if , or ; is present   pdfsubject={\metadata},  % never enquoted   pdfkeywords={\metadata}, % enquoted if , or ; is present ]{hyperref}  \begin{document}   Press ctl-d (in Acrobat Reader) to see pdf file metadata. \end{document}   Not only is this quite ugly but, more importantly, it interferes with metadata extracting programs used by certain document repositories.   I've worked my way through hyperref's code without much success. Would anyone have a solution for this problem?  Or advice about what I might be doing wrong? Properties of the greatest common divisor: $\gcd(a, b) = \gcd(a, b-a)$ and $\gcd(a, b) = \gcd(a, b \text{ mod } a)$ Prove that (a) gcd(a, b) = gcd (a, b – a) (b) Let r be the remainder if we divide b by a. Then gcd(a, b) = gcd(a, r).  I solved part a like: Assume a=pcommonpa b=pcommonpb gcd (a,b) = pcommon b-a = pcommon*(pb-pa)  So: gcd(a, b-a) = common again But I need help for part b guys I can solve it but I need a mathematical expression. Where, in the Windows 7 file system, are the taskbar shortcuts stored (per user)? Does the Hong Kong metro map give interchange direction suggestions? On the , some of the interchange symbols have little lines and half-circles in them. They're a bit small to read on some maps, but if you zoom in they get a big clearer:    Are these suggestions for where to change depending on the direction you're going + changing to? Or do they have some other meaning?  .  Bonus marks - Assuming I am right that that these are direction interchange suggestions, what does it mean if it's an empty circle, or a "T" in one? I was trying to look for an answer of mine earlier and did a search like this:  user:me SQLite RunInTransaction   The above found nothing. So I changed it to  user:me SQLite   Which found a bunch of things. I dug through the results and saw this snippet for :     From my experience, wrapping as many database calls as possible into a transaction speeds things up quite a bit: using (var db = new SQLiteConnection(dbPath)) { db.RunInTransaction(() => { …    Notice that the snippet contains both "SQLite" and "RunInTransaction". In looking at the post itself I noticed "SQLite" was in the question title and in my answer as code. I also noticed that "RunInTransaction" is only in my answer in code.  I looked at meta and saw , which says I need to prefix any code with code:, so I tried:  user:me SQLite code:RunInTransaction user:me code:SQLite code:RunInTransaction   None of the above returned any results.  I also found  on meta which says I can search for code like this (without the code: prefix):        So I tried:  SQLite RunInTransaction "SQLite RunInTransaction"   The first did not return my answer. The second did not return any results.  So my question:  How do I properly search for , that has both "SQLite" and "RunInTransaction" in the post? Why is $ \overline{e^z} = e^\overline{z} $? How can you conjugate an entire function? $ \overline{exp(z)} $ I need an equivalent.  I thought this is only possible with complex numbers.   What is the proof for $ \overline{e^z} = e^\overline{z} $ ? (Please don't involve a power series here.) At which moment does the 'Surprised' state disappear? Find all n such that $\phi(n) = n/2$ My idea for the solution is something like this:  Since $2 | n$, $n = 2^a p_1^{e1} p_2^{e2} \cdots p_t^{et}$ where $a \geq 1$.  Then, $n/2 = \phi(2^a) \phi(p_1^{e1}) \phi(p_2^{e2}) \cdots \phi(p_t^{et})$.  Looking at the case that $t = 0$,  $n/2 = \phi(2^a) = 2^{a-1}$, and therefore $n = 2^a$.  Otherwise, $n = 2^a \phi(p_1^{e1}) \phi(p_2^{e2}) \cdots \phi(p_t^{et}) = n = 2^a p_1^{e1} p_2^{e2} \cdots p_t^{et}$. Since $\phi(n) &lt; n$, this is a contradiction, and therefore, the only $n$'s that apply are the powers of 2.  Is this right? Also, we were asked to find $n$ such that $\phi(n) = n/3$. How would I go about that one? Proof of linear independence of $e^{at}$ Given $\left\{ a_{i}\right\} _{i=0}^{n}\subset\mathbb{R}$ which are distinct, show that $\left\{ e^{a_{i}t}\right\} \subset C^{0}\left(\mathbb{R},\mathbb{R}\right)$,  form a linearly independent set of functions.   Any tips on how to go about this proof. I tried a working from the definition of an exponential and combining sums but that didn't seem to get me anywhere. I saw a tip on the internet that said write it in the form  $\mu_{1}e^{a_{1}t}+\dots+\mu_{n}e^{a_{n}t}=0$ to try to show $\mu_{1}=\dots=\mu_{n}=0$ considering each term of the left hand side must be positive, but I can't get my head around that because while I understand $e^{x}&gt;0\forall x\in\mathbb{R}$ I cannot see why $\mu_{i}$ must be positive in any case. I have thought about differentiating but that doesn't seem to help. The question did originally ask for a "rigourous" proof but I'll take any hints right now and the provided the solution of 'is obvious' is most unhelpful to me.  Any input would be fantastic. Thank you. I'm talking about this nonsense:   Now, I'm aware that there are problems with the practicalities (or possibilities) of methods involving exotic matter with negative mass, and that kind of thing has been addressed here:   But in this case my question is different and more specific. Sweeping all the other problems of constructing such a beast under the rug, wouldn't this violate causality?  SR says that the simultaneity and relative ordering of events is dependent on the relative motion of the observer, but that no matter how it works out, if event A causes event B, no observer will see B first. One of the many problems with FTL travel (or signals) is that if any information is sent faster than light, there will exist an inertial frame in which the signal arrives before it is sent, a blatant violation of causality. (I think we can all agree, can we not, that the threshold should be extremely high before breaking assumptions that we're in a causal universe?)  So how is any scheme to travel faster than light, even if it may locally satisfy the equations of GR, not a blatant violation causality according to SR?  Is my understanding of GR incomplete and there's something in it that obviates the causality implications of SR? Or am I correct that FTL claims should be dismissed with extreme prejudice on this basis alone? (Pending a serious replicable experiment showing causality to be breakable.) How to import an FBX file into Blender I am trying to import an FBX file from Unity into Blender. Does anybody know how to do that? Question:      Let $p$ be any prime and $n \geq 3$. Show that there exists a non-abelian group of order $p^n$.    Attempt:   Take $n = 3$. Writing $\mathbb Z_p \times \mathbb Z_p = \{e, \alpha_1, \ldots, \alpha_{p^2 - 1}\}$ and considering $$\begin{align}\tau_{jk} : \mathbb Z_p \times \mathbb Z_p&amp;\to \mathrm {Aut} (\mathbb Z_p)\,\\e &amp;\mapsto id\\\alpha_j &amp;\mapsto id \\\alpha_i &amp;\mapsto \rho_k  \end{align}$$  $\forall i \neq j$ where $\rho_k : \mathbb Z_p \to \mathbb Z_p$ is such that $\rho_k (1) = k$, with $k \in \{2, \ldots, p-1\}$. Then we take the group $(\mathbb Z_p \times \mathbb Z_p) \ltimes_{\tau_{jk}} \mathbb Z_p$.   Then $$(\alpha_i , 2) \ltimes_{\tau_{jk}} (\alpha_i, 1) = (2\alpha_i, 1  + \tau_{jk} (\alpha_i)(2)) = (2\alpha_i , 1  +2 k)$$  and $$(\alpha_i , 1) \ltimes_{\tau_{jk}} (\alpha_i, 2) = (2\alpha_i, 1  + \tau_{jk} (\alpha_i)(2)) = (2\alpha_i , 1  +k)$$  taking $k = 1$ for example we have that the group $(\mathbb Z_p \times \mathbb Z_p) \ltimes_{\tau_{jk}} \mathbb Z_p$ is not abelian.    I was wondering if this is a good aproach. If not, is there an easier way to reach the result?  If this is the "best" way then would the higher cases ($n &gt; 3$) be more of a notation play game? If Anakin Skywalker didn't get what he wanted as a Sith (to save Padmé), why was he still a Sith? In the prequels, the primary reason Anakin was willing to become  is because he wanted to save Padmé;     ANAKIN: I will do whatever you ask.       PALPATINE: Good.       ANAKIN: Just help me save Padme's life. I can't live without her. If she dies, I don't know what I will do.      PALPATINE: To cheat death is a power only one has achieved, but if we work together, I know we can discover the secret.       ANAKIN kneels before PALPATINE.       ANAKIN: I pledge myself to your teachings. To the ways of the Sith.   Given that he didn't manage to save her, why did he still become a Sith? My proof is very different from my reference, hence I am wondering is I got this right?  Apparently, $F$ is continuous, and the identity matrix is closed. Now we want to show that the preimage of continuous function on closed set is closed.  Let $D$ be a closed set, Consider a sequence $x_n \to x_0$ in which $x_n \in f^{-1}(D)$, and we will show that $x_0 \in f^{-1}(D)$.  Since $f$ is continuous, we have a convergent sequence $$\lim_{n\to \infty} f(x_n) = f(x_0) = y.$$  But we know $y$ is in the range, hence, $x_0$ is in the domain. So the preimage is also closed since it contains all the limit points.  Thank you. How to distinguish Nexus 7 (2012) and Nexus 7 (2013) I am having trouble with Bluetooth Low Energy (BT 4.0) on a Nexus 7.  I think I may have a 2012 model.  How to tell if I have a 2012 or 2013 version of the Nexus 7? Attributive nouns vs. of-genitive Geometric intuition behind gradient, divergence and curl