c++ make parts of template class into header and cpp
Why can templates only be implemented in the header file?
Let $f \in L^1(\mathbb{R})$, for $a\in \mathbb{R}$ let $f_a(x)=f(x-a)$, prove that: $$\lim_{a\rightarrow 0}\|f_a -f \|_1=0$$  I know that there exists $g\in C(\mathbb{R})$ s.t $\|f-g\|_1 \leq \epsilon$, this is also true for $f_a$ and $g_a$.  Now I have the next estimation:  \begin{align*} \|f_a-f\|_1 &amp;= \int_{\mathbb{R}} |f(x)-f(x-a)| dx \\ &amp;= \int |f(x)-g(x)+g(x)-g(x-a)+g(x-a)-f(x-a)| \\ &amp;\leq \|f-g\|_1 + \|f_a-g_a\|_1 + \int |g(x)-g(x-a)| \end{align*} my question is: I can argue that $\lim_{a\to0} \int |g(x)-g(x-a)| = \lim_{a\to0} \lim_{T\to\infty} |g(x_0)-g(x_0-a)| 2T$, now I think that I can change the order of the limits here, but I am not sure why?  P.s $x_0$ is some point in $[-T,T]$, and the above is valid from the intermediate integral theorem for continuous functions, right?  Thanks. I wonder a generalization of Jensen's inequality: let $\mathbf{X,Y}$ be two positive definite matrices, can we obtain the following Jensen like inequality $$(1-\lambda)\mathbf{X}^{-1}+\lambda\mathbf{Y}^{-1} \succeq((1-\lambda)\mathbf{X}+\lambda\mathbf{Y})^{-1}$$ for any $\lambda \in (0,1)$, where the notation $\mathbf{A}\succeq \mathbf{B}$ represents matrix $(\mathbf{A-B})$ positive semi-definite. In the cases of black holes that form from supernova and collapse of a massive star, I understand that in most of these cases, the star loses significant amounts of mass from the explosion. Presumably, after this point as the remaining mass becomes more dense as it further collapses unto itself, it eventually becomes a black hole with gravitational force greater than that of its parent star. But, if gravity is based on mass, how can the black hole have greater gravitational force than the star from which it is formed? I am trying to prove that if I have $f:\mathbb{R} \to \mathbb{R}$ satisfying $\forall x,y\in\mathbb{R},f(x+y) = f(x) + f(y)$. Which is assumed continuous at $0$, that $f$ is continuous on $\mathbb{R}$  I am fairly sure it is, for that property seems to be a property of polynomials, and we know polynomials are continuous where defined(all reals)  Any ideas for rigor?  $|x-a| \lt \delta \implies |f(x+a)-f(x)-f(a)| \lt \epsilon$  No idea where to go from here, this is my first time doing $\epsilon-\delta$ stuff. arccot limit: $\sum_{r=1}^{\infty}\cot ^{-1}(r^2+\frac{3}{4})$ How do I increase my code coverage, or why can't I cover these lines? How to change boot priority? Is there a way that I can configure Visual Studio 2008 to understand CamelCase?  Specifically, I'd like to be able to get Ctrl + right or left cursor to take me to a subsection of a variable or type name. i.e., if my cursor was at the start of this line: LongNamedExampleClass longNamed = new LongNamedExampleClass();  and I hit Ctrl + right, I'd like to jump to &quot;Named&quot; in the class name, rather than the start of the variable name.  If I hit it again, I'd like to go to &quot;Example&quot;.  I hope that makes sense. I used this navigational feature in Eclipse quite a lot, and find it difficult to unlearn something so ingrained. Why does the question's closed status disappear when clicking to load a new edit? Cannot remove JDK – /usr/sbin/alternatives: No such file or directory When I try to remove Java with sudo apt-get remove jdk1.8.0-40 I get this:    Reading package lists... Done Building dependency tree        Reading state information... Done The following packages will be REMOVED:   jdk1.8.0-40 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 245 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 231488 files and directories currently installed.) Removing jdk1.8.0-40 (1.8.040-1) ... find: `/usr/java/*': No such file or directory /var/lib/dpkg/info/jdk1.8.0-40.postrm: line 586: /usr/sbin/alternatives: No such file or directory /var/lib/dpkg/info/jdk1.8.0-40.postrm: line 598: /usr/sbin/alternatives: No such file or directory dpkg: error processing package jdk1.8.0-40 (--remove):  subprocess installed post-removal script returned error exit status 127 Errors were encountered while processing:  jdk1.8.0-40 E: Sub-process /usr/bin/dpkg returned an error code (1)   Output of  ls -1 /var/cache/apt/archives/*jdk*:  openjdk-7-jre_7u75-2.5.4-1~trusty1_amd64.deb openjdk-7-jre-headless_7u75-2.5.4-1~trusty1_amd64.deb   Output of sudo dpkg --purge --force-all jdk1.8.0-40:  (Reading database ... 231488 files and directories currently installed.) removing jdk1.8.0-40 (1.8.040-1) ... /var/lib/dpkg/info/jdk1.8.0-40.postrm: line 586: /usr/sbin/alternatives: No such file or directory /var/lib/dpkg/info/jdk1.8.0-40.postrm: line 598: /usr/sbin/alternatives: No such file or directory dpkg: error processing package jdk1.8.0-40 (--purge): subprocess installed post-removal script returned error exit status 127 Errors were encountered while processing:  jdk1.8.0-40   When trying the edit I get this:  (Reading database ... 231488 files and directories currently installed.) Removing jdk1.8.0-40 (1.8.040-1) ... /var/lib/dpkg/info/jdk1.8.0-40.postrm: line 586: /usr/sbin/alternatives: Permission denied /var/lib/dpkg/info/jdk1.8.0-40.postrm: line 598: /usr/sbin/alternatives: Permission denied dpkg: error processing package jdk1.8.0-40 (--remove):  subprocess installed post-removal script returned error exit status 126 Errors were encountered while processing:  jdk1.8.0-40 E: Sub-process /usr/bin/dpkg returned an error code (1) I have a dll that was written in c++, I need to use this dll in my c# code. After searching I found that using P/Invoke would give me access to the function I need, but these functions are defined with in a class and use non-static private member variables. So I need to be able to create an instance of this class to properly use the functions. How can I gain access to this class so that I can create an instance? I have been unable to find a way to do this.   I guess I should note that the c++ dll is not my code. Irrationality of $\sum_{p\in\mathbb{P}} \frac{1}{2^{p}}$ Let $\mathbb{P}$ be the set of prime numbers, and consider $m=\displaystyle\sum_{p\in\mathbb{P}} \frac{1}{2^{p}}$. Is $m$ irrational?  In the following  , the author recalls several sufficient criteria for irrationality. When applying some of this criteria to $m$ I arrive that the condition of some of the criteria are not satisfied by means of Bertrand´s Postulate.  I found a similar result by Sándor:  Let $\lbrace a_m\rbrace$, $m\geq 1$ be a sequence of positive integers such that $$\text{lim sup}\frac{a_{m+1}}{a_1a_2\cdots a_m}=\infty \;\;\;\;\text{and}\;\;\;\;\;\;\text{lim inf}\frac{a_{m+1}}{a_m}&gt;1$$ Then the series $\displaystyle\sum_{m} \frac{1}{a_m}$ is an irrational number.  I have yet to prove that if $f$ is a continuous function then $\text{lim sup} \;f(a_m)=f(\text{lim sup}\, a_m)$. Assuming this;  $$\text{lim inf}\; P_{m+1}-P_{m}&gt;1$$ where $P_m$ is the $m$-th prime.  But I have trouble with $$\text{lim sup}\; P_{m+1}-\sum_{j=1}^{m}P_{j}$$ my guess is that $$\text{lim sup}\; P_{m+1}-\sum_{j=1}^{m}P_{j}\neq\infty$$ so $$\text{lim sup}\frac{2^{P_{m+1}}}{2^{P_1}\cdots 2^{P_m}}\neq\infty$$   and this theorem will result useless to tell if $m$ is irrational.   How can I prove (or disprove) that $m$ is irrational (are there any other simpler criteria)? How can I use Dirichlet criterion  or Hurwitz criterion? What is its ?    Any help is highly appreciated.      Edit: That $m$ is irrational is clear by the criteria provided in the comments, namely that if $x$ is rational then the binary representation of $x$ is periodic. The number $m$ in binary expansion has $1$ in the $P$-th position and zero elsewhere. As there are arbitrarily large gaps between primes; then the binary representation fails to be periodic.  So the question that remains unsolved is:   What is its irrationality measure? How to combine an SSD boot drive with a HDD data drive? Why the Galaxy has 25GB instead of 32GB I just purchased a Samsung Galaxy S3 32GB, when I check the storage I have only 25.5GB. Where is the other 6.5GB? How does a  work? If seen from the outer side, we can see through thinking it is transparent, while if seen from the inside, the glass acts as a mirror. How? illustrates drag coefficients for several shapes:    It is generally accepted that some variation of the teardrop/airfoil shape has the lowest drag coefficient.  I was wondering what shape has the highest drag coefficient.  The image suggests that it is a flat plate, and that would seem to be an intuitively correct answer, but is that correct?  Is there some other shape (perhaps with a concave front or back relative to motion) that has an even higher drag coefficient? Recalculate google sheet on demand: I have the following formula in a sheet:  =if(E1="HOLD",,query(Cust_Orders!B6:Z5000,"Select Y,G,I,H,K where H&gt;0  "))   With E1 being a drop down with values HOLD and FETCH  The recalculation when I go to FETCH takes about 13 seconds.  But when it is in HOLD, the query doesn't exceute, and everything goes blank. Not what I want.  I'm trying to avoid recalculating this query every time I make a change in the Cust_Orders range, but keep the old values, as two different pivot tables that are viewed by other people are dependent on it.  Google spreadsheet recalc settings all are 'on change and foo'  Is there a way to do this? Changing the style of the first *typeset* line of a paragraph Value of $\frac{\sqrt{10+\sqrt{1}}+\sqrt{10+\sqrt{2}}+\cdots+\sqrt{10+\sqrt{99}} }{\sqrt{10-\sqrt{1}}+\sqrt{10-\sqrt{2}}+\cdots+\sqrt{10-\sqrt{99}}}$ Here is the question:     $$\frac{\sqrt{10+\sqrt{1}}+\sqrt{10+\sqrt{2}}+\cdots+\sqrt{10+\sqrt{99}} }{\sqrt{10-\sqrt{1}}+\sqrt{10-\sqrt{2}}+\cdots+\sqrt{10-\sqrt{99}}} = \;?$$   ()  I think we need to simplify it writing it in summation sign as you can see here:  $$\frac{\sum\limits_{n=1}^{99} \sqrt{10 + \sqrt{n}}}{\sum\limits_{n=1}^{99} \sqrt{10 - \sqrt{n}}}$$  or in Wolfram Alpha input in comments.  I can compute it too! It's easy to write a script for this kind of question. I need a way to solve it. How would you solve it on a piece of paper? Probability of asymmetric random walk returning to the origin Consider the random walk $S_n$ given by $ S_{n+1} =  \left\{   \begin{array}{l}     S_n+2 &amp; \text{with probability $p$}\\     S_n - 1 &amp; \text{with probability $1-p$}   \end{array} \right. \ $  Assume that $S_0 = n &gt;0 $. What is the probability of eventually reaching the the point $0$?  Seems that the probability for this must be less than one; since it is not symmetric, it is not guaranteed to reach the origin if $p&gt;0.5$. It also seems like the positive starting value not being at the origin matters too, but I'm not sure how to compute the probability of eventually reaching the origin.