Is this an upcast or not? If not, please describe why. Thanks in advance.  C++ code:  Base base; Derived derived; base = derived; // is this the upcast?
Someone mentioned it in the IRC as the slicing problem.
Quadratic models with R. The use of poly(..) and I(..) functions (R-language) What causes the different results below?    var1 = c(0.04875,0.13725,0.28350,0.50975,0.77425,0.94700,0.05325,0.14050,0.29725,0.51525,0.79000,0.95400,0.04625,0.15250,0.29000,0.53300,0.79825,0.95225,0.05025,0.14625,0.28800,0.52625,0.78200,0.95925,0.04700,0.14225,0.30325,0.53500,0.79325,0.95875,0.04775,0.13850,0.28675,0.54250,0.78300,0.95175,0.05150,0.12725,0.30175,0.54725,0.79475,0.96275,0.05375,0.14100,0.30050,0.53275,0.78100,0.96175,0.05450,0.15300,0.29650,0.52850,0.80100,0.95675,0.05425,0.13975,0.30875,0.56025,0.80575,0.96100,0.05100,0.15350,0.31175,0.53300,0.78900,0.96000,0.04650,0.13525,0.29600,0.53625,0.78475,0.96375,0.05375,0.13900,0.29600,0.53725,0.78700,0.95800,0.05075,0.14350,0.29225,0.54525,0.80275,0.95800,0.05050,0.13200,0.29850,0.52700,0.80525,0.96150,0.05150,0.14050,0.29450,0.54375,0.79450,0.96375,0.05375,0.13525,0.30475,0.55250,0.79425,0.96025,0.04950,0.14500,0.29425,0.52250,0.78475,0.95650,0.05225,0.14425,0.29225,0.53150,0.80425,0.95375)  var2 = c(1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,3,4,5,6)  var3 = c(4,4,4,4,4,4,6,6,6,6,6,6,8,8,8,8,8,8,10,10,10,10,10,10,12,12,12,12,12,12,14,14,14,14,14,14,16,16,16,16,16,16,18,18,18,18,18,18,20,20,20,20,20,20,22,22,22,22,22,22,24,24,24,24,24,24,26,26,26,26,26,26,28,28,28,28,28,28,30,30,30,30,30,30,32,32,32,32,32,32,34,34,34,34,34,34,36,36,36,36,36,36,38,38,38,38,38,38,40,40,40,40,40,40)   summary(aov(var1~as.factor(var2)*var3)) summary(aov(var1~as.factor(poly(var2,1))*poly(var3,1)))   I might not understand well how poly(..) and I(..) work. Could you give me some hints about these two functions?  (I aim to create models of different degree (quadratic, cubic, etc..) and compare their BIC (or AIC)). Graph with $k$ components. Let $G$ be a simple graph on $n$ vertices. If $G$ has $k$ components and every component is complete prove that: $$|E| \le \frac{(n-k)(n-k+1)}{2}$$ I'm asking for advice. Whenever I try to cut out a circular hole in either a cylinder or sphere the polygons around the circular hole always have distorted normals after smoothing. Is there anyway to fix this. I've tried using the remesh modifier but wind up with some pretty ugly results. I am setting up a server where there are multiple developers working on multiple applications.  I have figured out how to give certain developers shared access to the necessary application directories using the setgid bit and default ACLs to give anyone in a group access.  Many of these applications run under a terminal while in development for easy access. When I work alone, I set up a user for an application and run screen as that user. This has the downside that every developer to use the screen session needs to know the password and it is harder to keep user and application accounts separate.  One way that could work is using screen multiuser features. They do not work out-of-the-box however, screen complains about needing suid root. Does giving that have any downsides? I am pretty careful about using suid root anything. Maybe there is a reason why it isn't the default?  Should I do it with screen or is there some other intelligent way of doing what I want? Installation of latest version R for linux First I typed  sudo gedit /etc/apt/sources.list   after that I got one sources list then I typed  deb http://cran.rstudio.com/bin/linux/debian wheezy-cran3/   then I get the error like this  No command 'deb' found, did you mean:  Command 'derb' from package 'icu-devtools' (main)  Command 'deb3' from package 'quilt' (main)  Command 'debc' from package 'devscripts' (main)  Command 'dwb' from package 'dwb' (universe)  Command 'xdeb' from package 'xdeb' (universe)  Command 'debi' from package 'devscripts' (main)  Command 'dab' from package 'bsdgames' (universe) deb: command not found   How should I proceed? How do I make a Theorem n followed by a Theorem n' ? Why is empty set an open set? I thought about it for a long time, but I can't come up some good ideas. I think that empty set has no elements,how to use the definition of an open set to prove the proposition. The definition of an open set: a set S in n-dimensional space is called open if all its points are interior points. Behaviour of printf when printing a %d without supplying variable name I've just encountered a weird problem, I'm trying to printf an integer variable, but I forgot to specify the variable name, i.e.  printf("%d");   instead of  printf("%d", integerName);   Surprisingly the program compiles, there is output and it is not random. In fact, it happens to be the very integer I wanted to print in the first place, which happens to be m-1.  The errorneous printf statement will consistently output m-1 for as long as the program keeps running... In other words, it's behaving exactly as if the statement reads  printf("%d", m-1);   Anybody knows the reason behind this behaviour? I'm using g++ without any command line options.  #include &lt;iostream&gt; #define maxN 100 #define ON 1 #define OFF 0  using namespace std;  void clearArray(int* array, int n); int fillArray(int* array, int m, int n);  int main() {     int n = -1, i, m;     int array[maxN];     int found;      scanf("%d", &amp;n);      while(n!=0)     {         found=0;         m = 1;         while(found!=1)         {             if(m != 2 &amp;&amp; m != 3 &amp;&amp; m != 4 &amp;&amp; m != 6 &amp;&amp; m != 12)             {                 clearArray(array, n);                 if(fillArray(array, m, n) == 0)                 {                     found = 1;                 }             }             m++;         }          printf("%d\n");          scanf("%d", &amp;n);     }      return 0; }  void clearArray(int* array, int n) {     for(int i = 1; i &lt;= n; i++)         array[i] = ON; }  int fillArray(int* array, int m, int n) {     int i = 1, j, offCounter = 0, incrementCounter;      while(offCounter != n)     {         if(*(array+i)==ON)          {             *(array+i) = OFF;             offCounter++;                }         else          {             j = 0;             while((*array+i+j)==OFF)             {                 j++;             }             *(array+i+j) = OFF;             offCounter++;                    }         if(*(array+13) == OFF &amp;&amp; offCounter != n) return 1;         if(offCounter ==n) break;          incrementCounter = 0;                while(incrementCounter != m)         {             i++;             if(i &gt; n) i = 1;             if(*(array+i) == ON) incrementCounter++;          }            }      return 0; } I have read several introductory texts about LSTM online, but none of them give a rigorously mathematical explanation of what the model actually does. For instance, why does the forget gate forget any more than any of the other gates in the LSTM unit?  Which papers and/or books should I read if I want to get a deeper understanding of LSTM? What font is "z" in "z-score"? Why am I getting no power when I pedal? Yesterday when I was biking my mountain bike on level paved path, I would pedal but get no power to the wheel.  To use a car analogy, it was as if I had the clutch in and was apply gas.  It seemed to happen most often after I coasted and then went back to pedalling.  I would pedal and realize that no power was going to the wheel.  The chain was definitely on the sprockets and moving. I could change gears no problem while I had no power.  Sometimes stopping the bike and starting again would work, or just trying again.  Needless to say, I'm taking it in as I'm not mechanically inclined, but I'm hoping to learn something.  Perhaps a link to a site that explains the problem?  So my questions.   What is going on?  I have heard of something called the "freehub".  I really don't know how bikes work though, so I'm hoping for an explanation of how one can pedal and give power to the wheel and then stop pedalling and the wheel just keeps moving (without the pedals moving).   If you are on a ride, is there any emergency adjustment to make?   For what it's worth, it's an old bike.  Circa 1993 Performance Mtn Bike.  So it's not too surprising that it's falling apart.  I haven't used it a whole lot, and have tried to wash and oil it, but I probably haven't taken the care that a biking aficionado would.  Also, besides losing power after coasting, one time I was pedaling and suddenly the pedals weren't powering the wheel.  I almost went over the handlebars!  So, I definitely want to get it fixed.  I'd just like to know a little bit about what is going on.  Thanks,  Dave.  Bonus question:  If there is enough info to make a diagnosis and you have ideas on costs to fix, perhaps you could comment on whether it's worth fixing.  Like I said, it's circa 1993 and cost about $450 then.  No shocks or anything.  Just 21 speed Mtn. Bike. Good textbooks on homological algebra Ugly 'post date' alignment on user profile when the date wraps into multiple lines This is basically the same as  for the Android app, except I am making the request for the iOS app.  When viewing a question in the iOS app, I'd like to see the total number of views for the question. How does Cypher exit/enter the Matrix without an operator? What happens to the energy when waves perfectly cancel each other (destructive interference)? It appears that the energy "disappear" but the law of conservation of energy states that it can't be destructed. My guess is that the kinetic energy is transformed into potential energy. Or maybe it depends on the context of the waves where do the energy goes? Can someone elaborate on that or correct me if I'm wrong? Can I view the Markdown-source of an unedited question/answer? Once a post has been edited, you can go into the revision list, and click "View Source".  If a post has not been edited (and I don't have the edit privilege) is there any way to see the raw Markdown?  The reason I ask I because of  - it's impossible to see the source markdown, and how it's different from the rendered Markdown.  Not exactly a huge issue, just curious! Getting error message when trying to start a virtual machine I have been using VMWare on Windows for a long time. But after a long wait, I moved to VirtualBox on Ubuntu 11.10. I installed Ubuntu, 32 Bit, installed all available updates and installed Virtual Box. When I try to create a new Windows installation inside VirtualBox, I got the following error messages.  VirtualBox - Error  Failed to open a session for the virtual machine Windows XP. The virtual machine '**Windows XP**' has terminated unexpectedly during startup with exit code 1. Details  Result Code: NS_ERROR_FAILURE (0x80004005) Component: Machine Interface: IMachine {5eaa9319-62fc-4b0a-843c-0cb1940f8a91}   2nd error dialogue  Virtualbox - Error in suplibOsinit Kernal driver not installed (rc--1908) Please install the virtualbox-dkmbs package and execute 'modprobe vboxdrv' as root.    I have already tried reinstalling VirtualBox. Google result seem to indicate the the problem happens due to Kernel updates.   Is there anyway I can get this working? I need this for malware analysis and if VirtualBox is going to crash on me all the time, then I won't be able to use Ubuntu for work.  Output to dpkg -l | grep virtual   server rc  virtualbox                             4.1.2-dfsg-1ubuntu1                     x86 virtualization solution - base binaries rc  virtualbox-qt                          4.1.2-dfsg-1ubuntu1                     x86 virtualization solution - Qt based user interface  cute 'modprobe vboxdrv' as root.&lt;p&gt; So I've got the shout in my shouts list and I've unlocked all three parts of it, but I can't seem to be able to use it all, just the first part.  Am I missing something? I still have a quest for 'Learn the first word of Durnehviir's shout' but it's showing as me having already got it.  What gives? Rules and guidelines for drawing good schematics There are a lot of poorly drawn schematics here. A few times people have actually asked for critiques of their schematics. This question is intended as a single repository on schematic drawing rules and guidelines can point people to. The question is  What are the rules and guidelines for drawing good schematics?     Note: This is about schematics themselves, not about the circuits they represent.