I have a class lets say myFrame that extends JFrame. On this frame I have a button with a action listener event. When this event triggers I want to make changes to the class(myFrame) like I would have done in the constructor of the class using this.add() or whatever function I need.   The problem is that if I use "this" in this action listener I am no longer referring to the current instance of the class myFrame. I vaguely remember that I have come across this issue before but I cannot remember how I went around it. I think I might have assigned this to some variable in the constructor of the class.
In the following snippet:  public class a {     public void otherMethod(){}     public void doStuff(String str, InnerClass b){}     public void method(a){         doStuff("asd",             new InnerClass(){                 public void innerMethod(){                     otherMethod();                 }             }         );     } }   Is there a keyword to refer to the outer class from the inner class?  Basically what I want to do is outer.otherMethod(), or something of the like, but can't seem to find anything.
I'm being forced to use my Macbook more and more with my metered 4G connection. I really need to keep data usage limited. Windows has an  mode which really helps with this.   What's the best way to handle this issue in the OSX world? Perhaps some use of the firewall? Is there any sort of logging happening as to what is using the network?  Thanks for your help :-) Reload activity in Android How does sudo handle $HOME differently since 19.10? How do I limit the number of rows returned by an Oracle query after ordering? Is there a way to make an Oracle query behave like it contains a MySQL limit clause? In MySQL, I can do this: select *  from sometable order by name limit 20,10  to get the 21st to the 30th rows (skip the first 20, give the next 10). The rows are selected after the order by, so it really starts on the 20th name alphabetically. In Oracle, the only thing people mention is the rownum pseudo-column, but it is evaluated before order by, which means this: select *  from sometable where rownum &lt;= 10 order by name  will return a random set of ten rows ordered by name, which is not usually what I want. It also doesn't allow for specifying an offset. Use mathematical induction to prove $ (2n)!\geq 2^n(n!)^2$ for $n \in \mathbb{N}$ Proof that $\bigcap_{a\in A} \bigg(\, \bigcup_{b\in B} F_{a,b} \, \bigg) = \bigcup_{f\in ^AB} \bigg(\, \bigcap_{a \in A} F_{a,f(a)}\,\bigg) $ I found an interesting exercise of other amazing book (Jech's) that I'm not totally sure about how to do it.   Prove the following form of the distributive law:   $$\bigcap_{a\in A} \bigg(\, \bigcup_{b\in B} F_{a,b} \, \bigg) = \bigcup_{f\in ^AB} \bigg(\, \bigcap_{a \in A} F_{a,f(a)}\,\bigg) $$  Assuming that $F_{a,b_1} \cap F_{a,b_2} = \emptyset $ for each $a\in A$ and $b_1,b_2\in B$ and $b_1\not=b_2$.  First of all, I'm not completely sure about what $ F_{a,b}$ really means. I suppose that is  the range of a family with a domain $A \times B$.    And second, I cannot figure out how to do the converse (assuming that the first part it is correct, I used as normal in this kind of proof element chasing)  Proof:  ($\Rightarrow$) ...  ($\Leftarrow$) Suppose that $z\in \bigcup_{f\in ^AB} \big(\, \bigcap_{a \in A} F_{a,f(a)}\,\big)$; then there is $f\in \,^AB$ such that $z\in  \bigcap_{a \in A} F_{a,f(a)}\, $. Let $a \in A$ be arbitrary.   Claim 1 $\, \bigcap_{a \in A} F_{a,f(a)}\subseteq F_{a,f(a)} \subseteq \bigcup_{b\in B} F_{a,b}$.  Proof of the Claim 1:   For the first inclusion: Suppose $z\in\bigcap_{a \in A} F_{a,f(a)}$; then for each $a\in A$ we have that $z\in F_{a,f(a)}$. Then $\bigcap_{a \in A} F_{a,f(a)}\subseteq F_{a,f(a)}$.  For the second inclusion: Now suppose $z\in F_{a,f(a)}$. Clearly $f(a)\in B$ because $f\in ^AB$. Then there is some $b\in B$ such that  $z\in F_{a,b}$ and hence that $z\in \bigcup_{b\in B} F_{a,b}$. $\square$  Since $a$ was arbitrary it follows that $z\in \bigcup_{b\in B} F_{a,b}$ (by claim 1) for each $a\in A$ and hence  that $z\in \bigcap_{a\in A} \big(\, \bigcup_{b\in B} F_{a,b} \, \big)$ as desired.  I really, really would very much appreciate some help with that. Thanks in advance as usual. Suppose I have this:   $\frac{6^{666}}{2^{6}}$ (mod $125$)  I saw it is possible to reduce only the numerator's power modulo Euler's phi function. Can someone explain why is that possible?  It is essentially this:   $\frac{6^{666 \space (mod \phi(125))}}{2^{6}}$ (mod $125$) In PHP (>= 5.0), is passing by reference faster? In PHP, function parameters can be passed by reference by prepending an ampersand to the parameter in the function declaration, like so:  function foo(&amp;$bar) {     // ... }   Now, I am aware that this is not designed to improve performance, but to allow functions to change variables that are normally out of their scope.  Instead, PHP seems to use Copy On Write to avoid copying objects (and maybe also arrays) until they are changed. So, for functions that do not change their parameters, the effect should be the same as if you had passed them by reference.  However, I was wondering if the Copy On Write logic maybe is shortcircuited on pass-by-reference and whether that has any performance impact.  ETA: To be sure, I assume that it's not faster, and I am well aware that this is not what references are for. So I think my own guesses are quite good, I'm just looking for an answer from someone who really knows what's definitely happening under the hood. In five years of PHP development, I've always found it hard to get quality information on PHP internals short from reading the source. Copying data over with rsync causes size discrepancies "No root filesystem is defined" while installing Ubuntu I have just got a new laptop, It is running Windows 7 Home Premium.  I have shrunk the windows partition to give me some empty space and now I want to install ubuntu.  From Windows my partitions look like:   So now in the ubuntu live cd If I hit install and go manual the partitioner looks like   So I thought I could just select the empty space and be away laughing, but when I hit it I get Why is a Hyperplane called a "Hyper"plane? I just had this curious question. In other fields, the word "hyper" is actually used to refer to something which is "over; beyond; above" as defined by Google. An example of such terms would be Hyperglycaemia, defined by Wikipedia as:     a condition in which an excessive amount of glucose circulates in the blood plasma.   Or Hypersonic, defined by Google as:     relating to speeds of more than five times the speed of sound.   So, my question is, what would be the motive to give a Hyperplane such a name when it is defined as :     a subspace of one dimension less than its ambient space I need my pre-installed version of Windows 7 (or any other version of Windows), how could I install Ubuntu without erasing it? error when adding user to wheel group in CentOS 7 I am trying to grant sudo privileges to a user of a CentOS 7 devbox by typing gpasswd -a user wheel, but the attempt is failing.  What am I doing wrong?    Here is what I typed:    I discovered that the user is not in the wheel group as follows:    [user@localhost git]$ sudo yum install git [sudo] password for user:  Sorry, try again. [sudo] password for user:  Sorry, try again. [sudo] password for user:  user is not in the sudoers file.  This incident will be reported.   I then logged in as root and typed the following to add the user to the wheel group:    [user@localhost git]$ su - Password:  Last login: Thu Aug 20 17:11:31 PDT 2015 on pts/0 [root@localhost ~]# gpasswd -a user wheel Adding user user to group wheel [root@localhost ~]# exit logout   I finally tried to use the sudo command again but it failed as follows:    [user@localhost git]$ sudo yum install git [sudo] password for user:  user is not in the sudoers file.  This incident will be reported. [user@localhost git]$ I want to achieve the exact same title page layout as the paper shown . For those that do not want to download the paper, the image of the title page is shown below:    The super-scripts indicating the authors doesn't have to be as shown in the example title page (e.g, a, b and c), other symbols are fine.  I am using the authblk package and know the general syntax such as:  \title{title of paper} \author[1]{author 1\thanks{details that goes into the footnote}} \author[1]{author 2\thanks{details that goes into the footnote}} \author[2]{author 3\thanks{details that goes into the footnote}} \affil[1]{university 1} \affil[2]{university 2} \renewcommand\Authands{ and } \maketitle  \begin{abstract} abstract goes here \end{abstract}   But I am not sure how to achieve the example title page shown. Any help would be appreciated! Windows 10: How to change a theme slideshow time interval? It's all int the title; I find myself unable to set a precise time interval defining how often the background pictures of the theme I am currently using change.  The only similar option available in Windows 10 settings applies only to single background images and not to multiple background images included in a theme.  Thanks in advance,  N. How to create vector graphics In Photoshop? I know people prefer using CorelDraw or Adobe Illustrator, but I want to know if there is a technique I can follow to use Adobe Photoshop to make vector Images. Too long in Primary Fermentation? What's the maximum amount of time for primary fermentation, assuming the beer is going straight to bottles next? Will it over ferment and then fail to carbonate, if left too long in a carboy? Show the expected number of packets to buy to collect a whole set of minifigures Advantages/Disadvantages of Partitioning a Drive I have a 100GB hard drive in my Win XP Pro desktop. I use an external 250GB drive for backups, and am wondering if there would be any advantages to partitioning my internal hard drive.   I understand that some people like to keep their OS and programs on one partition, and their data on another partion on the same hard drive.  I'd like people to list the advantages, or note any disadvantages.  Thanks. Do I need quote marks when I quote myself?