I'm getting a NullPointerException when I try to populate my ComboBox, I have my class implementing Initializable.       private ObservableList&lt;String&gt; incomeList = FXCollections.observableArrayList("Regular", "Other");     private ObservableList&lt;String&gt; expenseList = FXCollections.observableArrayList("Food", "Entertainment", "Rent",             "Bills", "Other");   @Override public void initialize(URL location, ResourceBundle resources) {      incomeComboBox.setItems(incomeList);      expenseComboBox.setItems(expenseList); }   I just want the ComboBoxes to be filled.  Thanks.
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?
How do you deal with a player that's determined to play the game in a way that is detrimental to the advancement of the story? How many switches can be stacked/interconnected? I would like to know how many switch can be stacked with fiber channel to get a best transfer rate between computers.  I have 200 computers connected to 12 3Com switches. All switches have two fiber ports.  Is the best way to have fiber backbone switch and connect fiber channel from every switch to the backbone? Or connect switch 1 to switch 2 to switch 3 to ... switch 12 to switch 1 again?  Thanks! Creating Inky-looking characters in Blender I'm involved in a project to do with ink animation and experimentation. I found this incredible piece of animation:    I originally thought this was some sort of After Effects compositing (is it even possible in AE?!), but found out that this particular animation was created in 3DS Max with Krakatoa and FumeFX. I'm just wonder if a similar effect is doable with Blender's smoke simulator.  There are various YouTube videos that have pretty decent results of ink renders from Blender, but I can't seem to find anything of a similar sort of movement animation. Just blobs floating around! The closest thing I found was this animation of a         but again I can't seem to replicate this. The smoke just doesn't seem to follow my character's animation. Any help with this would be greatly appreciated. Thanks. Monic $f(x)\in\Bbb Z[x]$ has no rational root if $f(0)\ \&\ f(1)$ odd [Parity Root Test, Modular Root Test] A polynomial problem from my old algebra textbook:     $f(x)\in\Bbb Z[x]$ with leading coefficient $1$, $\deg f(x)\ge 1$, and both $f(0)$ and $f(1)$ are odd numbers, prove:   $f(x)$ has no root within $\Bbb Q$   Eisenstein's criterion seems to be of little help here because we know virtually nothing about the coefficients. So I tried some other approach. Let $$f(x)=a_0+a_1x+a_2x^2+\cdots+a_{n-1}x^{n-1}+x^n\in \Bbb{Z}[x]$$ What we have known so far is $$f(0)=a_0\text{ is an odd number}$$ and $$f(1)=a_0+a_1+a_2+\cdots+a_{n-1}+1 \text{ is an odd number}$$ from which we can also conclude that $$f(1)-f(0)=a_1+a_2+\cdots+a_{n-1}+1\text{ is an even number}$$ To be honest I don't know how to proceed now. It isn't until just now that I realized "irreduicible" is not equivalent to "has no roots".. So all my previous attempt is fundamentally wrong.. Can anybody help or drop a hint? Best regards! I'm a European citizen living in the US on a work visa. Due to some unfortunate circumstances, I need to urgently visit my home country. However I would like to get back to the US after my visit is complete. Flying from the US to Europe is not a problem as there are still daily flights between some city pairs. However going back could be tricky, as  anyone who has been in the Schengen area in the past 14 days from re-entering the country.   Is there a flight route that would let me from Europe to some country, stay there for 14 days and then fly to the US? Canada is out, as they've banned international visitors. Mexico seems to keep their border open, but I  any direct European flights from their airports. Almost every other country either suspended flights or doesn't allow foreign nationals to enter. Run script as root at login (no sudoer user, shell session) Much like /etc/profile and ~/.profile but ran by root instead of the user is doing login. /etc/rc.local runs after boot but I need running the script before login. The user is not a sudoer one.   Thanks! Are two norms equivalent if they induce the same topology on a vector space? Whenever two norms are equivalent in the sense that $\|x\|_1\le c_1\cdot \|x\|_2$ and $\|x\|_2\le c_2\cdot \|x\|_1$, they generate the same topology. Is the reverse also true, i.e. if a topology is generated by two different norms, are the norms equivalent in the above sense? We know this to be true for $\mathbb{R}^n$, but is it generally true, and if not, what are some counterexamples?  What about a Hausdorff, translationally invariant vector space topology generated by two different metrics, are the metrics equivalent in the sense $d_1(x,y)\le c_1\cdot d_2(x,y)$ and vice versa? Derangements with repetitive numbers I have a very simple problem.  Lets assume that I have a well shuffled deck of 52 cards. I start drawing the top card always and when the card matches its rank I lose. J=11 Q=12 K=13.  If there were only 13 cards I could easily use the $\ \frac{!n}{n!}$ for derangements in order to solve this. The problem is that there are 52 cards so when I pass 13 I start from 1 again so I don't know what is the probability to win. Example of the game     1st card: 4 - Continue   2nd Card: A - continue   3rd Card: K - Continue   4th Card: K - Continue   5th Card: 6 - Continue   6th Card: 9 - Continue   7th Card: 10 - Continue   8th Card: A - Continue   9th Card: J - Continue   10th Card: 3 - Continue   11th Card: 2 - Continue   12th Card: 8 - Continue   13th Card: A - Continue   1st card: 5 - Continue   2nd Card 2 LOSE   So actually I have to count from 1 to 13 4 times and if I draw all 52 cards then I win. What's the probability? Drush from GitHub stopped working I have a  that has been working since it moved there.  I did a git pull this morning, and am now getting errors:     $ drush      Warning: require(/home/mpd/drush/vendor/autoload.php): failed to open   stream: No such file or directory in   /home/mpd/drush/includes/bootstrap.inc on line 1007      Fatal error: require(): Failed opening required   '/home/mpd/drush/vendor/autoload.php' (include_path='.:') in   /home/mpd/drush/includes/bootstrap.inc on line 1007   How can I fix this? I have a complicated integral to solve. I tried to split ($101 x$) and proceed but I am getting a pretty nasty answer while evaluating using parts. are there any simpler methods to evaluate this integral?  $$ \int\!\sin (101x)\cdot\sin^{99}(x)\, dx $$ Keeping an updated balance (Accounting) I have been struggling trying to find a way to properly and reliably maintain a balance for accounts in an order/payment system.  Currently, the process consists of three tables. Below example is very simplified but gets the point across.  Table one contains the account ID, name, total paid, total orders, balance etc.  Table two contains payments, date, the account ID (FK) and amount.  Table three contains orders, date, the account ID (FK) and amount.  Calculating the balance is of course as easy as  SELECT SUM(payments.AMOUNT) FROM payments WHERE ID = [account] SELECT SUM(orders.AMOUNT) FROM orders WHERE ID = [account]   Followed by some simple addition/subtraction math:  UPDATE accounts SET BALANCE = [balance] WHERE ID = [account]   All good - the problem is - how do I maintain this over let's assume years of activity and many, many transactions?  Currently the accounts table is updated every single time a transaction is made, meaning the above three statements run every time. There is of course an index on the ID column in all three tables, and everything is fast and neat for now, but I work with less than 100,000 transactions, meaning everything fits into the RAM and basically all I throw at the database gets executed immediately. Over time this will change, of course - so how do I handle this?  Is it better to mark the accounts as "dirty" and process balancing in a batch job later, or can I keep updating the balance real-time even when I reach the point where the orders and payments tables will not fit into the RAM?  Do I need to segment the orders and payments and "lock" everything before a given time, such as before last calculation? (I would rather not). I ask because then I could do a SUM WHERE DATE > [last lock timestamp] and update with UPDATE BALANCE = [balance] + [value for last lock] and prevent the problem from outgrowing resources.  I don't need a running balance for each transaction. That's all I can find results for when I try to research this problem. I just care about the total amount paid, the total amount ordered and the balance of accounts.  Why don't I calculate on the fly when I need the balance, you ask? Because one must be able to query the system and ask "Which of my (let's say) 50.000 accounts have a balance below 0?" - something we cannot do easily if we do not store the balance with every account. Proving a triangle with different edge colors exists in a graph. This is again some homework translated (hopefully not too badly) from my book  The graph $K_{n}$ is colored using $n$ different colors, in a way that each color is used at least once. Prove that there exists a triangle with its edges colored in different colors. Hanging indent inside list I would like items in a list to have a hanging indent (that is, for all lines after the first to be indented by a space or more),  but the traditional \hangindent command doesn't work for this.  \documentclass{article}  \begin{document} \hangindent=1cm This line of text has a hanging indent that looks fine, as long as it is outside a list environment. \begin{enumerate} \item \hangindent=1cm This line is inside a list environment and doesn't have a hanging indent- how can I add one? \end{enumerate} \end{document}     How can I add a hanging indent within a list? How to render lightning in Cycles How can you render a lightning bolt using Cycles? Taking notes, I was going to write this:     therefore p′ is a shortest path.   But the topic is APSP which stands for "all pairs shortest paths" so I decided to just write SP instead and...  Is it written with a like this     therefore p′ is a SP   or with an like this (because in my head I would "read" the S)     therefore p′ is an SP How to get reflections from 3D to show up on real images Andrew Price released a nice tutorial on how to nicely put 3D objects on top of a real image:   I have seen images, such as this:  which have 3D elements over images and have actual reflections from the object showing up on the wet asphalt.  How can this effect be achieved using render passes (or any other way)?  Here is another example (from ): Is there any way to create multiple insert statements in a ms-access query? White space below footer Java: Date from unix timestamp Can I travel to Croatia with single-entry Schengen visa? I am traveling to Zurich with a single-entry Schengen visa.  While coming back can I travel to Croatia for 3 days and then return to India (Country of Origin)?