Hi im trying to display customer orders that are added to a 'table' class from another class  public class PaymentScreenController {       public ArrayList&lt;Customer&gt; allcustomers; // Defining allcustomers Arraylist         public Table tbl; // Creating instance of Table class       @FXML     public void initialize() {          allcustomers = tbl.getCustomers(); // Error seems to come from here when i assign allcustomers to the getcustomers method of table         System.out.println(tbl.getCustomers());          System.out.println("test");         for (Customer customer : allcustomers) {              System.out.println(customer.getCustomerorder());         }       } }   any help would be appreciated thanks  ** More code*  public void submitorder(ActionEvent actionEvent) throws IOException {         //create a new UNIQUE customer to store that customers menu items         Customer cust = new Customer();         //add items to customer         cust.getCustomerorder().addAll(order);         // Adds the customer order to the table class         tbl.getCustomers().add(cust);         System.out.println(tbl.getCustomers());         //clear menu choices screen         lvOrder.getItems().clear();          // Once added the desired number of customers move to next screen         //extra customer was being added as a customer was put into the ArrayLust after the check happened.         if (tbl.getCustomers().size() == noOfDiners) {             Window mainWindow = btnSubmitOrder.getScene().getWindow();             Parent newRoot = FXMLLoader.load(getClass().getResource("payment_screen.fxml"));             mainWindow.getScene().setRoot(newRoot);         }      }   So the customer adds stuff to their order, and then the customer is added to the table class
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?
Consider the subset $B=\{(x,y):x^2+y^2\leq 1\}\ \subseteq \mathbb{R}^2$. Show that $\vert B \vert = \vert \mathbb{R}^2 \vert$.  It is easy to see tht $f:B\rightarrow\mathbb{R}^2$ defined as $f(x,y)=(x,y)$ is injective.   However, in the book I'm working out of (Book of Proof by Richard Hammack), the other injection noted is  $g:\mathbb{R}^2\rightarrow B$ defined as  $$g(x,y)=\left(\frac{x^2+y^2}{x^2+y^2+1}x,\frac{x^2+y^2}{x^2+y^2+1}y\right).$$  In the book I'm asked to verify this is indeed an injective function.  My approach was to assume $g(x,y)=g(m,n)$ and through basic algebra I was able to deduce  $x(m^2+n^2+1)(x^2+y^2)=m(x^2+y^2+1)(m^2+n^2)$  and  $y(m^2+n^2+1)(x^2+y^2)=n(x^2+y^2+1)(m^2+n^2)$  but how does this show $(x,y)=(m,n)$? Or is this the wrong approach? javac command not found I am trying to compile a java program I found on the internet and it says that I must check if javac is installed. I installed the JDK a long time ago so it should be working but I get command not found error:    how can this be resolved? complex polynomial satisfying inequality After installing Ubuntu 12.04 LTS on my HP Folio 13 I cannot get wireless to work. My kernel is 3.8.0-29-generic and my wireless module is a Broadcom BCM4313.  After running rfkill list all:  0: hp-wifi: Wireless LAN Soft blocked: no Hard blocked: no 1: hp-bluetooth: Bluetooth Soft blocked: no Hard blocked: no 2: hci0: Bluetooth Soft blocked: no Hard blocked: no   The wired connection works fine. The driver activation for Broadcom STA wireless driver fails every time. in the log it says  FATAL: Module wl not found. FATAL: Error running install command for wl   After running lspci -nnk | grep -iEA3 "(wireless|network|wlan)":  02:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01) Subsystem: Hewlett-Packard Company Device [103c:1795] Kernel modules: bcma 03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader [10ec:5209] (rev 01)   I have also tried this method and it did not work: . How to install Windows 7 from the network? Is it possible to install Windows 7 (Current RTM Version) on a computer without using removable media like DVD or USB?  The first thing that comes to my mind is through the network, but I don't have experience of doing a fresh install of Windows 7 via the network.  How to install Windows 7 via the network without any removable media?  P.S. I know some may think that doing so, is just a waste of time and it's easier to do it with removable media, but in the current situation the target PC neither has CD/DVD Drive nor supports booting from USB. And in addition to that, the target computer is connected to the network via a wireless connection (I don't know if it will cause any problems with the installation). Subsample of a random sample: random sample? Let's say you have a large random sample of soccer players in Europe but you are only interested in what happens in Spain. Could you reduce your sample to players in Spain and still call it a random sample (but of a different population)? If not, how would you call that subsample and which specific precautions should you take to be able to make inferences on the population of spanish soccer players?  My feeling is that using that subsample would be fine as long as it is large enough, but maybe I am missing something. How do I handle the window close event (user clicking the 'X' button) in a Python Tkinter program? Function pointers, Closures, and Lambda I am just now learning about function pointers and, as I was reading the K&amp;R chapter on the subject, the first thing that hit me was, "Hey, this is kinda like a closure." I knew this assumption is fundamentally wrong somehow and after a search online I didn't find really any analysis of this comparison.  So why are C-style function pointers fundamentally different from closures or lambdas? As far as I can tell it has to do with the fact that the function pointer still points to a defined (named) function as opposed to the practice of anonymously defining the function.  Why is passing a function to a function seen as more powerful in the second case, where it is unnamed, than the first where it is just a normal, everyday function that is being passed?  Please tell me how and why I am wrong to compare the two so closely.  Thanks. Removing the password from a PDF file I have a couple of ebooks as PDFs with passwords, however my ebook reader (sony prs600) doesn't seem to support PDFs with passwords.  What is the easiest of removing the password from a PDF (I know the password, which presumably helps a lot).  It's a bit annoying buying a book and then only being able to read it in front of a computer. Where's the BIOS on an Intel Mac? Is it possible to call the base method from a prototype method in JavaScript if it's been overridden?  MyClass = function(name){     this.name = name;     this.do = function() {         //do somthing      } };  MyClass.prototype.do = function() {       if (this.name === 'something') {         //do something new     } else {         //CALL BASE METHOD     } }; I want to quantify the relationship between two variables, A and B, using mutual information. The way to compute it is by binning the observations (see example Python code below). However, what factors determines what number of bins is reasonable? I need the computation to be fast so I cannot simply use a lot of bins to be on the safe side.  from sklearn.metrics import mutual_info_score  def calc_MI(x, y, bins):     c_xy = np.histogram2d(x, y, bins)[0]     mi = mutual_info_score(None, None, contingency=c_xy)     return mi How do I add a condition to a query? I just got a short algorithm on my page, and it keeps getting aligned at the center of the page. But I want to have it aligned at the top, what do I have to do? Do web browsers use different outgoing ports for different tabs? Where should I put my bash scripts I am looking for system monitoring tools which are GUI and CLI or web-based which include basic functions such as:   CPU Usage Ram Usage Swap Usage Disk Usage ( Space / I/O ) Heat Monitoring   I know there are many tools I can use, but I am looking for a single tool that has these basic functions. How to show the solution of $\dot{x} = Ax $ is an invariant subspace? Consider the linear dynamical system $\dot{x} = Ax $ in $V$ a finite dimensional vector space.  The definition of an invariant subspace $U$ is as follows:  For all $x_0 \in U$, (initial condition), the solution $x(t)$ with initial condition $x(0)=x_0$ lies in $U$, i.e. $x(t) \in U$ for all $t \in \mathbb{R}$. Intuitively, it means if we start in a subspace we never leave that subspace.  Prove that a subspace $U \subset V$ is an invariant subspace if and only if $AU \subset U$. Persistent Dummy Output Is the set of partial order relations over $ \mathbb{N}$ countable? I think it's uncountable but don't know how to prove this. I would be very helpful if someone could also give some kind of a strategy for proving uncountability, in particular how to find injective or surjective functions that help proving this.