Null Pointer Exception Error With Arraylist.add Java
What is a NullPointerException, and how do I fix it?
Whats the simplest way to edit and add files to "/var/www"? Having installed the web server is there a simple way to set a user able to use the graphic interface to copy files and directories to the local web server /var/www  I gave myself administrative privileges in Ubuntu but it still doesn't allow copies. I need to prove that $K\subseteq \mathbb{R}^n$ is a compact space iff every continuous function  in $K$ is bounded.  One direction is obvious because of Weierstrass theorem. How can i prove the other direction? I tried to assume the opposite but it didn't work for me.  Thanks a lot. In GMAIL you can list all your boss-tell-off and wife-cuss-out emails by clicking Drafts    I'd like to see my started-but-never-finished responses, possibly between x Answers and y Votes in /&lt;&lt;user&gt;&gt;/Stats/? On finding polynomials that approximate a function and its derivative (extensions of Stone-Weierstrass?) The Stone-Weierstrass Theorem tells us that we can approximate any continuous $f:\mathbb{R}^n\to\mathbb{R}$ arbitrary well on a compact subset of $\mathbb{R}^n$ by some polynomial. Suppose that $f$ is continuously differentiable, under what conditions can we guarantee we can find a polynomial $p$ such that $p$ approximates arbitrarily well $f$ and the partial derivatives approximate of $p$ arbitrarily well those of $f$ (on a compact subset of $\mathbb{R}^n$)? References are welcome. See below for my (probably naive) approach to the question.    It is straightforward to find conditions if $n=1$: Let $K:=[a,b]\subseteq\mathbb{R}$ and let $K_+$ denote some open cover of $K$. Suppose that $f:K_+\to\mathbb{R}$ is continuously differentiable and let $f'$ denote its derivative. Then, by Weierstrass's approximation Theorem we have that there exists a polynomial $q$ such that   $$||f'(x)-q(x)||\leq \varepsilon$$  for all $x\in K$. Choose some $y\in K$. For any $x\in K$ define  $$p(x):=f(y)+\int_y^xq(t)dt.\quad\quad(*)$$  By the Fundamental Theorem of calculus we have that $p'=q$. So for any $x\in K$  $$||f(x)-p(x)||=\left|\left|\int_y^x (f'(t)-q(t))dt\right|\right|\leq \int_y^x ||f'(t)-q(t)||dt\leq \varepsilon||x-y||\leq \varepsilon (a-b).$$  However, the above argument doesn't work in higher dimensions because the analogue of $(*)$ does not imply that $\nabla p = q$ (since not every vector of polynomials spans a gradient field). Can anyone suggest a way around this? That is, a way to to show that for continuously differentiable $f:\mathbb{R}^n\to\mathbb{R}$ and for any $\varepsilon&gt;0$, we can always find a polynomial $p$ such that   $$||f(x)-p(x)||+||\nabla f(x)-\nabla p(x)||\leq \varepsilon$$  for all $x$ in some compact set $K$? Feel free to add extra conditions on $K$, if it makes life easier. What is the difference between 'su -' , 'sudo bash' and 'sudo sh'? I would like to know what is the difference between    su - sudo bash sudo sh   I cannot login as root while doing su - because I do not have the root password - I mean I have my user password with which I can sudo "command"  but this password does not work for su - I can log in as root with sudo bash with my user password and I can login while doing sudo sh but then I get a command prompt in this form # There's a way to safely try KDE on top of an Ubuntu installation, keeping the possibility to revert the changes in case I dislike how it runs? Is it true that the order of $ab$ is always equal to the order of $ba$? Python mechanize javascript Texmaker GUI is messy with high resolution screen In Star Trek, does the original die in teleportation? I am just curious.  If I am teleported is the original me dead and the teleporter just makes another copy of me there[at destination]? Installing QGIS with ECW support on Mac? I bought a imac recently and I tried to install qgis: without success! It is not possible to read the raster files.  I installed GDAL ECW plugin, but it is necessary to copy and paste another file from  ERDAS ECW/JPEG2000 following this instruction.  "VERY IMPORTANT POST-INSTALL  You MUST download and install the ECW SDK yourself. I don't have the means to enforce export restrictions. I'm sorry, but installation is a manual process for now:  Go to . Select "ERDAS ECW/JPEG2000 SDK" from the Product popup. Click on the MacOSX line, then the Download Now link.  Open the downloaded disk image and run the installer. It will install into the top of your boot drive, /Intergraph. Dig into this folder to Desktop_Read-Only/redistributable/libstdc++.  Copy the libNCSEcw.dylib file to:  /Library/Application Support/GDAL/1.11/Libraries  and copy the whole Desktop_Read-Only/etc folder here to:  /Library/Application Support/GDAL/1.11  so it looks like (there may be other files in Libraries and PlugIns for other installed plugins):  Library Application Support GDAL 1.11 etc Libraries libNCSEcw.dylib PlugIns gdal_ECW_JP2ECW.dylib  You can trash the installed Intergraph folder when done to save a few hundred MB of space.  I failed the procedure! Could you help me? Sorry for asking such a basic question - but is there an actual term for the numbers that appear before and after the decimal point?  Example:  25.18  I know the 1 is in the tenths position, the 8 is in the hundredths position. are there singular terms which apply to all of the numbers that appear both before and after the decimal point?  I'm building a billing system, storing dollars and cents as integers (in separate columns), but for other currencies "dollars" and "cents" are not the correct terms = ).  Thanks! My multiple regression analysis model has a statistically significant F value however all beta values are statistically non-significant.   All the regression assumptions are met. No multicollinearity was found. Correlations among all predictors are all less than 0.60.   What else might be the cause of the insignificant predictors? This is a bit of a more unusual bug to report:    The screenshot above is unedited - the black box is rendered by the Stack Exchange application.  Phone:  running Android 4.0.4 (ICS) How to make a table from two lists? Which parsers are available for parsing C# code?  I'm looking for a C# parser that can be used in C# and give me access to line and file informations about each artefact of the analysed code. A fair coin is tossed repeatedly until 5 consecutive heads occurs.   What is the expected number of coin tosses? When I sum up the sizes of my files, I get one figure. If I run du, I get another figure. If I run du on all the files on my partition, it doesn't match what df claims is used. Why are there so many different figures for the total size of my files? Can't computers add?  Speaking of adding: when I add the “Used” and “Available” columns of df, I don't get the total figure. And that total figure is smaller than the size of my partition. And if I add up my partition sizes I don't get my disk size! What gives? Showing that $\frac{\sqrt[n]{n!}}{n}$ $\rightarrow \frac{1}{e}$ Show:$$\lim_{n\to\infty}\frac{\sqrt[n]{n!}}{n}= \frac{1}{e}$$  So I can expand the numerator by geometric mean. Letting $C_{n}=\left(\ln(a_{1})+...+\ln(a_{n})\right)/n$. Let the numerator be called $a_{n}$ and the denominator be $b_{n}$ Is there a way to use this statement so that I could force the original sequence into the form of $1/\left(1+\frac{1}{n}\right)^n$ Add desktop notifications for Chrome or Firefox