import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner;  public class testing {      public static int[] populationVectorFicheiro;     public static double[] survivalMatrixFicheiro;     public static double[] birthMatrixFicheiro;     public static double[][] matrizLeslieNaoInterativo = new double[survivalMatrixFicheiro.length + 1][birthMatrixFicheiro.length];      public static void main(String[] args) throws FileNotFoundException {         readFileInfo();     }      public static double[] formarVetor(String[] line) {         double[] matrix = new double[line.length];         for (int i = 0; i &lt; line.length; i++) {             String[] numbers = line[i].trim().split(&quot;=&quot;);             matrix[i] = Double.parseDouble(numbers[i]);         }         return matrix;     }      public static double[] getValores(String[] linha) {         double[] matriz = new double[linha.length];         for (int i = 0; i &lt; linha.length; i++) {             String[] objeto = linha[i].split(&quot;=&quot;);             matriz[i] = Double.parseDouble(objeto[1]);         }         return matriz;     }      public static int[] getTotalPopulacao(String[] linha) {         int[] matriz = new int[linha.length];          for (int i = 0; i &lt; linha.length; i++) {             String[] objeto = linha[i].split(&quot;=&quot;);              matriz[i] = Integer.parseInt(objeto[1]);         }          return matriz;     }      public static void readFileInfo() throws FileNotFoundException{         Scanner fileReader = new Scanner(new File(&quot;caes.txt&quot;));         String[] primeiraLinha = fileReader.nextLine().trim().split(&quot;,&quot;);         populationVectorFicheiro = getTotalPopulacao(primeiraLinha);          String[] segundaLinha = fileReader.nextLine().trim().split(&quot;,&quot;);         survivalMatrixFicheiro = getValores(segundaLinha);         for (int i=0; i&lt; survivalMatrixFicheiro.length;i++){             System.out.println(survivalMatrixFicheiro[i]);         }           String[] terceiraLinha = fileReader.nextLine().trim().split(&quot;,&quot;);         birthMatrixFicheiro = getValores(terceiraLinha);          double[][] leslieMatrix = fillMatrix(survivalMatrixFicheiro,birthMatrixFicheiro);         printMatrix(leslieMatrix);      }      public static void printMatrix(double[][] matriz) {         for (int i = 0; i &lt; matriz.length; i++)//Cycles through rows         {             for (int j = 0; j &lt; matriz[i].length; j++)//Cycles through columns             {                 System.out.print(matriz[i][j] + &quot; &quot;);             }             System.out.println(); //Makes a new row         }     }       public static double[][] fillMatrix(double[] survivalMatrix, double[] birthMatrix) {          for (int i = 0; i &lt; birthMatrix.length; i++) {             matrizLeslieNaoInterativo[0][i] = birthMatrix[i];         // preenche a primeira linha         }         int count = 0;         for (int i = 1; i &lt; survivalMatrix.length + 1; i++) {             for (int j = 0; j &lt; birthMatrix.length; j++) {                 if (i == j + 1) {                     matrizLeslieNaoInterativo[i][j] = survivalMatrix[count];                     count++;                 } else {                     matrizLeslieNaoInterativo[i][j] = 0;                 }             }         }         return matrizLeslieNaoInterativo;     }  }  I currently have this code in Java for some testing for a bigger project. I'm trying to create some public variables to use throughout my bigger project, but I keep getting an error while trying to use them here. Whenever I create a public matrix with other public variables as its parameters, I keep getting an error:  Exception in thread &quot;main&quot; java.lang.ExceptionInInitializerError Caused by: java.lang.NullPointerException: Cannot read the array length because &quot;testing.survivalMatrixFicheiro&quot; is null  Is there anyway to fix this? I need to keep that matrix as a public variable for other methods on the bigger project.
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?
Schwarz's Lemma, fixed points question This is from an old qualifying examination question.  If f is holomorphic in the unit disk $D$ and $|f(z)|&lt;1$ for all $z\in D$. Suppose also that $f$ has two distinct fixed points in $D$ then $f(z)=z$ for every $z\in D$  I know that I have to use the Schwarz's lemma and may be make use of Möbius transformations. I tried setting $g(z)=\phi_a\circ f\circ \phi_{-a}$. But that does not seem to work because I don't see why $|g(z)|=|z|$ for some non zero $z$.   Any helpful hints are greatly appreciated.  Edit: Of course the $a$ above is one of the fixed points. Simulate limited bandwidth from within Chrome? Reflection is quad dependent and looks non realistic Im rendering varous objects with a Sharp glossy effect but the reflections are quad dependent on the object (image below), meaning they behave separately within every quad making it look 8bit-like. Can anyone tell me why this happens?. (Im pretty sure subdividing would fix it but I want to know why I cant have a low poly object reflecting normaly.  The object has 2 modifiers: Subdiv Surface and Solidify. (Perhaps the Subdiv is causing it?). Help me you Blender savys I dont have a powerful CPU to test and test within every render would take me hours and hours.  Image: What does 2>/dev/null mean? I would like a brief explanation of the following command line:  grep -i 'abc' content 2&gt;/dev/null How many different/unique $4$-letter arrangements are there of the letters in the word Mississauga?  I'm thinking we need permutations? I already tried finding each letter and still don't get it... any help?   So far I've broken it off to:-  $M=1$  $I=2$  $S=4$  $A=2$  $U=1$  $G=1$  However, I don't really know what to do next. Which way should arrows point in a collapsible accordion? Left/down … down/up? Reading notification on website should clear native Android notification I think it would be nice if you read an inbox notification on the desktop version of the site, it should dismiss the native Android notification in the system tray. It seems kind of weird when I come back to my phone an hour later, and find a bunch of notifications I thought a dealt with... and come to find out I really did deal with them. I'm trying to send an E-mail message using Gmail to a contact group where some of the contacts have more than one E-mail address and I want to send the mail to all of them.   Is there a way for me to do that? Programmatically selecting non adjacent Cells I just reinstalled my Ubuntu system with 11.10, but ran into a problem when I tried to install Gimp 2.7.  I always get unmet dependencies (it's german, so I can't tell you the exact english translation):     Needs gimp-data (&lt;= 2.6.11-z) but 2.7.3-2011082002~oo should be installed   I already read the follow post, but the answers didn't really help me.  When I type in     sudo apt-get install gimp=2.6   it just says that there is no version 2.6 found. I get the same with 2.7.  I really need Gimp. But installing Gimp 2.6 isn't possible as well.  When I remove the repos for 2.7, I still get the same error. What does E mean in 9.0122222900391E-5? I often find this at the bottom of pages.  Page generated in 0.00013899803161621  Sometimes, I come across  Page generated in 9.0122222900391E-5  What does that time mean? I tried searching Wikipedia for E and maths but found the . My guess is E stand for Exponential and -5 is the power it is raised to. And the displayed time is a really small number. But that doesn't make sense when compared to the other time in the question. 0.00013899803161621 is bigger than 9.0122222900391E-5. If it means x times $10^{-5}$, then 9.0122222900391E-5 will be 0.000090122222900391 which is smaller than 0.00013899803161621. What does E stand for? Prove that $ n^3 + 5n$ is divisible by 6 for all $n\in \textbf{N}$ Prove that $ n^3 + 5n  $ is divisible by 6 for all $ n \in \textbf{N} $.  I provide my proof below. Is infinite scrolling justifiable? Recently I've noticed a new trend in user interfaces. Facebook and Twitter do this, and I've come across it on other random, less famous sites. However, to keep things simple, I'll just use Facebook as an example.  When you first log into Facebook, you are presented with a "News Feed" that has a certain amount of posts from your friends. The feed extends down past the bottom of the viewport.  Then, when you scroll down, to see the feeds "below the fold", at some point as you move downward, it loads in more items. Apparently, this is called "infinite scrolling".  On my computer, this often causes my position in the feed to jump while I'm in the action of scrolling, which is really annoying.  What's particularly egregious about this UI concept is that there is footer information at the bottom of the page. I advertise on Facebook, and use the link at the bottom of the page to get to the advertisement management interface.  Because of this incremental load feature I'm describing, I often scroll down to the bottom to get to the link I want, when I reach the bottom of the page, it will suddenly load in new data, pushing the footer down again, and I have to scroll down again.  This whole thing seems completely pointless to me. What's the upside? A Facebook page is near a megabyte of data, so saving the few extra kilobytes of feed data for when the user scrolls down is just not worth it.  What's wrong with a link that just says "show more"?  Since this additional data retrieval thing seems to happen as soon as I start scrolling even a little anyway, why not just load that data in the first place?  To me this minor annoyance reeks of some engineers concept of a "neat trick" that does not have any actual appreciable upside.  Or am I wrong about that? Is there an advantage that I'm not seeing? Am I the only one who thinks it's stupid? Do some people like it? VLC will not install (Built-in) way in JavaScript to check if a string is a valid number I'm hoping there's something in the same conceptual space as the old VB6 IsNumeric() function? JAVA Bad variable reference? Receiving strange output - possibly memory address? Using induction prove $n^3-n$ is divisible by 3 whenever n is a positive number. I am not sure if I am doing this right, but I have this:  There exists an integer $k$. $2k =$ positive number  $(2k)^3 - 2k$ [*And this is where I get lost. How does one prove this?] In my bash script I have an external (received from user) string, which I should use in sed pattern.  REPLACE="&lt;funny characters here&gt;" sed "s/KEYWORD/$REPLACE/g"   How can I escape the $REPLACE string so it would be safely accepted by sed as a literal replacement?  NOTE: The KEYWORD is a dumb substring with no matches etc. It is not supplied by user. Give an example of three positive integers m, n, and r "You're too clever a man" You're too clever a man to imagine this.   The above sentence was , a man of excellent rhetorical skills.   Since he said it, I doubt it's wrong, grammatically. But, I wonder if there is an explanation for this. Because adjectives always come after the article not before it. e.g. You're a clever man.   How could this be, grammatically?