Generally, when a new object is created in Java it follows the idiom:  Object obj = new Object();   where the Object() constructor matches the object type Object.  But what if it doesn't? I understand from the Oracle Docs on  and  that the constructor must be in that object's class or one of its subclasses.  However, suppose we wanted to declare a new stack.  My first instinct would be:  Stack s1 = new Stack();   But I assume it's valid to do it this way, too:  Object s2 = new Stack(); //This   Is there a difference here?  What are we really saying about s2?  I'm guessing s2 is simply an empty stack, but only has access to the Object class methods?  I'm not sure why someone would ever do this, but I want to solidify my understanding of the Java hierarchy.  Are there really any circumstances where someone would use a subclass's constructor when creating a new object?  Any and all informative responses will be appreciated.  Thanks in advance!
I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?
Pushforward of inverse map at the identity? Let $G$ be a Lie group and $i:G \rightarrow G$ denote the inversion map $i(x) = x^{-1}$. (Notation: $f_*$ is the pushforward map $F_*:T_pG \rightarrow T_{i(p)}G$ which takes $(F_{*}X)(f)=X(f\circ F)$ and $X$ is a tangent vector, $X\in T_pG$.) I wish to show that $i_{*}:T_{e}G\rightarrow T_{e}G$  is given by $i_{*}(X)=-X$ As a first step, it is trivial to prove that $i_*$ is an involution as $\mbox{Id}_{*}=(i\circ i)_{*}=i_{*}\circ i_{*}$ but I can't seem to make any further progress. Any help would be appreciated. Newton's 3rd law... hitting drywall (which I break) vs hitting a brick (which breaks me)? According to the Third Newton's law of motion:        For every action there is an equal and opposite reaction.   So, I understand that if I hit a brick wall with $50\, \mathrm{lbs}$ of force, the brick wall also hits me with $50\, \mathrm{lbs}$ of force (usually painfully). In this instance, Newton's third law makes sense. What I'm confused about is, if I hit a patch of drywall with $50\, \mathrm{lbs}$ of force, it's probably going to break, and due to the lack of pain in my hand, I can tell it did not hit me back with $50\, \mathrm{lbs}$ of force.   How does Newton's third law apply to situations when one object or the other is destroyed? It certainly seems like at that point it is incapable of delivering the full force of my blow back to me. What happens with the energy? Is there an algorithm to decide if a symlink loops? Unix systems usually just error out if they are confronted with a path that contains a symlink loop or just too many symlinks, because they have a limit to the number of symlinks they will traverse in one path lookup. But is there a way to actually decide if a given path resolves to something or contains a loop, even if it contains more links than a unix is willing to follow? Or is this a formally undecidable problem? And if it can be decided, can it be decided in a reasonable amount of time/memory (e.g. without having to visit all files on a filesystem)?  Some examples:  a/b/c/d where a/b is a symlink to ../e and e is a symlink to f and f is a symlink to a/b  a/b/c/d where a/b/c is a symlink to ../c  a/b/c/d where a/b/c is a symlink to ../c/d  a/b/c/d where a/b/c is a symlink to /a/b/e where a/b/e is a symlink to /a/b/f where a/b/f is a symlink to /a/b/g   Edit:  To clarify, I am not asking about finding loops in the file system, I am asking about a decision algorithm that decides of a given path whether it resolves to a definite file/directory or whether it does not resolve at all. For example in the following system, there is a loop, but the given path still resolves fine:  / -- a -- b where b is a symlink to /a   This directory tree clearly has a cycle, but the path a/b/b/b/b/b still resolves fine to /a. Where are the default settings saved for the Command prompt defaults? I got two mails from the UK embassy in Abu, saying your visa application has been concluded. I'm really confused, did I get the visa or not? What could the possible results be? Calculating the Fourier transform of $f(t)=Ae^{-i\omega_0 t}$ I am trying to calculate the Fourier transform of $f(t)=Ae^{-i\omega_0 t}$  I'm getting an infinity which is giving me problems. Here are my steps:  $$F(\omega)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty f(t)e^{i\omega t}dt$$ $$=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty Ae^{-i\omega_0 t}e^{i\omega t}dt$$  $$=\frac{A}{\sqrt{2\pi}}\int_{-\infty}^\infty e^{t(i\omega - i\omega_0)}dt$$ $$=\frac{A}{\sqrt{2\pi}(i\omega - i\omega_0)} |e^{t(i\omega - i\omega_0)}|_{-\infty}^{\infty}$$ $$=\frac{A}{\sqrt{2\pi}(i\omega - i\omega_0)}(\infty - 0)$$  Where am I going wrong? Thanks. Evaluating $\int \frac{1}{{x^4+1}} dx$ Terminal icon in window titlebar is stretched out over window control buttons A while ago I upgraded from Ubuntu 17.04 to Ubuntu 17.10 and everything is working fine except for the fact that the icon in the window title bar of my Terminal seems to be stretched out to some ridiculous size.    This only seems to happen in the Terminal window. The Nautilus icon is completely fine.    The problem seems to go away if I login into an Xorg session instead of a Wayland one. I've looked around and didn't find any immediate solution to this. Any help would be greatly appreciated. Photoshop To CSS: How do you translate Fill to CSS I have a content box in photoshop with the background color #bc0018 with a 65% opacity and 50% fill.  I am able to translate the backgroundcolor and opacity part to this, but without the 50% fill the backgroundcolor looks different.  .content-box {     background-color: rgba(188, 0, 24, 0.65); }   Any suggestions on also getting the proper "fill" in CSS?  EDIT  I did just divide the opacity by half and it appears to achieve the same effect as a 50% fill. Still, I would love to hear how other people do this? I definitely don't want to create an image just for this.  .content-box {     background-color: rgba(188, 0, 24, 0.325); }   Thanks! Nonabelian semidirect products of order $pq$? How to convert every pixel of raster picture to square objects in Illustrator? I want to start a modal operator by clicking a button in a panel in the properties region. It should then stop when I click somewhere in the 3D viewport. I want to execute some code when I start and finish the operator (see the code below). I tried modifiyng the modal operator template with an execute method to start the modal operator. But the now the context.space_data.type is always &quot;PROPERTIES&quot; because that's where the panel is located, I guess. Is this a bad way of doing what I want? class MY_OPERATOR_OT_click_on_3dview(bpy.types.Operator):          bl_idname = &quot;mesh.click_on_3dview&quot;     bl_label = &quot;Click on 3D&quot;      def modal(self, context, event):                  if context.space_data.type != 'VIEW_3D':             return {'PASS_THROUGH'}                  if event.type in {'MIDDLEMOUSE', 'WHEELUPMOUSE', 'WHEELDOWNMOUSE'}:             # allow navigation             return {'PASS_THROUGH'}         elif event.type == 'LEFTMOUSE':             # DO ALL THE POST-SELECT STUFF             return {'FINISHED'}         elif event.type in {'RIGHTMOUSE', 'ESC'}:             return {'CANCELLED'}          return {'RUNNING_MODAL'}      def execute(self, context):         # DO ALL THE SETUP STUFF           context.window_manager.modal_handler_add(self)              return {'RUNNING_MODAL'}            def cancel(self, context):         print(&quot;CANCEL???&quot;) Underline my name in the bibliography For several documents I'm preparing, I need to highlight (or underline) occurences of my name within the bibliography.   Is there an easy way of doing this? I have Raster data for a country which has Evaporation Data in its pixels. I also have Vector layer which has the 30 cities of the country.   What I need is the average Evaporation value of each city from the raster data using ArcGIS?  I have access to the spatial analyst extension. Does a log transform always bring a distribution closer to normal? I have a highly right skewed data set with a large range of values (from 1 ~ 10^6) (can't share the actual data for work related reasons).   When I plot the log of the data instead, the distribution looks a lot more like a normal distribution.   Have I stumbled on a meaningful insight in the data set, or is just a general property of the log transform that it brings the distribution closer to normal? If "clearly evident" is redundant, what word or phrase suggests being indisputable but not readily apparent? A  asks whether the modifier "clearly" changes the meaning of "evident". I would have said, prior to examining a few dictionaries, that evident did not necessarily mean readily apparent, but to my surprise it does.  This brings me to ask what word or expression would mean something can be taken as a true fact, but not through an easily constructed (not obvious or readily apparent) rationale?   For example, if Sherlock Holmes says something is true while everyone else is still sitting on their hands, then it is evident to Holmes, but not to the rest of the world. So, from everyone else's point of view, it is not readily apparent, and (by definition) apparently it is not evident, clear, or clearly evident at all, based on the dictionary definitions. But (let's stipulate) it is true and deducible from the observable evidence. What would we call this?  Update  An update is highlighted above. I can see from some of the answers and comments that I may have gone off my mark with the phrase "not through an easy-to-follow rationale”, and I have modified the question to correct this. I understand that there can be rationales, arguments, or proofs that, once explained, may or may not be easy to follow. What I intend is that the rationale to support the indisputable conclusion is not (initially) easy to recognize or construct (not readily apparent) in the first place. I apologize for the confusion. (The original can be seen in the change history.)  Update 2  Shortly after offering a bounty to this request, I recalled a single word that I now believe is a very good match to the parameters specified in this inquiry as it is stated above. That word has not yet been suggested (or approached) by any answer or comment (active or deleted) at the time of this edit. This request is changed to a single word request. (However, if you feel a single word fits well but not without some additional supporting words, please offer your thoughts in an answer.) While my curiosity for the term has already been met, the request and bounty remain as an open challenge. I will post my own answer once the bounty has expired and been awarded. After hours of banging my brain against my skull, I narrowed down an issue I'm having to the fact that \makeatletter doesn't work inside \newcommand. Commands that I call after \makeatletter are registered as undefined, as if \makeatletter didn't do anything.  Why is this the case?  In the example below, I define two commands. Calling one of them from the document body causes the undefined error, while the other doesn't.  \documentclass[11pt]{book} \usepackage{kvsetkeys}  \newcommand{\commandThatFails}{     \makeatletter \comma@parse{}{} \makeatother }  \makeatletter     \newcommand{\commandThatWorks}{         \comma@parse{}{}     } \makeatother  \begin{document}  Hi there.  \commandThatFails \commandThatWorks  \end{document} How to convert Local time to UTC time in Delphi? and how to convert it back from UTC to local time? Comparing $\pi^e$ and $e^\pi$ without calculating them How can I  compare (without calculator or similar device) the values of $\pi^e$ and $e^\pi$ ? Is it true that for each set $M$ a given injective function $f: M \rightarrow M$ is surjective, too?  Can someone explain why it is true or not and give an example?