So here I got a descent explanation that what actually is a virtual function and why do we really need it,        But there still remains a question in my mind that how compiler actually interpret that which definition should be used in case of multiple or hybrid inheritance. For example consider this example  class Up {  public:   void func(){       ...     }  };  class Middle_1 : public virtual Up {  public:  ... };  class Middle_2 : public virtual Up {  public:  ... };  class Down : public Middle_1, public Middle_2 {  public:  ... };   In above example code, class Down is receiving two definition of class Up (i.e one from Middle_1 and another from Middle_2). However we had ensured to use the virtual tag in Middle_1 and Middle_2 class which will remove the case of ambiguity (because compiler will take only one definition) and that is where my question arises.  Actually I am having a bunch of questions,   How will compiler select the best suited class? Will the selection be similar in all conditions? Didn't it contradict the fact that compiler have zero IQ?   Thanks in advance.
#include&lt;iostream&gt; using namespace std;  class A  {    int a;    int b;    public:    void eat()    {       cout&lt;&lt;"A::eat()"&lt;&lt;endl;    } };  class B: public A {    public:    void eat()    {        cout&lt;&lt;"B::eat()"&lt;&lt;endl;     }  };  class C: public A {     public:    void eat()     {        cout&lt;&lt;"C::eat()"&lt;&lt;endl;     }  };  class D: public B, C {  };  int foo(A *ptr) {  ptr-&gt;eat();  } main() {  D obj; foo(&amp;(obj.B)); //error. How do i call with D's B part.  }   The above foo call is a compile time error.  I want to call foo with obj's B part without using virtual inheritance. How do i do that.   Also, in case of virtual inheritance, why the offset information need to be stored in the vtable. This can be determined at the compile time itself. In the above case, if we pass foo with D's object, at compile time only we can calculate the offset of D's A part.
Statistical Entropy and Information theory Why is 'ping' unable to resolve a name when 'nslookup' works fine? On my Windows XP workstation, I can find the machine I want to connect to in DNS with nslookup:  nslookup wolfman Server: dns.company.com Address: 192.168.1.38  Name: wolfman.company.com Address: 192.168.1.178   But, when I try to connect to that machine, I get an error telling me that the machine can't be found (i.e., can't be looked up in DNS):  C:\&gt; ping wolfman Ping request could not find host wolfman. Please check the name and try again.   I am able to connect if I use the IP address directly:  C:\&gt; ping 192.168.1.178  Pinging 192.168.1.178 with 32 bytes of data:  Reply from 192.168.1.178: bytes=32 time=41ms TTL=126 Reply from 192.168.1.178: bytes=32 time=41ms TTL=126 Reply from 192.168.1.178: bytes=32 time=44ms TTL=126 Reply from 192.168.1.178: bytes=32 time=38ms TTL=126   I could work around this by adding an entry to my hosts file, but I would rather find out why this is happening.  The problem is transient, most of the day I can connect to the machine just fine.  How is this possible?  ETA: I left this out for brevity, but it was asked for:  C:\&gt; ping wolfman.company.com Ping request could not find host wolfman.company.com. Please check the name and try again.   ETA: Other applications get the same results.  I only tried ping to simplify.  telnet can't connect, Cygwin apps print a "unknown host wolfman" message.  Update: Using wireshark, I found that my workstation is not attempting a DNS lookup.  It's just reporting the "could not find host" error message. How do you return to the default view (the one you see when blender starts)? normal subgroups of Alternating group Klein's $4$ group, $\{1\}$ and $A_4$ are three normal subgroups of $A_4$. I want to know about any other normal subgroups of $A_4$. Do these exist? Real-time updates for new review tasks Is there an online course in Mathematical Methods for Physics, Covering Matrices and Vector Analysis? I am taking a course in Mathematical Methods for physicsPhysics (Junior Level).   We are working from   > Mathematical Methods for physicists, George B.Arfken .    I just need online resources covering ( Matrices, Determinants, Vector Analysis, Tensors and differential forms and Vector spaces...etc) to study and understand from. I'm trying to install Anbox in my new Ubuntu 16.04 using instructions from  . It seemed to work, but I got no icon in my dash, so I suspect that the installation is not complete. With Synaptic  Package Manager I can see that anbox-common &amp; anbox-modules-dkms are installed, but I have no icon in my dash, so I tried running   sudo snap install --edge --devmode anbox   and got this error:  error: cannot install "anbox": Get    https://search.apps.ubuntu.com/api/v1/snaps/details/core?channel=stable&amp;fields=anon_download_url%2Carchitecture%2Cchannel%2Cdownload_sha3_384%2Csummary%2Cdescription%2Cdeltas%2Cbinary_filesize%2Cdownload_url%2Cepoch%2Cicon_url%2Clast_updated%2Cpackage_name%2Cprices%2Cpublisher%2Cratings_average%2Crevision%2Cscreenshot_urls%2Csnap_id%2Csupport_url%2Ccontact%2Ctitle%2Ccontent%2Cversion%2Corigin%2Cdeveloper_id%2Cprivate%2Cconfinement%2Cchannel_maps_list:    dial tcp: lookup search.apps.ubuntu.com on [::1]:53: read udp    [::1]:54255-&gt;[::1]:53: read: connection refused   What am I doing wrong? Why was the connection refused? According to the instructions, it seems this is the correct command to install it.  ps: I'm not that familiar with Linux, I'm more of a Windows guy, trying to learn Linux. Schur's theorem and numbers Can you give a proof for bounds of  $S(r)$? Please suggest me articles to have better idea of Schur's theorem (Ramsey theory). iOS crash log catch, debug info.. Catch and send via email to the Dev team Send Blob file via Apex Rest Callout I'm trying to send a Blob Apex REST callout and it is keep failing. I tried all the examples in the web but didn't work. What is the standard and correct way to send Blob data via REST callouts?  //Parameters String strBody = 'flowIdentifier=1&amp;flowFilename=test.jpg&amp;flowTotalSize=14893&amp;flowCurrentChunkSize=14893&amp;flowChunkSize=14893&amp;flowChunkNumber=1&amp;flowTotalChunks=1';  bodyBlob = //Blob data  HttpRequest request = new HttpRequest(); request.setEndpoint(END_POINT); request.setMethod('POST'); request.setHeader('content-type', 'multipart/form-data'); request.setBodyAsBlob(bodyBlob); request.setBody(strBody);  try{ Http http = new Http(); HttpResponse response = http.send(request); System.debug(response.getBody()); } catch(Exception e) {      System.debug('ERROR:'+e);     } Ubuntu system is broken after accidentally uninstalling many packages I accidentally removed all the packages starting with the name jpeg with:  sudo apt-get remove jpeg*   This screwed up a lot of things, removed Unity, Firefox, Flash player etc.  I somehow managed to recover the desktop and unity but then a lot of things are still buggy. For example .rpm files and .tag.gz just won't open up at all.  What I want is a way to fix everything that's amiss. Something that is the equivalent of a 'repair installation' with a windows disc.  Any tips, anyone? My friend and his wife visited UK during the year 2015. And they came back on time we want to know one information as they same couple want to visit UK again  For how many years or months can multiple entry visa can be given for a couple who have already visited UK? If i try to update node revision like this:  $node = node_revision_load(59); $node-&gt;set('publish_on', null); $node-&gt;save();   or simple save:  $node = node_revision_load(59); $node-&gt;save();   I have a PHP memory error, (i have 1gb allocated) I have realized that to pronounce the plural form of words ending in -th, we have to drop the letter "h". e.g. Months is pronounced /mʌnts/. But I have never seen this point mentioned in any context. I just want to make sure that this rule is correct and can be always applied. Reputation widget crash I have an issue with crashing reputation widget when it's added to the home screen. When I add it for the first time, it says "Please login before using this widget" (even though the app itself is logged in already). So I open the app, go back to the home screen, add the widget again and it crashes (and it's not added to the home screen). When I'll try to add it again, it says "Please login before using this widget" again. And then it just repeats - "Please login...", execute the app, crash, "Please login...", etc.  Restart of the device didn't make any change.  I have found .  My set up:  Stack Exchange app version: 1.0.89 Android version: 5.0.1 Device: Samsung Galaxy S4 Not flying the first leg of the journey – Company cancels the second-leg ticket I've a friend that booked a round-trip journey. He booked A-to-B and B-to-A. Somehow he needed to be earlier at location B, so he took a train and did not take the flight from A to B.  When he went to the airport to take the "back home" flight (B-to-A), he was informed that his ticket was canceled because he did not take the A-to-B flight. They canceled the ticket and sold it to someone else.  Is this normal? The company said it was their right to do so, and he could not get the flight back. The company was Iberia. Is convex surface normal in cast iron skillet? I am new to cast iron skillet. I have cooked with it several times and found the Lodge 12" cast iron skillet has a convex surface which is not observable unless you pour oil on it.  When I cook, the oil move to rim of the skillet and makes the center short of oil. Is it normal?  EDIT: I added the photo of the stove and skillet for reference Can a word be contracted twice (e.g. "I'ven't")? How to identify a downvoting stalker Possible Duplicate:          Yeah I got a deranged stalker that keeps downvoting me.  Anyone know how going about identifying such individuals?  (I just got 4 all at the same time just after making a new post).      that was the question I originally asked. Please tell me, what is so wrong with it ? Login with Facebook using Stack Exchange Android App