Function template specialization - compiler only 'sees' base template, won't compile
Why can templates only be implemented in the header file?
Let $\vec{k}$, $\vec{v}$, and $\vec{u}$ be vectors, where $\vec{u}$ is unknown and $\vec{k}$ and $\vec{v}$ are known vectors. Given:     $\vec{u}\cdot\vec{k}=c$  $\vec{u} \times \vec{k}= \vec{v}$   From this relations, how can i determine the vector $u$? I tried to construct orthogonal coordinate system from $(\vec{k}, \vec{v},\vec{k}\times \vec{v})$ but i couldn't proceed from there. Any idea? Use of the comment package How do you make samba follow symlink outside the shared path This is Ubuntu server 10.04 64 and samba 3.4.7.  I have a shared directory /home/mit/share and another one /home/temp that I link into the shared one:  ln -s /home/temp /home/mit/share/temp   But on windows, after using internet, I cannot open S:/temp, but on Linux it is possible to access /home/mit/share/temp like expected.   This works if I link directories inside /home/mit/share/temp, so I guess samba is restricting to jump with a link outside/above the shared directory.   EDIT:  See also this question titled .  It seems best to put unix extensions = no into the global section and follow symlinks = yes and wide links = yes only into the shares section, where you really need it.  The unix extension flag has to live in the global section and not in the individual shares sections. But for security reasons it is better to use the other options only where you need it, and not globally. Removing columns in a SpatialPolygonsDataFrame in R? My spatial polygon data frame (SPDF) contains too many columns (variables) and I want to remove most of the columns entirely.   I know how to do this with a regular data frame in R, but I am unsure how to do this when dealing with object of class SpatialPolygonsDataFrame? I'm totally new to Ubuntu/Linux, using Ubuntu Server at the moment. Just trying to  figure out something basic.   How can you tell where you are installing a program. For example I just installed Sphinx search engine by placing the tarball that I downloaded from their site to my:  /home/sphinx   directory. I created the sphinx directory to place that tarball in. Then I ran these commands:  tar xvzf sphinx-0.9.8.1.tar.gz cd sphinx-0.9.8.1/ ./configure --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql   and then these:  make sudo make install   Now I have a lot of files sitting in the directory where I ran these commands. Is this my Spynx installation or did it install somewhere else?  In windows if you run an installer (.exe file) anywhere the program will still install in your C:\Program Files directory. Does something similar apply to linux where all programs are installed in a central place, or can you install programs anywhere on the system.  Questions   I would prefer to keep all my installed programs in one place so what is the right place for this in terms of best practice. In other words what is the Linux equivalent of C:\Program Files? And how does one always install at this location, is it just a matter of placing the tarball and running the install commands from this location? What about if I use sudo apt-get to install a package. How can I point to this location to tell apt-get to always install there? Launch app only if not already open Binary search (bisection) in Python Motivation: I once had one surplus card on my hand, and knew the robbers would come soon. So I gave it to someone for free, to avoid losing more cards when they hit. I was surprised by how badly this was received. Two of the three other players (the hosts of the game) acted upset, like I had tried to cheat. I had to take the card back, get robbed the next turn and 'giving cards away for free' was banned immediately. (Oh, how I hate mid-game additions to the rules. But that's beside the point.)  So now the question: Is this really illegal in Settlers of Catan? Is it generally considered underhanded in any way? If so, why?   My reasoning was like this:        Consider players A and B.   A wants to give B a sheep.   A trades a sheep and one rock to B, in exchange for wheat.   A trades the received wheat for the (formerly his) rock.   A and B now both have the same resources they had in the beginning, only the sheep has moved from A to B. Sequence of differentiable functions Let $f_n$ be a sequence of differentaible functions on $[0,1]$ to $\mathbb{R}$ converging uniformly to a function $f$ on $[0,1]$, Then    $f$ is differentiable and Riemann integrable there $f$ is uniformly continuous and R-integrable $f$ is continuous, need not be differentiable on $(0,1)$ and need not be R-integrable on $ [0,1]$, $f$ need not be continuous.   Well I think 2 is only correct statement  as every $f_n$ are differentiable on $[0,1]$ hence uniformly contnous, and as they converge uniformly to $f$ on $[0,1]$ so $f$ is uniformly continuous and every continuous function is rieman integrable..Am I correct? This seems to be a chicken-egg problem. The most common task using sudo is installing and removing software.  sudo apt-get purge &lt;appname&gt;   But sudo itself can be removed.  sudo apt-get purge sudo # Do not run this command on production computers!   This is where the fun comes  ubuntu@ubuntu:~$ sudo bash: /usr/bin/sudo: No such file or directory   Although it's obvious that no person in his right mind will purge sudo (other than me), someone can be fooled to run this command (not directly, in its hex mode, or whatever it's called) or a person could SSH in disguised as tech guru and do the mess.  So is there a way of reinstalling sudo? One asks “how does x taste,” implying that they’d like an adverb describing the way it tastes. But one answers with an adjective, “it tastes good” instead of “it tastes well,” which would imply that x is tasting something else. What’s the reason for this discrepancy? How to Give Credit for An Answer in the Comments I asked a question on SO and someone gave me the answer as a comment to the question. Subsequently, someone else gave the same answer as an answer.  I would like to give credit to the poster who made the comment. Is there any way to do that?   Being new to the site, my only thought would be to contact the commenter and tell him to post an answer if he/she wants credit. Shortest code to calculate list min/max in .NET I'd like something like  int minIndex = list.FindMin(delegate (MyClass a, MyClass b) {returns a.CompareTo(b);});   Is there a builtin way to do this in .NET? Add a rule after chapter title using titlesec What does a Terminator do after its mission is accomplished? A Terminator is essentially given a mission or an objective ("Go back in time and kill Sarah Connor" or something of the like).  What does a Terminator do once its mission is accomplished?  We see in Terminator 2: Judgment Day (the live-action movie) that the  (played by Arnold Terminator Schwarzenegger) completed its mission of protecting the Connors, and then sort-of just melted itself into nothingness (presumably to protect the world from discovering Terminators again).  But what would the  or the  (in Terminator 3) have done?   Are they given multiple directives ("Go kill Sarah Connor, then go kill Robert Baratheon, and then have a nice hot bath; you've earned it")?  This question is related, but not a dupe: Proof by Induction: Prove that $2^n > n^2$, for all natural numbers greater than or equal to $5$ Prove that the interval $(0, 1)$ and the Cartesian product $(0, 1) \times (0, 1)$ have the same cardinality Prove that the interval $(0, 1)$ and the Cartesian product $(0, 1) \times (0, 1)$ have the same cardinality  using the SB theorem? Also how does one find a bijection on $f:(0, \infty) \to (0,1)$ such that they have the same cardiniality? Do we have any experimental evidence to confirm that light is an electromagnetic wave? Or is it confirmed simply by Maxwell's equations showing a similarity in speed? “have found” vs. “found” What should I do when my neural network doesn't learn? I'm training a neural network but the training loss doesn't decrease. How can I fix this?  I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set.    This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion:   If your neural network does not generalize well, see: