java: Problem on second if condition , NullPointerException
What is a NullPointerException, and how do I fix it?
So I have some ISO stock options (yeah) and three kids in college (boo) so I'm trying figure out the best tax strategy. I was hoping someone help me through the following scenario  Strike Price: $10, 2014 exercise price: $20, 2015 price: $25, 2016 price $30   Lets' assume that all of this happens 2+ years after the grant date and that my "normal" tax bill is right on the brink of the AMT threshold, that the AMT tax rate is 28% and the long term capital gains tax is 15%.   Now I want to run the following scenario  2014: exercise 1000 options 2015: exercise 1000 options, sell the previous years' option after "one year and one day" 2016: sell the 2015 options after "one year and a day"    Tax wise that would look like this  2014: AMT on $10000 of bargain element so $2800 AMT 2015: AMT on $15000 bargain element $4200, long term gain tax on $15000 = $2250 2016: long term gain tax on $20000 = $3000    What's the overall tax liability in each year? I can't figure out how the AMT carries forward when the options are finally sold.   Any good pointers to modeling software, spreadsheets or decent papers would also be appreciated. Can regular expressions be used to match nested patterns? Consider the vectorspace of all real $m \times n$ vectors and define an    inner product $\langle A,B\rangle = \operatorname{tr}(B^T   A)$.    "tr" stands for "trace"        which is the sum of the diagonal entries of a matrix.   How do you prove that $\operatorname{tr}(B^T   A)$ is indeed a inner product?  Kind regards I have this MySQL query:  SELECT DAYOFYEAR(`date`)  AS d, COUNT(*)  FROM  `orders`  WHERE  `hasPaid` &gt; 0 GROUP  BY d ORDER  BY d   Which returns something like this:  d  | COUNT(*) | 20 |  5       | 21 |  7       | 22 | 12       | 23 |  4       |   What I'd really like is another column on the end to show the running total:  d  | COUNT(*) | ??? | 20 |  5       |   5 | 21 |  7       |  12 | 22 | 12       |  24 | 23 |  4       |  28 |   Is this possible? How to distribute the objects on a sphere evenly? I want to replicate this mesh -    I think the best way is using a particle system of cubes. So I need to create a sphere of simple circles. It is necessary that in each circle the vertices are at equal distance from each other. But I don't know how to create those circles. Recently my wife and I traveled to Italy and before we left we got about 85% of our money in travelers checks and the other 15% we carried on in cash. When we arrived there, no one would take our travelers checks and many places did not accept credit cards. Eventually, we found some currency exchange places that would take the travelers checks and give us Euro's, but at a 7-15% fee, which was not really a very fun surprise.   While I was under the impression that it is safer to use travelers checks, it seems that they were not really accepted (the usual explanation being fraud). So the question is, is it best to just exchange your currency at home and carry all of it with you when you travel or are there other alternatives to carrying cash that are safer and cost effective? In the definition of , I read the following text:     Many of the act's provisions were to sunset beginning December 31, 2005, approximately 4 years after its passage. In the months preceding the sunset date, supporters of the act pushed to make its sunsetting provisions permanent, while critics sought to revise various sections to enhance civil liberty protections. In July 2005, the U.S. Senate passed a reauthorization bill with substantial changes to several sections of the act, while the House reauthorization bill kept most of the act's original language. The two bills were then reconciled in a conference committee that was criticized by Senators from both the Republican and Democratic parties for ignoring civil liberty concerns.   What does sunset mean? In which cases can the word be used with a similar meaning? Does Quicksilver's walkman speed up with him? Is "I am sat" bad English? I believe it is incorrect and instead either the present continuous     I am sitting   or the predicate adjective     I am seated   should be used.  I hear this quite often, however, and ultimately usage overrules formality.  Does anybody know where this originated or how to describe it grammatically? How do you return to the default view (the one you see when blender starts)? My passport is expiring; can I still travel? The suffix -phobia means fear of, often irrational fear of.  For example, according to Wikipedia:       or ophiophobia is a particular type of specific phobia,   the abnormal fear of snakes.   Is there a suffix attachable to ophidio- which would describe a person who is not afraid of snakes, except for, say, a coiled rattler encountered on a trail, but who dislikes them and would not willingly share space with one?  Similarly, an  (don't click here if you are at all arachnophobic) is someone who loves spiders.  Is there a suffix for someone who likes spiders but does not love them?  These are Greek suffixes, and the Greeks, theoretically, were in favor of moderation.  So, are there suffixes in use in English, derivable from Greek or not, for moderate like and moderate dislike?    Edit to explain why the question:  "Is there a suffix for loathing" does not answer my question.  My question is NOT about fear and/or loathing.  My question is about moderate dislike (and moderate like).  I can watch a snake cross my driveway with interest, but would not want it in the house or lounging on my patio.   A person who loathed snakes would not be able to admire the smooth motion of the snake as it glided over the rough gravel and disappeared into the woods.  Loathe is very different from moderate dislike; Phobia is very different from caution. Show the series $a_n/(1+a_n)$ converges absolutely Non academic career options for PhD in Math I am thinking of getting my M.S. in Computer Science. I chose C.S. because I enjoy programming and because its a solid choice, career wise.  Low unemployment, good pay, all that jazz.  But my real passions has always been math and lately I have been thinking about swapping and going for my graduate degree in Math. If I went the math route I would probably go full PhD (since I don't think there is much you can do with just a Masters in math).  But as much as I love math, I can't see myself being a math teacher. I would want to work in research or industry, applying math to solve real world problems.    What kind of non-academic jobs are there for someone with a PhD in math (or what is the best resource to see what jobs are out there)? Ubuntu 14.04 multi touch screen support Just installed 14.04. It seems to be converting all my screen touch gestures to mouse gestures. And it only supports one point touch. It is supposed to support ten touch points (tested with windows 8.1).  Am I missing something here? Do I have to install some kind of package? Or is it just not supported?  Test - being able to draw here: There are many addons. Do you know how show it in two cloumns? I have B1/B2 Visa. Can I travel for Business trip to US with this Visa? I have been given B1/B2 Visa, but first time when I had applied, it  was for vacation &amp; holiday. Now I need to go to US for business meetings. Is this Visa good enough or do I have to apply for a B1 Visa again?  Note: I originally applied for vacation purposes, but in my visa it is stamped "R b1/b2" Logical explanation why exponentiation operation is not commutative and associative Considering Peano axioms we'll define addition, multiplication and exponentiation operations.  We can then prove that addition and multiplication operations are commutative and associative. The proof for addition operation is pretty straightforward but for for multiplication it a bit more difficult. For example, to prove associativity, we have to prove distributivity first.  Moreover, for the definition itself it is not obvious that commutativity should take place, because the definition is not symmetric.  $a \cdot 0 := 0$  $a \cdot S(b) := a \cdot b + a$  Here $S(b)$ is the "next" function from Peano axioms  This definition is not symmetric with respect to $a$ and $b$, so commutivity is not obvious.  For exponentiation operation neither commutivity nor associativity take place. And I am very curious about the logical explanation why that happens  NOTE: The explanation I am looking for is somehow similar to a Abel–Ruffini theorem which explains WHY there is no an algebraic solution for a general polynomial equation Calculate first difference by group in R What does the notation like 8.6e-28 mean? What is the 'e' for? I have a problem with the interpretation of a test result in which the p-value is 8.6e-28. How should it be interpreted? What is the e for?  Specifically, I used White's Test for the homoscedasticity assumption of a linear regression:  White's general test statistic :  150.0535  Chi-sq( 9)  P-value =  8.6e-28