Why is the output displaying “Base” given the fact that object “a” was assigned to object “b”? Why does it not output "Derived"?  #include &lt;iostream&gt;   class A {      public:      virtual void display()      {       std::cout &lt;&lt; "Base";  }  };   class B: public A {      public:      void display()         {       std::cout &lt;&lt; "Derived";  }  };   int main() {     B b;           A a = b;     a.display();           return 0; }
Someone mentioned it in the IRC as the slicing problem.
I already found the radius of convergence of the power series $:$ $$\sum_{n=1}^{\infty} \frac {(-1)^n} {n} z^{n(n+1)}.$$ What happens at the boundary of disk of convergence?  I found that the radius of convergence to be $1$ and hence the disk of convergence is $|z|&lt;1$. Now I found at $z=1$ the series converges. Now how can I proceed? Please help me. Thank you in advance. Making Change for a Dollar (and other number partitioning problems) I was trying to solve a problem similar to the "how many ways are there to make change for a dollar" problem.  I ran across a  that said I could use a generating function similar to the one quoted below:     The answer to our problem (293) is the   coefficient of $x^{100}$ in the reciprocal   of the following:      $(1-x)(1-x^5)(1-x^{10})(1-x^{25})(1-x^{50})(1-x^{100})$   But I must be missing something, as I can't figure out how they get from that to $293$. Any help on this would be appreciated. L1 & L2 Regularization in Light GBM This question pertains to L1 &amp; L2 regularization parameters in Light GBM. As per official documentation:  reg_alpha (float, optional (default=0.)) – L1 regularization term on weights.  reg_lambda (float, optional (default=0.)) – L2 regularization term on weights  I have seen data scientists using both of these parameters at the same time, ideally either you use L1 or L2 not both together.   While reading about tuning LGBM parameters I cam across one such case: Kaggle official GBDT Specification and Optimization Workshop in Paris where Instructors are ML experts. And these experts have used positive values of both L1 &amp; L2 params in LGBM model. Link below (Ctrl+F 'search_spaces' to directly reach parameter grid in this long kernel)      I have seen same in XGBoost implementations.  My question is why use both at the same time in LGBM/XGBoost.  Thanks. Is there a way to set the gnome-terminal title from within the terminal itself without having to right click on the tab. Something like:  active-terminal --title "Foo"   There was a related question previously with an answer that almost lets you do this:  but that doesn't set the gnome-terminal tab title only the window title. Code blocks are not prettified on mobile site On Chrome on Android, code blocks on the mobile site have no syntax highlighting, are not a monospaced font, and words are wrapped.  Mobile site on mobile browser:    Desktop site on mobile browser:    Inline code has the same issue, it isn't a monospaced font.  It has been this way for as long as I can remember. Wouldn't be surprised if this is a dupe. I did setup an easy scene with an area light behind a window. In the glass (simple plane) which is in front the area light is visible - how can I turn this off so that the background is shining throgh? What is the procedure for taking down Titans? ICANN charges 18¢ per domain name registered regardless of its extension, but I pay $10 for a domain name per year with my registrar.   What do domain name registrars do for its customers to justify this extra $9.82?  Is there something that they do for our domain names other than registering it with ICANN?   I just read about the 7 people who hold the ICANN database key and got a little bit curious to know what the domain name servers do for us to justify this extra amount (12 times the actual fee)? bordermatrix with blocks I need to write a complicated matrix, that has a structure as in the attached picture. Contraction mapping in the context of $f(x_n)=x_{n+1}$. Quantum teleportation and no-communication theorem According to the Wikipedia article for the :     In very rough terms, the theorem describes a situation that is analogous to two people, each with a radio receiver, listening to a common radio station: it is impossible for one of the listeners to use their radio receiver to send messages to the other listener. This analogy is imprecise, because quantum entanglement suggests that perhaps a message could have been conveyed; the theorem replies 'no, this is not possible'.   According to the Jet Propulsion's recent article on quantum teleportation:   they can effect an entangled photon (B) with another photon (A) to change the state of the other entangled photon.  Doesn't this contradict what the no-communication theorem states ? $\mathbb Q[x]/(x^2+1)$ is not isomorphic to $\mathbb Q[x]/(x^2+2)$ Is it possible to change the line style in a tikz figure in the same \draw command?  I am looking for something like:  \documentclass[tikz]{standalone} \begin{document}     \begin{tikzpicture}         \draw[style1] (0,0) -- ++(1,0)  **CHANGE STYLE** -- ++(1,0);     \end{tikzpicture} \end{document}   The main motivation is that I don't want to loose the relative coordinate as I go on with a long \draw command. Security importance of Key Schedule in Block Cipher Glossaries: Make a glossary entry recognizable in printing How do you make it visible to the reader that the printed word/term is an entry in the glossary? In my PDF on the computer, I just see it because I use the hyperref package and there's a red box around it. But when printing it, there's just nothing that makes it visible to the user.  Is there a typographically good and common way of doing this? Note: If you're looking for a simple explanation as to why comments aren't required on downvotes, see .   I used to get "upset" (though that is too strong a term) when I got downvoted without comment. If my answer isn't good enough then I'd like to know why. Not only does it improve the answer for the OP but it improves my knowledge too.  Where the down-vote has been explained I've found it useful &amp; it has improved my answer, or forced me to delete the answer if it was totally wrong.  So is there any way we can encourage people to leave a comment? Perhaps they don't lose rep if they explain their down-vote?  I must admit though that I haven't always explained my down-vote either so you could call me a hypocrite. I've also grown a thicker skin over the months of using SO (it seems to have come with the higher rep score ;-)), so I'm less bothered about this now. How can I make a message appears on my PC when my phone is ringing? When I'm at work, I usually have a headset on my head and I am listening to music. My phone is always on vibrate to respect co-workers.  However, I don't keep the phone in my pocket because of its size, so I don't feel it vibrating.  I miss a lot of calls.  I was wondering if it's possible to forward "phone is ringing" notifications to the PC, ideally via a Bluetooth connection.  I would not mind installing a 3rd-party app on the phone or software on the PC. How to find the smallest $n$ such that $n^a\equiv 1 \pmod p$ How can I make schematic of this board? How do I prove that $$ a^3+b^3+c^3−3abc = 1 $$ if   $ a = 1+\frac{x^3}{3!}+\frac{x^6}{6!}......$ , $b=x+\frac{x^4}{4!}+\frac{x^7}{7!}....$ , $c=\frac{x^2}{2!}+\frac{x^5}{5!}+\frac{x^8}{8!}......$ ?  I have tried the following :-  I discovered that $a+b+c=e^x$ and that $a=\frac{d(b)}{dx}$, $b=\frac{d(c)}{dx}$, $c=\frac{d(a)}{dx}$ . But I am unable to proceed further with these information.