I'm patching up security flaws in a 15-20 year old system that hasn't been maintained for 10 years.  As such, most of my "patches" are really work arounds and kludges because a real solution would erode the integrity of a working (if insecure) system.  One of the "patches" I applied was related to my old compiler , which works pretty well, but not perfectly.  Somewhere in these thousands of lines of code, I try to convert a double using patch::to_string(), and it fails to compile with the following error:      g++  -o main -Wall -g -Wextra -pedantic main.o veracodefunctions.o main.o: In function `main': /home/(omited for privacy)/2_Test/main.cpp:8: undefined reference to `std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; patch::to_string&lt;double&gt;(double const&amp;)' collect2: ld returned 1 exit status *** Error code 1 clearmake: Error: Build script failed for "main"   Below is the original implementation of the patch I used, which I got from , and should work:  #include &lt;string&gt; #include &lt;sstream&gt;  namespace patch {     template &lt; typename T &gt; std::string to_string( const T&amp; n )     {         std::ostringstream stm ;         stm &lt;&lt; n ;         return stm.str() ;     } }  #include &lt;iostream&gt;  int main() {     std::cout &lt;&lt; patch::to_string(1234) &lt;&lt; '\n' &lt;&lt; patch::to_string(1234.56) &lt;&lt; '\n' ; }   The patch by  has this main() at the bottom of it that is supposed to illustrate that it works with both int and double values, but for some reason mine only works with int, and not with double.  Here is my implementation:  patch.h:  8 #include &lt;string&gt; ... 25 namespace patch 26 { 27    template &lt; typename T &gt; std::string to_string( const T&amp; n ); 28 }   patch.cpp:  6 #include &lt;string&gt; 7 #include &lt;sstream&gt; 8 #include &lt;stdexcept&gt; 9 #include "patch.h" ... 41 namespace patch 42 { 43    template &lt; typename T &gt; std::string to_string( const T&amp; n ) 44    { 45       std::ostringstream stm; 46       stm &lt;&lt; n; 47       return stm.str(); 48    } 49 }   main.cpp:  2 #include &lt;iostream&gt; 3 #include "patch.h" 4  5 int main () { 6  7    std::cout &lt;&lt; "\"12345\" to string is: " &lt;&lt; patch::to_string(12345) &lt;&lt; std::endl; 8    std::cout &lt;&lt; "\"12.345\" to string is: " &lt;&lt; patch::to_string(12.345) &lt;&lt; std::endl; 9    return 0; 10  11 }   And just so you don't have to scroll, here is the compile error again:      g++  -o main -Wall -g -Wextra -pedantic main.o veracodefunctions.o main.o: In function `main': /home/(omited for privacy)/2_Test/main.cpp:8: undefined reference to `std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; patch::to_string&lt;double&gt;(double const&amp;)' collect2: ld returned 1 exit status *** Error code 1 clearmake: Error: Build script failed for "main"   Any insight would be much appreciated!
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.)
Root Android virtual device with Android 7.1.1 How to cleanly launch a GUI app via the Terminal? "Learn More" link on tags broken in latest Chrome stable Note: This is identical to , but that bug was declined because Chrome 30 was in dev. Chrome 30 has now been released, and still has this issue.   The "Learn More" link for tags is broken in the latest release of Google Chrome.    If I right-click and open in new tab, I get the tag's page, but just clicking doesn't work.  I'm using Chrome 30.0.15599.69, the latest stable release: How can a module detect when the "access denied" page is output? How is it possible for a module to detect when Drupal is outputting the "access denied" page? I know how to do it with Drupal 6; I need to know how to do it with Drupal 7. Problems with Groups in Traminer I'm having a problem using the group function in TraMineR. I have a data set that contains SPELL data, so multiple rows per case. I also have demographic data per case, at one row per case. I merge these together and end up with data that has a demographic covariate per row, so multiple rows per case. An example of this data would be:  id startmin stopmin activity educ4 4      1      20       work    HS 4      20     40       play    HS 8      1      15       sleep   College 8      15     40       work    College   I can make sequence data from this, but when I try to run a plot using the group command        seqiplot(atus.seq, group = atus.seqdata$educ4, border=NA,                 withlegend="right",  cex.plot=.55)   it tells me:       &gt;"Error: group must contain one value for each row in the sequence object".   I have gotten this to work with the example of the mvad data in the training manual, but I can't seem to get it to work with the groups, whether I link to the original demographic data, the merged data, or try to pass the covariates by seqformat and seqdef. Ideas? Since the  would it make sense to create a Stack Exchange site dedicated to homework help? It wouldn't have to be limited strictly to homework either, possibly including discussions of puzzles and brain teasers and possible approaches to solving them.  I have a programming background so I would be interested in helping with CS or math related homework, discussions of programming contest problems, etc. Topics don't necessarily have to be related to programming either. That's just where my interests are.  What are your thoughts? Inequality vs. Inequation, Equation vs. Equality When talking about statements that two terms are mathematically (un-)equal (e.g., 1 = 1, 1 &lt; 2, or 1 != 2), what is the correct notion for such mathematical statements? Are there special cases w.r.t. "mixed" relations like x &lt;= y? Can some notions be used interchangeably?  It seems many online sources use "equation" and "inequality" but there is also a . Apart from personal posts in forums, I have not found any sources using "equality" in such a situation, yet. Systematically, I would think that "equation" and "inequation" would make more sense than "equation" and "inequality", but not everything (probably very few things) in natural languages have developed according to a purely logical system.  Note that this question is more general than  for that it particularly asks for the relation between the notion for equations and the one for inequalities. Equations are not part of the existing question at all. What happens when a creature with "Whenever a creature dies" dies simultaneously with multiple other creatures? has the following ability:     Whenever a creature you control with a +1/+1 counter on it dies, return that card to the battlefield under your control at the beginning of the next end step.   I had a number of creatures on the battlefield, including Marchesa herself, with one or more +1/+1 counters on them when  was played, destroying each creature on the board.  When Marchesa and several other creatures would be killed simultaneously,   Does Marchesa's ability trigger for herself? Does Marchesa's ability trigger for the other creatures under my control with +1/+1 counters?   In attempting to resolve the issue, we tried to look things up, leading to , which cites Rule 603.6d as proving that Marchesa's ability should trigger both for herself and for each other creature with +1/+1 counters.  Unfortunately, none of us could actually understand Rule 603.6d, aside from this example:     Two creatures are on the battlefield along with an artifact that has the ability Whenever a creature dies, you gain 1 life. Someone plays a spell that destroys all artifacts, creatures, and enchantments. The artifacts ability triggers twice, even though the artifact goes to its owners graveyard at the same time as the creatures.   The example certainly seems analogous to me, but without understanding the actual rule, rather than just the example, we weren't too sure.  A complete answer has to not only answer the question, but back up that answer with citation and explanation of the official rules on the matter. Is there a way to run Python on Android? We are working on an  version and this platform has a nice Python API..  However, there is nothing official about Python on Android, but since  exists, is there a way to let the snake and the robot work together?? Universal Chord Theorem Let $f \in C[0,1]$ and $f(0)=f(1)$.   How do we prove $\exists a \in [0,1/2]$ such that $f(a)=f(a+1/2)$?  In fact, for every positive integer $n$, there is some $a$, such that $f(a) = f(a+\frac{1}{n})$.  For any other non-zero real $r$ (i.e not of the form $\frac{1}{n}$), there is a continuous function $f \in C[0,1]$, such that $f(0) = f(1)$ and $f(a) \neq f(a+r)$ for any $a$.  This is called the Universal Chord Theorem and is due to Paul Levy.  Note: the accepted answer answers only the first question, so please read the other answers too, and also this answer by Arturo to a different question:     This is being repurposed in an effort to cut down on duplicates, see here: .  and here: . Naive visualization of space-time curvature If I traceroute to my server via a bunch of different methods, the external ip seems to not work. However the server is online and accessible by this ip.  Localhost:  michaelxu@michaelxu-server:~$ traceroute 127.0.0.1 traceroute to 127.0.0.1 (127.0.0.1), 30 hops max, 60 byte packets  1  localhost.localdomain (127.0.0.1)  0.120 ms  0.069 ms  0.064 ms   Internal Ip:  michaelxu@michaelxu-server:~$ traceroute 192.168.1.3 traceroute to 192.168.1.3 (192.168.1.3), 30 hops max, 60 byte packets  1  michaelxu-server (192.168.1.3)  0.122 ms  0.065 ms  0.067 ms   External IP:   michaelxu@michaelxu-server:~$ traceroute 24.24.174.153 traceroute to 24.24.174.153 (24.24.174.153), 30 hops max, 60 byte packets  1  * * *  2  * * *  3  * * *  4  * * *  5  * * *  6  * * *  7  * * *  8  * * *  9  * * * 10  * * * 11  * *^C michaelxu@michaelxu-server:~$   ...it contines all the way to 30 ... the same thing happens if I traceroute it through the dns server  It also occurs if i do it from another online service:     Tracing route to cpe-24-24-174-153.socal.res.rr.com [24.24.174.153]...  hop rtt rtt rtt     ip address  fully qualified domain name 1   1   1   1       70.84.211.97    61.d3.5446.static.theplanet.com 2   0   0   0       70.87.254.5 po101.dsr02.dllstx5.networklayer.com 3   0   0   1       70.85.127.109   po52.dsr02.dllstx3.networklayer.com 4   0   0   0       173.192.18.230  ae17.bbr02.eq01.dal03.networklayer.com 5   0   0   0       66.109.9.97 ae-11-0.pr0.dfw10.tbone.rr.com 6   41  40  39      66.109.6.208    ae-6-0.cr0.dfw10.tbone.rr.com 7   39  39  40      66.109.6.0  ae-3-0.cr0.lax30.tbone.rr.com 8   37  39  39      66.109.6.65  9   42  40  39      72.129.9.3  agg1.lamrcadq-ccr02.socal.rr.com 10  36  36  35      72.129.10.73     11  53  60  49      24.24.209.18    ge17-0-spsdca1-ars1.socal.rr.com 12  *   *   *            13  *   *   *            14  *   *   *            15  *   *   *          What do the * * * mean? Is there any way to "fix this" Make rigid body collide with hair particles How to use PSTricks in pdfLaTeX? I thought that PSTricks package was not possible to use in pdfLaTeX but .   How can I force pdfLaTeX to use PSTricks then? "More clear" vs "Clearer": when to use "more" instead of "-er"? Random piece of plastic Apport-gpu-error-intel.py crash How does MySQL store data I am wondering if there is a modifier or tool that will essentially undo a subsurf or subdivide command. Network booting couldn't find kernel image I have a problem with PXE booting. I followed  on the Ubuntu help wiki. But I get an error on client machine:  Could not find kernel image: vmlinuz-3.13.0-24-generic   And now, question. This image should be in pxelinux.cfg folder, am I right?