What to use here, abstract class or Interface? I have an abstract class say CTest which contains only the abstract method f1() and nothing else. Similiarly, i have a Interface ITest with the only method f1(). Here both the CTest abstract class and ITest interface does the same thing.   The one difference is that, the Interface provides the flexibility that it can be implemented in any classes which already derived from other class but abstract classes cannot.   Apart from the above difference, What is the actual difference between these two? and which one is efficient here(CTest or ITest)? When i should use what? Any specific scenario's in OO Design and any general suggessions on this are helpful
When to use an interface instead of an abstract class and vice versa? This may be a generic OOP question. I wanted to do a generic comparison between an interface and an abstract class on the basis of their usage.   When would one want to use an interface and when would one want to use an abstract class?
WITH ROLLUP WHERE x IS NULL Improper display of parentheses in fraction of fraction The following code:  $\dfrac{\left( \dfrac{\left( \dfrac{1}{2}\right) }{2}\right) }{2}$   gives a nasty output:   It seems that the $\left( \right)$ command doesn't do the job.  Any idea how to solve this in general? Sigma algebra and algebra difference An algebra is a collection of subsets closed under finite unions and intersections. A sigma algebra is a collection closed under countable unions and intersections.   Whats the difference between finite and countable unions and intersections? Does "countable" mean it implies there can be infinitely many unions and intersections?    Secondly, I was reading a definition  For an algebra on a set: By De Morgan's law, $A \cap B = (A^c \cup B^c)^c$, thus an algebra is a collection of subsets closed under finite unions and intersections.  What law are they using here to get $A \cap B = (A^c \cup B^c)^c$? I thought de morgan's law was $(A\cap B)^c = A^c \cup B^c$?  Finally, what exactly do they mean by "closed under finite unions and intersections? Unfortunately hard disk of my system is damaged, now I recovered my database. But it cannot be attached again to SQL management studio 2005. The error is:  myfile.mdf is not a primary database file. (SQL server , error 5171) why is the set of all binary sequences not countable? In D&amp;D 4e there was an option to Delay your initiative:     Perform your actions as desired and adjust your initiative to your new   position in the order.   Does this rule to change initiative order still exist in 5th edition? I cannot find it in the PHB. Convex function as supremum of countably many affine functions Let $f:\mathbb{R}^n\to \mathbb{R}$ be a convex function. It is well-known that (see e.g.~) that there exists a set $A$ such that  $$ f(x)=\sup_{a\in A}A(a)x+b(a), \quad \forall x\in \mathbb{R}^n, $$ where $A(a)\in\mathbb{R}^{n\times n}$ and $b(a)\in \mathbb{R}^n$.  I was wondering, is there any reference saying we can choose $A$ as a countable set? Ubuntu 19.04 show applications box How can I get rid of ants in an environmently friendly way? Is there a Unix command to get the absolute (and canonicalized) path from a relative path which may contain symbolic links? In node.tpl.php, I have done some changes, like creating an array of paragraphs:      $paragraphs = explode("&lt;p&gt;",render($content));   So, I have a for loop for showing the paragraphs, like:  $number = count($paragraphs); if($page){   print render($paragraphs[0]);   for ($i=1;$i&lt;$number;$i++)       {          print render($paragraphs[$i]);        &lt;a href="#commenting"&gt;Put comment for Paragraph &lt;?php echo $i?&gt;&lt;br&gt;&lt;/a&gt; &lt;?php  } ?&gt;     &lt;a id="commenting"&gt;&lt;?php print render($content['comments']); ?&gt;&lt;/a&gt; &lt;?php }?&gt;   As you can see I want to create a hyperlink under each paragraph, so when user click on it, they can put comment on the paragraph, But right now, when they click on the hyperlink, it will  jump to the end of the page, which has the comment form.  If you check the CommentPress website, in the right column, you can see for example, it is said: 5 Comment on Paragraph 1, and when you click on it, it will show the comments and the comment form under that link, I want to have the same thing, I mean, when users click on the link under each paragraph, the comment form displays under that link instead of jumping to the end of the page. What are some examples of awkward sounding but grammatically correct sentences? What are some examples of awkward sounding but grammatically correct sentences? What is the difference between Gödel's completeness and incompleteness theorems? Got a bunch of .mp4 videos (info shows H.264 Video + AAC Audio) that are chapters of a larger video.  I'd like to merge them, but not sure which is the best way.  I don't have Quicktime Pro, but I'll get it if that's the best way to do this.  Edit: Just to clariify this is Mac OSX 10.6 I'm on. Automating the appearance of email addresses as images Publishing pdf manuscripts on the web with emails embedded in the file results in spam.  More generally, I am looking for a way to automate the conversion of a string to an image.  It's quite easy to solve this old problem using  (more ). The trouble is that you need a distinct file and typesetting run, and you end up with unnecessary image files that you cannot delete carelessly lest you also delete non-generated images.  Can you think of a way to do this on the fly? It's understood that people will have to type the email addresses if they need to message you, but that's the point.  More briefly/concretely...  With what can one replace #1  \documentclass{article} \newcommand\showasimage[1]{#1} \begin{document} \showasimage{joe@foo.bar} \end{document}   such that #1 appears as an image?  Edit  It would be really nice if the pdf file remains vectorial. Today I upgraded from Ubuntu 12.04 to Ubuntu 13.10. I am not able to watch any videos in Amazon Prime Instant Video. I am getting this message:   An error occurred and your player could not be updated.   This is likely because your Flash Player or Browser needs to be updated. This update is required to play back this video. Split a file by line and have control over resulting files extension I started learning Bash a couple of days ago.  I'm trying to obtain an exit status of grep expression into a variable like this:  check=grep -ci 'text' file.sh   and the output that I got is   No command '-ic' found   Should I do it with a pipe command? Is there any way to hide taskbar labels and not combine taskbar buttons? There are three options for customizing taskbar buttons in Windows 7:   Always combine, hide labels Combine when taskbar is full Never combine   Is there any way to hide labels and not combine taskbar buttons? Or even better, to exclude only certain applications from combining?  My main problem is that I switch a lot between two instances of a single application, and having to hover over combined icon and then choosing the correct one. Alt-Tabbing is not a good alternative when I'm switching between more than three applications; clicking on taskbar only once is what I'm looking for. Difference between "irascible", "fractious", "irritable" and "atrabilious"?