I coded for getting values from the JTable and get that value for do calculations.  //getting user input for selling qty          String Qty=JOptionPane.showInputDialog("Insert Selling Quantity :");         double sellingqty=Double.parseDouble(Qty);        //getting user input for specific item discount         String discount = JOptionPane.showInputDialog("Insert Item Discount");         double idiscount=Double.parseDouble(discount);  for(j=0;j&lt;100;j++){            double icost =(double) tableSale.getModel().getValueAt(j,2);          System.out.print(icost);        //calculating Gross Total           double grosstotal = (sellingqty*icost)-idiscount;          System.out.println(grosstotal);          for(i=0;i&lt;100;i++){          //setting qty input value to table sale           tableSale.getModel().setValueAt(sellingqty,i, 3);         //setting input value to table sale           tableSale.getModel().setValueAt(idiscount,i, 4);          //setting grosstotal value to table sale         tableSale.getModel().setValueAt(grosstotal,i, 5);          }         }   When I execute the code shows a null pointer exception.  java.lang.NullPointerException at  com.bit.project.Newsale.add_btnActionPerformed(Newsale.java: 710) at  com.bit.project.Newsale.access$800(Newsale.java: 37) at  com.bit.project.Newsale$12.actionPerformed(Newsale.java: 469) at  javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java: 2022) at  javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java: 2022) at  javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java: 2346)   This line shows the Null Pointer Exception   double icost =(double) tableSale.getModel().getValueAt(j,3);    What is the error here?
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 to change value of ArrayList element in java Embed data in a C++ program Can I pickle a python dictionary into a sqlite3 text field? Any gotchas I should be aware of?  Can I store it in a text field, or do I need to use a blob? (I'm not overly familiar with either pickle or sqlite, so I wanted to make sure I'm barking up the right tree with some of my high-level design ideas.) Comment submission broken for comments that end with @username Today I got what I presume was the update that should take care of Spectre and Meltdown. That didn't go very well. What do I do now? See screen photo.    I can't boot the 4.4.0-108-generic kernel because of a kernel panic. I'm running 16.04 on an Intel Core i5-4670K CPU @ 3.40GHz × 4. How to backup 20+TB of data? We have a NAS server at the company I work for that is being used for storing photography sessions. Each session is approximately 100gb. Over the last couple of years this server has accumulated 10+ TB of data, and we are increasing the amount of photoshoots exponentially. I estimate that by the end of next year we will have 20+ TB stored on this NAS. We are currently backing this server up to tape using LTO-5 tapes with Symantec BackupExec. Since the size of this server has grown, full backups of this server are not completing overnight. Does anyone have any suggestion on how to backup this amount of data? Should we be backing it up to tape? Are there any other options which may be better? is there a way to get the option "Organize Desktop by Name" in Ubuntu 19.10 same as in 18.04? I'm setting up an Nginx web server and and want to perform load balancing using the round robin method.  This is what I have found thus far:  upstream backend  {    server backend1.example.com;    server backend2.example.com;    server backend3.example.com; }   According to the page they says i need to add the above lines to my nginx.conf file and upload it to server to load balance.  I do not understand what it means by server backend3.example.com;.  How do I setup a backend instance? What is the first reference in Sci-Fi to a touch-screen computer interface? I know in TNG that all computer interfaces are now touch-screen, and that got me thinking: when was the first reference to touch-screen computer interfaces in Sci-Fi made? A very basic ring theory question, which I am not able to solve. How does one show that    $\mathbb{Z}[i]/(3-i) \cong \mathbb{Z}/10\mathbb{Z}$. Extending the result: $\mathbb{Z}[i]/(a-ib) \cong \mathbb{Z}/(a^{2}+b^{2})\mathbb{Z}$, if $a,b$ are relatively prime.   My attempt was to define a map, $\varphi:\mathbb{Z}[i] \to \mathbb{Z}/10\mathbb{Z}$ and show that the kernel is the ideal generated by $\langle{3-i\rangle}$. But I couldn't think of such a map. Anyhow, any ideas would be helpful. There is a way to use my Galaxy tab s like a wacom table, on linux? Cauchy-Schwarz inequality proof (but not the usual one) Before you downvote/vote-to-close, I am not asking for a proof of: $$\sum^n_{i=1}a_ib_i\le\sqrt{\sum_{i=1}^na_i^2}\sqrt{\sum^n_{i=1}b_i^2 } $$ Which is what EVERY link I've found assumes is the inequality (for a proof of that see:  )    I am reading a book that claims the Cauchy-Schwarz inequality is actually: $$\vert\langle x,y\rangle\vert\le\Vert x\Vert\Vert y\Vert$$ where $\Vert x\Vert :=\sqrt{\langle x,x\rangle}$  with the additional claim: equality holds $\iff\ x,y$ are linearly dependent  I cannot find a proof of this claim (only proofs for the dot product inner product). My question is: what is the simplest way to prove this (I define simplest to mean "using as few definitions outside of the inner product itself as possible" - so that's not including Gramm-Schmitt orthonormalisation, for example.)  I've just found some possible answers in the links on the right (annoyingly) but fortunately I have a second, albeit softer, question:  What inequalities that are common for say $\mathbb{R}^n$ are actually based on the inner product?   (In future I will check this site first, I was targeting lecture notes and such in my search)  Addendum: I want to use this on not-finite dimensional vector spaces. I've found one proof that relies on finite-ness. Emission of EM radiation from an electron I have read about an electron making a transition between two energy levels and electromagnatic radiation will be emitted. The problem is how and why e.m radiation is emitted. I realise it's unlikely that posting the file would cause a problem. However, since I know nothing about what a what's in a minidump file I thought I should check. What is the "Templates" folder in the home directory for? For as long as I can remember, every time I install Ubuntu there is a folder in the home directory called "Templates." I've always just deleted it, but I'm curious: what's it supposed to be used for, and why is it in the default install? Autosegmental Representation in tikz-qtree This is what I want to achieve    and this:    But all I've been able to make with tikz-qtree is the following:  \documentclass[12pt,a4]{article} \usepackage[utf8]{inputenc} \usepackage{tipa,tikz,tikz-qtree} \begin{document}  \begin{tikzpicture} [baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ p ] ] [.R [.$\mu$ a ] [.$\mu$ : ] ] ] \end{tikzpicture} \begin{tikzpicture} [baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ p ] ] [.R [.$\mu$ a ]  ] ] \end{tikzpicture}   And this:  \begin{tikzpicture}[baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ l ] ] [.R [.$\mu$ a ] [.$\mu$ l ] ] ] \end{tikzpicture} \begin{tikzpicture} [baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ : ] ] [.R [.$\mu$ a ] [ l ] ] ] \end{tikzpicture} \end{document}   Which renders:    and    The important part here is the linking from the leaves to more than one parent (it would be nice if I had the option of making the line dashed too). Now, pst-asr doesn't quite achieve what I want it to. It's important that I have the moras ('mu's). (Also it's a pstricks package, which means I must typeset it in DVIPSPDF.) I have tried a bit of the forest-package (especially forest-GP1), but I can't make that work as I want either. Lastly, some have recommended xyling, but I find that package very difficult to use.  Any recommendations?  Thanks. In the beginning of the series, it's mentioned that Muggle-born wizards/witches are identified due to inadvertent spell-casting. However, it seems like later in the book, disarmed wizards/witches are completely helpless.   What is the explanation for why some spells can be cast without a wand and is there an in-universe explanation for why this isn't done? Also, are there spells that can be cast non-verbally (with/without a wand)? Compile gvim from sources? Is there a Google Drive client available? I'd like to install a  client for Xubuntu (12.04).  I'm getting non-English Google results, and I didn't find  in the Xubuntu repositories.   Does anyone know of a client that works well for Ubuntu or it's supported derivates (or installation instructions for grive?) What kind of components are black blobs on a PCB?