I have a list of number of url and its name is  listOfUrlSources, I passed it inside class GenerateUrlImages the task of this class is to come out with a picture link and it works if you use it and pass a link to one site it gives out a picture link, but now I'm trying to pass more than one site for it and also give me links to photos I tried, but I didn't make it through a list.   //  for (int i = 0; i &lt; sources.size(); i++) {                          item = new GenerateImage(sources.get(i).getUrl());                         // networkImagesLiveData.setValue(createLiveDataForLoadingImage(sources.get(i).getUrl()));                         listOfUrlSources.add(item);                     }                      new GenerateUrlImages().execute(listOfUrlSources);  //---------   //     public class GenerateUrlImages extends AsyncTask&lt;List&lt;GenerateImage&gt;, Void, List&lt;GenerateImage&gt;&gt;{          public GenerateUrlImages(){          }          @Override         protected List&lt;GenerateImage&gt; doInBackground(List&lt;GenerateImage&gt;... arrayLists) {             List&lt;String&gt; result = new ArrayList&lt;String&gt;();             List&lt;GenerateImage&gt; passed = new ArrayList&lt;GenerateImage&gt;();             passed = arrayLists[0];              //get passed arraylist             //urlImages             String src="";             try {                 org.jsoup.nodes.Document doc1;                 Elements img2;                 GenerateImage Item;                 for(int i=0; i&lt;passed.size(); i++) {                   doc1 = Jsoup.connect(passed.get(i).getUrl()).get();                   //Elements img = doc1.getElementsByTag("img");                     img2 = doc1.getElementsByTag("meta");                     for(Element element : img2) {                       if("og:image".equals(element.attr("property"))) {                         src = element.attr("content");                          Item = new GenerateImage(src);                           urlImages.add(Item);                        }                     }                     for (int j = 0; j &lt; urlImages.size(); j++) {                         Log.d("getUrlImage:", "" + urlImages(j));                     }                 }                 //InputStream in = new java.net.URL(src).openStream();                // bmp = BitmapFactory.decodeStream(in);             } catch (Exception e) {                 Log.e("Error :", e.getMessage());                 e.printStackTrace();             }             return null;         }         @Override         protected void onPreExecute(){          }         protected void onPostExecute(ArrayList&lt;String&gt; result){           }      }
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
I use a cookieless sub domain static.example.com to serve all images, js, and css files. This static sub domain has as its root directory the same directory as the parent http://example.com. So static.example.com/index.php will result in calling the same file as http://example.com/index.php  Google has taken up indexing static.example.com and I need to stop this.  I can't modify robots.txt since it would apply to both domains. Webmaster tools allows "temporary" removal of a link, but this needs to be permanent.  I registered this static domain through google as a separate site from example.com, but this doesn't seem to buy me anything since I can't see a way to block crawling without using robots.txt - which would block it from the parent domain.  Any other ideas?  UPDATE  Found this conversation on   I am looking into whether it's possible to insert a META tag dynamically into the header of every page called on the static domain using php  CLARIFICATION  I am not putting any content on static.domain.com. There are NO webpages on it that are called - it only serves images. I have it redirecting to the same root directory as the main site for ease of coding image links (not every image is fed from the same image path).  Google got a hold of the static web root address - probably because .htaccess redirects to index.php if a file is missing and then crawled it. Now Google is showing the static version of the same pages with search results. Use of very as an adjective is (in my experience) most frequently attested in phrases like     ...the very person I was looking for.   To use adjective very with the indefinite article sounds quite bizarre in this case:     ?...a very person I was looking for.   But consider this sentence, where indefinite a is used:     Visualizing a very transformation of the master-slave relation, Thomas presses further: the slave is brother to the master, even doubly a brother.   OED treats the two uses as separate senses of the word, with the following definitions:           (first use):&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;With limitation (usually expressed by the or a possessive) to particular instances      (second use): Really or truly entitled to the name or designation   Here are two respective examples quoted in OED:     What would you say to me now, and I were your verie, verie Rosalind? (1616)   Thence we went into Queen Mary's room, and saw that beautiful portrait—that very queen and very woman. (1857)   Clearly, the difference in meaning between the two senses is quite light, and it seems to me like a kind of difference which is recurrent enough to have its own term. What is the proper term? Are there other English words having similarly related pairs of senses? And lastly, is OED jumping the gun in treating these as two senses? Could the difference in meaning instead be due to the choice of determiner? Prove $(1+a+b)(1+b+c)(1+c+a)\ge 9(ab+bc+ca)$ How one can prove the following.  Let $a$, $b$ and $c$ be non-negative real numbers. Then the inequality holds:  $(1+a+b)(1+b+c)(1+c+a)\ge9(ab+bc+ca).$  WLOG one can assume that $0\le a\le b\le c$.  It is not difficult to prove the statement when $0\le a\le b\le c\le 1$ or $1\le a\le b\le c$. I often run into this issue. I'm creating a file in Photoshop with masked layers etc. I want to make the final output available for some mock-ups in Illustrator, so I rasterize the layers and marquee select the entire area, copy and move to Illustrator.  Pasting the area in Illustrator flattens all transparencies, which is quite annoying. I'm left with my object and a flat white background.  Is there a reason for this? Nautilus does not show the left bar, how do I turn it back on? Hungerford's book of algebra has exercise $6$ chapter $3$ section $6$ [Probably impossible with the tools at hand.]:     Let $p \in \mathbb{Z}$ be a prime; let $F$ be a field  and let $c \in  F$. Then $x^p - c$ is irreducible in $F[x]$ if and only if $x^p - c$   has no root  in $F$. [Hint: consider two cases: char$(F) = p$ and   char$(F)$ different of $p$.]   I have attempted this a lot. Anyone has an answer? Rails Previous Sunday in Relation to Any DateTime irrationality of $\sqrt{2}^{\sqrt{2}}$. The fact that there exists irrational number $a,b$ such that $a^b$ is rational is proved by the law of excluded middle, but I read somewhere that irrationality of $\sqrt{2}^{\sqrt{2}}$ is proved constructively. Do you know the proof? Is it acceptable to edit (correct) grammar or spelling? Some individuals may be sensitive to edits of their posts on the basis of spelling or grammar. Some editors may be concerned about what to put in as a reason/explanation for the edit. New editors, in general, are likely uncertain of what the accepted "etiquette" is, on these sites, for such corrections. Can someone explain the dollar sign in Javascript? Minimum value of $ f(x,y,z)=\left(x+\frac{1}{y}\right)^2+\left(y+\frac{1}{z}\right)^2+\left(z+\frac{1}{x}\right)^2. $ If $x&gt;0$, $y&gt;0$, $z&gt;0$ and $x+y+z=6$ then find the minimum value of    $$ f(x,y,z)=\left(x+\frac{1}{y}\right)^2+\left(y+\frac{1}{z}\right)^2+\left(z+\frac{1}{x}\right)^2. $$   Thanks in advance. Why am I forced to use the newest chat interface? When logging into chat-stackexange I am presented with this message:  The new mobile version of chat is now the default mobile version on devices that support it. Unlike the classic (okay, ancient) version, it allows you to perform actions like editing, starring, and direct replies to particular messages. The classic version is still available and will be used in browsers that lack support for some necessary features of the new version. Logged in users can also choose to continue using the old version on the preferences page of their user profile. Please report bugs and other issues on Meta Stack Exchange. Thank you!  I choose to continue using the old version but cannot find the option to do so on my chat user profile page? Closing Etiquette: Why Do Some Answer *and* Close? I've noticed quite a few cases () where people not only vote to close a question, but then also answer said question. At best this is just silly, and at worst it is totally hypocritical and seems almost like rep whoring (since often the closers answers are the only ones that remain to be voted on since no new answers can be given).  If you want to close a question, it makes more sense to simply add a comment if you feel the need to say something. This also leaves the option open for the author of the question to delete it if they want to. If the author realizes they've asked a duplicate, or they want to avoid the onslaught of downvotes that can often accompany a closed question, they should be allowed to delete it. However, if any answers to the question have upvotes, the author can't delete it.  So why do people answer and close? Should we try to crack down on this sort of thing, via either new features, clearly stating it in the FAQs, or just getting the word out through commenting when we see it?  EDIT: Just to clarify, I'm asking this in relation to SO, not MetaSO. Let he who believes in this prophet speak now what he knows.       Let him who believes in this prophet speak now what he knows. How can I convert the binary string $x_bin="0001001100101" to its numeric value $x_num=613 in Perl? How to randomize (shuffle) a JavaScript array? How to check if this limit exists: $$\lim_{(x,y)\rightarrow (0,0)}{ \frac{x^4y^4}{(x^2 + y^4)^3}}$$  Can I convert it to polar form ? $$\frac{r^8 (\cos^4 (\theta)\sin^4(\theta)}{r^6 (\cos^6 (\theta) + r^6 \sin^{12} (\theta))} = \frac{r^2}{\cos^6(\theta) + 0} = 0$$ "A quarter past five" or simply "Quarter past five"? I usually say “It’s a quarter past” (for instance) “five”.  But I think I’ve heard (or read) “It’s quarter past ...”, too, with no indefinite article: is that correct?  Which is more common (if both constructions are in use)?  Is the omission of the article more colloquial (informal, popular, whatever)?  Is there a difference between British and American English?  Thank you very much. Macrons appear really wide on all characters, but especially so on the i. Is it possible to make them less wide?  \documentclass{article} \begin{document} Tac\=e, M\=arc\=o, \=unus, f\=\i li\=\i? \end{document} Show that the countable product of metric spaces is metrizable