What does the keyword 'this' means in TextView textView = new TextView(this);  Below is quote sniplet  public class DisplayMessageActivity extends ActionBarActivity {      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         //setContentView(R.layout.activity_display_message);         Intent intent = getIntent();         String message = intent.getStringExtra(MyActivity.EXTRA_MESSAGE);         TextView textView = new TextView(this);         textView.setTextSize(40);         textView.setText(message);         setContentView(textView);     }     ....   My guess is it initialize the object textView but with what?
If I write the following class:  public class Example {        int j;       int k;        public Example(int j, int k) {            j = j;            k = k;       }        public static void main(String[] args) {            Example exm = new Example(1,2);            System.out.println(exm.j);            System.out.println(exm.k);       }  }   The program compiles, but when I run the program, the main method will print out two 0s. I know that in order to say that I want to initialize the instance variables in the constructor I have to write:  this.j = j; this.k = k;   But if I don't write it, then which variable is evaluated (or considered) in the constructor (on the left and on the write hand side of the expressions)? Is is the argument or the instance variable? Does it make a difference?  Are there other cases where the use of this is obligatory?
Back when the first discussion about deleted questions came up, I  building an official unofficial read-only archive for good deleted SE content.  I had a plan to build something like this:    Each link would point to a 1:1 scraped StackOverflow (or other SE network) deleted question (of course with a big fat disclaimer to the top, historical data, legal stuff, yada yada yada - and of course after asking Stack Exchange for permission, seeing as this would go far beyond what the CC license allows.)   I also registered a domain name that would (IMO) suit nicely, overflown.org.  However, when thinking about it, I realized doing this properly is a lot of work. You would have to:   build a scraper that can use a 10k+er's OpenID to fetch the deleted question (using the API or the data dump is for wusses. If we go through all this trouble, we want a historical document of what the site looked like "back then", right?) edit the page's DOM to remove dynamic elements, remove the "deleted" CSS classes, remove all the voting abilities from the buttons, and add the "this is historical data" disclaimer fetch - this is the biggest part and applies even if you use the API or data dump - all linked image resources (even those from imgur - even images used only in deleted questions could be purged one day), store them, and link them fetch all associated CSS style sheets and store them intelligently - preferably in a way that you don't fetch a copy of each file for each page (as normal page scrapers do), but also in a way that doesn't break if SE update their style sheets   long story short, I won't be in a position to build this any time in the foreseeable future - with old work, new work, and studying, I really have enough on my plate already.  Of course, if somebody else in the community feels like giving this a try, cool! But what I was really thinking is - maybe this is something Stack Exchange should build after all?   I know Jeff's  on these questions is used to be     @system I did think about a sweet place for them, in the bitbucket. – Jeff Atwood♦ Dec 29 '10 at 1:54   but come on. Think about it:     Future deletion discussions and changes in on-topicness policy would become way more relaxed because the popular and loved stuff has a place to go. A site for "overflown" questions could be curated by selected community members, who decide whether a contribution deserves to be archived or not.  A separate domain name (I'm happy to donate overflown.org for the purpose if desired) and the separate site design would create enough distance to the Stack Exchange network: it would be crystal clear that this read-only archive is for historical purposes only, and the existence of a question there does not mean you can ask something similar on one of the live sites. The pages would be 1:1 scrapes of what the site looked like at the time of the scraping, making it a general historical archive as well. These questions traditionally drive a lot of traffic. The possibility of continuing to show ads in the usual places would allow Stack Exchange to take advantage of that traffic without endangering content quality on the SE network. Hosting an archive like this is a job for a business, not us regular joes. A private project hosted by some community member can go down once they forget to pay a bill, or decide they want to password protect their private blog or photo album. The ideal place to host a site like this is at a company with professional admins that intends to stay online for a long time.    How about it? Confused between Nested Quantifiers I am reading nested quantifiers. I am confused in between two cases,   1. Existential Quantifier before Universal Quantifier  2. Universal Quantifier before Existential Quantifier   I would be very thankful if someone highlights the difference between them and also give an example.   Thanks in advance. Remove empty elements from an array in Javascript How do I remove empty elements from an array in JavaScript?   Is there a straightforward way, or do I need to loop through it and remove them manually? How can I find $\gcd(a^m+1,a^n+1)$ with $a,m,n$ positive integers? How can I find $\gcd(a^m+1,a^n+1)$ with $a,m,n$ positive integers?    I have this idea:  Let $d=\gcd(m,n)$. Then there exist positive integers $x,y$ such that $mx-ny=d$ (WLOG). We shall find $G=\gcd(a^m+1,a^n+1)$.  If $m,n$ are odd, then $d$ is odd, therefore one and only one of $x,y$ is even. We have:  $$a^{ny}(a^d+1)=a^{mx}+a^{ny}=(a^{mx}-1)+(a^{ny}+1)=(a^{mx}+1)+(a^{ny}-1).$$  If $x$ is even and $y$ is odd, then $a^{m}+1\mid a^{mx}-1$ and $a^{n}+1\mid a^{ny}+1$, therefore $G\mid a^{ny}(a^d+1)$. If $x$ is odd and $y$ is even, then $a^{m}+1\mid a^{mx}+1$ and $a^{n}+1\mid a^{ny}-1$, thus $G\mid a^{ny}(a^d+1)$. However, since $\gcd(a^m+1,a^{ny})=\gcd(a^n+1,a^{ny})=1$, so $\gcd(G,a^{ny})=1$, hence $G\mid a^d+1$. We also have $a^d+1\mid a^{m}+1$ and $a^d+1\mid a^{n}+1$, so $a^d+1\mid G$. Thus $G=a^d+1$.  If $v_2(m)=v_2(n)=v_2(d)=k&gt;1$, then there exist some odd numbers $m_1,n_1,d_1$ such that $m=2^km_1,n=2^kn_1,d=2^kd_1$. We shall have $m_1x-n_1y=d_1$, so one and only one of $x,y$ is even, and we can use the same argument when $m,n$ are odd, so $G=a^d+1$.  However, if $v_2(m) \neq v_2(n)$, I cannot find any solutions for this. I think that $G \in \{1,2\}$, but I cannot prove or disprove it. How can I find $G=\gcd(a^m+1,a^n+1)$ if $v_2(m) \neq v_2(n)$ ? Moreover, is there anything from my arguments that can be improved ? Trying to show that $\ln(x) = \lim_{n\to\infty} n(x^{1/n} -1)$ How do I show that $\ln(x) = \lim_{n\to\infty} n (x^{1/n} - 1)$?  I ran into this identity on . I haven't been able to find any proof online and my efforts to get from $\ln(x) := \int_1^x \frac{\mathrm dt}t$ to that limit have been a failure. Using single quote by curly braces in String.format in Dynamic SOQL I'm struggling to use String.format to replace a token with a value when the token is within single quotes:  Example:  String query = String.format('SELECT Id FROM Availability WHERE Person__c = \'{0}\'', personId);   String query is equal to:  SELECT Id FROM Availability WHERE Person__c = {0}   Rather than:  SELECT Id FROM Availability WHERE Person__c = '234567890' What if residuals are normally distributed, but y is not? I've got a weird question. Assume that you have a small sample where the dependent variable that you're going to analyze with a simple linear model is highly left skewed. Thus you assume that $u$ is not normally distributed, because this would result in normally distributed $y$. But when you compute the QQ-Normal plot there is evidence, that the residuals are normally distributed. Thus anyone can assume that the error term is normally distributed, although $y$ is not. So what does it mean, when the error term seems to be normally distributed, but $y$ does not? Is it possible to Pivot data using LINQ? I am wondering if it is possible to use LINQ to pivot data from the following layout:  CustID | OrderDate | Qty 1      | 1/1/2008  | 100 2      | 1/2/2008  | 200 1      | 2/2/2008  | 350 2      | 2/28/2008 | 221 1      | 3/12/2008 | 250 2      | 3/15/2008 | 2150   into something like this:  CustID  | Jan- 2008 | Feb- 2008 | Mar - 2008 | 1       | 100       | 350       |  250 2       | 200       | 221       | 2150 Access to our computer (not only to the internet) needs to be restricted for the accounts of my kids (7, 8) until they are old enough to manage this by themselves. Until then we need to be able to define the following:   the hours of the day when computing is o.k. (e.g. 5 - 9 pm) the days of the week when computing is not o.k. (e.g. mondays to fridays) the amount of time allowed per day (e.g. 2 hours)   In 11.10 all of the following that used to do the job don't work any more:   : for > 11.10 no more available through the ppa. : command line alternative, but from 11.10 removed from the repositories. : Looks great but repeatedly crashes to force restarting X-server. So we can't use or recommed this program at the moment.   Are there any other alternatives? Arithmetic and geometric sequences: where does their name come from? Where does the name of these two famous types of sequences come from?  The article  of Wikipedia says that the geometric sequence is called like this because every term is the geometric mean of its two adjacent terms. Though it is true, it only reduces the question to: why is the geometric mean geometric (in opposition to the arithmetic mean).   Continuing my investigation on , I was told that a square with the same area than a rectangle with sides $a$ and $b$ has their geometric mean $\sqrt{ab}$ for side. That's again totally true, but a square with same perimeter than this rectangle of sides $a$ and $b$ has their arithmetic mean $\frac{a+b}{2}$ for side!  Thus, my question: Who coined these names? And why? Why is the geometric mean more geometric than the arithmetic mean? An unclear sentence in the book "Griffiths, Harris-Principles of algebraic geometry" Let $X$ be a complex manifold and consider a holomorphic vector bundle $\pi:E\to X$ of rank $r$. By the usual correspondence between vector bundles and locally free sheaves, we consider $E$ as a sheaf by abuse of notation. We denote with $\mathscr A_X^{p,q}$ the sheaf of $C^\infty$ $(p,q)$-differential forms on $X$ and we define: $$A^{p,q}(E):=\Gamma(X,\mathscr A^{p,q}\otimes_{\mathscr O_X} E)$$ $$A^k(E):=\bigoplus_{p+q=k}A^{p,q}(E)$$  Now suppose that $\nabla:A^\bullet(E)\to A^\bullet(E)$ is a linear connection on $E$, then the curvature operator is defined as: $$\nabla^2:A^0(E)\to A^2(E)$$ where $\nabla^2$ is the composition of the maps $\nabla: A^0(E)\to A^2(E)$   and $\nabla: A^1(E)\to A^2(E)$. One can show that $\nabla^2$ is $C^\infty(X)$-linear.    I don't understand the following sentence from the Griffiths-Harris book at page 75 (I rephrase it by using my notation):     Since $\nabla^2$ is $C^\infty(X)$-linear, then it is induced by a bundle map $E\to\bigwedge^2T^*X\otimes E$, or in other words, $\nabla^2$ corresponds to a global section $\Theta$ of the bundle $\bigwedge^2T^*X\otimes\operatorname{Hom}(E,E)$.   I absolutely don't understand how I can see the operator $\nabla^2$ as the section $\Theta$. I am looking for a reference which has a self-contained (elementary, that is, at the "undergraduate algebra level") proof of the the fact that any one-dimensional Noetherian UFD is a PID. Does anyone know such a reference?   (Note: I have looked at the similar questions on this website but don't find them particularly useful). Receiving commandline input while listening for connections in Python Wi-Fi speed on my laptop with RTL8723DE is a bit slow and its range is also very low, what to do? My Wi-Fi connection seems to be very weak and the range is very low. It drops by two bars if I just move to the next room and by two if just step outside.  The speed is also not fast as compared to what I get from the router on my desktop .  My laptop is a HP laptop with RTL8723de module. Can anyone help me in bumping up my Wi-Fi speed?  Result of lspci -nnk | grep 0280 -A3:  03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:d723] Subsystem: Hewlett-Packard Company Device [103c:8319] Kernel driver in use: rtl8723de Kernel modules: rtl8723de How to use grep and cut together? Lets say I'm doing a database for fruits. Using a text file for it, inside contains, in this format,  (Fruit:Quantity:Cost) Apple:10:1 Orange:20:2 Pears:10:3 Banana:20:4  10 Apples at $1 each. 20 Oranges at $2 each. 10 Pears at $3 each. 20 Bananas at $4 each.   My simple script goes like this:  echo "Enter fruit to find" read fruit  echo "Enter quantity to find" read count  echo "Enter cost to find" read cost  grep $fruit FruitDB.txt     It will display the fruits in the database.  But how do i use grep and cut together to find just by the quantity or the cost. In the quantity count area, let's say i enter 20, it will display the Oranges and Banana. Or when i enter count and cost, it will display just those that meet the conditions. Ubuntu Wifi drivers not working after getting update Calling sleep(5); and updating text field not working Quadrilateral problem with midpoints of diagonals For an arbitrary convex quadrialteral $ABCD$:   $$AF=FC, BE=ED, GI=IH$$  Prove that points $F$, $E$ and $I$ are collinear.  I was able to solve the problem by using vectors and I think that it can be also solved analytically but I wanted some more elegant proof, more in the spirit of Euclid. Slope of geometry as `fac` input for cycles material I have a terrain with two materials going into a Mix Shader, I want the fac input to be the slope of the terrain. Steep parts should be one color, flat part another. Are there published predictions that hydrogen could remain metallic at ambient pressure? Below the question  there is a  that directed me to the BBC News summary . In their attempt to balance the skepticism of this particular reported observation with the potential implications of producing metallic hydrogen in a laboratory, the BBC included some far-reaching possibilities:  If that is true - and it is a controversial claim - it fulfills a more than 80-year quest to produce what many have said would be a wonder material. Theory suggests metallic hydrogen could be used to make zero-resistance electrical wiring and super-powerful rocket fuel, among many applications.  At the end of the article:  &quot;The scepticism here is probably a good thing, in that it will drive many groups towards attempting to reproduce this experiment. This publication will certainly incite the field. Again, if it holds up, this is an exciting result. I think in this case time will tell,&quot; he told BBC News.  ...referring to Marcus Knudson from Sandia National Laboratories.  And Jeffrey McMahon from Washington State University concurred: &quot;With respect to the tiny sample amount: Such experiments are performed in small diamond anvil cells. One challenge would be to make a larger quantity (at once); another, perhaps bigger challenge is to recover even the small sample (ie, remove it from the extreme pressures that it is under in the diamond anvil cell). &quot;Whether the latter is possible is an important open question.&quot;  Question: Are there published, peer-reviewed predictions that hydrogen could remain metallic at ambient pressure? A link or reference would be appreciated. If it's still in pre-print form (AeXiv) that's OK too. If it's possible, a little help understanding the prediction would be great as well: I know there are many predicted crystalline forms of water ice at elevated pressures and/or reduced temperatures, and many or most of these have been observed, but I think most of them revert once pressure is reduced to ambient. Also the  comes to mind. If there is such a prediction of the possibility of hydrogen remaining metallic at ambient, is there an analogous example of this with a material I'm more familliar with, or is this something quite new?