I am trying to insert from textfields data into my database. Insert data to a table compte_utilisateur and I've 2 comboboxes : first for groupe containing names of all groups (alias libelle_groupe) in my database, and second for statut containing all status values (alias valeur) in my database.   I want to insert into my db a user ( alias compte_utilisateur) and to do that i need id_groupe of the name of group selected in the combobox and id_statut of the status selected in my combobox.   I've tried this, but i'm having an exception : java.lang.NullPointerException  the code :  ResultSet valeur1= stmtListeLivre.executeQuery("select id_groupe from groupe where libelle_groupe='"+combo_name.getSelectedItem().toString()+"'");  ResultSet valeur2= stmtListeLivre1.executeQuery("select id_statut from statut where valeur='"+jComboBox1.getSelectedItem().toString()+"'");  Number val1 =  ((Number) valeur1.getObject(1)).intValue();  Number val2 =  ((Number) valeur2.getObject(1)).intValue();   String requete="INSERT INTO compte_utilisateur(Id_compte, Nom, Prenom, Matricule, Id_groupe, Id_statut) VALUES (?,?,?,?,?,?)";       pst=maConnexion.ObtenirConnexion().prepareStatement(requete);     pst.setString(1, jTIdf.getText());     pst.setString(2, jTNom.getText());     pst.setString(3, jTPrenom.getText());     pst.setString(4, jTMatricule.getText());       pst.setString(5, val1.toString());      pst.setString(6, val2.toString());      pst.execute();
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?
SQL Server - Best way to get identity of inserted row? tar unpack : Unexpected EOF in archive I have downloaded eclipse-platform-3.7-linux-gtk-x86_64.tar.gz.  Using Ubuntu 10.10  64-bit on Intel 64-bit processor.  While trying to unpack the contents (either double-click or right-click &amp; open-with-archive-manager) I get this error:  gzip: stdin: unexpected end of file&lt;br/&gt; tar: Unexpected EOF in archive&lt;br/&gt;  tar: Error is not recoverable: exiting now   Is there any remedy to repair it? or is the downloaded file corrupt &amp; needs to be re-downloaded? During U-substitution, is the $du$ that we use as the infinitesimal in $\int f(u) \ du$ changing size? I am familiar and comfortable with the following definition of an integral (defined as the the Riemann Sum where n approaches infinity).    I have circled in red two terms to emphasize a concept that I was taught: the $\frac{b-a}{n}$ term effectively becomes the $dx$ term. This intuitively makes sense to me.   Additionally, I am familiar with the following statement (as expressed here: )    However, I have boxed in red something that I find rather confusing when trying to interpret it through the understanding that $\frac{b-a}{n}$ sorta kinda equals $dx$...  Specifically, the $du$ value appears to be changing throughout the interval $[ g(a), g(b)]$. To reframe this in the "Riemann Sum" version,we would have something like: $\text{ "value that varies depending on where you are"} * \frac{g(b)-g(a)}{n}$  This is very confusing to me...because, if this is the correct interpretation, I'm not quite certain I understand why this is allowed. Your communities list is not visible in mobile web on site where you don’t have an account If you don’t have an account for some site, you can still see a list of your communities via top bar menu of this site, e.g. on 3D Printing:        But this works only for full web, in mobile web «sign up or log in» is shown:        When you have an account then the list of your communities is shown even for mobile web: Prove the Radical of an Ideal is an Ideal I am given that $R$ is a commutative ring, $A$ is an ideal of $R$, and $N(A)=\{x\in R\,|\,x^n\in A$ for some $n\}$.  I am studying with a group for our comprehensive exam and this problem has us stuck for two reasons.  FIRST - We decided to assume $n\in\mathbb{Z}^+$ even though this restriction was not given. We decided $n\ne 0$ because then $x^0=1$ and we are not guaranteed unity. We also decided $n\notin\mathbb{Z}^-$ because $x^{-1}$ has no meaning if there are no multiplicative inverses. Is this a valid argument?  SECOND - We want to assume $x,\,y\in N(A)$ which means $x^m,\,y^n\in A$ and use the binomial theorem to expand $(x-y)^n$ which we have already proved is valid in a commutative ring and show that each term is in A so $x-y$ is in $N(A)$. The biggest problem is how to approach the $-y$ if we are not guaranteed unity. Does anyone have any suggestions?  Thank you in advance for any insight. When does $P(x)=\sum_{n=0}^{\infty}{\frac{n!}{n^n}\cdot x^n}$ with $x\in \mathbb{C}$ converge? How to properly write multiple authors in bibtex file? Prove that $\lim_{t\to \infty} t\mu(\{x:f(x)\geq t\})=0$ Problem  Suppose $f$ is a non-negative integrable function on a measure space $(X,\mathcal{A},\mu).$ Prove that $$\lim_{t\to \infty} t\mu(\{x:f(x)\geq t\})=0$$  Attempt  Let $E_t=\{x:f(x)\geq t\}$ Note that $f\chi_{E_t}\leq f$. Since $f$ is integrable, the Lebesgue dominated convergence theorem tells us that $$\lim_{t\to\infty} \int f\chi_{E_t}\rightarrow \int \lim_{t\to\infty} f\chi_{E_t}=0,$$ since $\lim_{t\to\infty} f\chi_{E_t}=0$ a.e. $\ ^{(1)}$ The result follows from the fact that $$t\mu(E_t)\leq\int f\chi_{E_t}.$$  Question  I am having trouble proving $(1)$. That is, how can I show that $f\chi_{E_t}\rightarrow 0$ a.e? In "Settings" > "SD card &amp; phone storage settings" under "Internal Phone Storage" it lists "Available Space" as 13.78MB.  I'm trying to install an app that is 2.38MB.  Why do I get the "Insufficient storage available" error message?  I clearly have enough space.  If it's relevant, my phone is an LG Optimus V. In Harry Potter and the Philosopher's Stone, Hermione is in the toilets when Harry and Ron lock in the troll. She lies and says that she went looking for the troll. Why? She could have just said that she was in there because she needed the toilet (she was allowed to be, it's a girls' bathroom) and Harry and Ron came to save her.   Is there a reason she lied? I have detached a process from my terminal, like this:  $ process &amp;   That terminal is now long closed, but process is still running, and I want to send some commands to that process's stdin. Is that possible? How do I skip specific tests when building an rpm? I am building an RPM of git version 2.13.0. The build has gone ok but one of the tests are failing:  Config variable ${LIB_HTTPD_SVN} is not defined Config variable ${LIB_HTTPD_SVN_PATH} is not defined   I cannot find any info about these variables so I was going to just skip the tests. How can I do that? How to set render engine in blender? I am not talking about mirrors, just a plain window made of glass like material. Would it be possible to allow light pass only in one direction but not the other? Primes dividing a polynomial Let $g(x)\in \mathbb{Z}[x]$, a nonconstant polynomial. Show that the set of primes $p$ such that $p\mid g(n)$ for some $n\in \mathbb{Z}$ is infinite.  I don't know how to start. I have tried asuming that the set is finite but i haven't reached any contradiction. Another indicator of a review audit: Question has no tags Add an application to the command search path in csh Recently, I have installed an application (gnuplot) under user directory (/home/usr/bin). I want to run the application whenever I type 'gnuplot' in any directory. What could I do?  I tried to set the path in ~/.cshrc by  setenv gnuplot /home/usr/bin/gnuplot   but it doesn't work. It reports "command not found" as I type gnuplot in the terminal. Given a DateTime object, how do I get an ISO 8601 date in string format? What is this mark over the question When I open a site I see a mark over a question.See screen shot.  When I open the question mark is not remove.It still appear.    is this bug or? This is a follow-up question to the discussion about the finite axiom of choice .  Suppose we have a countable collection of non-empty sets $\{A_1, A_2, A_3,\cdots\}$ Reasoning as indicated in that discussion, we can prove the existence of a choice function $c_n$ such that $c_n(i)$ belongs to $A_i$ for $i = 1,\cdots,n$  Again reasoning as suggested and using induction, we can prove the existence of a function $C$ defined over $\{1, 2, \cdots\}$ such that $C(n)$ is a choice function defined for $i=1,\cdots,n$ with $C(n)(i)$ an element of A_i. We can require in addition that $C(n)(i)$ and $C(n-1)(i)$ are equal for $i=1,\cdots,n-1$.  Now it would it seem that we can prove the countable axiom of choice by taking the union of $C(1)$, $C(2)$, $\cdots$  The question is as follows: why is that proof wrong? I suspect the answer may have something to do with the axiom of union.