can any one tell me how to clear the content of the stringstream..? i tried the following but it didnt work.  stringstream ss; ss&lt;&lt;"bala"&lt;&lt;"murugan"; cout&lt;&lt;ss.str();         //Output balamurugan ss.str().clear(); ss&lt;&lt;" hi"; cout&lt;&lt;ss.str(); // output is balamurugan hi    my required output is " hi" alone.. Pls tell me
I've tried several things already,  std::stringstream m; m.empty(); m.clear();   both of which don't work.
I'm searching how to remove the chapter+section number on the theorem numbering with a section counter.  With no section counter it's like:  \newtheorem{thm}{Title} Chapter1 ----Section 1 --------thm 1 --------thm 2 ----Section 2 --------thm 3 --------thm 4 Chapter2 ----Section 1 --------thm 5 --------thm 6 ----Section 2 --------thm 7 --------thm 8   And with the section counter:  \newtheorem{thm}{Title}[section] Chapter 1 ----Section 1 --------thm 1.1.1 --------thm 1.1.2 ----Section 2 --------thm 1.2.1 --------thm 1.2.2 Chapter 2 ----Section 1 --------thm 2.1.1 --------thm 2.1.2 ----Section 2 --------thm 2.2.1 --------thm 2.2.2   And I want numbering my theorems like this:  \newtheorem???????? Chapter 1 ----Section 1 --------thm 1 --------thm 2 ----Section 2 --------thm 1 --------thm 2 Chapter 2 ----Section 1 --------thm 1 --------thm 2 ----Section 2 --------thm 1 --------thm 2   I know it's always a pain to remove such things, thanks for whoever will help me ^^ How can I change the local origin of an object, without changing the object location in the world space.  This is the object located at position (0,0,0) in the world space    This is the same object located at position (0,1,0) in the world space, but with its local origin offset so that the object is in the same place    Is there a way to do this in a single step? mysql_fetch_array does not retrieve all rows future or present with when Rigify generated rig, hand IK controller has unexpected rotation Finding derivative of $\sqrt[3]{x}$ using only limits I need to finding derivative of $\sqrt[3]{x}$ using only limits  So following tip from : I multiplied top and bottom by conjugate of numerator  $$\lim_{h \to 0} \frac{\sqrt[3]{(x+h)} - \sqrt[3]{x}}{h} \cdot \frac{\sqrt[3]{(x+h)^2} + \sqrt[3]{x^2}}{\sqrt[3]{(x+h)^2} + \sqrt[3]{x^2}}$$  $$= \lim_{h \to 0} \frac{x+h-x}{h(\sqrt[3]{(x+h)^2} + \sqrt[3]{x^2})}$$  $$= \lim_{h \to 0} \frac{1}{\sqrt[3]{(x+h)^2} + \sqrt[3]{x^2}}$$  $$= \frac{1}{\sqrt[3]{x^2} + \sqrt[3]{x^2}}$$  $$= \frac{1}{2 \sqrt[3]{x^2}}$$  But I think it should be $\frac{1}{3 \sqrt[3]{x^2}}$ (3 instead of 2 in denominator?)  UPDATE  I found that I am using the wrong conjugate in step 1. But this (wrong) conjugate gives the same result when I multiply the numerator by it. So whats wrong with it? (I know its wrong, but why?) $\mathbb{Q}(\sqrt{n}) \cong \mathbb{Q}(\sqrt{m})$ iff $n=m$ Page 105 of D. Burton's A First Course in Rings and Ideals reads     It is not difficult to show that if (I'll call them $n$ and $m$ instead of $n_1$ and $n_2$) $n$, $m$ are square free integers, then $\mathbb{Q}(\sqrt{n}) \cong \mathbb{Q}(\sqrt{m})$ if and only if $n=m$.   Well, it is getting difficult for me, any help or would be appreciated.    My progress so far: Suppose $\phi :\mathbb{Q}(\sqrt{n})\to\mathbb{Q}(\sqrt{m})$ is an isomorphism. Then $\phi(u)=u$ for every $u \in \mathbb{Q}$, so that $\phi(\sqrt{n})^2=\phi(n)=n$. If $\phi(\sqrt{n})=a+b\sqrt{m}$ for some $a,b\in\mathbb{Q}$, then $(a+b\sqrt{m})^2=a^2+b^2m + 2ab\sqrt{m}=n$ implies $$a^2+b^2m = n$$ and $$2ab=0.$$  Then $b=0$ cannot happen since that would imply that $\sqrt{n}\in\mathbb{Q}$, where $n$ is a square-free integer. Also $a=b=0$ cannot happen. Hence $a=0$ and we have $$b^2m=n.$$ If $\psi:\mathbb{Q}(\sqrt{n})\to\mathbb{Q}(\sqrt{m})$ were an isomorphism then there would exist some $s\in\mathbb{Q}$ such that $$s^2m=n,$$ then $s=b$ or $s=-b$. Therefore the only isomorphisms from $\mathbb{Q}(\sqrt{n})$ to $\mathbb{Q}(\sqrt{n})$ are $\phi(u+v\sqrt{n})=u+vs\sqrt{m}$ and $\psi(u+v\sqrt{n})=u-vs\sqrt{m}$.    I don't know if there's an easier way and I don't know if I'm in the correct way here. Thanks beforehand :) How can I add "Show desktop" to the GNOME dash or Ubuntu Dock? Footnotes in tables? I would like to have footnotes in tables, but the \footnote command does not work inside a table environment.  Googling one finds that this is , at least in the UK.  That link contains a list of solutions to the problem, but since the author of the FAQ does not believe that this is good style, no comparison is made between the different methods.  I am sure that there are good typographical reasons why in most situations it is undesirable to have footnotes in tables (although I have never come across them), however I have recently felt the need to do just this in a paper I am currently writing.  Therefore I'd like to ask two questions:   What are the arguments against footnotes in tables? If one really must go against the advice in 1., which method (whether considered in the  or not) would you recommend?   Thanks in advance.  Added  In response to ShreevatsaR's comment: I do not much care for where the text of the footnote appears.  I do however insist on the footnote marks being attached to the relevant entries in the table, so that I can avoid having to reference "the second entry in the eighth line of the table", etc... Is my sugar daddy scamming me Multiple Image in Canvas ItemsControl Homeomorphism that maps given points to given points What and where are the stack and heap? Programming language books explain that value types are created on the stack, and reference types are created on the heap, without explaining what these two things are. I haven't read a clear explanation of this.  I understand what a stack is. But,    Where and what are they (physically in a real computer's memory)? To what extent are they controlled by the OS or language run-time? What is their scope? What determines the size of each of them? What makes one faster? How does gravity escape a black hole? My understanding is that light can not escape from within a black hole (within the event horizon).  I've also heard that information cannot propagate faster than the speed of light.  It would seem to me that the gravitational attraction caused by a black hole carries information about the amount of mass within the black hole.  So, how does this information escape?  Looking at it from a particle point of view: do the gravitons (should they exist) travel faster than the photons? What is the rigor behind U subsitution? How to edit / how to format box overlapping with footer when scrolling down I just edited an answer on Unix&amp;Linux and when scrolling down, the semi-transparent right sidebar boxes "How to edit" and "How to format" kept their fixed positioning and overlapped with the page footer.     While posting this, I have seen several (not) duplicate questions about this issue, and although from my personal taste, I would prefer the boxes to stop scrolling before the footer is reached, I can accept the development teams decision to let it overlap.   However, on all those other posts, the boxes had an opaque background, so that the footer was hidden and the box content was readable. Here the boxes are transparent though, so the texts get mixed and are no longer well readable. I need to cite the journal "Sankhyā: The Indian Journal of Statistics" in a paper.  I would like to draw the ā character properly (i.e., I'd prefer, if possible, to avoid using some hack, such as \bar or \overline).  Question: How do I properly write ā in LaTeX?  I didn't have luck with  (after several attempts in both in capital and lowercase) nor The Comprehensive LATEX Symbol List (searching the file for "ā" and "india" revealed no hits). Why isn't The Flash unstoppable? I've recently gotten into The Flash TV show, and so I've been reading about his powers. What I don't understand is why his typical rogues pose a threat - it seems like there should be very little limit to his powers.  He can go back in time, so if he loses a battle or the bad guys do something, he can go back and preempt it. In the new 52, he can all but predict the immediate future, so he can see bad things that are going to happen and stop them. He can phase matter through matter, or let matter pass through him. This means he is all but immune to weapons fire.  I haven't read enough of the old comics so I don't the know challenges he's had. For a guy who can't be attacked, can time-travel and can race around the globe several times in a minute, I can't imagine there is much that could pose a threat. R/mgcv: Why do te() and ti() tensor products produce different surfaces? What are the requirements to use iMac screen as a second monitor - Target Display Mode? I have a Surface Pro 4 and an iMac (late 2019). I would like to connect my Surface Pro to the iMac to use the iMac screen as a second monitor.  Is that possible?  What are the requirements to use an iMac as a second screen?