Not sure why this is getting a NullPointerException.  According to error log, NullPointerException is thrown while executing this statement.  "file[i] = loadSaveFile.nextLine()" towards the end of the script.  public class SaveGame { static String[] file; static String loadSaveFile; static String gameDir; static int numLines = 0;  public static void main(String[] args) throws FileNotFoundException {     File saveFile = new File(gameDir + "\\savefile.txt");     Scanner loadSaveFile = new Scanner(saveFile);     Scanner findNumLines = new Scanner(saveFile);     while(findNumLines.hasNext() != false){         findNumLines.nextLine();         numLines++;     }     for (int i = 0; i &lt; numLines; i++) {         file[i] = loadSaveFile.nextLine();         if(loadSaveFile.hasNextLine() == false){             break;         }     } } }
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?
Memory Usage of SQL Server SQL Server instance on my server is using almost full memory available in my Physical Server. Say if i am having 8GB of RAM than SQL Server is using 7.8 GB of RAM from system. I also have read articles and also read many similar questions regarding same on this forum and i understand that memory is reserved and it is using memory.  But i have 2 same servers and 2 SQL Servers, why this is happening on a single SQL Instance not on other. Also when i run DBCC MemoryStatus than it is showing up...  VM Reserved 8282008 VM Committed 537936   so from this we know that SQL reserved whole 8GB memory, but why this VM Committed keeps increasing. What i understand is VM Committed is:      VM Committed: This value shows the overall amount of VAS that SQL Server has committed. VAS that is committed has been associated with physical memory.   So this is the memory SQL Server has committed (from this i understand that physical memory actually SQL Server is using at instance).  So like to know the reason behind this ever increasing VM Committed memory on my server and not on another. Thanks in Advance. Array of zero length How to resolve Google "Indexed, though blocked by robots.txt" Articles: When do I use "a", "the", or "__"? Creating fishnet grid with specified rotation angle in ArcGIS Desktop? I'm working on this project and I need a grid with a certain rotation, at about 60 degrees, for example.  Starting from that I need to make a block of 20mx50m, and the last thing is that inside each block there must be a small set of sub-blocks.   The result is this:    Of course it's been done manually, but I was thinking of a way of making it done automatically because I must do 30 blocks like this one, maybe more, and it is consuming a lot of my time. Prove the following equality using mathematical induction: Prove the following equality using mathematical induction: For any integer $n \ge 1$  $$\sum_{i=1}^{n} \frac{1}{i(i+1)} = \frac{n}{n+1}$$  I understand for the base base I need to have $n=1$. If I substituted $n$ for 1 and $i$ for 1 I would get   \begin{align} \sum_{i=1}^{1} \frac{1}{1(1+1)} &amp;= \frac{1}{1+1} \\ \sum_{i=1}^{1} \frac{1}{2} &amp;= \frac{1}{2} \end{align}  As for the inductive step, I inputted $n +1$ but it did not work for me because honestly I did not know what to do with the $i$ and what I should do next.  How would I go about doing the next step and an explanation for $i$ would be helpful. Figure subfigure layout with different numbers Note: The legacy Skype for Linux application (v4.*) is now discontinued and was removed from Canonical’s partner repositories, so this question and its answers are obsolete. Please refer to  of our .  Skype 4.3 is just released with considerable improvements. As a regular Skype user I want to use the latest Skype on my Ubuntu 14.04, but there is no updates from Update Manager. Even in Skype website only Skype 4.3 is available only for Ubuntu 12.04. Is there anyway to use this latest Skype on Ubuntu 14.04 or how much we have to wait for the update? Identify $P(2014)$ if $P(i)=1/i$ for every positive integer $1\le i\le2013$ What is the preferred way to remove spaces from a string in C++? I could loop through all the characters and build a new string, but is there a better way? VS Code Salesforce plugin deploy does not provide an error message VS Code plugin for salesforce seems to be broken yesterday, It does not provide proper error message in case of failure.  Tried this in a developer org as well as scratch org. Neither deploy code or push gives an error message, and every time we need to go to Salesforce setup -> Deployment Status to view the details.  Is anyone aware of any workaround? I have a psd that has rounded rectangle. I need to create a new rounded rectangle with the same radius. How do I determine the radius used on that said rounded rectangle?   I feel like this is such an awful question but thanks in advance for answering. This question is from PDE by Evans, 1st edition, Chapter 5, Problem 14. It has been posted  previously, however, I cannot quite put all the information together from the responses there. Hopefully you can help me now. The problem is as follows:     Let $U$ be bounded with a $C^1$ boundary. Show that a ''typical''   function $u \in L^p(U) \ (1 \leq p &lt; \infty)$ does not have a trace on   $\partial U$. More precisely, prove there does not exist a bounded   linear operator      \begin{equation} T:L^p(U) \to L^p(\partial U) \end{equation}      such that $Tu = \left. u \right|_{\partial U}$ whenever $u \in C(\overline{U}) \cap L^p(U)$.   So what we're trying to find is a bounded sequence of functions that go to infinity at the boundary, correct? Because then $Tu = \left. u \right|_{\partial U}$ is undefined.  I like the idea of using the $\mathrm{dist}(x, \partial U)$ function to do this. I was thinking about defining the function  \begin{equation} u(x) = \frac{1}{\mathrm{dist}(x,\partial U)}, \end{equation}  which must be in $L^p(U)$ since $U$ is bounded (hence integral of $\varepsilon$ over $U$ is finite, right?). But this function is not continuous at the boundary, and so $u \notin C(\overline{U})$. Can this be modified somehow?  Another option is to use that the boundary is $C^1$. So for each $x^0 \in \partial U$ there exists an $r &gt; 0$ and a $C^1$ function $\gamma : \mathbb{R}^{n-1} \to \mathbb{R}$ such that $U \cap B(x^0,r) = \{ x \in B(x^0,r) \ | \ x_n &gt; \gamma(x_1,\ldots, x_n) \}$. So around every point on the boundary we can find a ball where the n'th coordinate is greater than the $C^1$ function $\gamma$. How can we use this? how to pass value like 100,102,103 to view params I am trying to zoom plot numbers.Plot numbers like 1 10-12 13/P road 20(A) 100&amp;102 and etc.I am able to zoom to all combination plot numbers except 1,2,3.when I pass such value its trowing error:  1 feature types requested, but found 2 view params specified  geoserver sql view is:  select * from plotboundary where nmindar='%nmindar%' and plno='%plno%'   default values and validation are  Name  | Default Value   | validation  nmidar| Hanagawadi I A  | ^[\w\d\s]+$  plno  |  100,102&amp;103    | ^[ A-Za-z0-9_ *@.\/#&amp;+-\,()-_]*$   ajax function:   $.ajax({             url: 'http://XX.168.1.XX:8089/geoserver/XX/ows?service=WFS&amp;version=1.0.0&amp;request=GetFeature&amp;typeName=XX:vwplot&amp;maxFeatures=5000&amp;outputFormat=text/javascript',             contentType: 'application/json',             dataType: 'jsonp',             jsonpCallback: "parseResponse",             data: {                 viewparams: "nmindar:" + nmindar + ";plno:" + plno             }   Can any one tell me how to pass value to viewparams in geoserver, value includes comma. For example as mentioned above "100,102&amp;103" is a single value(plot number).Here   comma is not a separator. Why would turning off a sink faucet stop the shower? Too many blanks between summation symbol and its associated expression changed primary email in google account. how to log in? I added gmail to my google account. Now when i try to log into stack exchange using google it prompts me to create a new account instead of using the existing.   The google account is still the same but google changed the primary email adress.  How can i log in again? Getting filesystem path of class being executed Nignx - worker_connections are not enough I don't know what is going on. I double value for worker connections but it still return error.  server { server_name xxx.com;  root /var/www/web; index index.html index.htm index.php; error_log /var/log/nginx/error.log; location / { proxy_http_version 1.1; proxy_set_header   Host $http_host; proxy_set_header   X-Real-IP $remote_addr; proxy_set_header   Upgrade $http_upgrade; proxy_set_header   Connection "upgrade"; proxy_cache_bypass $http_upgrade; proxy_pass         http://127.0.0.1:7777; }        listen 443 ssl; # managed by Certbot     ssl_certificate /etc/letsencrypt/live/xxx.com/fullchain.pem; # managed by Certbot     ssl_certificate_key /etc/letsencrypt/live/xxx.com/privkey.pem; # managed by Certbot     include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot     ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot  } server {     listen 80;     server_name xxx.com;     return 301 https://$host$request_uri; # managed by Certbot  }   Everything is okej with this code?  ERROR:  Firstly was:  worker_connections are not enough worker_connections are not enough   Now is  27513#0: accept4() failed (24: Too many open files) 27513#0: accept4() failed (24: Too many open files) 27513#0: accept4() failed (24: Too many open files) 27513#0: accept4() failed (24: Too many open files) Labels disappear while zooming