The code seems to show no errors yet when I run it, my ide shows a lang.nullpointerexception. I have no idea what is wrong or how to fix this problem. Thank you so much for taking the time to help me. Much appreciated.   String sql="Select cast(Sum(Copper) as varchar(255)) as sumcu from RawMaterials"; st=conn.prepareStatement(sql); rs=st.executeQuery(); if(rs.next()){ String sum = rs.getString("sumcu"); sum_text.setText(sum);
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?
I was doing a package removal with apt-get remove but then realized I should have done a --purge along with it to remove the configuration files.  Can I remove the packages configuration files easily or do I need to reinstall the package and then remove with a --purge? How To Get Notified When Hard Drives Fail In Dell PowerEdge Servers I have a Dell PowerEdge R415 and R515 and wondering how I can be alerted remotely when a hard drive fails in either server? Both are running RAID, so I need to be notified, so I can swap out the drive. Both servers only have the basic Baseboard Management Controller. Is this possible with a third party tool/software? On-shell and off-shell transformations in Noether's theorem For any transformation of the fields,  $$\varphi\to\varphi'=\varphi+\delta\varphi$$ the change in the Lagrangian can be written as  $$\delta\mathcal L = \text{EoM} + \partial_\mu j^\mu\tag{1}$$where "EoM" represents the equations of motion (Euler-Lagrange equations) and all other terms can be written as a total derivative of some function $j^\mu$, which is a known function in terms of the Lagrangian.   I would like to distinguish the different realizations of transformations. Let's assume that the transformation (1) leaves the action invariant, $\delta S=0$.    $\delta\mathcal L=0$   EoM $=0$, "on-shell": Noether current is conserved, $\partial_\mu j^\mu=0$. EoM $=\partial_\mu b^\mu\neq0$, "off-shell": modified Noether current $J^\mu = j^\mu+b^\mu$ is conserved, $\partial_\mu J^\mu=0$.   $\delta\mathcal L =\partial_\mu a^\mu \neq 0$, "quasi-symmetry"   EoM $=0$, "on-shell": modified Noether current $J^\mu = j^\mu-a^\mu$ is conserved, $\partial_\mu J^\mu=0$.  EoM $=\partial_\mu b^\mu\neq0$, "off-shell": modified Noether current $J^\mu = j^\mu-a^\mu+b^\mu$ is conserved, $\partial_\mu J^\mu=0$.     Is this listing correct?      What roles do the terms "on/off-shell" and "(quasi) symmetry" play in Noether's theorem?   Related: , , , , . Math mode in tabular without having to use $...$ everywhere Find the number of ways in distributing $8$ distinct balls into $6$ distinct boxes such that there is at least $1$ ball in each box.  We are well acquainted with the traditional Inclusion-Exclusion principle in solving this and it will come up as $191520$ ways.  I tried in this way:  When we distribute $8$ balls into $6$ boxes we have two possible cases  Case $1.$ There are exactly $2$ boxes with $2$ balls each  Case $2.$ There is exactly $1$ Box with $3$ balls in it.  For Case $1$, the distribution is done by choosing $2$ boxes from $6$ boxes and $2$ balls from $8$ balls and those two balls can be arranged in $2!$ ways. But I require another two balls from remaining $6$ balls to be placed in each of these two boxes which can be done in $\binom{6}{2} \times 2!$ ways. Finally remaining $4$ balls can be distributed in remaining $4$ boxes in $4!$ ways. So total number of ways for Case $1.$ is  $$\binom{6}{2} \times \binom{8}{2} \times 2! \times \binom{6}{2} \times 2! \times 4!=604800$$  For Case $2$, the number of ways is  $$\binom{6}{1} \times \binom{8}{3} \times 5!=40320$$  I am pretty sure the value obtained for Case $2.$ is correct. but I could not find where I went wrong in Case $1.$ How to make hair material different from the plane itself? In Cycles Render, I added hair to a plane (as I was making a grass field) and I don't seem to know how to make the actual flat plane's material different from the hairs themselves, because I'd like to make the plane have an image texture and the hairs have a yellow-like color to them, but of course, if I attempt to make the material yellow-ish, the plane AND the hairs will become yellow. I'm done with the plane, I just want to control the hairs' materials. import Excel sheets by name What does a two overlapping circles symbol mean in an electrical schematic/diagram? In the datasheet for a A3503 Hall Effect Sensor, I saw a circuit diagram labeled 'Functional Block Diagram', and it shows a symbol I have not seen before. It's shown here between 3 - Output and 2 - Ground.  What is this supposed to represent?    The full datasheet is available What is the difference between equation and formula? Sometimes equation and formula are used interchangeably, but I was wondering if there is a difference.  For example, suppose we can calculate a car's fuel efficiency as:  mpg = distance traveled in miles / the fuel used in a gallon   Is that an equation or formula? Why is it so difficult to pull an immersed mug out of the water? I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation? Exit from both root and user with one command I know about "not using sudo su -" etc. But let's be honest, almost all of us do it.   So, here is the issue. We can't have root logins enabled, so we have to ssh in as our user then su to root.  Here is the process tree:       1  7897  7826  7826 ?           -1 S     1000   0:00 sshd: josh@pts/0  7897  7898  7898  7898 pts/0     8182 Ss    1000   0:00  \_ -bash  7898  7990  7990  7898 pts/0     8182 S        0   0:00      \_ sudo su -  7990  7991  7990  7898 pts/0     8182 S        0   0:00          \_ su -  7991  7992  7992  7898 pts/0     8182 S        0   0:00              \_  -su  7992  8182  8182  7898 pts/0     8182 R+       0   0:00                  \_ ps axjf   I would like to exit from root, then from my user with one command. Is there a way to do this?  BTW exit &amp;&amp; exit does not work because it exits the shell and doesnt process the rest of the command  josh@ubuntu:~$ sudo su - root@ubuntu:~# exit &amp;&amp; exit logout josh@ubuntu:~$ Are all stormtroopers as poor soldiers as the ones in the movies? In the Star Wars films we consistently witness just how poor soldiers stormtroopers are. They show very sub-par marksmanship, crappy house searching tactics, and are easily fooled and defeated by Ewoks and Rebels.   That being said, I remember reading a character guide that defined stormtroopers as the very best of the best (best marksman, above average intelligence, etc.). So, in the realm of the Expanded Universe, does the mold that the movies set continue to hold true or are they just the exceptions to the rule? Substr(). Add characters for each n digits What to do with an Ubuntu disk image that appears as a WinRAR file? When I run the logistic regression, two independent variables have VIF values greater than 10 like 13 or so. Logistic regression is the one I will use to measure the overall change in the dependent variable with one incremental changes in every each independent variable. However, when I run the linear regression model version on my same data, the VIF values I get from all the independent variables are either slightly greater than 1 or around 5 or 6. Besides, all the coefficients are highly significant all below 0.01.  If so, is it safe to use my logistic regression model to find out the incremental effect of every each independent variable without dropping out any independent variables?   If my purpose is to find an incremental effect of every each independent variable on the overall dependent value in a logistic regression model, is multicolinearity an important problem to consider? Can I ignore it?   If my p-values are all less than 0.01 which is the same indicator as t-value, will I still need to worry about colinearity issue even though my VIF scores for two variables are around 13-14? Based on what you said, if p-value is safe enough, will this be still a problem?  I am also referring to the following website comment:                                                                     So, in sum, my ultimate goal is to use the final output from the logistic regression model generated from the independent variables and one binary dependent variable. If so, do you think I can ignore the multicolinearity problem? In the simple linear regression case $y=\beta_0+\beta_1x$, you can derive the least square estimator $\hat\beta_1=\frac{\sum(x_i-\bar x)(y_i-\bar y)}{\sum(x_i-\bar x)^2}$ such that you don't have to know $\hat\beta_0$ to estimate $\hat\beta_1$  Suppose I have $y=\beta_1x_1+\beta_2x_2$, how do I derive $\hat\beta_1$ without estimating $\hat\beta_2$? or is this not possible? Refused UK Visit visa for lack of sufficient funds - What more can I do? New phone: How to transfer game progress? What are the biggest differences between Reversal Rings, Extension Tubes and Macro Lenses? As far as I understand all three options help you do macro photography but are their other reasons for having the three different items? I figured reversal rings and extension tubes were just for the low cost but with additional more expensive features being added to the two options it seems there may be certain situations for each type? What are their biggest differences and advantages over each other?   Are there situations where you would have one over the other? Do all three options have the same "wafer thin" depth of field?  Do they all suffer from the same light loss? Do any of them affect your photos more negatively than the others? Can I achieve the same magnification with rings and tubes that I can with proper lenses? Would you ever combine these options together or would there be no need for that?   I ask because I recently bought a cheap extension tube and reversal ring and I'm trying to get a better overall understanding of each. I tend to use the extension tube a lot more, because I can put it on my 70-200 and have a workable distance between subject and lens.  This photo was taken with 49mm of extension tube on the 70-200 I believe which may be greater than 1:1. Would it be sharper with a macro lens?       on 500px