Define a Class instance and create its objects and cast with it
Casting of objects to dynamic types at runtime
What are the rules about using an underscore in a C++ identifier? It's common in C++ to name member variables with some kind of prefix to denote the fact that they're member variables, rather than local variables or parameters. If you've come from an MFC background, you'll probably use m_foo. I've also seen myFoo occasionally.  C# (or possibly just .NET) seems to recommend using just an underscore, as in _foo. Is this allowed by the C++ standard? Upper bound for norm of Hilbert space operator It is a standard result that for a bounded self-adjoint operator $T$ on a complex Hilbert space $H$, we have $\|T\|=\sup_{\|x\|=1}|\langle Tx,x\rangle|:=M(T)$, where $M(T)$ is called the  of $T$. It seems that for any bounded operator on $H$, we have $||T||\leq 2M$. Why is that so? How many ways can $r$ nonconsecutive integers be chosen from the first $n$ integers? During self-study, I ran across the question of how many ways six numbers can be chosen from the numbers 1 - 49 without replacement, stipulating that no two of the numbers be consecutive.  I can obtain a simple lower bound by saying that, in the worst-case scenario, when you choose a particular number, there are now three numbers that cannot be chosen next.  For example, if I first pick 17, then I can't choose 16, 17, or 18 for the remaining choices.  This gives me the lower bound  $$\frac{49*46*43*40*37*34}{6!} = 6,773,770 \frac{8}{9}$$  This is about 48% of ${}_{49}C_6 =  13,983,816$.  The real answer must be bigger (and an integer).  I haven't found a way to calculate it, though.  The original problem asked to show that the probability of having non-consecutive integers when you choose six is greater than 50%, so if the problem is complicated to count exactly, better approximations that show the answer is above 50% would also be appreciated.   Of course, I can use a computer to do the counting, but I'm interested in learning what methods I'm missing. A generic list of anonymous class Brownian motion - Hölder continuity Any difference between "Good morning, Brian" and "Good morning to you, Brian" I often hear it on TV when they are talking to a guest.  Normally, if we want to greet Brian in morning, we would say "Good Morning Brian". But many times TV presenters say "Good morning to you Brian".  Why is that? Why do they add "to you". There seems to be no need to do it.  Regards, Remove completed reminders in OS X and iOS Suppose your git history looks like this:  1 2 3 4 5  1–5 are separate revisions. You need to remove 3 while still keeping 1, 2, 4 and 5. How can this be done?  Is there an efficient method when there are hundreds of revisions after the one to be deleted? Remove rogue app from menu bar I have a rogue item on my menu bar from a terrible piece of printer/scanner software. I long ago removed the app, but the button for the app remains in the menu bar.   Is there any central way for me to remove an item from the menu bar? Any plist I can hack? command line trick, etc?  It's the one to the left of the Facebook icon:    (I tried holding Command and dragging it away, but it doesn't seem to respect that convention.) Best way to remove file extension from a string? So, I'm using a script I've made to convert videos to the webm format. A certain program calls the script, sending %f which is the full, absolute file name of the video, like this:  converter.sh %f   where %f has two possible extensions, .avi or .mpg.  # /bin/bash ffmpeg -i $1 `dirname $1``basename $1 avi`webm &amp;&amp; rm $1   It currently works perfectly when $1 contains a .avi file, because basename removes the .avi extension. When $1 ends with .mpg instead, the result is .mpgwebm.  How can I modify that script to be able to receive those two possible different formats?    Resuming: If $1 is /somedir/video.avi, the script should do:  ffmpeg -i /somedir/video.avi /somedir/video.webm   And if $1 is /somedir/video.mpg, the script should do:  ffmpeg -i /somedir/video.mpg /somedir/video.webm   I know this might be fool for some people, but I'm kind of new with the bash. Including all the jars in a directory within the Java classpath I have a function with the same name, but with different signature in a base and derived classes. When I am trying to use the base class's function in another class that inherits from the derived, I receive an error. See the following code:  class A {     public:     void foo(string s){}; };  class B : public A {     public:     int foo(int i){}; };  class C : public B {     public:     void bar()     {         string s;         foo(s);     } };   I receive the following error from the gcc compiler:  In member function `void C::bar()': no matching function for call to `C::foo(std::string&amp;)' candidates are: int B::foo(int)   If I remove int foo(int i){}; from class B, or if I rename it from foo1, everything works fine.   What's the problem with this? Do I need a RHEL subscription to install packages? All rounds of AES (and Rijndael) have a MixColumns step, save the last round which omits it.  DES has a similar feature where the last round differs slightly.  The rationale, if I recall correctly, was to "make the cipher appear similar in reverse as it does in the forward direction."  Why does this make AES$^{-1}$ look similar to AES?  And how does this help in implementing the block cipher? Can a Paladin take levels of other classes? In 3.5 D&amp;D,  have severe restrictions on multiclassing:     Like a member of any other class, a paladin may be a multiclass character, but multiclass paladins face a special restriction. A paladin who gains a level in any class other than paladin may never again raise her paladin level, though she retains all her paladin abilities.   Because Pathfinder is based on 3.5 D&amp;D, do Pathfinder paladins face the same restriction? That is, if a Paladin multiclasses to say, a fighter, can she take another level of Paladin later on? Feedback Request: New Timeline Question View Minecraft crashes on launch with EXCEPTION_ACCESS_VIOLATION, Problematic frame: ig4dev32.dll or ig4dev64.dll or ig4icd32.dll or ig4icd64.dll What is the difference between /sbin/nologin and /bin/false? I have often heard it recommended that a user account should be disabled by setting its shell to /bin/false. But, on my existing Linux systems, I see that a great number of existing accounts (all of them service accounts) have a shell of /sbin/nologin instead.  I see from the man page that /sbin/nologin prints a message to the user saying the account is disabled, and then exits. Presumably /bin/false would not print anything.  I also see that /sbin/nologin is listed in /etc/shells, while /bin/false is not.  The man page says that FTP will disable access for users with a shell not listed in /etc/shells and implies that other programs may do the same. Does that mean that somebody could FTP in with an account that has /sbin/nologin as its shell?  What is the difference here? Which one of these should I use to disable a user account, and in what circumstances? What other effects does a listing in /etc/shells have? how do you make clothes move along with your model? Do you rig the model first and then parent it to the body of the character then click cloth simulation? I am a little bit confused with the process. Thanks for the help. Why did the Tethered form a line in Us? In Jordan Peele's  we see that the Tethered plan a revolt, rise above ground and start murdering everyone in sight and then they form a line by holding hand in hand.   What was the purpose of that?