Don't get the solution of this java NullPointerException
What is a NullPointerException, and how do I fix it?
making a big summation sign How can I make a big summation sign?   ‎\begin{align}‎ ‎\cos x‎ ‎=‎ ‎‎\sum\limits‎_‎{n=0}^{‎\‎‎infty‎} ‎\frac{(ix)^{2n‎}}{(2n)!}‎‎ \end{align}‎   this is the code which I'm using for summation Cannot inherit from multiple classes defining __slots__? Let's say I have  on the board. He is a 2/2 that says:  Whenever another creature enters the battlefield under your control, creatures you control get +1/+1 until end of turn.  I play a . It says:  Put three 1/1 red Human creature tokens with haste onto the battlefield. Sacrifice those tokens at the beginning of the next end step.  The sacrifice portion is not important to this question. What is important is how these two cards interact with each other. Playing this card in my first main phase, assuming no counters or other shenanigans by my opponent, I will have my Commander and 3 tokens on the battlefield. What will happen in terms of the power/toughness of my tokens and Commander? Option A The tokens will be 1/1 each. They don't see each other come in at all. The Commander is 3/3, as one &quot;enter the battlefield&quot; trigger happens. Option B The tokens will be 1/1. They don't see each other come in at all, because they weren't on the battlefield to see any of the triggers. The Commander is 5/5, as he saw three &quot;enter the battlefield&quot; triggers occur. Option C The tokens will all be different, with one being 3/3 as he saw the other two come in, one being 2/2 as he saw only the last one come in, and 1/1 as the last one saw none come in. Option D The tokens will all be 4/4, as three creatures entered the battlefield this turn. I am obviously hoping for this option. It may be supported by a ruling on Goldnight Commander that says, emphasis mine:  The creature that entered the battlefield will also get +1/+1 until end of turn if it's still on the battlefield when the ability resolves.  The key being the ability resolving. So my thought is thus:  Thatcher Revolt goes on the stack. Thatcher Revolt resolves, and three separate &quot;enter the battlefield&quot; triggers go on the stack as the three humans enter the battlefield as 1/1. The last (it is a stack) &quot;etb&quot; trigger resolves. This puts an ability from Goldnight Commander on the stack. This resolves and the humans are now all 2/2. The next &quot;etb&quot; trigger resolves. This puts a new ability from Commander on the stack, and resolves with the humans being 3/3. The first &quot;etb&quot; trigger finally resolves, puts a Command ability on the stack, which resolves putting the humans at their final state of 4/4.  Option E The tokens will all be 2/2.  Thatcher Revolt goes on the stack. Thatcher Revolt resolves, and one single &quot;enter the battlefield&quot; trigger goes on the stack. The &quot;etb&quot; trigger resolves. This puts an ability from Goldnight Commander on the stack. This resolves and the humans are now all 2/2.  I would really like to have a complete understanding both of the result and how this result is calculated by the game engine. Long-distance movement arrow in gloss I have a question on drawing an arrow using gb4e. Currently, I am trying to use the method described in the link below. The problem takes place when I draw the long distance arrow like (5). As you can see the picture below, the line cross over the gloss. I would like to draw the horizontal line like the example (1). How can I evacuate the crossing?    \documentclass[11pt, dvipdfmx]{article} \usepackage{tikz} \usetikzlibrary{calc} \newcommand\tikzmark[1]{\tikz[remember picture, baseline=(#1.base)] \node[anchor=base,inner sep=0pt, outer sep=0pt] (#1) {#1};}  % This code from http://tex.stackexchange.com/q/55068/2693 \tikzset{     ncbar angle/.initial=90,     ncbar/.style={         to path=(\tikztostart)         -- ($(\tikztostart)!#1!\pgfkeysvalueof{/tikz/ncbar angle}:(\tikztotarget)$)         -- ($(\tikztotarget)!($(\tikztostart)!#1!\pgfkeysvalueof{/tikz/ncbar angle}:(\tikztotarget)$)!\pgfkeysvalueof{/tikz/ncbar angle}:(\tikztostart)$)         -- (\tikztotarget)     },     ncbar/.default=0.5cm, }  % Thanks to Paul Gessler adn Percusse for code improvement here \newcommand{\arrow}[2]{\begin{tikzpicture}[remember picture,overlay] \draw[-&gt;,shorten &gt;=3pt,shorten &lt;=3pt] (#1.base) to [ncbar=\arrowht] (#2.base); \end{tikzpicture} \setlength{\arrowht}{0ex} } \usepackage{gb4e} % The following code modified from  % http://permalink.gmane.org/gmane.comp.tex.linguistics/1036 % This adds some extra space after the first line \newlength{\arrowht} \setlength{\arrowht}{0ex} \newcommand*\cgdepthstrut{{\vrule height 0pt depth \arrowht width 0pt}} \renewcommand\eachwordone{\cgdepthstrut\rmfamily} \renewcommand\glt{\vskip -\topsep} \let\trans=\glt \newcommand\arrowex{\setlength{\arrowht}{2.5ex}\ex}   \begin{document} \begin{exe} \ex\label{scramble-det} \begin{xlist}         \arrowex          \gll          \ldots dat Jan \tikzmark{een} auto gisteren \tikzmark{t}  gekregen heeft.\\         \ldots that John a car  yesterday t gotten has \\         \ldots that John a car yesterday.         \arrow{t}{een} \end{xlist} \end{exe}  \begin{exe} \ex\label{scramble-dets} \begin{xlist}         \ex          \gll          \ldots dat Jan een auto gisteren t gekregen heeft.\\         \ldots that John a car  yesterday t gotten has \\         \ldots that John a car yesterday. \end{xlist} \end{exe}  \begin{exe} \ex[]{     \gll     John-wa totetumonaiukurai baka-da.    \\     John-Top very stupid-cop \\     `John is very studip.'     }  \ex[]{     \gll     John-wa totetumonaiukurai dousiyoumonai tondemonai sukuigatai baka-da.    \\     John-Top very very very very stupid-cop \\     `John is very studip.'     }  \arrowex[]{     \gll     \tikzmark{John}-wa totetumonaiukurai dousiyoumonai tondemonai sukuigatai  \tikzmark{t} baka-da.    \\     John-Top very very very very stupid-cop \\     `John is very stupid.'         \arrow{t}{John} }  \end{exe}  \end{document} Why do universal constants have the values they do? It would be nice to see what users have recently been active. This is somewhat standard with many forum-style websites, showing how active the site has been in the last n-minutes or so. As a functional advantage, this also serves to let you know when is a good time to get a question in. I just read a book "Linear Algebra and Its Applications 4E" by David C. Lay. The book is (should be) LaTeX typeset. The matrix and equations are so nice, please see the following 3 examples:        It's so beautiful, so I want get the same effect inside my paper. Here is my code:   \usepackage{amsmath} \usepackage{colortbl} \newcommand\y{\cellcolor{clight2}} \definecolor{clight2}{RGB}{212, 237, 244}%  %%% \[A=\left[ \begin{array}{ccccc} \y 0 &amp; -3 &amp; -6 &amp; 4 &amp; 9 \\    -1 &amp; \y -2 &amp; -1 &amp; 3 &amp; 1 \\ -2 &amp; -3 &amp; 0 &amp; \y 3 &amp; -1 \\ 1 &amp; 4 &amp; 5 &amp; -9 &amp; -7      \end{array} \right]\]  \[A=\left[\begin{array}{cccccc} \rowcolor{clight2} 3 &amp; -9 &amp; 12 &amp; -9 &amp; 6 &amp; 15\\ 0 &amp; 2 &amp; -4 &amp; 4 &amp; 2 &amp; -6 \\ 0 &amp; 3 &amp; -6 &amp; 6 &amp; 4 &amp; -5 \end{array} \right]\]   And the result:     But how to add these arrows?? Should one ask generic or specific question? Let's assume that one has some problems with coding or designing specific project. Should one ask general question about techniques, algorithms, generic problem (anonymising the project references), or should one ask about specific problem in specific problem? Or perhaps something in between?  Example:   generic: Cross-browser implementation of “HTTP Streaming” (push) AJAX pattern specific: How to implement AJAX-y 'incremental blame' view in gitweb (git web interface in Perl)?   If one should ask generic questions, how to anonymise problem? If one should ask specific question, how avoid 'homework' syndrome? Tweaking AStar to find closest location to unreachable destination I've implemented AStar in Java and it works ok for an area with obstacles where the chosen destination is reachable.  However, when the destination is unreachable, the calculated "path" is in no way to the closest location (to the unreachable location) but is instead some random path.  Is there a feasible way to tweak AStar into finding the path to the closest location to an unreachable destination? (already output) in Debug logs I am trying to add a list into an another nested list before adding values of a list to nested list it is getting the correct value but after adding i am getting (already output) in debug log when i checked.    public List&lt;String&gt; fieldName {get;set;}  public List&lt;List&lt;String&gt;&gt; fileValuesXML; // To get the field values of xml  for(Dom.XMLNode child : SalesforceObjecet.getChildElements()) {                        objecetName = child.getText();             system.debug('Object Name in XML field  ' + objecetName );              for(Dom.XMLNode subchild : child.getChildElements())              {                 system.debug('Sub child ' + subchild.getText() );                 for(Dom.XMLNode subchildfield : subchild.getChildElements())                 {                     system.debug('Sub child Field ' + subchildfield );                     fName  = subchildfield.getText();                     fieldName.add(fName);                     //fileValuesXML.add(fieldName);                     //system.debug('Filed Name in XML field  ' + fieldName);                 }                  system.debug('Filed Name before affing to filevalueXML  ' + fieldName);                                     fileValuesXML.add(fieldName);                 fieldName.clear();                 system.debug('Filed Name after affing to filevalueXML  ' + fileValuesXML);             }    }    I am getting values in debug log as:     Filed Name before affing to filevalueXML  (AccountSource, field3)   Filed Name after affing to filevalueXML  ((), (already output),   (already output)) Cannot see OpenLayers under Plugin in QGIS? Although I have installed the OpenLayers plugin in QGIS 2.4, I cannot see it in the list when I click on Plugins.    Does anyone else have this issue? Why does the new review page sometimes shows questions to vote to close without anybody having voted to close it? Delay in approval leads to missing out on being awarded an "Explainer" badge Why can't I mine diamond, gold ore, or redstone ore? Normal blocks I can mine fine, but when it comes to diamond and gold ores, the block just gets "destroyed" (as in you can't pick it up). I'm playing on multiplayer with no spawning monsters. If $f:E\rightarrow S$ is an elliptic curve over a scheme $S$ (so $f$ is proper and smooth of relative dimension one with geometrically connected fibers of genus one, equipped with a section $0:S\rightarrow E$), then is the sheaf $\underline{\omega}_{E/S}:=f_*\Omega_{E/S}^1$ actually free of rank one? According to the statement of Grothendieck-Serre duality in Hida's book Geometric Modular Forms and Elliptic Curves, there should be a canonical isomorphism $\underline{\omega}_{E/S}\cong\mathcal{Hom}_{\mathscr{O}_S}(R^1f_*\mathscr{O}_E,\mathscr{O}_S)$, and the first result on elliptic curves in this book is that $R^1f_*\mathscr{O}_E\cong\mathscr{O}_S$. It's also not clear to me whether $S$ is being assumed (locally) Noetherian, but if that's necessary for Grothendieck-Serre duality to hold, then I'm fine with assuming it. I can't find another reference with a statement of Grothendieck-Serre duality in this generality which does not use the language of derived categories (which I unfortunately don't understand).  The reason I'm kind of skeptical about this is that in Hida's book, as well as in Katz-Mazur, it is said that $\underline{\omega}_{E/S}$ is invertible, so that an $\mathscr{O}_S$-basis $\omega$ for $\underline{\omega}_{E/S}$ can be found locally on $S$. If the invertible sheaf in question were really trivial then one would be able to choose a global $\mathscr{O}_S$-basis for $\underline{\omega}_{E/S}$, and there would be no reason to talk about doing so locally. Hida goes on to say that, choosing an $\mathscr{O}_S$-basis $\omega$ locally on $S$ allows one to regard $(\Omega_{E/S}^1,\omega)$ as a relative effective Cartier divisor in $E/S$, which also doesn't make complete sense to me because if we can only find $\omega$ locally, how are we getting a global section $\omega\in H^0(E,\Omega_{E/S}^1)=H^0(S,\underline{\omega}_{E/S})$ (unless $\underline{\omega}_{E/S}$ really is trivial)? Take most recent (or concatenate) edit comments when editing during grace period Recently, I edited  to update a link to a better resource. I clicked "Save" without entering a description of the edit (edit #1).  Then I realised that the question was asked by a new user who may not be able to easily identify the change that was made. So I edited it again, this time only to add a detailed edit description (edit #2).  Since edit #2 was made during the grace period (within 5 minutes of edit #1), the system has merged them into a single edit, but only the edit comment from edit #1 was recorded in the revision history, whereas edit #2's comment was simply discarded/ignored.  I'd suggest that either the most recent (non-default) edit comment is taken or that the comments are concatenated to provide a more useful edit history I own a Panasonic DMC-G81 (same as G80/G85) with in-body Image Stabilization.  When turned on everything is just fine, but when turned off, the sensor is wobbling around in the body. When no lens attached, it's clearly visible moving about 1/2 cm in the body. I didn't find anything about it in the internet. Shouldn't the sensor be in a kind of parking position, should I worry about the sensor ?  I'm not sure if that is the usual behavior, maybe someone with the same or similar body can have a look. In SQL, what's the difference between count(column) and count(*)? In Java, is there any way to use the JDK libraries to discover the private classes implemented within another class? Or do I need so use something like asm? How to make generated classes contain Javadoc from XML Schema documentation