I have a .h and .cpp file Foo.h template&lt;typename T&gt; class Foo { public:   void g();   void h(); };  Foo.cpp #include &lt;iostream&gt; #include &quot;Foo.h&quot; template&lt;typename T&gt; void Foo&lt;T&gt;::g() {   std::cout &lt;&lt; &quot;Foo&lt;T&gt;::g()\n&quot;; } template&lt;typename T&gt; void Foo&lt;T&gt;::h() {   std::cout &lt;&lt; &quot;Foo&lt;T&gt;::h()\n&quot;; }  The above two files are in abc/def directory and I have the implementation in a different cpp file Foo-impl.cpp #include &lt;../../Foo.cpp&gt; template class Foo&lt;int&gt;;  This Foo-impl.cpp is in abc/ghi/jkl directory. But when I use #include &lt;abc/def/Foo.cpp I get an error saying that the file doesn't exist. But when I use #include &lt;abc/def/Foo.h&gt;, I don't get file doesn't present erro (the file is identified by the compiler) but I get linker error. I am using the implementation as per  Why does it work with &lt;../../Foo.cpp&gt; and why not with &lt;abc/def/Foo.cpp. How should I make it work ?
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.)
I´m trying to model a race track using a bezier curve, but, when I add modifiers -> array -> curve I get this :    What should I check for to get the mesh following the curve correctly ? Thankyou What is wrong with the De Broglie–Bohm theory a.k.a "Causal Interpretation" of quantum theory? Possible Duplicate:          I've heard of De Broglie–Bohm theory a.k.a causal interpretation of quantum theory. The predictions match accurately with with the nondeterministic quantum theory.  As a philosophy buff this one seems just like the classical universe. No funny new-age religion style gimmicks.  So why don't people use this interpretation instead of the Copenhagen "magic" interpretation?  P.S. I'm not an expert. I possess only superficial knowledge of quantum physics. How can I migrate a Windows 10 from BIOS/MBR boot to UEFI/GPT without reinstalling? How can I define the different properties of an Cycles/Eevee material? Such things as glossy, glass, diffuse, RGB-color, emissive via python scripting? vertical alignment of text in tikz node The output from the following script \documentclass{article} \usepackage{tikz} \usepackage{graphicx} \begin{document} \begin{tikzpicture}   \node(title)[text width = 0.25\textwidth, text height = 3 cm, draw]{title};   \end{tikzpicture} \end{document}  is  How can I vertically align the text in the node? Specifying the text depth as in \node(title)[text width = 0.25\textwidth, text height = 1cm, text depth = 1 cm, draw]{     title line 1\\     title line 2\\     title line 3};  Does not result in the text being vertically centred. Today I had some time and felt like writing a relatively good answer on Stack Overflow; explaining both the underlying mechanisms and good practices, unlike usual declarative answers in a "do that" style.  It took me like an hour of time, $50 if I were free lance. It'll bring me nothing but 3-5 occasional views, and - if I get lucky - some ignorant comments.  You know, it's quite discouraging.  Instead of pride for the job that was done, I feel frustrated. I know, this answer may offer help to the OP, if he ever notices it (being already satisfied with other answers).  So the only fate the answer will meet is to sink forever, below thousands other questions, falling like snow.  So, being a programmer, I am thinking of efficiency. It's a waste of time to spend so much effort to answer one question when there is no way to [actually] reuse it. So, I wouldn't do it again but just turn back into short answers mode without explanations.       Seeing other answers, I don't think I am only one with such feeling.  The current policy is driving knowledgeable and educational users away, yet it attracts inexperienced ones in numbers. Ones who will tell you to use [some technology] which they never have laid their hands upon. Ones who write answers just because they have learned some "good practice" from other questions, and this "knowledge" becomes an endless source of rep points.  The idea of Stack Overflow is rotten. It was excellent when trees were high and traffic was low.  It turned bad now; it has become a honeypot for all the "enthusiast programmers" of the world, eager to share their 2 cents faster than you can say the word "close".  You're killing a great resource. Despite all the nice words and proper declarations, it discourages the reuse of the knowledge. And encourages fast on-site answers.  Of course, the rules will tell you contrary. It's all nice and proper (if you don't mind it's strict mutual exclusivity). But mechanically, technologically it works in the way I described.  I tried to write a tag wiki. You know, it was biggest waste of time in my life. As a matter of fact, it is not a wiki at all; you can't even link to a certain section. Not to mention that nobody ever has the idea to read tag wikis.  Reference questions? Don't make me laugh. There is no good mechanism to store and categorize links. Favorites, although intended for the different purpose, are a chunk of crap when you want to use it as a reference. So, you can't compete with 30-seconds answers: a question will get 5 answers before you can even find an appropriate link.  Okay, I can organize links myself but, there are some problems:   I am just a human. I cannot remember everything I am just a human and I cannot answer questions at rate of 1 qpm. One person cannot fight the Tide. It's helpless. When technology makes people writing fast [incomplete] answers -  no good will of proper declarations can do a thing.  Even if a question gets finally closed, it won't hurt anyone - the hydra grew two more already.   You'll call me a brute for insulting honest users and innocent volunteers, but that's fact: There are much more inexperienced users than experienced ones. And inexperienced users have much more spare time to hang over than experts who have their job to do. So, from that fact we can conclude that most of the answers on Stack Overflow have a low quality. Nobody cares. But I do.   There should be a technical way to limit the activity of not-so-knowledgeable-yet-eager-to-answer users. There should be a technical preference for the closing a question over answering it (have a silly answer for the silly question? welcome to comments). There should be a technical solution to accumulate and structure knowledge, a system that lets you choose a good answer instead of writing it by hand.   That's the only way. Otherwise Stack Overflow will remain an automated dispenser of bad practices.  Well, I just felt like letting it out again. Thank you for reading. A certain physics problem I have been working on has turned into a math problem. Particularly, I want to find the solutions of some equation of the form   $$f(x)=ae^{bx}+cx+d = 0$$  where $a, b, c,$ and $d$ are constant, real numbers that come from the physics problem and $x$ will be a real number. I do not know how to find the solutions of an equation of this form. In the special case where $c=0$, the solution is simply  $$x = \frac{\ln(\frac{-d}{a})}{b}$$  but for other values of $c$, I am stumped. If there is no exact form for the roots, is there a relatively simple way to estimate the roots? SQL query to convert columns into rows Looking for a short story about a man who is visiting a planet where you get your position/job through playing a game I read this story 8-15 years ago in German. I'm not sure but I think the book had 2 short, totally different stories in it.  The story was about a man who was sent (I think kinda forced to go) to a planet where he should play a game everyone on that planet plays. I think the goal was to beat their leader and conquer the world like this?  The better you are at the game, the higher is your position in the society. I remember that at the end he was playing against the leader and they had a long back and forth game, but I'm not sure who won.  They played the game on a different planet that had only one stripe of forest around the whole planet and a fire that goes around it. But thats only the location they were playing.  The man was chosen because he was the best player in every game if I remember correctly.  The game was a board like game where you have troops or armies that you move around. It was not an easy game everyone just could play. Minecraft directory doesn't have a 'Resource Packs' folder? I go into my .minecraft folder and there's Assets and all the other files and folders, but no resource packs folder?  If I create one manually, and place the textures inside, they don't show up in-game.  I'm on a Mac. I am struggling with this question from Halmos's text, please ignore the imperative language.  "Suppose that $L, M$  and $N$ are subspaces of a vector space. Show that the equation    $$L \cap (M + N) = (L \cap M) + (L \cap N)$$   is not necessarily true.  Since each of these subspaces has origin in them, clearly there intersections could not be empty. I wasn't able to formulate an example where this result did n't hold. Any help would be highly appreciated. I originally read this book in the mid- to late '70s.   The premise was a bureaucracy whose job it was to manipulate events in human history by making the smallest possible change that would effect the desired outcome. Not time cops in the sense of going after law breakers.  The intent was to maintain a policy of non-interference as much as possible but when interference was warranted then to make the least possible change and to do so invisibly.  For example, they might take someone's keys off the dresser and put them just out of sight underneath the dresser where they plausibly might have fallen.  The subject would never know of the manipulation but would then be delayed getting out of the house and the ripples grew from there to avert a war or otherwise affect events on a large scale.  After reading that, whenever I would lose something - especially in an improbable way such as dropping a screw at my feet and then finding it on the other side of the room half an hour later - I would take some consolation in the thought that I had just averted some global catastrophe.  I was pretty scatterbrained as a kid (we call that ADHD nowadays) so I experienced this a lot.  Given that I've spent so much time pondering the ideas from the book, I'd love to re-read it. What's the bad magic number error? Find the infinite sum $\sum_{k=1}^{\infty}\sqrt k - 2\sqrt {k + 1} + \sqrt {k + 2} $ I am facing a problem, where I have to find the partial sum of a sequence/sum and with that, the infinite sum of the sequence.  $\sum_{k=1}^{\infty}\sqrt k - 2\sqrt {k + 1} + \sqrt {k + 2} $   The problem here is that I don't know how to proceed. I would be thankful if someone would steer me in the right direction. Is it possible to write a template that changes behavior depending on if a certain member function is defined on a class?  Here's a simple example of what I would want to write:  template&lt;class T&gt; std::string optionalToString(T* obj) {     if (FUNCTION_EXISTS(T-&gt;toString))         return obj-&gt;toString();     else         return "toString not defined"; }   So, if class T has toString() defined, then it uses it; otherwise, it doesn't. The magical part that I don't know how to do is the "FUNCTION_EXISTS" part. How can I use multiple overlay effects simultaneously in Photoshop? There are 3 overlay effects available in Photoshop as layer styles: Color, Gradient and Pattern. The problem: these effects come in a strictly fixed order!  Is it possible to make a translucent Gradient Overlay over a Color Overlay using only layer styles? Or a Multiply Pattern and Color Overlays? It seems that a common operation needed when defining new commands is to scan over a list of arguments (separated e.g. by a comma, but maybe by something else) and do something with each argument in the list, find the last one, or whatever.  For example to write commands that look like \Command{a,b,c} or \Command{c.d.e} and do something with each a, b, and c. See e.g. questions on  and .  Some solutions have been posted there, but what would be the best idiom to perform such kind of operations? LaTeX's \@for looks very nice, but is it possible to use it to scan anything other than comma-separated lists? Will Ubuntu get patched against Meltdown and Spectre? The following is a canonical post that attempts to cover a broad number of Meltdown and Spectre questions.  It is being maintained by Thomas Ward who is in contact with the Security and Kernel teams on this matter for other reasons as well.   I recently read about the  vulnerabilities.  I was wondering, will Ubuntu be patching against the vulnerabilities?  And is there an ETA on a fix? Understanding d-separation theory in causal Bayesian networks I am trying to understand the d-Separation logic in Causal Bayesian Networks. I know how the algorithm works, but I don't exactly understand why the "flow of information" works as stated in the algorithm.    For example in the graph above, lets think that we are only given X and no other variable has been observed. Then according to the rules of d-separation, the information flow from X to D:   X influences A, which is $P(A)\neq P(A|X)$. This is OK, since A causes X and if we know about the effect X, this affects our belief about the cause A. Information flows. X influences B,which is $P(B)\neq P(B|X)$. This is OK, since A has been changed by our knowledge about X, the change at A can influence our beliefs about its cause, B, as well. X influences C,which is $P(C)\neq P(C|X)$. This is OK because we know that B is biased by our knowledge about its indirect effect, X, and since B is biased by X, this will influence B's all direct and indirect effects. C is a direct effect of B and it is influenced by our knowledge about X.   Well, up to this point, everything is OK for me since the flow of the information occurs according to intuitive cause-effect relationships. But I don't get the special behavior of so called "V-structures" or "Colliders" in this scheme. According to the d-Separation theory, B and D are the common causes of C in the graph above and it says that if we did not observe C or any of its descendants, the flow information from X is blocked at C. Well, OK, but my question is why?  From the three steps above, started from X, we saw that C is influenced by our knowledge about X and the information flow occurred according to the cause-effect relationship. The d-Separation theory says that we cannot go from C to D since C is not observed. But I think that since we know that C is biased and D is a cause of C, D should be affected as well while the theory says the opposite. I am clearly missing something in my thinking pattern but can't see what it is.  So I need an explanation of why the flow of information blocked at C, if C is not observed. Custom environment in wrapfigure