I am trying to dynamically add,delete and update records into a table  but i am getting following error.  java.lang.NullPointerException in preparedStatment object  i have tried this  try {         String sql = "INSERT INTO " + LoginFrame.userName + "." + TableInfo.tableName + "(" + txtIdName.getText() + "," + txtName.getText() + ") VALUES(?,?)";         JOptionPane.showMessageDialog(null, sql);          pst = (OraclePreparedStatement)con.prepareStatement(sql);          pst.setInt(1, Integer.parseInt(txtIdValue.getText()));         pst.setString(2, txtValue.getText());         pst.executeUpdate();      } catch (Exception ex) {         JOptionPane.showMessageDialog(null, ex);         System.out.println(ex);     }
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?
Find the slope of tangent line to the curve at the point $(1, \pi/2)$  the equation is  $$\sin(xy) = x$$  The right answer was = Slope is infinite   My answer was taking the derivative and I end up in this equation   $$ (1-y\cos(xy))/ x\cos(xy)  $$  I substitute with the points and the calculator showed an error, Does the error means infinite ? Would Dr Hannibal Lecter allow himself to be a consultant with Clarice if Miggs hadn't behaved improperly to her? mkfs on raw software raid device or partition I am making a huge RAID10 device (8 TB) for storage on CentOS. I have created the 4 partitions on my 4 physical hard disks and have created the raid device /dev/md2 out of those 4 partitions.  Now it's time to put a filesystem on it. I am wondering whether I should do just:  mkfs.ext4 /dev/md2   which totally works (I tried it), or I should first create a single partition on that device (with fdisk, gdisk or parted?), that takes up all the space, and then do the mkfs stuff on that partition.  Googling the Web, I found another person asking the very same question here:  but, although a responder said:      Partitions go on the array members.   Filesystem goes on the array.   they didn't give him a definitive, non-ambiguous answer or an explanation when one approach should be preferred over the other. Migrate to *any* site? Finding the limit of $(1-\cos(x))/x$ as $x\to 0$ with squeeze theorem How do I find:  $$ \lim_{x\to0}\frac{1-\cos(x)}{x} $$  Using the squeeze theorem.  Particularly, how would I arrive at its bounding functions?   If possible, please try not to use derivatives. P-adic expansion construction I use tikz (and tikzpicture) a fair bit, but files that used to compile fine before the latest slew of updates to pgf, and pstricks, no longer seem to do so (at least, on my MikTeX installation). The MWE (below) seems to compile correctly, but the DVI can't be rendered using yap, and dvi -> ps -> pdf fails (the dvi -> ps seems to be ok -- to the extent it isn't throwing errors), but ps2pdf fails miserably, with the following errors:   Error: /undefined in XC@.  Operand stack:    --nostringval--   --nostringval--   --nostringval--   --nostringval--   -  -nostringval--   --nostringval-- Execution stack: %interp_exit   .runexec2   --nostringval--   --nostringval--   --  nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --  nostringval--   false   1   %stopped_push   2045   1   3   %oparray_pop    2044   1   3   %oparray_pop   2025   1   3   %oparray_pop   1884   1   3    %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval-  -   --nostringval--   --nostringval--   2   %stopped_push   --nostringval-- Dictionary stack:   --dict:979/1684(ro)(G)--   --dict:1/20(G)--   --dict:87/200(L)--   --    dict:182/300(L)--   --dict:58/200(L)--   Current allocation mode is local   Current file position is 99615   GPL Ghostscript 9.26: Unrecoverable error, exit code 1   Here is the MWE:  \documentclass[12pt,letterpaper,oneside]{article}  \usepackage{tikz}  \usetikzlibrary{decorations,shapes,arrows,matrix,positioning}  \begin{document}  \begin{center} \begin{tikzpicture}[x=0.175cm,y=0.175cm,scale=1]  % set up maximum and minimum x- and y-coordinates \def\xmin{0} \def\xmax{23.5} \def\ymin{0} \def\ymax{23.5}  % draw and label axes    \draw[-&gt;,thick] (\xmin,0) -- (\xmax,0) node[below=8pt,near end]  {\small{abundance ($N$)}};   \draw[-&gt;,thick] (0,\ymin) -- (0,\ymax) node[above=12pt,near   start,rotate=90] { \small{birth rate ($b$)}};  % draw vertical reference line at K/2=50   \draw[color=black, thick,  smooth] (0,20) -- (20,0)  node[below=6pt,midway,rotate=-45] {\small{slope~$=a$}};  % draw circle around point where function intersects x-axis \draw [red] (0,20)  ellipse (0.2cm and 0.2cm) node[right=3pt,black] {$b_0$};   \end{tikzpicture}  \end{center}   \end{document} There are two different commands to incorporate another file into the source of some document, \input and \include. When should I use one or the other? What are the differences between them? Are there more things like them to be aware of? Mobile SE sites not allowing edits to edits When you have less than 2K rep and your edit goes in a queue, you are usually allowed to revise your edit while it is being reviewed, by clicking the edit button again on the question page. However, when on mobile SE sites, the edit button disappears when you have submitted an edit for review.    Editing  by  into the question: It seems that the cause of this is when the mobile site hides the edit link (when there is a pending edit), it doesn't check who is making the edit, which means that it hides it for your own as well as other's edits. How are release codenames chosen? There's a story my grandpa use to tell me when I was younger, about the sole survivor of of an attack on a mining vessel in space. The man lives in space for months/years, ignored by the company he worked for and never rescued. Then when he thinks he is being rescued, it's actually another set of raiders who attack him and kidnap him.  He then wakes up in captivity in some sort of prison inside of an asteroid, and has a word tattooed on his forehead. My grandpa called him Ronin (that's what the tattoo on his forehead said) but I don't know what the character's real name is. Anyways, he learns that he has the ability to teleport after having a brush with death and decides to make his way back to Earth so that he can exact revenge on the mining company who abandoned him and left him floating to die.  Does anyone know what this story or book may be? My grandpa told it to me when I was little, he said that he got it from a book he use to love reading when he was younger. I'm assuming the book is very old (possibly pre 1940's as he was born in the 20s). I can't ask him as he is no longer alive. I'm also unsure as to whether or not all the details in the story he told me, are the same as in the original. Norm $N$ on $\Bbb Z[\sqrt d]$ is multiplicative, $N(x)$ prime $\Rightarrow x$ irreducible Serana disappeared during dawnguard questline. How to set the background color of the Linux console screen? Note: I reworked the question to clarify the issues. This is a trivial question that can be answered in several parts because the question has several attributes.  Unfortunately, the question may be reworked when the person asking the question apprehends (knows) some parts of the answer as well as the structure of the question.  Therefore, the question is presented from a different point of view than the original one.  How to change the color setting¹ of the Linux console, using a shell utility? How to change the color setting¹ of a terminal emulator, using a shell utility?  Originally, I wanted to change the background color of the Linux console during the execution of a shell script. The following proposition works as I wanted.  #!/bin/sh  # set the background color of the terminal tput setab 6 clear  printf "%s\n" 'background: cyan'  # do some tasks  cd /usr/src/initramfs pwd ls -l  # the background of the shell output is cyan   Nonetheless, someone may encounter several glitches (or difficulties).   For instance, if the screen is not cleared, the background color is only applied to the text output, during a shell script execution. If the command tput setab 6 is submitted with the command line and the screen is not cleared, the background color is only applied to a small portion of the output text. If the command tput setab 6 is submitted on the command line and the screen is cleared, the background color is applied to the full screen but only persists until another command is submitted. [...]  ¹ background color For example, if I revisit a memory of mine where I'm inside a castle and talking to someone, can the present-me explore different parts of the castle meanwhile the past-me continues her conversation? Is that possible? On Linux can I keep a program running in background even after I disconnect? If I'm logged into a remote Linux machine, I know I can suspend a process (cntr-z) and move it to the background (bg 1) but if I disconnect from the machine, the process stops.  Is there a way I can leave it in the background and have it there when I log back in? This is a very long running process.  On Ubuntu, logged in via SSH. How can I resize a partition with Disk Utility? I have 2 partitions, I reduced the size of one and want to expand the other to fill the now available space.   How do I expand the Lion Partition into the empty grey space beneath Macintosh HD partition? Determine app that keeps turning on bluetooth HTTP GET request in JavaScript? Does separability imply the Lindelöf property? Does separability imply a sort of Lindelöf property?  Since I can't prove this fact I'm beginning to think that my conjecture is false.  Intuitively, $\mathbb{R}$ has a countable subset $\mathbb{Q}$ which is used to form a countable basis for $\mathbb{R}$ with the usual topology and prove the Lindeöf property.