int e=0; int Compatibility=0; int numOfDisagreements=0; int tsize=likes.size()+dislikes.size(); int numOfCommonLikes=0; int numOfCommonDislikes=0; while(e&lt;tsize){     if (user.likes.get(e).equals(Stranger.likes.get(e))){         if ((Stranger.howDoYouLike(likes.get(e)))== 1 &amp;&amp; user.howDoYouLike(likes.get(e))==1)         {             numOfCommonLikes=numOfCommonLikes+1;         }     }     else if (user.dislikes.get(e).equals(Stranger.dislikes.get(e))){         if ((Stranger.howDoYouLike(dislikes.get(e)))== -1 &amp;&amp; user.howDoYouLike(likes.get(e))==-1)         {             numOfCommonDislikes=numOfCommonDislikes+1;         }   Am getting a nullpointer error, I don't know what that means but can someone tell me what is wrong with this code please, I am looking real hard      else      {         numOfDisagreements=numOfDisagreements+1;     }          e+;     }      Compatibility=(numOfCommonLikes+ numOfCommonDislikes)- numOfDisagreements;     return Compatibility; }
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?
Email SMTP validator I need to send hundreds of newsletters, but would like to check first if email exists on server. It's called  validation, at least I think so, based on my research on Internet.    There's several libraries that can do that, and also a page with open-source code in  (), but I have hard time reading ASP Classic, and it seems that it uses some third-party library...    Is there some code for SMTP validation in C#, and/or general explanation of how it works? I'd really like to learn how to play pen-and-paper RPGs.  I know that it takes a few players to actually sit down and play, but I'm not at all sure where to find more gamers.  How do I find existing groups to join? Or, are there any resources online that may help me find existing RPG groups or players? Constructing a continuous distribution to match $m$ moments Prove that for any piecewise smooth curve it is possible to find the parametrisation What's the meaning of the transpose? Using Euler's Totient Function, how do I find all values n such that $\phi(n)=12$? How do I generalize the equation to be able to plug in any result for $\phi(n)=12$ and find any possible integer that works? Can't boot Windows 7 after installing Ubuntu I installed Ubuntu yesterday alongside Windows 7 and whenever I start my computer I don't have the option to boot Windows. When the computer starts it goes straight to Ubuntu without giving me an OS selection menu. When it goes to Ubuntu it gives me Ubuntu repair options and Ubuntu normal start option. I still have all of the Windows 7 files on my hard drive, but Windows 7 has no way to boot. How can I modify title page so that it looks like it is in  video. Please seek to 16 seconds and watch title page. I do not have permission to post images. I liked this theme and I want to make a beamer theme that looks similar. I tried with beamercolorbox but I failed to position the box to the bottom.      Edit: Here is my minimum working example  \documentclass[xcolor=dvipsnames]{beamer} \defbeamertemplate*{title page}{customized}[1][] { \usebeamerfont{subtitle} \usebeamercolor[fg]{subtitle}  {\flushright \setbeamercolor{author}{bg=white,fg=Red} \usebeamerfont{author} \insertauthor\par \usebeamerfont{institute}\insertinstitute\par }  \vspace{0.2in}  \setbeamercolor{postit}{fg=white,bg=YellowOrange}  \begin{beamercolorbox}[sep=1em,wd=1.062\textwidth,ht=3cm,dp=3cm,right]{postit} \usebeamerfont{title} {\huge \inserttitle}\par \usebeamerfont{subtitle} {\insertsubtitle} \end{beamercolorbox} } \usecolortheme[named=YellowOrange]{structure} \useoutertheme{infolines} \setbeamertemplate{navigation symbols}{}  \institute{Harvard College Professor and\\ Johnstone Family Professor in Psychology, Harvard University}  \title{SAY WHAT?} \subtitle{Linguistics as a Window to\\ Understanding the Brain} \author{Steven Pinker}  \begin{document} { \setbeamertemplate{footline}{} \begin{frame} \titlepage \end{frame} } \end{document} I understand that there are $\frac{8!}{3!2!}$=3600 permutations possible without any restrictions in place. I follow this by attaching all like elements as such {1,2,{3,3,3},{4,4},5} where I can account for 5! permutations where I have three 3s and two 4s in consecutive positions. However, when it comes to accounting for the permutations that, for example, will have three consecutives 3s but not so for the 4s, I am at a loss. I wrote some simple code and came up with a set of 960 permutations as the acceptable answer. As the question implies, I am unsure of how to reach that through other means. My apologies if this is considered elementary and I appreciate any help whatsoever. Exactly what the name entails. The function $2^n-1$ I see largely tends to generate primes when $n$ is prime. However, a week ago I heard that this was horribly false. Please show me a disproof. How do I remove an account from Google multi-login? I have three accounts among the multiple accounts I have for Google's products. One of them belongs to a friend who accidentally made his account one of mine when he was using my PC.  How do I remove his account from my Google multiple accounts? Logging out from his account doesn't work. His account still displays under the user dropdown even though I can't log in to it. Entropy of sum is sum of entropies Every planar graph has a vertex of degree at most 5. How do I change folder timestamps recursively to the newest file? Failed to download repository information due to missing CDROM When updating I got this error message:  W:Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)/dists/oneiric/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs W:Failed to fetch http://ppa.launchpad.net/synce/ubuntu/dists/your_ubuntu_version/main/source/Sources  404  Not Found   What to do? Does the new guidance on duplicate questions suggest closing a question as duplicate, if the original answers the OP's question? In other words, should we now look at the content of the answers when we are evaluating questions for possible duplication?  Is it sufficient to say "Your answer can be found in this question over here, therefore your question is a duplicate?"  The new guidance is here:    Among other things, it describes the new close banner:     This question already has an answer here:   Link to the Duplicate Question   ... which seems to suggest that, if some other question in the system answers the OP's question, then the OP's question can be closed as a duplicate on that basis (even if the question itself is not necessarily duplicated).  Example Here:    Note the comments below the question, where I dispute the assertion made there that it is a duplicate question.  The original question doesn't mention unit testing. Updating Location of Point Features using XY Fields? I have changed the coordinates of couple points in the attribute table and I want to update the location. I have found the script that is working in field calculator.   Does anybody know how to write it using a Python script in ArcGIS Desktop (not in Field Calculator)?  def XYsetVALUE( shape, X_value, Y_value):    point = shape.getPart(0)    point.X = X_value    point.Y = Y_value    return point  __esri_field_calculator_splitter__ XYsetVALUE ( !SHAPE!, !X_COORD!, !Y_COORD! )   COORDINATE FIELD TYPE ------ STRING !!!! Does this email mean that I have been granted the visa? I received the following email this morning. Does it mean that my visa has been granted?  UK Visas &amp; Immigration has now assessed your UK visa application and made a decision. Your documents and the decision will be sent back to either the UK Visa Application Centre where you applied, where we will contact you by email over the next few days to collect them, or if you are using the courier return service, will be sent directly back to the address provided. Please note that TLScontact does not know the outcome of the assessment and has played no role in the decision-making process. Kind regards, TLScontact UK VIsas &amp; Immigration What is a terminal and how do I open and use it? Recently I commented on  question   and the text did got bold but the italic word didn't seem to get italic on Android Chrome(Latest Ver.), but when I saw from the PC browser, it rendered as it should...  I've attached a screenshot of my phone ...