how to call second superclass methods from subclass in java class A {   public void display()   {     System.out.println("Class A display!!!");   } }  class B extends A {   public void display()   {     System.out.println("Class B display!!!");   } }  class C extends B {   public void display()   {     System.out.println("Class C display!!!");     super.display(); // will call B's display() method     // how to call A's display() method here?   } }   public static void main(String args[]) {   C obj = new C();   obj.display(); // will call C's display() method }  }   How can I call A's display() method from C's display() method? Is it possible to somehow call A's display() method using super?
Why is super.super.method(); not allowed in Java? I read  and thought that would easily be solved (not that it isn't solvable without) if one could write:   @Override public String toString() {     return super.super.toString(); }   I'm not sure if it is useful in many cases, but I wonder why it isn't and if something like this exists in other languages.  What do you guys think?  EDIT: To clarify: yes I know, that's impossible in Java and I don't really miss it. This is nothing I expected to work and was surprised getting a compiler error. I just had the idea and like to discuss it.
What is the proper way to handle data between scenes? I am developing my first 2D game in Unity and I have come across what seems an important question.  How do I handle data between scenes?  There seems to be different answers to this:   Someone mention using , while other people told me this should be used to store other things like screen brightness and so on. Someone told me that the best way was to make sure to write everything into a savegame everytime that I changed scenes, and to make sure that when the new scene loads, get the info from the savegame again. This seemed to me wasteful in performance. Was I wrong? The other solution, which is the one I have implemented so far is to have a global game object that isn't destroyed between scenes, handling all the data between scenes. So when the game starts, I load a Start Scene where this object is loaded. After this ends, it loads the first real game scene, usually a main menu.   This is my implementation:  using UnityEngine; using UnityEngine.UI; using System.Collections;  public class GameController : MonoBehaviour {      // Make global     public static GameController Instance {         get;         set;     }      void Awake () {         DontDestroyOnLoad (transform.gameObject);         Instance = this;     }      void Start() {         //Load first game scene (probably main menu)         Application.LoadLevel(2);     }      // Data persisted between scenes     public int exp = 0;     public int armor = 0;     public int weapon = 0;     //... }   This object can be handled on my other classes like this:  private GameController gameController = GameController.Instance;   While this has worked so far, it presents me with one big problem: If I want to load directly a scene, let's say for instance the final level of the game, I can't load it directly, since that scene does not contain this global game object.  Am I handling this problem the wrong way? Are there better practices for this kind of challenge? I would love to hear your opinions, thoughts and suggestions on this issue.  Thanks Utopia of children brought up by robots I am looking for the title of a science-fiction book describing a colony (utopia) on another planet that has been established as a social experiment. The inhabitants had been brought up only by robots and therefore work perfectly as a society. I think there is no formal government and people work on what they are interested. If any catastrophe happens, they are able to form groups of specialists who react to the threat. Later there comes a group of outsiders who decide to join and live in the utopia. I am not sure, but author was probably Canadian. Why does latex stretch small sections across the whole page vertically? How to show ascii art at the top of the terminal when it's opened? How to calculate information included in R's confusion matrix I want know the formulas for the information highlighted in the confusion matrix in the picture below: I'm searching for a template which makes a document look like it's written with a real typewriter. Ideally, this means it's not only in mono-spaced font, but the hyphenation is adjusted accordingly. Also, some randomness would be nice (e.g. some characters more bold than others), so that it looks more natural. Does there exist an $a_0$ such that the sequence $a_{n+1} = 2a_n + 1$ is prime for all $n \ge 0$? I believe I see that $a_n = 2^n(a_0+1) - 1$ but am somewhat uncertain where to proceed afterwards. I am a complete beginner at number theory and would appreciate it if someone could point me in the right direction--surely there is some obvious argument I am missing. Inspecting standard container (std::map) contents with gdb Supposing to have something like this:  #include &lt;map&gt; int main(){     std::map&lt;int,int&gt; m;     m[1] = 2;     m[2] = 4;     return 0; }   I would like to be able to inspect the contents of the map running the program from gdb. If I try using the subscript operator I get:    (gdb) p m[1] Attempt to take address of value not located in memory.   Using the find method does not yield better results:  (gdb) p m.find(1) Cannot evaluate function -- may be inlined   Is there a way to accomplish this? Topological proof on discrete topology where $X$ is infinite How must I prove this problem? Let $X$ be an infinite set and let $T$ a topology in $X$ in which all infinite subsets of $X$ are open.   Prove: $T$ is a discrete topology in $X$. I would like to use Flash Player to show web contents but since today (12 Jan 2021) Adobe is blocking it. Is there a way to use it? I've tried Firefox, Chrome, Safari and Brave browsers. How do I prepare best for my first wedding photography event? I am going to shoot a wedding this weekend, and I want to do my best for my friend's big day.    What can I do to prepare for the day in order to minimize failures and mistakes? How do I avoid missing important shots? What backup plan should I have?   I have been shooting for 6 years or so, and I know wedding is one of the hardest thing to do. I have told my friend what I end up producing will be of no match with the work of dedicated wedding photographers, not even the ones that are about to fall out of business.  They are on a tight budget, they said some photos are still better than none, they really must minimize the cost as much as they can. I exaggerated again that my photos will be worse off than the cheapest wedding photographer you can find.  She has been a close friends for years, I want to do everything I can to help her.  Their wedding is at 12:30pm coming Sunday, I have visited the venue last Sunday at 12:30pm to check traffic condition and also the lighting.  The setup is mainly outdoor (no church), the indoor area will not have a good ceiling for bounce. Being at the middle of the day, this can mean some tricky fill flash. I have jot down a list of must-have shots. I am also asking for the seating plan and the event run-down.  Gear:   Canon EOS 60D , EF-S 15-85mm f/3.5-5.6 IS USM Canon EOS 450D (or I can borrow a 550D), EF 50mm f/1.4 Speedlite 580 EXII Speedlite 270 EXII Yongnuo 460 (a cheap but powerful manual flash as backup) Samsung EX-1 f/1.8 point and shoot (backup of a backup...?)   Other lenses that I have but I don't think will be useful:   50mm f/1.8 EF-S 50-250mm f/4.0-5.6 IS II EF-S 18-135mm f/3.5-5.6 IS (I have the better 15-85 on 60D, should I put this on the 450D as a backup allrounder?) EF-S 60mm f/2.8 Macro (should I replace 50mm f/1.4 with this for added macro? You can hardly use f/1.4 under direct sunlight if you want to have fill-flash)   I have two batteries for all cameras (60D 450D and EX1). I have like in total 64GB SD card (I am really inclined to get more, or bring a laptop for on-the-fly backup, or do both). I recently repaired my 580EXII, it has a brand new flash head so the recycle time is as good as it can be, I just need a tonne of batteries. No I don't have external power pack or battery grip for my cameras.  I have a great monopod, but a cheap tripod.  I am happy to bring everything, just putting them in the boot of my car. The carpark is on-site, walking from venue to my car is under 1 minute.  I will have my girlfriend carry the 450D and shoot details / non-portraits.  One concern that I have is fill flash, I really do not have a large surface to bounce off  from. I have shot events before but they are not as dynamic/critical as a wedding.  How do I prepare for differing weather conditions?  If its sunny, fill flash is probably going to be in every single shot. If its cloudy, I probably will turn off the flash. If it rains, my 60D should be fine I have used it in slight rain before, but I really don't know their plan and if they have extendable shelters etc.  What else should I prepare for? Having no experience I want to be as prepared as I can be. Maybe I have overlooked something, maybe there is something else I can do to ensure the shooting will go smoothly. Your help is greatly appreciated! extract fields from bib bibliographic file I want to extract specific fields from a natbib/bibtex bibliographic file to construct a table similar to:  title ------------------------------------------------- authors ------------------------------------------------- journal, year, volume ------------------------------------------------- abstract -------------------------------------------------   is there a way to do this in latex?  Thanks Jorge How to find the running network services and the port and user I want to find a list of all network services running on my system, including details of the port and services and the users. I know that I need to use netstat, ps and fuser. but I don't know how to write the command. Do I need to write a shell script to find all of them? or I can use in a line of commands? Thanks for your help. I have read so many things already that I'm more confused than before. So decided to ask this by myself.  My paladin just got his Find Steed spell, and after some tweaking and talking, he decided to get a Worg and I was okay with it. This last session was his first time using it and I have few doubts when it comes to combat.  I know that while mounted, he uses the mounts movement and actions. But what about when unmounted? What if the combat began with him walking by his mount's side?   Does the mount share his initiative? Are the actions that the mount do, part of the Paladin's actions? Or are they both separately, having his Action, Movement and Bonus Action and then the mounts Action and movement?   We've stated that it can understand him but not talk back, he just telepathically receives feelings as a feedback to his commands, knowing that the mount understood what he needed. Last session he just said things to the mount like "I tell the mount to protect the ranger and the druid" and in case they got hit, it would attack them, but it didn't really do anything at all, as I didn't know when it would act and I had too many things already to remember about the mount. Is it safe to put hot food in the fridge? I heard that putting really warm food in the fridge right after cooking it is not the right thing to do. It might cause bacterial growth? Is this true? I´m not sure how to start with this proof, how can I do it? $$ \limsup ( a_n b_n ) \leqslant \limsup a_n \limsup b_n  $$ I also have to prove, if $ \lim a_n $ exists then: $$ \limsup ( a_n b_n  ) = \limsup a_n \limsup b_n  $$ Help please, it´s not a homework I want to learn. How to assign symbols to functions Getting the ID of the element that fired an event Is there any way to get the ID of the element that fires an event?  I'm thinking something like:    $(document).ready(function() {   $("a").click(function() {     var test = caller.id;     alert(test.val());   }); }); &lt;script type="text/javascript" src="starterkit/jquery.js"&gt;&lt;/script&gt;  &lt;form class="item" id="aaa"&gt;   &lt;input class="title"&gt;&lt;/input&gt; &lt;/form&gt; &lt;form class="item" id="bbb"&gt;   &lt;input class="title"&gt;&lt;/input&gt; &lt;/form&gt;     Except of course that the var test should contain the id "aaa", if the event is fired from the first form, and "bbb", if the event is fired from the second form. How to set the monitor to its native resolution which is not listed in the resolutions list? After installing Ubuntu 10.04 with my Samsung SyncMaster B2030, native resolution (1600X900) is not found in the list of resolutions. Are the rings $k[[t^3,t^4,t^5]]$ and $k[[t^4,t^5,t^6]]$ Gorenstein? (Matsumura, Exercise 18.8) Here is question 18.8 of Matsumura's Commutative Ring Theory. It asks whether the rings   $k[[t^3,t^4,t^5]]$, $k[[t^4,t^5,t^6]]$   are Gorenstein. I got that 1) is not Gorenstein, but 2) is Gorenstein (by computing the socle). Just wanted to check if I am correct. I don't need the answer necessarily, a yes or a no will suffice. Thanks.