I referred   question/answer to understand prototypical inheritance.  I got to know to extend a method , we need to define Person.prototype.getName in base class. So that in child class it can be called as myCustomer.sayMyName();  Code in the answer can be summarized as follows :      function Customer(name) {         this.firstName = name;     };     function User() {           }      Customer.prototype.hi = function() {         console.log('Test method of parent');     }       User.prototype = new Customer('shaadi');     var myUser = new User();     myUser.hi();     But the question is if I can call the same with following syntax, why should I use prototype?  My code:    function Customer(name) {         this.firstName = name;         this.hi= function() {             console.log('Test method of parent');         }      };     function User() {           }     User.prototype = new Customer('shaadi');     var myUser = new User();     myUser.hi();     I could use the method of parent without defining Customer.prototype.hi, then why/when should Customer.prototype.hi be used?  If both solutions give me access to parent's method, why should I choose former?
What's the difference between  var A = function () {     this.x = function () {         //do something     }; };   and  var A = function () { }; A.prototype.x = function () {     //do something };
How can I prove that if $\gcd(a, b) = 1$, then $\gcd(ab, c) = \gcd(a, c) \times \gcd(b, c)$?  By eea there exists $ax+by=1$ from $\gcd(a,b)=1$ so a and be are co-primes there also exists $dk=a$ and $dj= b$ where $d=\gcd(a,b)=1$ this is all the information I have gathered from the question but I dont know how to approach and solve it. Can anyone help explain to me how to arrive at the answer? Thanks! I have been around on Twitter for awhile and I regularly find people using "Please to retweet this" or "Please to help me", etc. Is this proper English? I do not think prefixing the infinitive form with a 'to' is necessary here at all. Extension “RANDR” missing on xvfb My system:  $lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 14.04.3 LTS Release:        14.04 Codename:       trusty   Xvfb:  $ dpkg -s xvfb Package: xvfb Status: install ok installed Priority: optional Section: x11 Installed-Size: 2140 Maintainer: Ubuntu X-SWAT &lt;ubuntu-x@lists.ubuntu.com&gt; Architecture: amd64 Multi-Arch: foreign Source: xorg-server Version: 2:1.15.1-0ubuntu2.7 Provides: xserver   Current problem:  Xvfb do not support RANDR extension, even if I add the flag:  +extension RANDR   If I run xdpyinfo, RANDR is not on the list. It's a missing feature or a bug. I found a reference here with a patch:   And looks like that in other distros like debian, there is already a testing build of Xvfb with support:   I am trying to run a program throught Xvfb, and it returns the following error:  Xlib:  extension "RANDR" missing on display ":99".   The program works if I run it via ssh/command line. The problem appears to be the the lack of support for "RANDR" in xvfb.  My question is: what is the easiest way to get xvfb with "RANDR" support in my system? Prove the following $A \setminus (B\setminus C) = (A\setminus B)\cap (A \cup C)$ I want to prove the following so I decide to rewrite the RHS  $$A \setminus (B\setminus C) = (A\setminus B)\cap (A \cup C)$$ $$ A\setminus(B\setminus C) = A\setminus (B \cap C^c) = A\cap (B\cap C^c)^c = A\cap(B^c\cup C) = (A\cap B^c)\cup(A\cap C) $$ there is way that $(A\cap B^c)\cup(A\cap C)\rightarrow (A\setminus B)\cup(A\cap C) = (A\setminus B)\cap (A \cup C)$?  thanks. EDIT  LHS: $$x\in A \vee x\in A\cap C \rightarrow x\in A \wedge x\in C$$ RHS: $$x\in A \wedge x\in A\cup C \rightarrow x\in A \vee x\in C$$  how it can help me? How to loop over the lines of a file? FICA was not withheld from my paycheck Hello personal finance,  I was filing my taxes for 2016 and I just found out that I transitioned from Non-Resident-Alien to Resident Alien around September last year by passing substantial presence test. After doing some research, I have found out that I qualify as a resident alien for the whole tax year (from January 2016).   Unfortunately, my employer did not know about this change in status, so for all of 2016 no Social Security or Medicare taxes were withheld.   I have found out that I need to correct this, and I need help figuring out a few things.    Should I have a W-2 re-issued? I spoke to two accountants and one said I should, the other said I shouldn't. I don't know which one to believe.  Who pays for the FICA I should have paid last year? Is it my employer's problem to fix or mine?  Should I file the taxes with the old or the new W-2?  As best as I understand it, the new W-2 will be written as if I made this contributions. So there will be a discrepancy between what I actually earned and what the W-2 says. How should I handle this discrepancy? Declare it as extra income? Or claim it back in case I earned less than I should have? I want to synchronise two folders in real time under Windows 7.  Basically, I want to monitor a folder and synchronise each change (new files, changed files, deleted files) to another drive. It has to be in real time, so it gets synchronised instantly when a change happens. A one-direction synchronisation is enough.  I tried Microsoft's , but it does only syncing by hand or scheduled (thus not satisfying the "real-time" requirement).  Can this be achieved with Windows 7 itself? If not, are there other methods of doing this? How do you generate dynamic (parameterized) unit tests in Python? Why is chi square used when creating a confidence interval for the variance? This is a very basic question. Why do we use a chi square distribution? What is the meaning of this distribution? Why is this the distribution used for creating a confidence interval for the variance?   Every place I google for an explanation just presents this a fact, explaining when to use chi, but not explaining why to use chi, and why it look the way it does.  Many thanks to anyone that can point me towards the right direction and that is - really understanding why I am using chi when I am creating a confidence interval for the variance. Continuing in the Visual Studio debugger after an exception occurs When I debug a C# program and I get an exception throwed (either thrown by code OR thrown by the framework), the IDE stops and get me to the corresponding line in my code.  Everything is fine for now.  I then press "F5" to continue. From this moment, it seams like I'm in an infinite loop. The IDE always get me back to the exception line. I have to Shift + F5 (stop debugging/terminate the program) to get out of his.  I talked with some co-workers here and they told me that this happens sometime to them too.  What's happening? Word for people who live in the same city What are the people who live in the same city are called? Any words for that? I want to use it in the following context:      I and my ____ are happy. How to get the native version of Spotify running? When should titles like "captain" or "admiral" be capitalized? Please excuse the contrived example below, but I am wondering if this example is properly capitalised? I'm assuming that capitals are used when addressing someone directly, but lower case is used elsewhere. Can someone give some rules on this?      The captain walked into the room.    "Hi, Captain," said the admiral.   "Hi, Sir," replied the captain.   "Call me Admiral."   "Hi Admiral."   The captain and admiral stepped forward.   "Prime Minister, this is Captain Jones," said Admiral Brown.   "Pleased to meet you," said the prime minister. I improved an edit... but did I actually? How to keep VLC player in minimized mode? I'm using VLC media player which can play almost all kinds of audio and video formats. While listening to audio, I keep VLC in minimized mode and can work on other windows. But when I select to listen video songs mixing with audio songs, VLC is maximizing itself to play every video song in the playing list, which is really annoying in the middle of work.  So how can I keep always VLC player in minimized mode while playing a list of songs mixed with audio and video songs? Schrödingers MySQL table: exists, yet it does not Will there be data loss if I upgrade? Declare local variables as late as possible or at the nearest curly brace they belong? Why are there only derivatives to the first order in the Lagrangian? Using "${a:-b}" for variable assignment in scripts