You can define the compareTo method in a class without implementing the Comparable interface. What are the benefits of implementing the Comparable interface?
So lets say I have this interface:  public interface IBox {    public void setSize(int size);    public int getSize();    public int getArea();   //...and so on }   And I have a class that implements it:  public class Rectangle implements IBox {    private int size;    //Methods here }   If I wanted to use the interface IBox, i can't actually create an instance of it, in the way:  public static void main(String args[]) {     Ibox myBox=new Ibox(); }   right? So I'd actually have to do this:  public static void main(String args[]) {     Rectangle myBox=new Rectangle(); }   If that's true, then the only purpose of interfaces is to make sure that the class which implements an interface has got the correct methods in it as described by an interface? Or is there any other use of interfaces?
Double dispatch in C#? How can Planck units be consistent with conflicting dimensions of mass? I suspect I'm missing something obvious, but I'm coming up blank. I've gotten pretty comfortable with so-called natural units over the years: in doing quantum mechanics/QFT, it's common to set $c = \hbar = 1$ and in GR, it's common to set $c = G = 1$. I'm told that quantum gravity researchers are fond of , where (according to that Wiki page) we set $c = \hbar = G = 1$, along with a couple other fundamental constants. I don't know what to make of this, though: it's dimensionally inconsistent in 3+1 dimensions. That same article gives the dimensions of each constant:  $$\begin{align} [c] &amp;= L T^{-1} \\ [G] &amp;= L^3 M^{−1} T^{−2} \\ [\hbar] &amp;= L^2 M T^{−1} \end{align}$$  Setting $c$ and $G$ to 1 implies $L=T=M$. Setting $c$ and $\hbar$ to 1 implies $L=T=M^{-1}$. Hence, making all three unity is internally inconsistent: mass cannot simultaneously have dimensions of length and reciprocal length. So, how do Planck units work? Chmod to allow read and write permissions for directory I have created directories in root. I am looking for the chmod command to allow all users read and write permissions to a specific directory. I have done chmod 775 for a file but I need this for a directory. This includes permissions on all files and sub directories. How to split strings into text and number? I want to make a schematic of this board. Can anyone tell me how? I have a problem with a virus in windows 7, I don't know what kind of virus is infected my OS, I installed kasersky antivirus, and clear all detected viruses. After that I can't open any antivirus sites, can't ping any antivirus sites. example:  C:\Windows\system32&gt;ping kaspersky.com Pinging kaspersky.com [38.117.98.231] with 32 bytes of data: General failure. General failure. General failure. General failure.  Ping statistics for 38.117.98.231:     Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),   When I ping to other sites, I get reply normally: example woth pinging to google.com  C:\Windows\system32&gt;ping google.com  Pinging google.com [31.7.160.224] with 32 bytes of data: Reply from 31.7.160.224: bytes=32 time=2ms TTL=61 Reply from 31.7.160.224: bytes=32 time=2ms TTL=61 Reply from 31.7.160.224: bytes=32 time=1ms TTL=61 Reply from 31.7.160.224: bytes=32 time=1ms TTL=61  Ping statistics for 31.7.160.224:     Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:     Minimum = 1ms, Maximum = 2ms, Average = 1ms   I tryed any antispyware/antimalware softwares, but null results.  Anyone else encountered this problem? How do I delete a Git branch locally and remotely? Text to Speech shortcuts with two languages Lagrangian and Hamiltonian EOM with dissipative force I am trying to write the Lagrangian and Hamiltonian for the forced Harmonic oscillator before quantizing it to get to the quantum picture. For EOM $$m\ddot{q}+\beta\dot{q}+kq=f(t),$$ I write the Lagrangian  $$ L=\frac{1}{2}m\dot{q}^{2}-\frac{1}{2}kq^{2}+f(t)q$$ with Rayleigh dissipation function as   $$ D=\frac{1}{2}\beta\dot{q}^{2}$$ to put in Lagrangian EOM $$0 = \frac{\mathrm{d}}{\mathrm{d}t} \left ( \frac {\partial L}{\partial \dot{q}_j} \right ) - \frac {\partial L}{\partial q_j} + \frac {\partial D}{\partial \dot{q}_j}. $$  On Legendre transform of $L$, I get $$H=\frac{1}{2m}{p}^{2}+\frac{1}{2}kq^{2}-f(t)q.$$  How do I include the dissipative term to get the correct EOM from the Hamiltonian's EOM? Say I have two Chrome windows open like this:   It seems that the most recently used window always appears on top. In other words, the &quot;Apply Digital Signatures&quot; was the window I had open last. If I were to switch to the window showing the new tab, then the order in which the windows are displayed in the task bar suddenly changes. Is there a way to keep them from shuffling around? I'd like to be able to order them however I want, like tabs in a web browser. (I'd also like to put them across different workspaces.) Count total number of files in particular directory with specific extension I want to count the total number of files in particular directory that ends with ".mp4" extension.  I am getting following command:  ls -F |grep -v / | wc -l   It count all the files in particular directory, but I want the count of files that end with .mp4 extension.  Is there any Ubuntu command for that? How can I download an older version of OS X/macOS? Sometimes it's hard to search for older versions of macOS &amp; OS X  on the App Store.  This is an attempt to provide the canonical QA for this issue, as per the Meta QA -  I expect it to be modified over time to hopefully become a complete information resource.  How can I get any older version of a Mac OS to be able to run as a VM, or to reinstall on my Mac? htdigest file format I wonder whether it is possible to draw the three following quadric surfaces (cone, hyperboloids)  x^2+y^2-z^2=0  x^2+y^2-z^2=1  x^2+y^2-z^2=-1  (and the axis)   using pgfplots 3d or TikZ as it is done in the following image can CakePHP automatically create tables from models? Negative y value in polar plot I'm having some trouble with polar plots. I have to plot negative values, but without changing direction. I tried to set the ymin value to be negative, but it doesn't work.  \documentclass[10pt,border=10pt]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{polar}  \begin{document} \begin{tikzpicture} \begin{polaraxis}[    xticklabel=$\pgfmathprintnumber{\tick}^\circ$,    ymin=-10,    xtick={0,30,...,330}] \addplot table{    0  -1     30 -2    45 -3    60 -4    75 -5    }; \end{polaraxis} \end{tikzpicture} \end{document}   Any suggestion?  For clarity, this is what I expected. If $d(x,y)$ is a metric, then $\frac{d(x,y)}{1 + d(x,y)}$ is also a metric Solidify conundrum? I stumbled across a solidify issue, I cannot wrap my head around. I have a simple mesh, consisting of three faces.  When adding a solidify modifier, I expect to get an object with three walls, where every angle is square. However, whatever I try, tweaking the various solidify parameters, what I get is something like the following, with a skewed rim.  Did I hit a bug, or is it a limitation of the solidify modifier? Is there a workaround? Is there a way to move a Trello Checklist to a different Card? I often need to consolidate (combine) Checklists from a couple of Cards into one Card.  Any way to do this? How do the PHP equality (== double equals) and identity (=== triple equals) comparison operators differ? What is the difference between == and ===?  How exactly does the loosely == comparison work? How exactly does the strict === comparison work?  What would be some useful examples?