Filling objects in object array, null pointer exception
What is a NullPointerException, and how do I fix it?
Show that an integer of the form $8k + 7$ cannot be written as the sum of three squares. I have figured out a (long, and tedious) way to do it. But I was wondering if there is some sort of direct correlation or another path that I completely missed.  My attempt at the program was as follows:   A number of the form, $8k + 7 = 7 (mod 8)$. That is, we are looking for integers a, b, c such that $a^2 + b^2 + c^2 = 7 (mod 8)$.   LONG and TEDIOUS way: $$(8k)^2 = 0 (mod 8)$$ $$(8k+1)^2 = 1 (mod 8)$$ $$(8k+2)^2 = 4 (mod 8)$$ $$(8k+3)^2 = 1 (mod 8)$$ $$(8k+4)^2 = 0 (mod 8)$$ $$(8k+5)^2 = 1 (mod 8)$$ $$(8k+6)^2 = 4 (mod 8)$$ $$(8k+7)^2 = 1 (mod 8)$$  That is, using three of these modulo there is no way to arrive at  $$a^2 + b^2 + c^2 = 7 (mod 8)$$ How do you make an image emission without washing out the image? How to remove time from date? Universe being flat and why we can't see or access the space "behind" our universe plane? I'm a layman, but i watched some intereting videos about big bang on youtube[michio kaku, hawking this kind of things, not some crackpots :)]   I described everything on my picture:     So is there any possibility to see that inner side, for example, by creating wormhole, or entering new dimension? Or i get something wrong, on the way, and my model is totally wrong?  And another question. I heard that even if you would fly a ship across the universe you would eventually end in the place where you started, because we live in a 3d space that is defined on a surface of big sphere. But why a big sphere? Universe might be a big mobius strip, and the same principle of ending at start will apply. Is it possible?  Thanks in advance, and please don't bash me for silly questions. Im just curious, but i don't have any degree in physics. Im also not an english native speaker. I installed or upgraded to Ubuntu 16.04, but I'm having some problems with my graphics card.   The display is blank The display flickers Items on the screen do not display correctly Certain programs complain of graphics issues The computer boots to low-graphics mode Your specific issue may not be here, but try the solutions described in the answers anyway.   This question is very broad, but each one of these issues likely has one solution.    If you are experiencing a login loop, check the last part of my answer.    If you experience one of the listed issues and have your own solution (mine didn't work, or there's a faster way), feel free to post another POLITE answer, describing your problem and how you fixed it.    Those attempting to install Ubuntu, please refer to the section titled: If you are unable to enter a TTY or are trying to install Ubuntu. I have an Excel file that has a bunch of VBA and macro code in it.  When I open the file in Excel I can choose not to 'enable' them - so the values in the fields all stay as they were during the last save.  I need to manipulate the values as they were last saved - so I don't want the macros (which look at the current date and update values accordingly) to run.  When I open it via our dot net code:   Dim oxlRep As Excel.Application Dim oWBRep As Excel.Workbook Dim oSheetRep As Excel.Worksheet Dim oRngRep As Excel.Range oxlRep.Open(path)   the vb code runs - throwing off the values.  I've been looking for a way to open it without macros, or in 'secure' mode where the macros aren't run.  If I simply double click the file and don't choose to enable macros the values are all there as I want them.    Usually we run this code within the month that the files are created, so we haven't seen this problem in the 3 or 4 years that it has been working.  Now I need to go back to some of the old files and run some archival code...    Anyone have a suggestion? can't send email to addresses at my own domain How do I change my Stack Exchange password? How do I change my password?  I have a Stack Exchange account but can't seem to find the option to change my password.  Help please? If $x_1 = 3$, $x_{n+1} = \frac{1}{4-x_n}$ for $n \geq 1$, prove the sequence is bounded below by $0$, above by $4$. If $x_1 = 3$, $x_{n+1} = \dfrac{1}{4-x_n}$ for $n \geq 1$, prove the sequence is decreasing and bounded below by $0$, above by $4$.  Want to show: $0 &lt; x_{n+1} &lt; x_n &lt; 4$  I decided to do the bounded part first.    Base Case, $n=1$  $0 &lt; 3 &lt; 4$ [works]  IH  Suppose $0 &lt; x_k &lt; 4$, for some $k\in\mathbb{N}$  IS  Show $0 &lt; x_{k+1} &lt; 4$  We know $x_{k+1} = \dfrac{1}{4-x_k}$  We also know that $0 &lt; x_k &lt; 4$, by IH.  So we have:  $$\dfrac{1}{4} &lt; x_{k+1} &lt; \infty$$  But this doesn't show the boundness. Where have I went wrong? Add an API key to QGIS for QOSM layer How can I improve viewport performance when using Dyntopo? I'm doing a Blendercookie course on how to sculpt a Scifi weapon with dyntopo. The fact is that when some piece reach a certain level of compleiity (about 1.1 million tris) the systems starts to lags too much and is so frustrating.  I've tried the several options:   Disable double sided lighting Enable VBO    I've so also reduced the topology of hidden faces. But that´s how far I've reached.  I'm using a late Imac Intel I5 Nvidia GPU GTX 680mx  any tips out there? I mean 100+ MB big; such text files can push the envelope of editors.  I need to look through a large XML file, but cannot if the editor is buggy.  Any suggestions? Is there a way to adjust the torch/flash brightness level on an iOS device? I realize this isn't possible, but I can't see why not, especially if you change the model a little bit so that the balls simply travel through a tube of water on the way up, rather than exactly this model.  Please be clear and detailed.  I've heard explanations like "the balls wouldn't move" but that doesn't do it for me - I really do not see why the balls on the right would not be pulled/pushed up, and the rest of the chain wouldn't continue on. How can brackets be escaped in using string.Format? For example: String val = &quot;1,2,3&quot; String.Format(&quot; foo {{0}}&quot;, val);  This example doesn't throw an exception, but it outputs the string foo {0}. Is there a way to escape the brackets? Creating point features with exact coordinates in QGIS Converting a Java Keystore into PEM Format I am trying to convert from a Java keystore file into a PEM file using keytool and openssl applicactions. But I could not find a good way to do the conversion. Any ideas?   Instead of converting the keystore directly into PEM I tried to create a PKCS12 file first and then convert into relevant PEM file and Keystore. But I could not establish a connection using them. (Note that I just need a PEM file and a Keystore file to implement a secured connection. There is no restriction like "Start from a java keystore file". :) So starting from other formats is acceptable with my case)  But a direct conversion method from jks to pem is preferable. This is one of the possible ways I come out:  struct RetrieveKey {     template &lt;typename T&gt;     typename T::first_type operator()(T keyValuePair) const     {         return keyValuePair.first;     } };  map&lt;int, int&gt; m; vector&lt;int&gt; keys;  // Retrieve all keys transform(m.begin(), m.end(), back_inserter(keys), RetrieveKey());  // Dump all keys copy(keys.begin(), keys.end(), ostream_iterator&lt;int&gt;(cout, "\n"));   Of course, we can also retrieve all values from the map by defining another functor RetrieveValues.  Is there any other way to achieve this easily? (I'm always wondering why std::map does not include a member function for us to do so.) How do I prompt users with a GUI dialog box to choose file/directory path, via the command-line? Highest power of a prime $p$ dividing $N!$ How does one find the highest power of a prime $p$ that divides $N!$ and other related products?  Related question: How many zeros are there at the end of $N!$?    This is being done to reduce abstract duplicates. See   and  for more details.