I'm trying to read other peoples code but most code is broken up into separate files.  I haven't learned how to do that yet.  How do you split up code into separate files?  And how do you find the right source code file for a function?
I'm used to doing all my coding in one C file. However, I'm working on a project large enough that it becomes impractical to do so. I've been #including them together but I've run into cases where I'm #including some files multiple times, etc. I've heard of .h files, but I'm not sure what their function is (or why having 2 files is better than 1).  What strategies should I use for organizing my code? Is it possible to separate "public" functions from "private" ones for a particular file?   question precipitated my inquiry. The tea.h file makes no reference to the tea.c file. Does the compiler "know" that every .h file has a corresponding .c file?
Why do we say the following?        I'll have an hour's wait at the airport      Today's lesson      Yesterday's programme    Two weeks' worth of groceries.      They are not possessive, or are they? Why is the possessive apostrophe used with time expressions and adverbs? Determining the Orbits/Orbit Space of $O(3)$ on Real 3 by 3 Traceless Symmetric Matrices Let $O(n)$ be the set of $3 \times 3$ orthogonal matrices, and $S$ be the set of traceless real symmetric $3 \times 3$ matrices.  Now  $O(n)$ will act on $S$ by conjugation. Note that by the spectral theorem $ \forall A \in S$ in the orbit of $A$ there is a diagonal matrix $D=diag(\lambda_1, \lambda_2,\lambda_3)$ with $\lambda_1\le\lambda_2 \le\lambda_3 $.  Determine the all the orbits of the action &amp; the orbit space of the action.  What I've done:  Since all elements of $S$ are diagonlizable that the orbit of any element should be the orbit of its' diagonalized form because $\forall A \in S,   \exists P \in O(3)$ st  $PAP^t=D $ with $D$ a diagonal matrix and moreover for any other  $Q\in O(3)$ we get $QDQ^t=QPAP^tQ^t=(QP)A(QP)^t=RAR^t$.   And so would that imply the orbit space is just the set of traceless diagonal matrices as $tr(QDQ^t)=tr(DQ^tQ)=tr(Q)$ (cyclic property of trace) and $Q\in S$.  Any help is appreciated. When I run the following query in query editor I get this error.  Error     Unknown error parsing query   Query  SELECT Id, OwnerId,Account.OwnerId FROM Contact where OwnerId = Account.OwnerId limit 100   Does anybody know what the problem is? Given a compact Hausdorff space $X$, if $a \in X$ is a $G_\delta$ singleton (i.e., $\{ a \}$ is a $G_\delta$ set), then there is a countable local base at $a$.   The point $a$ can be written as countable intersection of open sets let's call $U_{n}$.  How can I use the compactness? What is the next step for proof? Could you give me hint please? Is it correct to say I electrocuted my friend if he was only injured by electricity? Limit of divided integrals Prove that: $$\lim\limits_{m\to \infty} \frac{\int\limits_0^{\pi/2}(\sin(x))^{2m} dx}{\int\limits_0^{\pi/2}(\sin(x))^{2m+1} dx} = 1$$  I had tried to get it from inequalities like $$(\sin(x))^{2m+1} \le (\sin(x))^{2m} \le (\sin(x))^{2m-1}$$ But I always hit a wall in that regard (I integrate the sin functions and from there keep on going but there it ends). Induction Proof: Fibonacci Numbers Identity with Sum of Two Squares Using induction, how can I show the following identity about the fibonacci numbers? I'm having trouble with simplification when doing the induction step.  Identity: $$f_n^2 + f_{n+1}^2 = f_{2n+1}$$  I get to:  $$f_{n+1}^2 + f_{n+2}^2$$  Should I replace $f_{n+2}$ using the recursion? When I do that, I end up with the product of terms, and that just doesn't seem right. Any guidance on how to get manipulate during the induction step?  Thanks! The question is $$\text{If }\, p, \ q\in \mathbb{N}, \;1-\frac12+\frac13-\frac14-\dotsb-\frac{1}{1318}+\frac{1}{1319}=\frac{p}{q}.\qquad \text{Prove that } 1979\mid p.$$ So my solution went like this:  $$S=1-\frac12+\frac13-\frac14-\dotsb-\frac{1}{1318}+\frac{1}{1319}\Rightarrow S=\sum_{k=1}^{1319}\frac{1}{k}-2\sum_{k=1}^{659}\frac{1}{2k}=\sum_{k=660}^{1319}\frac{1}{k}$$ Now this is equivalent to finding the sum of the roots of the equation $$\left(x-\frac{1}{660}\right)\left(x-\frac{1}{661}\right)\dots \left(x-\frac{1}{1319}\right)=0$$. Rewriting this equation, we get $(660x-1)(661x-1)\dotsc(1319x-1)=0$ (we can discard the $\displaystyle \frac{1319!}{659!}$ since $1979$ is a prime). Calculating the sum of the roots, we get the required value to be equal to $(1320+659)\times 330$ which is obviously divisible by $1979$ (again discarding the coeffecient of $x^{660}$).  Now my question is: Using the same method of converting the problem into finding the sum of roots of a polynomial, we get from the original equation something like this: $$(x-1)\left(x+\frac{1}{2}\right)\dots \left(x-\frac{1}{1319}\right)=0 \Rightarrow (x-1)(2x+1)\dotsc(1319x-1)=0$$ So, the sum of roots would be $-1+2-3+4-\dotsc+1318-1319=-660$ But this is not divisible by $1979$. Why does the former solution work while the latter doesn't? Is there a flaw in my reasoning? Note: I know that the question can be solved by some other methods. Please only explain my given doubts and don't instead give another solution  I realised my mistake after some hours of pondering over it. (In the 1st equation) To get the required sum I would need to take calculate $\displaystyle -\frac{\text{coeffecient of }x^{659}\,}{\text{coeffecient of }x^{660}}$. However what I've done is calculate this:  $\displaystyle -\frac{\text{ coeffecient of }x}{\text{coeffecient of }x^{660}}$ which is actually equal to $\text{sum of roots taken }659 \text{ at a time} $. It was just a coincidence that the value I calculated was divisible by $1979$. The correct way, indeed, would be through the link supplied Let $E=l^p=\left\{x=\left(x_n\right): x_n\in\mathbb{R}, \sum_{1}^{\infty}\left|x_n\right|^p&lt;\infty\right\}$ with $1\le p&lt;\infty$, $\left\|x\right\|_E=\left(\sum_{1}^{\infty}\left|x_n\right|^p\right)^{1/p}.$ Let $\left(\lambda_n\right)$ is a bounded sequence in $\mathbb{R}$ and consider the operator $T$ defined by $$T(x)=\left(\lambda_1x_x,\ldots,\lambda_nx_n,\ldots\right)$$ where $x\in l^p$. Prove that $T$ is a compact operator from $E$ to $E$ iff $\lambda_n\rightarrow 0$.  Can anyone give me some hints to solve this problem? Thank you! How to fix "-5 No address associated with hostname error" while updating? Resistor circuit that isn't parallel or series How do I run .sh scripts? How do I evaluate several n-th derivatives of a function at one point? Move EFI System Partition to another drive For $0 < x < \pi/2 $, prove that $x + \frac{x^{3}}{3} <\tan x $ I proved as follows:  Let $f(x) = \tan x -  x - \frac{x^{3}}{3}.$ Then $f '(x) = \sec^{2}x - 1 - x^{2}$ and $f''(x) = 2\sec^{2}x\tan x-x &gt; \tan x - x,$ since $\\tan x &gt; x,$ $f''(x) &gt; 0$ so $f'(x)$ is increasing. Since $f '(0) = 0,$ $f '(x) &gt; 0$ for all $x \in (0, \frac{\pi}{2}).$ So $f(x)$ is increasing. since $f(0) = 0,$ $f(x) &gt; 0$ for all $x \in (0, \frac{\pi}{2}).$  But my proof seems complex. Is there any simpler way to prove this? Many of the various items have a list of enchantments that would be ideal. For instance, I might want Infinity, Power, Flame, and Punch all on a bow... and at the highest levels. Barring incredible luck, I will never get those with an enchantment table.  I can enchant books until I find those spells, and add them to the bow with an anvil. However, at some point (I haven't yet figured out how many times) it will no longer allow you to add enchantments to an item, saying that it's "too expensive". There is a hidden counter that is incremented every time, and once this goes past a threshold you can never add more magic (though, I've read in places you can continue to repair the item at great cost indefinitely... not clear if that's true or not).  This counter is cumulative, such that if you combine two items' magic into a single item, that won't sidestep the limit.  However, I've only just caught on that one can also combine two books. I can take two Power I books, and make a single Power II book. And I can take two of those, and get it up to Power III, and so on, but also have two spells combined in a book.  If I do this until I get all the magic I need onto a single book (or even just two or three books, supposing the books max out), will I get to the point where the books will no longer combine with the item because it's too expensive? Or are books exempt from the cumulative counter thing? It would suck to spend so much time and effort to get a powerful book and discover that it can't actually be used on anything.  Also, is it true that you can indefinitely repair, as long as you have the repair material and are at level 39? Or is that a misunderstanding of the rules (or maybe just an earlier version of the game and it no longer works like that... I'm on 1.8.9)? Does that only work for those items that can be repaired with diamond/iron, or will it work for fishing rods and bows as well? I can't think of a decent reason to allow editing audit messages (like  or ). I have abused it for fun before but it really has no purpose other than joking or obfuscating your actions. For that I think that such messages should be untouchable. Please make them so. Avoiding errors due to unexpanded asterisk In bash I often use for-loops such as the following  for file in *.type; do    sommecommand "$file";  done;   to perform an operation for all files matching *.type. If no file with this ending is found in the working directories the asterisk is not expanded and usually I will get an error message saying that somecommand didn't find the file. I can immediately think of several ways to avoid this error. But adding a conditional does not seem to be very elegant. Is there a short and clean way to achieve this? How can I change PulseAudio port priorities? I list sources and sinks as follows:  pactl list sources pactl list sinks   The output I get is:  ...     Ports:         analog-input-internal-mic: Internal Microphone (priority: 8900)         analog-input-headphone-mic: Microphone (priority: 8700)         analog-input-headset-mic: Headset Microphone (priority: 8800) ...     Ports:         analog-output-speaker: Speakers (priority: 10000)         analog-output-headphones: Headphones (priority: 9000, available)    How do I change the priorities listed above and have them fixed at what I change them to? Note that I am not looking to set a default source and sink or to delete unwanted sources or sinks, I just want to be able to assign them different priorities. .gitignore for Visual Studio Projects and Solutions