I have two PHP classes, one of which is unnecessary so I'm trying to move it into the first class The issue is that each extends another class I'm trying to move the class aggregateData into the main class dataGather. Basically, just moving those functions into the dataGather class. aggregateData extends a custom class and dataGather extends the laravel model class. How can I properly move those functions into the dataGather class and still extend both the custom class and Model properly? aggregateData.php class aggregateData extends aggregater {   //functions within }  dataGather.php class dataGather extends model {  }
If I have several classes with functions that I need but want to store separately for organisation, can I extend a class to have both?  i.e. class a extends b extends c  edit: I know how to extend classes one at a time, but I'm looking for a method to instantly extend a class using multiple base classes - AFAIK you can't do this in PHP but there should be ways around it without resorting to class c extends b, class b extends a
Should operator<< be implemented as a friend or as a member function? That's basically the question, is there a "right" way to implement operator&lt;&lt; ? Reading  I can see that something like:  friend bool operator&lt;&lt;(obj const&amp; lhs, obj const&amp; rhs);   is preferred to something like   ostream&amp; operator&lt;&lt;(obj const&amp; rhs);   But I can't quite see why should I use one or the other.  My personal case is:  friend ostream &amp; operator&lt;&lt;(ostream &amp;os, const Paragraph&amp; p) {     return os &lt;&lt; p.to_str(); }   But I could probably do:  ostream &amp; operator&lt;&lt;(ostream &amp;os) {     return os &lt;&lt; paragraph; }   What rationale should I base this decision on?  Note:   Paragraph::to_str = (return paragraph)    where paragraph's a string. I am trying to solve the following exercise.      Assume that $m$ and $n$ are co-prime positive integers, and that $k$ is a field. Prove that the ideal generated by $x^{m} - {y^n}$ is a prime ideal in $k[x,y]$.   I tried the following approach : Consider the ring homomorphism ${\varphi}:k[x,y]\rightarrow{k[t]}$ defined by $\varphi(x) = t^n$, and $\varphi(y) = t^m$, and extend $\varphi$ to $k[x,y]$ to ensure that it is a ring homomorphism. Then the ideal $(x^m - y^n)$ is clearly contained in the kernel of $\varphi$. It remains to prove the reverse set inclusion. i.e. to prove that this ideal is exactly equal to the kernel of $\varphi$. I don't know how to go about this! I just saw Death in Paradise Season 5 Episode 3, which features a photographer using a DSLR to shoot a fashion runway performance.  He had a flash that was a ring around the lens.   I thought that was for macro shots only, where the extreme close-up has trouble with normal flash placement.  For normal photos you want the flash far from the lens, like on a boom on a separate handle framing the camera.  I've seen some recent trendiness in having ring-shaped catch lights, but I supposed those would be positioned in the normal manner: off-angle from the lens.  I suppose if an on-camera had any effect at all it would be for some subtle fill flash.  Is this a realistic thing to see from a pro? Or is it just a cool-looking prop that doesn't really fit the situation? How do you declare an interface in C++? How do I setup a class that represents an interface?  Is this just an abstract base class? Square root of an inverse gamma distributed random variable I work on the grouped t copula and try to replicate part of the following paper: &quot;The t copula with Multiple Parameters of Degrees of Freedom: Bivariate Characteristics and Application to Risk Management&quot;, Luo &amp; Shevchenko (2010). My Question: I need the distribution of the following random variable: $$ Y = \sqrt{\frac\nu X} $$ where X is Chi square distributed with v degrees of freedom. I found out that the following random variabe Z is inverse gamma distributed with alpha = v/2 and beta = v/2, $$ Z = {\frac\nu X} $$ So, basically I am looking for the distribution of the square root of an inverse gamma distributed random variable. Do you have any ideas? Possible Duplicate:          In a question, I see that each time I refresh the page, the answers were placed in a different order. The question has 3 answers each with zero votes. The users' reputation was something like 6, 1200, and 7300 but these numbers didn't affect the order.  What is the criteria of the sort order of the answers? I am currently studying in class 10 and I am unable to do this problem. $$\tan 70 ° -\tan 20° -2 \tan 40° =4\tan 10°$$ Can anybody please help me.  Thanks! Is there a good tool/program that allows me to clone a system drive to another, smaller hard drive?  I've bought a new 64GB SSD drive and would like to move my current Windows 7 Professional 64-bit installation to that new drive. My current drive is a 200GB SATA drive with one partition only. Of course there's enough free space to shrink my current partition to less than 64GB. Set margins in maketitle Can you enter UK later than intended date of travel on the visa application? I have a qualifying exam coming up in a couple days and I am just trying to understand some pathological examples I have in my notes. I will list a similar problem which I know the solution to and then the question.  True or False:   let $A,B \in \mathbb{Q}^{n \times n }$  Suppose $xI-A$ and $xI-B$ are equivalent then $\det(xI-A) = \det(xI-B)$.     I wrote in my notes this is true because any two matrices are equivalent in $\mathbb{Q[x]}^{n \times n}$ if and only if they have the same invariant factors.  Since the characteristic polynomial is a product of the invariant factors it follows that $\det(xI-A) = \det(xI-B)$.        True or False:   let $A,B \in \mathbb{Q}^{n \times n }$. If $\det(xI-A) = \det(xI-B)$ (in $\mathbb{Q}[x]$) then $xI-A$ and $xI-B$ are equivalent  in $\mathbb{Q}[x]^{n \times n}$   I think this is false because of the fact that equality of determinants is not strong enough to guarantee all invariant factors are equal but I do not have an example. Changing content of footline in beamer I bought an audio book from audible and want to convert it to mp3 from aa because my phone doesn't support the format. Is there any way to do that? Is it possible to play FIFA 2015, 4v4 on 2 Consoles? I've the following situation: My friends and I, we're 8 in total, want to play Fifa 15 4v4. I know that the Playstation 4 just supports 4 controllers and thats why we think about a 2 console + 2 TV's setup, so 4 players per console.   So my question is: Is it possible or is there a game mode available were we could play such a setup?  Update: After I got the first answer I've to add that I know that the only way to play on 2 consoles would be through the psn online features. So we did not plan to play on Lan. We just want to sit in the same room with 2 consoles and play against each other over psn. Today I gave a .  This results of course in a negative score for today.   Since then I don't get any more notifications for new rep in the new top-bar on meta.    Only after resetting the rep indicator by clicking on it I get new notifications. In how many ways can you choose $k$ numbers out of $\{1,2,3,\dots,n\}$ so none of them is consecutive? Is there a difference between the original file and a hard link to it? I'd like to synchronise some configuration files via a file hoster like Dropbox. I could create a hard link in the software's configuration folder and let it point to my cloud storage directory.  When having done that, is there a difference between those two files? I read somewhere that both files are attributes of the file in the master file table and that there would be no difference at all.  On the other hand, on Windows, directory junctions via mklink can be found using dir /AL /S, so they somehow differ from real directories.  Is that correct? Calculating peaks in DEM using GRASS What methods can I use to infer a distribution if I know only three percentiles?  For example, I know that in a certain data set, the fifth percentile is 8,135, the 50th percentile is 11,259, and the 95th percentile is 23,611.  I want to be able to go from any other number to its percentile.  It's not  my data, and those are all the statistics I have.  It's clear that the distribution isn't normal.  The only other information I have is that this data represents government per-capita funding for different school districts.  I know enough about statistics to know that this problem has no definite solution, but not enough to know how to go about finding good guesses.  Would a lognormal distribution be appropriate?  What tools can I use to perform the regression (or do I need to do it myself)? Laptop using 14.04 won't get past login GUI