Separate compilation and template explicit instantiation
Why can templates only be implemented in the header file?
If $f_k \to f$ a.e. and the $L^p$ norms converge, then $f_k \to f$ in $L^p$ Let $1\leq p &lt; \infty$. Suppose that    $\{f_k\} \subset L^p$ (the domain here does not necessarily have to be finite),  $f_k \to f$ almost everywhere, and  $\|f_k\|_{L^p} \to \|f\|_{L^p}$.    Why is it the case that $$\|f_k - f\|_{L^p} \to 0?$$   A statement in the other direction (i.e. $\|f_k - f\|_{L^p} \to 0 \Rightarrow \|f_k\|_{L^p} \to \|f\|_{L^p}$ ) follows pretty easily and is the one that I've seen most of the time. I'm not how to show the result above though. I stand up and I look at two parallel railroad tracks. I find that converge away from me. Why? Can someone explain me why parallel lines seem to converge, please? I have posted a proof below, and would appreciate it if someone could review it for accuracy. Thanks!   Problem:   Let n $\in$ $\mathbb{Z}$ with $n$ $\ge$ 3. Prove the following:   (a) Z(D$_{2n}$) = 1 if $n$ is odd.   (b) Z(D$_{2n}$) = {1, r$^k$} if $n$ = $2k$.   Note that $r$ and $s$ generate D$_{2n}$ with the group presentation { $r$,$s$ | $r$$^n$ = $s$$^2$ = 1, $rs$ = $sr$$^{-1}$ }   Proof:  part (a)   Let $n$ $\ge$ 3 where $n$ $\in$ $\mathbb{Z}$ and $n$ is odd.   For any x $\in$ Z(D$_{2n}$), x must commute with both $s$ and $r$, since both are in $D_{2n}$. Note that if $x$ commutes with both $s$ an $r$, then $x$ commutes with any element of $D_{2n}$ since $r$ and $s$ generate D$_{2n}$.    Then for any x$\in$ Z(D$_{2n}$), we have $xr$ = $rx$, where x is of the form $x$ = s$^j$r$^w$ (any such element can be arranged into this form via the relation $rs$ = $sr$$^{-1}$ and the fact that $r$ and $s$ generate D$_{2n}$). Note that since r and s have finite order, the exponents are modulo n and modulo 2 for $r$ and $s$ respectively.   Then we have  s$^j$r$^w$$r$ = $r$s$^j$r$^w$.   Which implies s$^j$r$^{w+1}$ = s$^j$r$^{w +- 1}$  In the case where the power of r on the RHS is $w$ - 1, it is clear we cannot have equality unless |r| = 1, which it is not. Note that if $j$ is even then we have only the $w$ + 1 case. Hence $x$ may be of the form $1$$r$$^w$ = $r$$^w$.   Also we have that x must commute with $s$, hence $s$$x$ = $x$$s$.   Then $s$$r$$^w$ = $r$$^w$$s$.  Which implies $s$$r$$^w$ = $s$$r$$^{-w}$.   Applying s$^{-1}$ to both sides we arrive at the task of finding when r$^w$ = r$^{-w}$ i.e when $w$ = $-w$. But since r has finite order we have:   $$ \bar{w} = (n-1)*w $$   where $\bar{w}$ is the residue class of w modulo n. Hence for some a $\in$ $\mathbb{Z}$$_+$   $$ w + an = wn - w $$  $$ 2w = wn - an $$ $$ 2w = n(w-a) $$   Now since 0 $\lt$ w $\le$ n we have that the LHS is greater than 0. Also since n $\ge$ w then (w-a) $\le$ 2, since otherwise the RHS would be greater than the LHS. So since n is odd we must have that (w-a) is even and hence (w-a) = 2, implying that 2w = 2n and hence n = w.   Hence x = $r$$^w$ = $r$$^n$ = 1. So Z(D$_{2n}$) = 1.   part (b)   From the argument above any x $\in$ Z(D$_{2n}$) must be of the form $s$$^j$$r$$^w$ for j even and j $\in$ $\mathbb{Z}$. Then x is of the form $r$$^w$ for $0$ $\lt$ w $\le$ $n$. Since $n$ is even we have the equation below is satisfied when $2w$ = $n$ or $w$ = $n$, since (w-a) $\le$ 2 but also (w-a) $\ge$ 0 for (w-a) $\in$ $\mathbb{Z}$$_+$.   $$ 2w = n(w - a) $$   Hence $r$$^w$ $\in$ Z(D$_{2n}$) when $2w$ = $n$, as desired. What counts as "observation" in Schrödinger's Cat, and why are superpositions possible? So if I understood correctly, Schrödinger's Cat is a thought experiment that puts a cat inside a box, and there's a mechanism that kills the cat with 50% probability based on a quantum process. The argument is that the cat now must be in a superposition of dead and alive.  This makes sense at first, but the state of the cat inside the box will affect the outside world in an observable way, right? For example if the cat dies, it might meow loudly which would be audible. If it didn't meow, it would produce a thud on the ground when it dies. And even if the ground was very solid, the redistribution of mass inside the box will affects its gravity field which means the whole universe theoretically immediately observe's the cat's death.  So extending this argument to all superpositions, the different states would cause different effects on the rest of the universe, usually a slight change in the gravity field is the minimum. This gravity perturbation would propagate throughout the universe, and even all the experimenters go to sleep with thick, thick earplugs, somebody or something in the universe is going to inadvertently observe the event and the superposition immediately collapses. Thus superpositions cannot exist beyond an extremely short amount of time.  What's wrong with my reasoning? The best stack-up possible with a four-layer PCB? I'm designing a 4 layer PCB and I know that the standard stack-up is  Signals GND VCC Singals  (GND and VCC can be switched depending on the layer with more signals) The problem is, I don't really want to connect all ground pins through vias, there are just too many of them ! maybe because I'm not used to 4 layer PCBs, anyway, I've read a  by Henry W. Ott about a different stack-up  GND Signals Signals GND  (Where the power is being routed with wide traces on the signal planes) According to him, this is the best stack-up possible with a four-layer PCB, for the following reasons: 1.Signal layers are adjacent to ground planes. 2.Signal layers are tightly coupled (close) to their adjacent planes. 3.The ground planes can act as shields for the inner signal layers. (I think this requires stitching ??) 4.Multiple ground planes lower the ground (reference plane) impedance of the board and reduce the common-mode radiation. (don't really understand this one) One problem is cross-talk, but I really don't have any signals in the third layer, so I don't think that corss-talk will be an issue with this stack-up,am I correct in my assumption ? Note: The highest frequency is 48MHz, there's a wifi module on the board too. How can I stream the same music to multiple computers? Is there a way to stream the same playlist on multiple computers at the same time? I want to be able to sync what's playing on multiple computers (for parties etc). Say I have a cologne bottle of 100 ml that I want to carry in my hand luggage on a plane trip.  100 ml is the limit so it should be fine for the transport regulations (if not, please let me know!).  The problem I always encounter is regarding the storage of the bottle: how to prevent it from leaking?  What I normally do is to put it in a plastic bag, so that the possible loss remains there. It is fine, only that the bottle ends up quite wet.  What would be a better approach? Series where the planet’s air is really polluted and there is a portal to take you to a world where the air is clean The movie was released in the last 15 years, probably between 2008-2018. &quot;Pre-movie&quot; (like what happens before the main part of the movie begins):  The movie was in the future. The people have to wear gas masks to go outside because the air is so polluted. airpollution smog 2 child policy they had 3 kids the guy goes to prison There is some sort of transportation portal that brings some important people 85mio years in the past on another timeline The guy runs to the portal and gets there with his entire family  &quot;Main movie&quot; (most of the movie):  The guy is on this new planet and I think he gets imprisoned. The people built a camp with walls because there are dinosaurs that can easily kill people. Then a few other things happen I don't clearly remember. I think there is also some sort of love story. Then the dinosaurs attack the camp and they have to defend it. Equation's symbols or parameters description are shown below, however, the = and the details of parameter are not aligned.     I want to make a parameters list for a equation like this, in which symbols, = and detail information are aligned in terms of vertical position.  where    ...    P   =   notional permeability factor    N   =   number of waves    Sd  =   damage level    ...   A tabular environment will produce more spacing before and after text. So how to make the = vertical aligned?   The codes is provided:  \begin{equation} \frac{H_s}{\Delta D_{n50} } = 1.0~ P^{0.13}~ \left(\frac{S_d}{N} \right)^{0.2} \xi_m^P~ \sqrt{\cot \alpha} \end{equation} where:   $H_s$ = significant wave height, equal to the average of the highest 1/3 of the waves  $\Delta$  = relative buoyant density, equal to $\rho_r / \rho_w - 1$, where     $\rho_w$ is the water density  $D_{n50}$ = nominal  diameter defined in Equation (2)  $P$ = notional permeability factor  $S_d$ = damage level   $N$ = number of waves  $\xi_m$ = breaker parameter based on mean wave period $T_m$  $\alpha$ = slope angle Why are text format commands used inside braces? Most commands in Latex are written with the arguments inside braces following the command: \command{arguments}. But text formatting options, like \em, or \scriptsize are usually written inside the braces, like {\em some italicised text}. Why is this? What makes these commands different? I'm particularly asking because it seems to make standardisation - of which LaTeX really appears badly in need - more difficult. How to prove $|a^k|=n/\gcd(n,k)$ whenever $|a|=n$? Find lost device without Gmail account configured and without SIM card I recently misplaced a phone that did not have gmail account configured and did not have a SIM card in it either. Is there any way I can track it ?   All of the tracking apps either require sending an SMS (needs SIM card) or OTA install(needs Gmail account).   I do have the IMEI number of the phone. grep a file, but show several surrounding lines? I would like to grep for a string, but also show the preceding five lines and the following five lines as well as the matched line. How would I be able to do this? Automatic coloring of numbers according to size Scientific talks have their own culture, reporting the results, typically for me, in a table of the following form  1.7333    1.6472    1.5418    1.4682    1.5740 1.1525    1.2878    1.2652    1.3511    1.5102 1.2181    1.1500    1.2220    1.2425    1.5699 0.9786    1.1051    1.1472    1.3096    1.6757 0.9569    0.9190    1.0433    1.2924    1.4867   There is clearly a(n almost perfectly) monotonic pattern for rows and columns. Now for the naked eye, this is not the most quick way of capturing informing.  I would like numbers that bigger in absolute value, to appear differently (either green vs red or light vs dark) than smaller numbers, such that the pattern becomes clear instantly.  Is there a way of programming this in LaTeX? Fourier transform of a radial function Consider a function $f \in L^2(\mathbb{R}^n)$ such that $f$ is radial. My question is, is the Fourier transform $\hat{f}(\xi)$ automatically radial (I can see it is even in each variable $x_i$), or we need some conditions on $f$? Thanks for your help. Is $\{0\}$ a field? Consider the set $F$ consisting of the single element $I$.  Define addition and multiplication such that $I+I=I$ and $I \times I=I$ .  This ring satisfies the field axioms:   Closure under addition.  If $x, y \in F$, then $x = y = I$, so $x + y = I + I = I \in F$. Closure under multiplication.  $x \times y = I \times I = I \in F$ Existence of additive identity.  $\forall x \in F$ (i.e., for $x=I$), $x + I = x$, so $I$ is the additive identity. Existence of mulitiplicative identity. $\forall x \in F, x \times I = x$, so $I$ is the multiplicative identity. Additive inverse. $\forall x \in F, \exists y = I \in F: x + y = I$ Multiplicative inverse. $\forall x \in F, \exists y = I \in F: x \times y = I$.  However, because the additive identity need not have a multiplicative inverse, this is a vacuous truth. Commutativity of addition.  $\forall x, y \in F, x + y = I = y + x$ Commutativity of multiplication.  $\forall x, y \in F, x \times y = I = y \times x$ Associativity of addition.  $\forall x, y, z \in F$, $(x + y) + z = I + I = I$ and $x + (y + z) = I + I = I$, so $(x + y) + z = x + (y + z)$ Associativity of multiplication.  $\forall x, y, z \in F$, $(x \times y) \times z = I \times I = I$ and $x \times (y \times z) = I \times I = I$, so $(x \times y) \times z = x \times (y \times z)$ Distributivity of multiplication over addition. $I \times (I + I) = I$ and $I \times I + I \times I = I$, so $\forall x,y,z \in F, x(y+z) = xy+xz$   Based on the above, $\{I\}$ seems to qualify as a field.  If $I$ is assumed to be a real number, then the unique solution of $I + I = I$ and $I \times I = I$ is, of course, $I = 0$.  So, is {0} a field, or is there generally considered to be an additional field axiom which would exclude it?  Specifically, is it required for the multiplicative identity to be distinct from the additive identity? $C \otimes A \cong C \otimes B$ does not imply $A \cong B$ Let $R$ be a commutative unital ring and let $M$ be an $R$-module and let $S$ be a multiplicative subset of $R$.  Today I proved both of the following: $$ S^{-1} R\otimes_R S^{-1}M \cong S^{-1} M$$ and $$ S^{-1} R \otimes M \cong S^{-1} M$$  Now I'm slightly confused.      Either my proofs are wrong or $C \otimes A \cong C \otimes B$ does not imply $A \cong B$. But I can't come up with an example. Can someone give me an example? (Or tell me that my proofs are wrong.) I know you can export the asset as a PSD and open it in Photoshop. Is there a more seamless way?  Update:  I'm an idiot.  Someone else created the logo, and the shadow was it's own layer on multiply and not a normal drop shadow effect. I keep on seeing a fair number of questions (such as ) which get marked as answered within 5-10 minutes of being posted. Sometimes the questions like this are insanely popular and actually see some proper discussion, however often I see questions have few views and only 1 answer. The trouble with these questions is that very few people have scrutinised the answer for correctness, or possibly a better solution. I always make a point of not accepting my answers until a day or so has passed — would it not be a good idea to put a short (1 hour or so) time limit on accepting answers on new questions with few views or votes, or perhaps just an additional confirmation dialog, something along the lines of:  Your question is new and not many people have had a chance to look at it yet.  Are you sure you don't want to wait to see if anyone else has a better suggestion? Disable HTTPS for a domain that shares IP with another domain that is under HTTPS I am running into a weird problem trying to disable HTTPS for one domain, but the other domain has HTTPS. They both are different websites running on a dedicated server, sharing the same IP address for the domains.  However, I have a domain that does not have a SSL certificate, but the other does. I want to disable HTTPS for the non-certified domain while leaving the other domain with HTTPS on.  I have two different separate vhosts in /etc/nginx/sites-enabled/,   domain1.org (no HTTPS)  server {      listen                      80;     server_name                 www.domain1.org domain1.org;     root                        /var/www/domain1.org;     index                       index.html index.php index.htm;      error_log                   /var/www/logs/domain1.errors.log;      [ ... ]   domain2.com (with HTTPS)  server {      listen                      443 ssl;     server_name                 domain2.com www.domain2.com;      # INCLUDE SSL CERTIFICATE     include                     sites-enabled/domain2_ssl_include;       root                        /home/domain2/www/www;     index                       index.html index.php index.htm;      [ ... ]   I've included a listener to the port 443 for domain1.org, but once I do that, I get an aborted error from Firefox saying (when accessing ):     This Connection is Untrusted      You have asked Firefox to connect securely to domain1.org, but we can't confirm that your connection is secure.   I opened the technical data, it appears that the domain1.org is using the domain2.com SSL certificate:     domain1.org uses an invalid security certificate.      The certificate is only valid for the following names:    *.domain2.com , domain2.com        (Error code: ssl_error_bad_cert_domain)   So I added this to domain1.org vhost configuration:  server {      server_name                 domain1.org www.domain1.org;      listen                      443 ssl;      rewrite ^ http://domain1.org permanent; }   Which still gets me prompted with the Firefox error.  Now... when I access to , I get an 400 error from nginx saying this:     400 Bad Request      The plain HTTP request was sent to HTTPS port   I am not entirely sure what to do, disabling the https with ssl off; has no effect. How can I actually disable HTTPS for domain1.org but not for domain2.com?  I am using Ubuntu 12.04 running nginx 1.2.6.