How to extends multiple classes, in php? I would like to create a form in my "contactus" page. I'm following . I have to extends the sfFrom class to use sfWidget, but in my code I've already extends BaseController.  Is there any solution to do this without making a new class?  class InfoController extends BaseController {     /**      *      * @Route("/contactus", name="info_contactus_page")      * @Template()      */     public function contactusAction()     {         return array();     } }
Can I extend a class using more than 1 class in PHP? 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
With all the new sites up and running it gets more and more difficult for users to really know the scope of a site and thus a lot of questions a migrated to places where they are (probably even more) off-topic, see e.g. . So I request the opposite of :  Allow migration if you have enough rep on both the source and the target site (the target reputation required could be a bit lower, say 5001)  That way questions could only be migrated by users familiar with the scope of both sites who can really estimate where the question is better. Maybe those who don't have the rep on the target site could still be able to cast a flagging-only-but-not-counting-as-vote vote...  1) Courtesy of Rings, ideals and units-proof Let $R$ be a ring and let $J$ be an ideal of $R$. Assume $J$ contains   a unit of $R$. Prove $J=R$, rigorously.   Again I feel here as if the statement is intuitive so I am not able to make it rigorous. If you could show all steps in the proof that would be nice. I want to make a schematic of this board. Can anyone tell me how? Possible Duplicate:          The  describes the expansion of the $n$th power of the sum $(a+b)$:  $$(a+b)^n = \sum_{k = 0}^n {n\choose k}a^kb^{n-k}$$  In calculus, there is a generalization of the product rule called , which describes the expansion of the $n$th derivative of the product of two functions $f$ and $g$:  $$(fg)^{(n)} = \sum_{k = 0}^n {n\choose k}f^{(k)}g^{(n-k)}$$  It's not difficult to prove using the product rule and induction, what I'm really trying understand here is why the formula is true. Is there a way to prove it using the binomial formula? How are these two formulas related? Is there a combinatorial proof for Leibniz's rule like there is for the ?   I understand this question is a bit vague, but I hope you'll agree that these two formulas look so similar it just feels like there should be some relation between the two. Of course this is not necessarily true, but I'm hoping it's not just a crazy coincidence. Reduction Integration of $I_n=\int{\frac{x^n}{\sqrt{x^2+a^2}} dx}$ How do I derive this using reduction formula?  $$I_n=\int{\frac{x^n}{\sqrt{x^2+a^2}} dx}$$  I got $\sqrt{x^2+a^2}(x^n) - \frac{1}{n-1}(x^{n-1})\sqrt{x^2+a^2} + \frac{1}{n-1}(I_n) $ . I'm not too sure if this is correct. I would appreciate any form of help or correction to my answer. Thank you. How do you remove duplicates from a list whilst preserving order? Does python optimize modules when they are imported multiple times? If a large module is loaded by some submodule of your code, is there any benefit to referencing the module from that namespace instead of importing it again?  For example: I have a module MyLib, which makes extensive use of ReallyBigLib. If I have code that imports MyLib, should I dig the module out like so  import MyLib ReallyBigLib = MyLib.SomeModule.ReallyBigLib   or just  import MyLib import ReallyBigLib How to delete a row by reference in data.table? I posted an answer (pointing to another question already asked) but when I hit submit, I saw my answer appear as a comment to the question instead.   I tried it a couple of times and still the same result. The answer gets eaten up and is transformed into a comment.   Is this a bug? RESTful Authentication What does RESTful Authentication mean and how does it work?  I can't find a good overview on Google.  My only understanding is that you pass the session key (remeberal) in the URL, but this could be horribly wrong. I am working on Ubuntu 12.04 64bit.  I want to add "Open terminal here" to Nautilus context or right-click menu but it tries to download 32bit version from Internet. How to call a space in which every G$_\kappa$-set is open Recall that in a topological space $X$, we say that a subset $A\subset X$ is a G$_\delta$-set if $A$ is the intersection of countably many open sets of $X$. Also, we say that $X$ is a  if G$_\delta$-sets are open.  Now, call as G$_\kappa$-set the intersection of $\kappa$ many open sets, where $\kappa\geq\aleph_0$ is a cardinal. I would like to know if there is some standard name for those spaces in which G$_\kappa$-sets are open, for a fixed cardinal $\kappa\geq \aleph_0.$  Motivation: this kind of space arose in my PhD thesis, but I do not know any references in which they appear. I'm temporary calling them as $P_\kappa$-spaces. I am thinking of buying a camera to learn photography. Most of the time I'll be shooting portraits and landscapes. But I am not sure where I should start. Most of my friends tell me that I should get an entry level DSLR, but I am not sure if I have the persistence and enthusiasm to carry it all day in a backpack. But the camera on my cellphone doesn't seem to be enough to begin with.  So what I want is some expert advice (preferably with professional experience). Can most compact fixed-lens or mirrorless cameras fit the situations I mentioned? Or do I really need to go to a DSLR to get a tool to learn photography? Show that a positive operator on a complex Hilbert space is self-adjoint Let $(\mathcal{H}, (\cdot, \cdot))$ be a complex Hilbert space, and $A :  \mathcal{H} \to \mathcal{H}$ a positive, bounded operator ($A$ being positive means $(Ax,x) \ge 0$ for all $x \in \mathcal{H}$). Prove that $A$ is self-adjoint. That is, prove that $(Ax,y) = (x, Ay)$ for all $x,y \in \mathcal{H}$. Here's what I have so far. Because $A$ is positive we have $\mathbb{R} \ni (Ax,x) = \overline{(x,Ax)} = (x,Ax)$, all $x \in \mathcal{H}$. Next, I have seen some hints that tell me to apply the polarization identity: $$(x,y) = \frac{1}{4}((\lVert x+y \rVert^2 + \lVert x-y \rVert^2) - i(\lVert x + iy \rVert^2 - \lVert x - iy \rVert^2)),$$ where of course the norm is defined by $\lVert \cdot \rVert^2 = (\cdot, \cdot)$. So my guess is that I need to start with the expressions: $$(Ax,y) = \frac{1}{4}((\lVert Ax+y \rVert^2 + \lVert Ax-y \rVert^2) - i(\lVert Ax + iy \rVert^2 - \lVert Ax - iy \rVert^2)),$$ $$(x,Ay) = \frac{1}{4}((\lVert x+Ay \rVert^2 + \lVert x-Ay \rVert^2) - i(\lVert x + iAy \rVert^2 - \lVert x - iAy \rVert^2)),$$ and somehow show they are equal. But here is where I have gotten stuck. Hints or solutions are greatly appreciated. On a series involving harmonic numbers Finding $$\sum^{\infty}_{n=1}\bigg[\bigg(\frac{(-1)^{n+1}}{n+1}\bigg)\bigg(\sum^{n}_{r=1}\frac{1}{r}\bigg)\bigg]$$   Try: Let $\displaystyle H_{n} =\sum^{n}_{r=1}\frac{1}{r},$ then series $\displaystyle \sum^{\infty}_{n=1}\frac{(-1)^{n+1}}{n+1}\cdot H_{n}=\frac{H_{1}}{2}-\frac{H_{2}}{3}+\frac{H_{3}}{4}\cdots\cdots$  could some help me to solve it, thanks Can someone explain this trigonometric limit? I have $$\lim \limits_{x\to 0}  \frac {\tan(2x)}{\sin(x)}$$ and in my case the result is $\frac{2}{1}$ =2 not whether it is right.  This is my procedure.  $$\lim \limits_{x\to 0}  \frac{\frac {\sin(2x)}{\cos(2x)}}{\frac{\sin(x)}{1}}= \lim \limits_{x\to 0}  {\dfrac {\sin(2x)}{(\cos(2x))(\sin(x))}}=\dfrac{2x\frac {\sin(2x)}{2x}}{\cos(2x)\frac{x\sin(x)}{x}}$$  I separate the limit.  $$\frac{\left(\lim \limits_{x\to 0}2x\right) \cdot \left(\lim \limits_{x\to 0}\frac {\sin(2x)}{2x}\right)}{\lim \limits_{x\to 0}\left(\cos(2x)\right)\cdot\left(\lim \limits_{x\to 0}\frac{x\sin(x)}{x}\right)} = \lim \limits_{x\to 0} \dfrac{2x}{x}=\frac{2}{1} =2$$ Is there a simple way to convert C++ enum to string? An epimorphism from $S_{4}$ to $S_{3}$ having the kernel isomorphic to Klein four-group Exercise $7$, page 51 from Hungerford's book Algebra.     Show that $N=\{(1),(12)(34), (13)(24),(14)(23)\}$ is a normal subgroup   of $S_{4}$ contained in $A_{4}$ such that $S_{4}/N\cong S_{3}$ and   $A_{4}/N\cong \mathbb{Z}_{3}$.   I solved the question after many calculations. I would like to know if is possible to define an epimorphism $\varphi$ from $S_{4}$ to $S_{3}$ such that $N=\ker(\varphi)$.  Thanks for your kindly help. I had Ubuntu 12.04 Beta installed on my computer. When 12.04 was finally released, I made a bootable USB Flash Drive using Startup Disk Creator.  Then I decided to check if this drive works properly and to reinstall the system on my desktop. I must add, my desktop behaves a bit strange when it comes to bootable USB's, it recognizes them as HDD.  In BIOS I changed priority of boot so USB Flash Drive (recognized as HDD) was first. Successfully booted, I installed Ubuntu. Everything worked fine, but...  Now I cannot boot from my real HDD. Every time I want to boot, I put the USB Flash Drive into my computer, boot, safely remove it and everything works.  What do I need to do to repair boot? Is there a tool to encrypt a file or directory? What's the most popular way to encrypt individual files or folders?