How to make sure template class definitions make it into shared library? I am trying to compile a .so for a fairly large project, and I am running into the issue that none of the classes, templated or otherwise, written in any of the files are in the completed .so file.  I made the file with:  g++ -shared -fPIC -Wall filename1.cpp -o libfilename1.so   I'll spare you the full output of the nm, but all of the non-templated functions that were defined are there, and none of the templated functions, templated classes, or classes are there. I tried using __attribute__ ((visibility=("default"))) in the class declarations, but it didn't seem to do anything.
Why can templates only be implemented in the header file? 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 was surprised to find that standalone package can not compile a document with an equation:  \documentclass{standalone} \begin{document} \begin{equation} % not working! F(V, T) = E(V) + D(T) \end{equation} \end{document}   Is there an option or some workaround that allows this? The current error is something like:   ! Missing $ inserted.   in line 4. (The idea of course is that the including (main) document can just \input the standalone without knowing if is going to be an equation or something else) How to avoid the wrinkle at the poles of the UV sphere? When I create a UV sphere and add the subdivision surface modifier, the following wrinkle appears.    How can I avoid it?  I've read the article  but there seems to be no clear solution.  UPDATE 1  I've used the word 'apply' in the first sentence of the initial version of this question. It's misleading since I want to preserve the modifier without 'applying' it. Rather, what I meant is 'adding' the modifier.  UPDATE 2  I followed josh sanfelici's solution, but still there is an artifact at the pole.  Here is the screen: (A rendered view with a sun lamp)    Maybe it's the limitation of the general-purpose subdivision modifier.  BTW, when the cast modifier is added after the subdivision modifier, the sphere becomes perfect (even for my original wrinkled sphere).  But since I want to edit the resulting sphere (for example, scaling X, Y, etc) while modifier is added but not applied, it's not usable. The Barbarian's Rage ability gives advantage on Strength checks and saving throws.  Does this mean that the Barbarian gets advantage to attack rolls as well? Is an attack a check, or since saving throws are mentioned, that means it does not apply to attacks? I have a matrix and need to highlight some elements in the matrix. I have found how to highlight a single element (I want to put the cell in the square):  $$ A = \begin{bmatrix} \fbox{0} &amp; \fbox{0} &amp; 0 \\  \fbox{0} &amp; \fbox{0} &amp; 0 \\ 1 &amp; 1 &amp; 1 \\  \end{bmatrix}$$   But how can I outline elements of the submatrix like in the picture below? I need just a frame where some elements are located. I read a book back in middle school. Can't remember the name of the book or the author or anything. Tried googling all the stuff I remember, but nothing ever fit it. It had a biohazard symbol on the cover, and it was sort of holographic, a bunch of whites and blues, looked kind of like how people interpret dream sequences or warp jumps in sci-fi animation or film. The book involved three kids, and they got a message one day or something, and they eventually decoded it to be lottery numbers, and they were told to buy a submarine with it and some other things. Some weird fog starts appearing all over the place, and these white creatures start beating up on everybody else. When they lose pretty much everybody, they're just kind of sitting in the submarine, and they send a message back in time, I think. It's been a few years. Anybody know what the book is or have any hints on it? Thank you~ I'd like to see if somebody has been trying to log-in by brute-force into my Ubuntu 12.04 server over SSH. How can I see if such activities have been taking place? I'm stuck in a teleporting loop. What can I do? I set a command block to /tp. It was supposed to activate only if you had 0 time left, and to activate the command block with a hopper clock to keep giving it power.   But it is not checking if you have 0 time left, so it keeps teleporting me. I can't get close enough to the command block to break it, so I'm stuck in a neverending teleport loop.  Any ideas? Determining a matrix from its characteristic polynomial Let $A\in\mathcal{M}_{n}(K)$, where $K$ is a field. Then, we can obtain the characteristic polynomial of $A$ by simply taking $p(\lambda)=\det(A-\lambda I_n)$, which give us something like $$p(\lambda) = (-1)^n\lambda^n + (-1)^{n-1}(\text{tr } A)\lambda^{n-1} +  \cdots + \det A$$ Now, how can we obtain the matrix $A$ knowing the characteristic polynomial? How do I logout from a non-registered account? I have a registered StackOverflow account which I normally log into using OpenID.  Recently I logged out in order to post a question anonymously (supplying a fake name and of my secondary email addresses).  The problem now is that I'm logged in to StackOverflow as this "dummy" user, unable to see a way to log out.  The top menu normally has a "logout" link, but when you aren't fully registered this link is replaced with "register".  There is no "logout" link for me. :(  So..   When logged out there is a "login" link. When logged in there is a "logout" link. When "logged in" with an unregistered account, there is only a "register" link (no "logout"). Console freezes on auto-complete of /mnt/folder (CIFS) share I have a Ubuntu 14.04 server that will lock up after an undetermined amount of time when you attempt to tab-auto-complete the path of a CIFS share in the /mnt directory. I mount the share and it seems to work fine for a uncertain amount of time. I can do ls or run du on folders within the mounted share. Then I will go to tab out a folder path and my console locks up. I can start a new session but it will lock as soon as I try to mess with the mounted share; this even happens to other users if I have them try as well. I have no idea why this is happening? I've never seen this issue. How to integrate $\int_0^{\infty} \frac{e^{ax} - e^{bx}}{(1 + e^{ax})(1+ e^{bx})}dx$ where $a,b > 0$. This  $$\ \int_0^{\infty} \frac{e^{ax} - e^{bx}}{(1 + e^{ax})(1+ e^{bx})}dx \text{ where } a,b &gt; 0. $$ is a problem that showed up on a GRE practice test. I believe you're supposed to use complex contour integration, but I'm not sure which contour to use. I think it's the keyhole contour, but I wasn't able to get anything useful. We are having issues with our exchange 2013 server. The server is running Windows Server 2008 R2 Standard.  The issue we're having is that our Exchange server isn't receiving internet emails. It can currently send mail out to internet addresses, and send and receive internal emails from the current email server. I have checked the settings of the receive connectors and everything seems correct. We have tried everything that we can think of.   We can send and receive email locally, and send out to a gmail account. However, we don't get the reply email from the gmail account to the inbox.    Thanks in advance!! Image is of the DNS settings on the exchange server. I have a Word file which has some Excel plots in it. Unfortunately I lost the original excel plots and the word file is now 'de-linked'.   Is there a way to retrieve the lost data for the plots? Just copying the plot back to Excel does not seem to work, but I can see that the data is still there somewhere, because hovering over a dot on the plot shows the values. How does LSTM prevent the vanishing gradient problem? LSTM was invented specifically to avoid the vanishing gradient problem. It is supposed to do that with the Constant Error Carousel (CEC), which on the diagram below (from ) correspond to the loop around cell.  (source: ) And I understand that that part can be seen as a sort of identity function, so the derivative is one and the gradient stays constant. What I don't understand is how it does not vanish due to the other activation functions ? The input, output and forget gates use a sigmoid, which derivative is at most 0.25, and g and h were traditionally tanh. How does backpropagating through those not make the gradient vanish ? I'm using pdflatex, and use \includegraphics to include content of figures from PDF. PDF are exported from InkScape.  \begin{figure} [!h]     \centering     \includegraphics[height=3cm]{fig/SUSAN.pdf} \end{figure}   Included PDF or source SVG has same colors. Green has always RGB value (0, 255, 0). Problem occurs when I include this files from LaTeX. In output PDF on some pages colorspace is darker. Even same image on other page has different colourity.  My PDF  . As you can see on page 7 (11 in PDF) USAN areas are bright green, but then on page 5 (9 in PDF) are green points on corners more darker. OED says:     doobie: a marijuana cigarette    Origin unknown. A relationship with dobby has been suggested.    dobby/dobbie: A silly old man, a dotard, a booby. Dialectal.      First citations:    1967   J. B. Williams Narcotics &amp; Hallucinogenics. Dubbe, Negro slang for a marijuana roach.    1982   A. Maupin Further Tales of City 95,  I smoke a doobie at lunch.   But I just chanced upon  in Yahoo Answers (don't laugh! :) where someone posted:     "It's obvious that Shaggy's a , I'm sure he's been feeding Scoob a bit of his hash and whatnot."    Scoob = , cartoon "pet" dog of constantly-hungry hippie/village idiot Shaggy (from 1969)   I'm not entirely convinced that 1967 dubbe was necessarily a significant factor in the appearance of  since around 1970 (the hippie era, some might say).  So I'd like to know whether it's credible to claim the usage arose (primarily?) through association with the TV show (specifically, the two characters therein closely associated with marijuana). I was trying to fix my audio problems using suggestions from . One of the comments suggested I execute this and only this:     killall pulseaudio   So I did, and I restarted my computer just in case, but all it did was remove my soundcard and I still couldn't hear anything. Now I don't know how to get my soundcard back.  Please note that I am extremely inexperienced when it comes to Ubuntu. Shoenfield introductory mathematical logic book alternatives I was originally intending on reading Mathematical Logic by Joseph R. Shoenfield (1967) though after reading  I get the impression that despite being influential for the time it was written, there now exist many new books written from our current perspective that tend to be easier on non-experts by offering more thorough explanations for each new topic being introduced.   As of now I have a basic knowledge of abstract algebra (basics on vector spaces, rings, groups etc.) from doing elementary number theory and taking a course on linear algebra, also I have completed  a year long course on real analysis which used a lot of elementary set theory and some order theory.   With all that said, I was hoping based on my current basic knowledge of math that someone could recommend me an introductory book on mathematical logic which I could use as an alternative to Shoenfield's and which addresses Peter Smith's criticisms - any help would be greatly appreciated. I'm planning to use USB port for an application(from a device to a PC) but the distance between the device and the PC will be around 15m. The recommended maximum USB cable length is 5m.  How can I buffer the data without loosing any information, safely? Would a USB hub work? Makeindex error when ! used in \index in align environment See MWE below. The symbol ! in the \index causes an error. This is only the case in align environments (not in equation). So it seems to have to do something with amsmath. If ! is put in an \mbox there is no error. But then of course the font size is not adjusted to subindices. Curiously enough, \index{$C_{K!!}$} (two exclamation marks) doesn't cause any error.    \documentclass{article} \usepackage{amsmath} \usepackage{imakeidx} \makeindex \begin{document} \begin{align} y\index{$C_{K!}$} \end{align} \printindex \end{document}     Any solutions suggested?