java.lang.NullPointerException for Object instantiateItem in ViewPager use in fragment activity
What is a NullPointerException, and how do I fix it?
Solve recurrence relation $ a_{n+1} = (n+1)a_n + 1 $ $a_0 = 1 \\ a_{n+1} = (n+1)a_n + 1 $  Could you help me solve this? And maybe someone know good source explaining how to solve recurrence relations? Level 10 vim adventures beers on the wall complete solution I saw this question  but it doesn't have a full solution. What is the full solution to the 99 bottles of beer on the wall for Vim adventures?  Context: for the sake of being a good SO member I will give more details but a full solution will answer my question. It seems from reading the other post that my register is incorrect for some reason. I can't get the &lt;NL&gt;. I think that's the issue since pasting won't work... What is "cloning a hard drive" and how does one go about doing it? What does cloning a hard drive mean? Is it just simply copying over all the "CONTENT" of the hard drive EXCLUDING the operating system, drivers, all the installed programs? or is it copying the ENTIRE hard drive BIT for BIT? Is the cloned hard drive bootable?  I have an external USB hard drive and trying to make a exact copy of my computer system by cloning, so that I can connect the cloned hard drive to another machine and boot into it, or install the cloned disk on another computer system and boot into it. Is this possible? Or am I going about this totally wrong?  What is ghosting a hard drive? when EditText is empty and click calculateButton, app crashes Space $\mathcal{L}^p(X, \Sigma, \mu)$ is separable iff $(\Sigma, \rho_\Delta)$ is separable Let's consider the space $\mathcal{L}^p(X, \Sigma, \mu)$ of all functions $f\colon X \to \mathbb{R}$ (or $\mathbb{C}$) for which: $$ \int\limits_X|f|^p \mu(dx) &lt; \infty. $$ Here $X$ is a metric space, $\Sigma\subset 2^X$ — sigma-algebra on $X$ and $\mu$ — is the measure on $\Sigma$. As usual, functions that are equal almost everywhere considered to be equivalent, so technically we are dealing with classes $$[f]=\{g\in \mathcal{L}^\infty(X,\Sigma, \mu) \colon \mu \{x\in X\colon f(x)\neq g(x)\}=0\}.$$ This space is endowed with integral metric $$\rho_p(f,g)=\left(\int\limits_X|f-g|^p \mu(dx)\right)^{1/p}$$  The statement is that space $\mathcal{L}^p(X, \Sigma, \mu)$ is separable iff $(\Sigma, \rho_\Delta)$ is separable, where $\forall A,B\in\Sigma$ $$\rho_\Delta(A,B)=\mu(A\Delta B)$$ Here, again, we consider $A\in \Sigma$ as a class $[A]=\{A'\in\Sigma\colon \mu(A\Delta A')=0\}$ to have the identity of indiscernibles.  How do one prove the statement? $n$-th digit in the sequence of natural numbers What's the $n$-th digit in the sequence $S$ of numbers formed by the natural numbers, i.e.,  $n$-th digit in the sequence 1 2 3 4 5 6 7 8 9 10 11 12... ? For example 11th digit in the sequence is 0. What is the difference between fixed effect, random effect and mixed effect models? In simple terms, how would you explain (perhaps with simple examples) the difference between fixed effect, random effect and mixed effect models? How to Truncate a string in PHP to the word closest to a certain number of characters? I have a code snippet written in PHP that pulls a block of text from a database and sends it out to a widget on a webpage.  The original block of text can be a lengthy article or a short sentence or two; but for this widget I can't display more than, say, 200 characters.  I could use substr() to chop off the text at 200 chars, but the result would be cutting off in the middle of words-- what I really want is to chop the text at the end of the last word before 200 chars. Prove that the derivative of $x^w$ is $w x^{w-1}$ for real $w$ Can anyone give a proof of the derivative of this type of function? Specifically showing that  $\dfrac{d(x^w)}{dx} = wx^{w-1}$ for a real $w$?  I tried to use the Taylor series expansion for $(x+dx)^w$ and got the correct result. However, the proof of the Taylor series requires knowledge of the derivative of these functions. So this is essentially circular reasoning. I know that the same series is also given by the binomial expansion, but that's not entirely satisfactory either, because where's the proof that the binomial expansion works for all reals (isn't it only apparent for integers)? So far all of the arguments I've come across involve circular reasoning. I was thinking of showing that the binomial expansion is true for all reals using some form of proof by induction e.g. something like this.  I'm really not sure. Why did Voldemort stop employing Occlumency against Harry in Deathly Hallows? Assumptions of linear models and what to do if the residuals are not normally distributed I am a little bit confused on what the assumptions of linear regression are. So far I checked whether:  all of the explanatory variables correlated linearly with the response variable. (This was the case) there was any collinearity among the explanatory variables. (there was little collinearity). the Cook's distances of the datapoints of my model are below 1 (this is the case, all distances are below 0.4, so no influence points). the residuals are normally distributed. (this may not be the case)  But I then read the following:  violations of normality often arise either because (a) the distributions of the dependent and/or independent variables are themselves significantly non-normal, and/or (b) the linearity assumption is violated.  Question 1 This makes it sound as if the independent and depend variables need to be normally distributed, but as far as I know this is not the case. My dependent variable as well as one of my independent variables are not normally distributed. Should they be? Question 2 My QQnormal plot of the residuals look like this:   That slightly differs from a normal distribution and the shapiro.test also rejects the null hypothesis that the residuals are from a normal distribution: &gt; shapiro.test(residuals(lmresult)) W = 0.9171, p-value = 3.618e-06  The residuals vs fitted values look like:   What can I do if my residuals are not normally distributed? Does it mean the linear model is entirely useless? How does Ethernet know how long a frame is? custom button visibility list view bash: /usr/bin/locale-check: No such file or directory error after i downgraded from ubuntu 18.10 to 18.04 Proof by induction: $\sum\limits_{i=1}^{n} \frac{1}{n+i} = \sum\limits_{i=1}^{n} \left(\frac{1}{2i-1} - \frac{1}{2i}\right)$ How can the following be proved by induction?  $$\sum\limits_{i=1}^{n} \frac{1}{n+i} = \sum\limits_{i=1}^{n} \left(\frac{1}{2i-1} - \frac{1}{2i}\right)$$ I am out of ideas after practicing for a while:  $$\frac{1}{n+1}+\frac{1}{n+2}+\dots+\frac{1}{2n}=\left(1-\frac{1}{2}\right)+\left(\frac{1}{3}-\frac{1}{4}\right)+\dots+\left(\frac{1}{2n-1}-\frac{1}{2n}\right) $$  Does this involve telescoping series? An irreducible polynomial in a subfield of $\mathbb{C}$ has no multiple roots in $\mathbb{C}$ Area of a quadrilateral proof What would you see if you have 2 huge mirrors (you cant look over it or next to it)  You place them with the reflecting side to each other and you look in the mirror from behind one mirror (one way mirror = 1 side glass 1 side mirror, like in a movie when cops are questioning a suspect.)  The mirror would reflect each other endless.  The example could be preformed with a see trough mirror (1 side mirror other side glass) but I don't have one, also I don't have huge mirrors.    Would it make a diffrence if you place a light source and if you dont have a light source?  My guess is that you would always see black because there is nothing to mirror.  Edit important:   There is nothing in the room to reflect on, so it only reflects the mirror, thats what i ment. Possible Duplicate:        My Windows 7 is 64-bit, and I thought that means it can use the full 4GB of RAM installed on the computer.  But I just saw this on my computer's properties: (So only 3.25GB is usable??) Let $(X,d)$ be a metric space, and say $(x_n)$ is a Cauchy sequence such that it has a convergent subsequence $(x_{n_k})$ that converges to $x$. We show $x_n \to x$. Let $\epsilon &gt; 0$. Take $N &gt;0$ such that for all $n,m &gt; N$, we have   $$d(x_n,x_m) &lt; \frac{\epsilon}{2}.$$  By hypothesis, we can take also $K &gt;0$ such that for all $n_k &gt; K$, we have  $$ d(x_{n_k},x) &lt; \frac{\epsilon}{2}.$$  Put $M = \max \{N,K\}$. Therefore, for all $n,m,n_k &gt; M$, we have  $$ d(x_n,x) \leq d(x_n, x_{n_k}) + d( x_{n_k},x) &lt; \frac{\epsilon}{2} + \frac{\epsilon}{2} = \epsilon.$$  Hence, $x_n \to x$ as desired.  Is this a correct approach? Thank you very much in advance.