I want to get the child class name, in parent class constructor. The classes are namespaced so if I use get_class(); function, it will retrieve the entire namespace and I need only the class name of a child.  The parent class is a abstract class if that's matter.
Lets say I'm building a base class which will be extended upon by the children class. So a base class is called Base and children can be Child1, Child2, etc.  In the base class's constructor, how can i get the value of Child1/Child2?  This is all using PHP
INI file parsing in PowerShell Rational solutions of $y^2 = x^3 - x$ NOT IN vs NOT EXISTS Why does this formulation of Choice not follow from the Comprehension Schema? RGB and CMYK: Why both? Any of you who have at least little experience with graphic design software, photography or professional printing, must have -almost undoubtedly- have gone through this: 'the struggle' of RGB and CMYK colour spaces.  Now, there are many questions regarding matters of 'which should I choose', 'what is what' and converting problems, but that's not really what I'm after here.  As a graphic designer with only a couple of years of experience, I still have this struggle from time, and find the whole CMYK/RGB choosing/converting/saving situation quite confusing, to say the least. I do know that RGB is meant for digital end purposes, and CMYK is suitable for printing.  I have always been wondering about the neccesity of this whole thing. So, my question is: why are there these two colour profiles, instead of just having one?   Wouldn't it be a lot easier if printers or software could convert any RGB file to a CMYK printing document instead? I'm pretty sure it does already exist, by the way, because printing an RGB file sometimes simply prints the right colours for me. Alas, not always (doesn't seem to be related to the printer of software I print from).    I have gone trough some RGB vs. CMYK-related questions and found this, a.o., (), an answer of user DKuntz2 (thanks DKuntz2):     RGB is a light-based theory. All colors begin with black "darkness",   to which different color "lights" are added to produce visible colors.   RGB "maxes" at white, which is the equivalent of having all "lights"   on at full brightness (red, green, blue).      CMYK is a color-based theory. All colors start with white "paper", to   which different color "inks" are added to produce output colors. CMYK   "maxes" at black, at which point all "inks" are applied at 100% (cyan,   magenta, yellow, black).   Not sure if this is entirely right, though, because some people disagreed with DKuntz2:     I disagree. With RGB you start with black - the absence of light; with   CMYK you start with white paper.   – e100  Although this does clarify the differences fairly well, I still don't see the point of the two colour profiles(/spaces)    Side question: What happens when you work in an RGB document in photoshop, then press ctrl+y? Photoshop says the document is RGB/8/CMYK, but it can't be both. Right?  EDIT:  Big thanks for the answers, the (current) three below are very informative and interesting. I understand the whole thing a bit better, although it's all very complicated and in-depth to me. Especially when I read about terms like colour models, colour profiles, colour spaces, colour spectra and gamut all one after another.  As much as I would like to accept an answer as the desired one, I feel that my question in the core isn't fully answered yet. What I would really like to emphasize is what I asked about earlier: Wouldn't it be a lot easier if printers or software could convert any RGB file to a CMYK printing document instead?. As Alan Gilbertson explained, the reason is - if I understand correctly - basically a 'lost-in-translation' thing that makes the conversion not 100% accurate, and the colours to possibly be a bit distorted.  However, I still don't see how the solution cannot be an automated conversion done by a printer. Should be possible with modern technology; if you can convert RGB to CMYK in Photoshop, why can't a printer do the exact same for you? As was also said in the answers, the slightest differences in colours and colour spaces, can not be seen by the human eye. And that's what it all comes down to: what we want to see. Be it on a screen or on a sheet of paper.  The fact that this question has three very long answers, or even moreso the fact that there are so many questions about these two colour models (I now know the right term, yay) kind of proves that this is way more complicated than it should be. how to display the actual network traffic (wireless) in a terminal?  Additionally: Is it possible to add this info to the chart of top? It is asked to solve the PDE  $$u_x + u_y + u = e^{x+2y}$$  My attempt: We have that $$\frac{dx}{1}=\frac{dy}{1}=\frac{du}{e^{x+2y}-u} $$  $\Rightarrow \frac{dy}{dx}=1 \Rightarrow y=x+C_1 \iff C_1=y-x$  $\Rightarrow \frac{du}{dx}= e^{x+2y}-u \iff \dot{u}+u=e^{x+2y} \iff \\ \frac{d}{dx}(e^x u) = e^{2x+2y} \iff u = e^{-x} ( \frac{1}{2}e^{2x+2y} + C_2)$  As $u$ is constant along its characteristics:  $$u(x,y)=\frac{e^{-x}}{2}(e^{2x+2y} + 2C_2(y-x))$$  where $C_2$ is any function of one variable. But wolfram gave the following answer  $$u(x,y)=\frac{e^{-x}}{4}(e^{2x+2y} + 4C_2(y-x))$$  as you can check   What am I doing wrong? When to use static methods Theorem. Let $X$ and $Y$ be sets with $X$ nonempty. Then (P) there exists an injection $f:X\rightarrow Y$ if and only if (Q) there exists a surjection $g:Y\rightarrow X$.  For the P $\implies$ Q part, I know you can get a surjection $Y\to X$ by mapping $y$ to $x$ if $y=f(x)$ for some $x\in X$ and mapping $y$ to some arbitrary $\alpha\in X$ if $y\in Y\setminus f(X)$. But I don't know about the Q $\implies$ P part.  Could someone give an elementary proof of the theorem? Why can't a normal user `chown` a file? Installing Numpy on 64bit Windows 7 with Python 2.7.3 Prove that if $a&gt;0$ then $1+a^9 \leq \frac{1}{a}+a^{10} $.   Using the fact that $a \gt 0$, multiply by $a$ on both sides and get everything to one side we have; $a^{11}-a^{10}-a+1 \geq 0$. By factoring $(a^{10}-1)(a-1) \geq 0 $.  I am not sure how to proceed any further. How do users navigate to Meta? The standard titlepage is quite simple. I am looking for a very  and need help customizing my title page.  It should match the  classicthesis doctoral thesis template  Below a minimal working example:   \documentclass[12pt,a4paper,footinclude=true,twoside,headinclude=true]{scrbook} \XeTeXinputencoding iso-8859-1 \usepackage[marginparsep=8pt,left=3.5cm,right=3.5cm,top=3cm,bottom=3cm]{geometry}  \usepackage[parts,pdfspacing,dottedtoc]{classicthesis}    \frontmatter  \begin{document}     \pagestyle{scrheadings}        %this is the place to set up my cover sheet.       %*******************************************************      % Abstract     %*******************************************************    %\renewcommand{\abstractname}{Abstract}    \pdfbookmark[1]{Résumé}{Résumé}   \begingroup    \let\clearpage\relax    \let\cleardoublepage\relax    \let\cleardoublepage\relax       \chapter{Résumé}     Résumé de la thèse en français\dots      \vfill      \chapter*{Summary}   Résumé de la thèse en anglais\dots    \endgroup             \vfill     \end{document} Best choice between using \\ or leaving space after each paragraph to end the paragraph Here is the thing, I have always used a blank space between paragraphs in order to tell latex that there is a new paragraph. But there is someone I work with very often that keeps using \\ to break a line after a paragraph...  This is really annoying so I wanted to know if there is a real advantage of using \\ over just leaving a space.  Note that I am not referring to the paragraph environment, but to the simple term paragraph. Find the asymptotic tight bound in  $$ T(n) = 4T\left(\frac{n}{2}\right) + n^{2}\log n. $$  where $ \log n= \log _{2}n $ and $T(1) = 1$.  I should solve this using all three common methods: iteration, master theorem and substitution.  It is highly likely that this kind of recurrence equation will be in my test in two days. Thank you very much in advance! Dimensional Tolerance for US Standard NEMA 1-15 Plugs I am trying to find the dimensional tolerance on US electrical plugs. I have tried looking online, but I have only been able to find that they are called , and have found the picture below showing length and height for the male connector (but not width of the male prong), and I haven't been able to find dimensional tolerances anywhere.     I ask here because I'm assuming there's a US code that governs electrical plugs, but I can't seem to find the standard anywhere. When I have .txt files or .py files, I can Quick Look those files in Finder. I have .jl files that are codes written in the Julia Language. Of course they are text files. They will open in a text editor like Sublime Text. How can I Quick Look these .jl files in Finder? Do questions about specific StackOverflow implementation details belong on SO or Meta? has several discussion comments going back and forth about whether the question belongs on SO or Meta.  The question is asking about how a specific feature of the site is implemented from a coding perspective (so that the OP might duplicate it in their own implementation), which can make it a legitimate programming question.  According to the Meta FAQ: "If your "question is about ... Stack Overflow / The core Stack Exchange engine", it should be asked here.  Here are some similar example questions on Meta:         Where do these questions belong? I've been working a bash script to automate the process of opening and closing an LVM over LUKS external hard drive. However I continue to receive errors on line 28:   $(vgchange -a n ; cryptsetup luksClose vol)   The error I receive:  $ sudo ./encryption.sh -l Locking System.............. ./encryption.sh: line 28: 0: command not found System Locked!   Here is the rest of the code for reference:  if [ $1 = -u ] ; then     $(cryptsetup luksOpen /dev/sdb2 vol)     echo "Unlocking.................." | pv -qL 10     $(mount /dev/mapper/vol-lvroot /mnt ; mount /dev/mapper/vol-lvvar /mnt/var ; mount /dev/mapper/vol-lvhome /mnt/home ; mount /dev/sdb1 /mnt/boot)     echo "System Mounted!" | pv -qL 10 #   exit 0 fi  if [ $1 = -l ] ; then     $(umount /mnt/var ; umount /mnt/home ; umount /mnt/boot ; umount /mnt/)     echo "Locking System.............." | pv -qL 10     $(vgchange -a n ; cryptsetup luksClose vol)     echo "System Locked!" | pv -qL 10     exit 0 fi   Other information:   I receive no apparent error when running the command in question by itself interactively. I'm new to writing bash, so any recommendations and constructive criticism is appreciated. The process appears to complete successfully, but I don't understand the error or how to make them go away. Upon further research when running the troubled code alone in interactive mode it does provide output after being executed.   This is given after posting the troubled code interactively.   0 logical volume(s) in volume group "vol" now active