I have an error in this code  void f(list&lt;CClass*&gt; mylist,CP* Database,string namePoi){ //some code list &lt;CClass*&gt;::reverse_iterator ite;             for (ite=mylist.rbegin(); ite!= mylist.rend(); ite++) {                     mylist.insert(++ite,Database-&gt;getPointer(namePoi));//compiler error                 } }   The error is  : no matching function for call to 'std::list::insert(std::list::reverse_iterator&amp;, CPOI*)' the lineDatabase-&gt;getPointer(namePoi)  is giving the right output but I think I m not using the right insert command because when I use a normal iterator(not reverse_iterator), it works perfect. Thanks
I want to insert something into a STL list in C++, but I only have a reverse iterator. What is the usual way to accomplish this?  This works: (of course it does)  std::list&lt;int&gt; l; std::list&lt;int&gt;::iterator forward = l.begin(); l.insert(forward, 5);   This doesn't work: (what should I do instead?)  std::list&lt;int&gt; l; std::list&lt;int&gt;::reverse_iterator reverse = l.rbegin(); l.insert(reverse, 10);
Opportunity attack when moving in and out of range of a creature in the same move? Let's say I'm 10ft away from an enemy. In my turn, I choose to move 5ft to get close enough to attack, I do attack, then I use my remaining movement to move out of range of the enemy. Does this still allow them an opportunity attack? Using TIPA with fontspec At the very end of Deathly Hallows, after Harry repaired his own wand with the Elder Wand, he tells Dumbledore's Portrait in the office:     “I’m putting the Elder Wand,” he told Dumbledore, who was watching him with    enormous affection and admiration, “back where it came from. It can stay there. If I die a    natural death like Ignotus, its power will be broken, won’t it? The previous master will    never have been defeated. That’ll be the end of it.   Now, this seems incredibly foolish to me.  "The previous master will never have been defeated" would only have been assuredely true if Harry had died right after depositing the Elder Wand back into Dumbledore's Tomb.   If not, Harry (the Wand owner) would still be alive, and at the risk of being Disarmed (as was shown with Harry and Draco Malfoy, it doesn't matter if the Elder Wand's owner is defeated by death or simple disarming, AND it's not even required that the Disarming would involve the Elder Wand!).  So, if Harry merely put the Elder Wand back into the Tomb, and some years later, someone would disarm him (or, even worse, kill him) - then that someone would become the Elder Wand owner, either by accident or by design:    By accident - Harry is likely to get into plenty of magical duels in the future. Even discounting friendly one (teaching people the Expelliramus), he plans on becoming an Auror!  By design - plenty of people have been in the Great Hall hearing Harry explaining to Voldemort that he, Harry, was now the owner of the Elder Wand, so the fact of his ownership would most assuredly NOT remain a secret, inviting countless people tempted by owning the Deathstick to hunt Harry down. Oh, and the location is now also known!   So "its power will be broken" is quite unlikely to come true!  Is Harry hopelessly wrong? Or am I missing something in the above logic? Was this addressed in canon/JKR info? Proof that every number ≥ $8$ can be represented by a sum of fives and threes. Uniform convergence of $f_n(z)=nz^n$ in the set $|z|<\frac{1}{2}$ I have a scene below where I am wanting to get an HDRI image to come in through the windows and light the scene in the window areas and have a god ray like effect.  I want to do this with a volumetric effect and have the HDRI lighting create throw patterns in the scene.  Is this possible?  To have volumetric lighting where the HDRI creates throw patterns?  Thanks for the help How can I convert an integer into its verbal representation? Is there a library or a class/function that I can use to convert an integer to it's verbal representation?  Example input:     4,567,788`   Example output:     Four million, Five hundred sixty-seven thousand, seven hundred eighty-eight Evaluating $\int P(\sin x, \cos x) \text{d}x$ I've somehow lost my id_rsa.pub file. I still have my id_rsa file. How do I recover the public key from the private key?  (This question came up after ssh-copy-id was reporting "ERROR: No identities found" while ssh-keygen reported "/root/.ssh/id_rsa already exists". ls ~/.ssh pointed out the problem was having id_rsa but not id_rsa.pub. I found the solution, but it was buried at the bottom of a long post on an Ubuntu support forum.) Size and density of neutron stars Most of the books which I looked at give approximately 10 km as the radius of a neutron star. Just yesterday I looked at a book by Dave Goldberg titled The Universe In the Rearview Mirror (2013) which says that they're "only about 5 km in radius" [p.225]. Is this true, [i.e., is there some recent evidence for this], or did he make a mistake here? $a^2b^2+a^2c^2+b^2c^2\leq 3$ Let $a, b, c\geq 0$ s.t.$$(a^2-a+1)(b^2-b+1)(c^2-c+1)=1$$  Show that $ a^2b^2+a^2c^2+b^2c^2\leq 3$.  My idea:  I denote $a+b+c=x$, $ab+bc+ac=y$ and $abc=z$.  Then I have $$x^2+y^2+z^2-xy-xz-yz+2z-y-x=0$$ I have to show that $$y^2-2xz\leq 3$$ I tried to prove it with the sign of trinom, but it doesn't work. How do I login as root? How do I survive in the Nether? How to replace an old version of Ubuntu with a newer one from USB/DVD? Definite Integral $\int_{-\infty}^{\infty}\frac{x\sin x}{(x^2+a^2)(x^2+b^2)}\,\mathrm{d}x$ $$\int_{-\infty}^{\infty}\frac{x\sin x}{(x^2+a^2)(x^2+b^2)}\,\mathrm{d}x$$  This is easy to evaluate with complex analysis but is there an elementary way (substitution, partial fractions, integration by parts)? Can anyone tell me how to judge if a supervised machine learning model is overfitting or not? If I don't have an external validation dataset, I want to know if I can use ROC of 10 fold cross validation to explain overfitting. If I have an external validation dataset, what should I do next? Independence of disjoint events Why is mathematical induction a valid proof technique? I am really having trouble working a problem in my course. I will post it and then add what I have thought etc.  Let p be an odd prime, then using the Euclidian Algorithm, calculated the GCD of of $x^{p-1}-1$ and $x^2+1$ in $\mathbb{Z} / p\mathbb{Z}[x]$  Also, how does $p=1 (mod4)$ tell us that  $-1$ is a square in $\mathbb{Z} / p\mathbb{Z}$, infact that $-1$ is a square here if and only if $p=1(mod4)$.  My thoughts:   I know that $$x^{p}-x=(x)(x-1)(x-2)…(x-(p-1))$$ and so that in this sense our roots will be the congruence classes of $1,2,…p-1$  and also that $$x^{p-1}-1=(x-1)(x-2)…(x-(p-1))$$  But I get lost when trying to apply the EA to these polynomials,  like how can I do it when p is arbitrary?  Preferably id like to be able to understand/see how to do the first part first i.e. using division with residue and then move on to the second part. Any insight/hint or solution to this would be great,  Thank you all  Update:  When I try to do division with residue, I just get  $$x^{p-1}-1=(x^2+1)(x^{p-3}-x^{p-5}+x^{p-7}-x^{p-9}...)$$  for example,  $p=7$  $$(x^{6}-1)=(x^2+1)(x^4-x^2+1)$$  for $p=11$  $$(x^{10}-1)=(x^2+1)(x^{8}-x^{6}+x^{4}-x^{2}+1)$$  which for specific cases tells me that 1 is the gcd, but I dont know how to generalize that for the case with arbitrary prime p. I would appreciate it if someone could refer me to a proof (or simply give one here) for the statement in the title. That is:  If $k&lt;n$, then every $k-$dimensional subspace of $\mathbb{R}^{n}$ has $n-$dimensional Lebesgue measure zero.  I've seen some proofs that use Sard's lemma but I'm not really familiar with that subject and I've never seen a proof of said lemma so I'd appreciate a proof that doesn't use it if possible.  Thanks in advance!