Compiling error on template method, return is instance from inner class
Where and why do I have to put the "template" and "typename" keywords?
I read a book a while ago ( read many years, maybe a decade ago, it was at least 20 years old then) about a watery planet ruled over by a monstrous overlord sea monster thing.   The hero rallies some of the floating villages to fight the monster and they make iron weaponry out of iron from blood as far as I can remember.   Beyond this I can't remember much about the book, but I'm sure at least one other person out there must have read it.  Edit for more potential details: I think the village folk were reluctant to trust the hero, he was maybe a stranger to them and a lot of them didn't want to upset the status quo.    The iron weapons were maybe to pierce the hide? A harpoon seems familiar, something to trap him with the aid of nets. Counterexample to Leibniz criterion for alternating series I have this statement and I need to say if it is true or false:  Let $\{a_n\}$ be a real sequence.  $$\lim_{n\to +\infty} a_n = 0 \quad \implies \quad \sum_{n=1}^{\infty}(-1)^na_n \quad \text{converges}$$  I know, from the Leibniz criterion that:     If $a_n \to 0$, $a_n$ is decreasing and positive then $\sum_{n=1}^{\infty}(-1)^na_n$ converges   From this fact I believe that the statement is false but I couldn't come up with an infinitesimal sequence that isn't decreasing and for that reason is divergent. I tried some function with $sin(\frac{1}{n})$ without any luck. Any help would be very appreciated, thank you! What are "good men that do nothing" called? "The only thing necessary for the triumph of evil is for good men to do nothing." -Edmund Burke  Is there an idiom, phrase or preferably a single word that we can call people that could have helped but didn't? Bystanders don't necessarily have help to give. Cowards aren't particularly helpful either.    Addendum:  For example, once EMS has arrived on scene, bystanders are encouraged not to try to help, unless they're a nurse and therefore have the necessary skills to, and sometimes even then so. If in The Service, I would not want a coward (a liability) next me holding the line. Not to take anything away from these great answers, or to insist on a non-militaristic point of view, I would like to veer into the commercial or civilian realm in which I find this quote most often alluded to, E.G., "If we all gave 5 cents we could cure cancer tomorrow." Pretend most of us did give 5 cents and we did cure cancer, but you didn't give. You are now a(n) ____?... yes, I know what we call them, but what is their proper designation? Why did Owen Chase not fire his harpoon at Moby Dick? In movie In the Heart of the Sea, when Owen Chase finally faces the big white whale (later named Moby Dick) with his harpoon, why does he not do it? Is it possible that $a_n>0$ and $\sum a_n$ converges then $na_n \to 0$? (without assuming $a_n$ is decreasing) How to get full query text from performance_schema.threads? According to : Access to the threads table does not require a mutex  and has minimal impact on server  performance. The other sources have negative performance consequences because they require a mutex.   So yes, I want to use threads table to examine running queries. The trouble is, the PROCESSLIST_INFO column does not contain the full query. It just contains a truncated version of the query. There is a flag viz performance_schema_max_sql_text_length which controls how many bytes are allocated for the SQL query. But it seems to affect the events_statements_history_long table. There is no change in the thread table output. There is also the events_statement_current table. But it is not clear if accessing that table affects performance or not. How does database indexing work? Given that indexing is so important as your data set increases in size, can someone explain how indexing works at a database-agnostic level?  For information on queries to index a field, check out . How do I improve boot speed? I have seen many videos that make Ubuntu faster, but these methods only make desktop performance faster.  I am looking to make my computer boot faster. Is their anything I can do to make Ubuntu boot significantly faster? Words for "a bit sad" and "a bit happy"? Is it possible to install an iPhone app in MacBook Pro? Why is "can I get" replacing "could I have"? I noticed the other day when serving the public that when asking for something, people were saying "Can I get an xyz, please". The previous time I had such a job it was "Could I have an xyz", or "May I have..." if they were being very polite.  Does anyone know when this trend started and what caused it? In 10.04, I had a lot of keyboard shortcuts defined using Super/Mod4 and one single other key,   Super+O ran Opera Super+W opened Nautilus pointing to my Work folder, etc.   In 11.04, these do not seem to work -- only Super+R works to run the terminal, and Super+Shift+W successfully runs Nautilus.  Is there some way I can get these to function again?  Adding them in Keyboard Shortcuts does not work, and neither does adding commands in CompizConfig Settings Manager. What is a combo update and how is it different than the regular update? What is a combo update and how is it different from a normal update? Showing a set is closed under inverses Let $G$ be a finite group, say a group with $n$ elements, and let $\emptyset \neq S \subseteq G$. Suppose $e \in S$, and that $S$ is closed with respect to multiplication. Prove that $S$ is a subgroup of $G$.    Let $G = \{a_1, \ldots, a_n\}.$ Let $a_i \in G.$ Then any number of $a_ia_1, a_ia_2, \ldots, a_ia_n \in S,$ since $S$ is closed under multiplication. One of those $a_ia_j$ is $e$ since $e \in S.$ Then either $a_i$ or $a_j$ is $a^{-1}.$ Would this argument work? What is the difference between AOSP and AOKP? Identifying a resistor with a weird band combination Upvoting a downvoted answer will do +2 upvote? I have first downvoted an answer. Then, I decided to leave it the way it was before, meaning to undo my downvote just like it never existed, so I upvote to remove my downvote. Suprise! SO seems to consider it as two upvotes!  Let's say I have an answer with -3, then I decide to downvote it making it -4. After deeper thoughts, I prefer to remove my downvote to let it the way it was before I downvoted, meaning -3, but SO makes it -2 automatically!     Wouldn't it be supposed -3, and not -2? If someone else would have upvoted, it would have made it an upvote +1, not a +2!   Am I missing something here?  In fact, is there a way to tell SO that I only wish to undo my downvote, and not upvote the answer? I may understand why it does behave this way. I only wish to undo my downvote, though. My book says  \begin{equation} (a,b)=\{\{a\},\{a,b\}\} \end{equation}  I have been staring at this for a bit and it doesn't make sense to me. I have read several others posts on this, but none made any sense to me.  For example,   Based on how my ignorant brain is viewing this, I don't see why the definition could not be.  \begin{equation} (a,b)=\{\{a\},\{b\},\{a,b\}\} \end{equation}  aka the power set. What is the significance of the {a} in that definition? Please keep things simple if possible. Normally definitions have a valid and clear reason for being defined that way.    Clarification  First, I understand what an ordered pair is. I just don't see how the set notation says that.   Second,  \begin{equation} (a,b) = \{\{a\},\{a,b\}\}=\{\{a,b\},\{a\}\} \end{equation} Sets don't preserve order, but ordered pairs do. How does the third part of the equality apply to the definition?  Third, another issue with the notation that I have starts with the Product Property of Sets  \begin{equation} \text{Let $X$ and $Y$ be sets} :\ X=\{a,b,c\}\text{ and }Y=\{a,d,e\}. \end{equation} \begin{equation} \text{Then }X \times Y = \{(a,a),(a,d),(a,e),(b,a),(b,d),(b,e),\dots,(c,e)\} \end{equation} If we look at the first ordered pair and our given definition we have  \begin{equation} (a,a)=\{\{a\},\{a,a\}\} \end{equation}   How can this be so, you can't have duplicates in sets? I guess what I am looking for in an answer, is not a proof or a definition of ordered pairs, but rather something like, "This notation says what it says because...". Except for the second to last point I get the terminology, I just don't get the connection between the two different uses of notation. I'm looking for a story that was probably written somewhere from the 1940s to the 1960s. I think I read it in an anthology, possibly in the 1970s.  A group of human explorers landed on a planet with primitive aliens, living in hunter-gatherer villages. They hoped to make a profit from trading our goods for—well, I'm not clear on what they wanted from the aliens.  The native people learned the human language before the explorers could learn theirs. Then the natives suddenly started producing technological innovations far beyond what they originally used. I remember that wooden sailing ships suddenly replaced their canoes. All the natives had to do was hear a story once from the explorers before copying the technology in the story.  Finally, the explorers realized that the natives were much, much smarter than us and that Earth faced a serious problem.  I'm fairly certain that it wasn't a Heinlein story, but I remember that it had some qualities similar to his work. What happens if you call erase() on a map element while iterating from begin to end? In the following code I loop through a map and test if an element needs to be erased.  Is it safe to erase the element and keep iterating or do I need to collect the keys in another container and do a second loop to call the erase()?  map&lt;string, SerialdMsg::SerialFunction_t&gt;::iterator pm_it; for (pm_it = port_map.begin(); pm_it != port_map.end(); pm_it++) {     if (pm_it-&gt;second == delete_this_id) {         port_map.erase(pm_it-&gt;first);     } }   UPDATE: Of course, I then  which I didn't think would be related but answers my question.