I understand that if you attempt to split a templated class in a .h interface and a .cpp implementation, you get a linker error. The reason for this as mentioned in a popular post is "If the implementations were not in the header, they wouldn't be accessible, and therefore the compiler wouldn't be able to instantiate the template."  What I dont understand is that if the implementations inside a .cpp file are inaccessible in case of templated classes, what makes them accessible for non templated or just regular classes. How come we are able to split the interface and implementation for normal classes over a .h and .cpp file without getting a linker error?  Test.h  template&lt;typename TypeOne&gt; TypeOne ProcessVal(TypeOne val);   Test.cpp  template&lt;typename TypeOne&gt; TypeOne ProcessVal(TypeOne val) {     // Process it here.     return val; }   Main.cpp  void main() {     int a, b;     b = ProcessVal(a); }   This code gives linker error. A similar splitting of non templated classes does not give Linker error. I could post the code, but you get the idea.
Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)
Both  (if you take a list of values, the distribution of the most significant digit is rougly proportional to the logarithm of the digit) and  (given a corpus of natural language utterances, the frequency of any word is roughly inversely proportional to its rank in the frequency table) are not theorems in a mathematical sense, but they work quite good in the real life.   Does anyone have an idea why this happens?  (see also ) P-adic expansion construction How do I install software using the Ubuntu Software Center? The title says it all. I'd like to know how I can install software - an example is the Chromium web browser. What is the difference between a HMAC and a hash of data? Mapping/texturing inside of a box I'm trying to replace the content of a box in a video, I have used the tracking system to match the movement of the video box with the interior of the one rendered in Blender, but I am running trough what seems a simple thing but I can't manage to get done.   I want the outside faces of the box to be invisible while hiding the inside of the box where the front wall of the box hides it, and the inside of the box to be rendered where visible. To do that I thought it would be as simple as making the face normals point to the inside of the box and giving a color only to the faces where normals are pointing to. But I can't manage to get that, am I going the wrong road? How can I achieve my goal? How to find Hamiltonian from this simple Lagrangian? (tricky) $$L~=~ \frac{1}{2} \dot{q}  \sin^2{q} $$  Is it zero or not defined? Short story about survivors on Earth after the atmosphere has frozen Evaluate definite interval of normal distribution I know that an easy to handle formula for the CDF of a normal distribution is somewhat missing, due to the complicated error function in it.  However, I wonder if there is a a nice formula for $N(c_{-} \leq x &lt; c_{+}| \mu, \sigma^2)$. Or what the "state of the art" approximation for this problem might be. How do I run 32-bit programs on a 64-bit Debian/Ubuntu? I have a 64-bit (amd64 a.k.a. x86_64) Debian or Ubuntu installation. I need to run 32-bit (i386/i686) programs occasionally, or to compile programs for a 32-bit system. How can I do this with a minimum of fuss?  Bonus: what if I want to run or test with an older or newer release of the distribution? I'm rather interested in getting my feet wet at the interface of  and . Can anybody give me references to some good books on these topics? I'm looking for very introductory technical books. So I have a mac computer but i plugged in a windows keyboard in my mac. I am still trying to figure out how to paste commands into a command block. So how can I paste a command? What is the difference between correlation and causation? What is the difference between correlation and causation?  Pirates and Global Temperature Example  For example, how do we know when we're dealing with correlation only and not also causation here?   What Certain Philosophers Seem to Hold Regarding This  It would seem that   Hume would saycorrelation ≡ causation. Aristotle would say that in generalcorrelation ≢ causationand thatcausation ⇔ correlationonly if we are not dealing with chance events.   ("≡" means "is identical to," and "⇔" means "implies each other.") Drop "not constructive", combine "noisy", reword "rude" and "other" comment flags Is $(x^2+y^2+z^2) \ \sin \frac{1}{\sqrt{x^2+y^2+z^2}}$ Differentiable in $(0,0,0)$? Looking at the properties for a Windows file I get two attributes, “Size” and “Size on disk,”  and "Size on disk" is always larger.  What do these two metrics mean? [See  for more on this topic, as well as better illustrations of the final product.]  I have a document with a lot of short excerpts from another book scattered through it.  Putting frames around them looks a little too 'clean'. How can I get a 'torn page' type effect, to make it look as if the excerpt has been physically torn out of a book?  (I've occasionally seen this done in printed books, although I can't find an example right now.)  I'm not wedded to a very specific look here --  gives plenty of examples. But just to give this some frame of reference, here are some of the nicer ones:          (The strong colouration in this second example is a probably a little too distracting for actual use, although it might be interesting as an option. It's more the edge effect I'm interested in.)    Edit (again): I tried typesetting my text according to the updated versions of the answers below. Here are the results:    Or with interpolated shading: How to set timeout for web service call I want to call out my web service after the insert process of a custom object with a delay of 2 minutes. But i am getting that exception FATAL_ERROR|System.CalloutException: Read timed out How can i fix that problem ? Here is my implementation.  Callout class:  public class HttpCallout{     @Future(callout=true)     public static void getContent(String url){         Http h = new Http();          HttpRequest req = new HttpRequest();         req.setEndpoint(url);         req.setMethod('GET');         req.setTimeout(2000);          HttpResponse res = h.send(req);         String response = EncodingUtil.urlDecode(res.getBody(),'UTF-8');         System.debug('***response****'+response);     }      public void serviceCaller(){         getContent(url);     } }   Trigger:  trigger AfterInsertOrUpdate on Sales_Order__c (after insert) {     System.debug('Making future call to update account');     HttpCallout httpCallout = new HttpCallout();     httpCallout.serviceCaller();     System.debug('After Insert'); }   Any help would be appriciated. Touch enabled monitors and Android What determines the direction of precession of a gyroscope? I understand how torque mathematically causes a change to the direction of angular momentum, thus precessing the .  However, the direction, either clockwise or counterclockwise, of this precession seems to me a bit arbitrary beyond mathematical definitions. (What if torque were defined by a "left hand rule", for example?).  What's the fundamental physical reason that the precession of a gyroscope would be directed in a certain direction? Is $\sin \infty$ an indeterminate form? I had a  over what seems like a simple question:     Is $\sin \infty$ an ?   What do you think? :)    I'm labelling this as (soft-question) to be safe, but it should have a clear answer depending on the definition of indeterminate form used. The term "indeterminate form" is seldom used in post-calculus mathematics, but I believe it has one or more accepted definitions, which are either informal or formal. So any answer which takes a standard definition and argues the case would be interesting to me.  How to make a good answer:   State the definition of indeterminate form, either from an online or textbook source, or a definition you came up with on your own. Determine, using your stated definition, whether $\sin \infty$ is indeterminate or not.   EDIT: What do I mean by $\sin (\infty)$?  It's not a well-defined expression, but neither are any of the other indeterminate forms: $\frac{0}{0}$ doesn't exist, $1^\infty$, doesn't exist, and so on. So the question is whether this expression -- which is not well-defined, just like any other indeterminate form -- is an indeterminate form.