Why does Downnot invoke the Base ctor  through Left &amp; Right twice?  class Base { public:     Base() { cout &lt;&lt; "base-ctor" &lt;&lt; endl; }     Base(string a) { cout &lt;&lt; a &lt;&lt; endl; } };  class Left : virtual public Base { public:     Left(string a) : Base(a) {} };  class Right : virtual public Base { public:     Right(string a) : Base(a) {} };  class Down : public Left, public Right { public:     Down(string a) : Left(a), Right(a) {} };  int main() {     Down x("down");     // -&gt; base-ctor }
This question attempts to collect the few pearls among the dozens of bad C++ books that are published every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a well-written C++ book. It is way too big and complex for doing this. In fact, it is so big and complex, that there are very many very bad C++ books out there. And we are not talking about bad style, but things like sporting glaringly obvious factual errors and promoting abysmally bad programming styles. Please edit the accepted answer to provide quality books and an approximate skill level — preferably after discussing your addition in . (The regulars might mercilessly undo your work if they disagree with a recommendation.) Add a short blurb/description about each book that you have personally read/benefited from. Feel free to debate quality, headings, etc. Books that meet the criteria will be added to the list.  Books that have reviews by the Association of C and C++ Users (ACCU) have links to the review. *Note: FAQs and other resources can be found in the  and under .
I have a program which spawns several child processes.  I want to know which files this program and its children are creating, deleting, and modifying.   inotifywait can tell me which files are being accessed, but cannot tell me which process is doing it. And I have to know where the files are being created in order to set up the monitor. auditctl will let me log which processes modify a file, but, again, I have to know where the files are in order to set up logging. lsof will tell me all of the files, but doesn't seem to be a good solution for real-time tracking.   Is there anything that will let me monitor a program's file manipulation without knowing a priori which files will be manipulated? Spacings between continuous uniform random variables I'm writing a tool to report information about .NET applications deployed across environments and regions within my client's systems.  I'd like to read the values of assembly attributes in these assemblies.  This can be achieved using Assembly.ReflectionOnlyLoad, however even this approach keeps the assembly loaded.  The issue here is that I cannot load two assemblies that have the same name from different paths, so naturally I can't compare the same application deployed in different systems.  At this point I'm assuming the solution will involve using temporary AppDomains.  Can someone detail how to load an assembly into another AppDomain, read the attributes from it and then unload the AppDomain?  This needs to work for assemblies on the file system as well as those at URL addresses. Generate a comma-separated list of cell contents, excluding blanks To concatenate a certain four cells, I'd use:  =CONCATENATE(A2,",",C2",",D2,",",F2)   This would make it so that...   A2 = "Matthew" C2 = "Mark" D2 = "Luke" F2 = "John"   would result in Matthew,Mark,Luke,John.  But we run into problems with something like...   A2 = "Jesus" C2 = "" D2 = "Mary" F2 = "Joseph"   which would result in Jesus,,Mary,Joseph.  Here, the extra comma is undesired. Is there a way to gracefully handle this so that all non-blank cells are included in the comma-separated list, while avoiding the addition of unnecessary commas when some cells are blank?  Certainly, this can be done with a fair number of nested IFs, but I really want to avoid that if possible. Can it be done with native Excel functions, or perhaps an array formula? Or would one have to resort to VB Script for something like this? How can I start automatically a command on Ubuntu 18.04? I have a small command like this  xinput set-prop "XP-PEN G430S Pen Pen (0)" --type=float "Coordinate Transformation Matrix" 1.155756, 0.000000, 0.000000, 0.000000, 1.529, 0.000000, 0.000000, 0.000000, 1.000000   to use my XP-PEN tablet, I have to start it automatically every time that I start my PC. How can I do that? How do I iterate through each element in an n-dimensional matrix in MATLAB? How to include a document into another document? 2D collision detection Let's assume I'm using this character.  (source: ) How would you implement collision detection for it? Using a bounding box doesn't seem to be a good approximation, because the bird's shape is nowhere near a square. I was thinking of having a sort of quad tree data structure inside the object that represents portions of the image. Each leaf could be either false (in case it covers the white/transparent space outside the bird) or true (in case it represents an area of the bird i.e. beak, eye etc). Then somehow test the only obstacle in the scene for collision with the bird. But my problems in my approach are:  I don't know how to initialize the quad tree. Once the quad tree is initialized, I'm not sure how to traverse &amp; use it once the obstacle is within the coordinates of the image.  How would you do collision detection with non-squarish characters? LE: The other approach I've seen was to use multiple bounding boxes. For example I'd have one or a few bounding boxes for the beak, then a few of them for the hair or the tail. But it can get tedious. If this is a valid approach in my case, how would I generate those bounding boxes? I doubt I'd have to have them hardcoded in my program. LE2: I care about fairly precise collisions. I can't imagine how a single bounding box or circle can at least approximate decently that shape, so this approach won't work. Formatting should not count towards the character limit on comments This is a minor frustration, but I have a  that I put italics and bold into (using asterisks.)  Now I know I just just be happy that I could do it at all, but it seems to me that those should not count toward my comment char limit. Help to do something or help do something? I wrote:      I will help you to acquire Russian.    A native English speaker corrected me saying that 'to' is unnecessary here. Is it correct to say      "I will help you acquire Russian" I don't really get why these hyperbolic functions are named after trig functions. Can someone enlighten me? How does bash interpret the equal operator with no surrounding spaces in a conditional? The following script does not behave as I would have expected.  Adding spaces around the '=' in the conditional made it perform how I wanted, but it got me thinking, what is it actually doing inside the conditional?  #!/bin/bash S1='foo' S2='bar' if [ $S1=$S2 ]; then     echo "S1('$S1') is equal to S2('$S2') fi echo $S1 echo $S2   The output is:  S1('foo') is equal to S2('bar') foo bar   The contents of S1 and S2 don't change from what they are assigned, so the = doesn't perform an assignment. Is there a way to summon Dogmeat to you? I've recently started playing Fallout 4, and I've acquired Dogmeat. Long story short, I told him to stay in a small building so I could down a few raiders quietly but I forgot about him and I can't find him. Is there a way to call Dogmeat back or do I have to retrace my steps until I'm reunited with him? How can I reset my menus? How do I install the Nvidia drivers? Give me a blank Comment box when I am Improving a Suggested Edit The suggested edit screen includes both the suggested edit, and the reason for the edit:        When you click to improve the edit, that comment is left as-is and hidden at the bottom of the post above the save edit button:        At the moment, when I Improve a Suggested Edit, the Comment text for that Edit is retained (though editable). It's unlikely that the comment would still apply (e.g. Suggester added a tag and Approver corrected a typo), so I would rather have the field blank.  Also, it's better to have a blank Comment than an incorrect one... many people don't bother changing the original Comment.  So that box should be blank like this instead: Mysterious! Beamer itemize has no bullets after adding a few packages this is my first time using beamer.  I copied a template from the sharelatex page on Beamer  Which works, and \begin{itemize} shows bullets     But after adding a few more packages that I need, all the bullets are gone!    What is going on and how can I fix this?  \documentclass{beamer}  \usepackage[utf8]{inputenc}    \usepackage{amsmath}  \usepackage{amsthm}     %Theorem Environment  \usepackage{amssymb}  \usepackage{multirow}  \usepackage{cancel}  \usepackage{amsfonts}  \usepackage{graphicx}  \usepackage{subfigure}  \usepackage{upgreek}     \usepackage{mathtools}  \usepackage{thmtools}  \usepackage{enumitem}       %Information to be included in the title page: \title{Sample title} \author{Anonymous} \institute{ShareLaTeX} \date{2014}  \begin{document}    \frame{\titlepage}    \begin{frame}  \frametitle{Sample frame title}  \begin{itemize} \item  This is a text in first frame.  \item This is a text in first frame. \item This is a text in first frame.  \end{itemize}  \end{frame}  \end{document} Let $R$ be a simple ring and $T$ be a non-zero ring. Let $f\colon R \rightarrow T$ be a ring homomorphism. Show $f$ is injective.  Proof: $\ker f \lhd R$, so $\ker f=R$ or $\ker f=\{0\}$. If $\ker f=R$ then $R/R \cong \{0\}$, but $T \neq \{0\}$, which is a contradiction. I can't see why does the last part means contradiction.   Thanks for any assistance! Can Cycles renders be done from the command line? It seems that Cycles is mainly built in the form of Python scripts (as far as I can tell). Is it still possible to use Cycles to render a .blend file from the command line? Is there an analytic function $f$ on $B(0,1)$ the open ball with radius 1 such that $f(1/n)=e^{-n}$ for $n=2,3,4,...$? Is there an analytic function $f$ on $B(0,1)\subset\mathbb{C}$ such that $f(1/n)=e^{-n}$ for $n=2,3,4,...$? I know the following doesn't work:  Let $g(z)=\exp(-1/z)$. Then, $f=g$ on a sequence with a limit point in $B(0,1)$ and so $f=g$ on $B(0,1)$. Since $g$ is not $\mathbb{C}$-differentiable at $0$, neither is $f$ and so such a function cannot exist.  This is not the solution because you cannot use the identity principle with a non analytic function like $\exp(-1/z)$ is not analytic at $z=0$. Any help using the identity principle another way?