Java, MySQL: myStatement.executeUpdate INSERT INTO gives NullPointerException The Problem:  java.lang.NullPointerException at mainPackagePaketverwaltung.Datenbank.savePaket(Datenbank.java:58) at mainPackagePaketverwaltung.MainPV$12.actionPerformed(MainPV.java:507)   The Cause:  This is the Line (58):  myStatement.executeUpdate("INSERT INTO Relation VALUES(NULL, '"+ PaketID +"', '"+ atodb.getArtikelID() + "', '"+ atodb.getMenge() +"')");   From what i understand this should create a new line in the Database because the NULL/Primary_Key is set to Auto_Increment, but after one runt it errors out.  That should not happen bc with each run a new line would be made by the Auto_Increment.  More Info:  PaketID is a INT  atodb.getArtikelID is a INT  atodb.getMenge is a INT  All DB Fields are INT,s
What is a NullPointerException, and how do I fix it? 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?
Drush hangs when trying to bootstrap Drupal In The Witness, I was walking along the coast, and I came upon this:    Now, since I've learned      that mazes can be embedded in the environment,   I see the puzzle here, but I just can't get the pieces to line up well enough.  Standing on the couch and walking all around it doesn't seem to get me a       functional maze.   Where do I need to stand to activate the puzzle successfully? Proof of "continuity from above" and "continuity from below" from the axioms of probability One of the consequences of the axioms of probability ($\sigma$ field and probability axiom) is the "infinite subset" and "infinite union" property, I can't figure out how it follows from them.  if $A_1 \subseteq A_2 \subseteq \cdots$ then   $$P\left(\bigcup_{i=1}^{\infty}A_i \right) = \lim_{k \to \infty} P(A_k)  $$  If $A_1 \supseteq A_2 \supseteq \cdots$ then   $$P\left(\bigcap_{i=1}^{\infty}A_i \right) = \lim_{k \to \infty} P(A_k)  $$ What and where are the stack and heap? Programming language books explain that value types are created on the stack, and reference types are created on the heap, without explaining what these two things are. I haven't read a clear explanation of this.  I understand what a stack is. But,    Where and what are they (physically in a real computer's memory)? To what extent are they controlled by the OS or language run-time? What is their scope? What determines the size of each of them? What makes one faster? I am a total newbie to Ubuntu, and I'm not sure what to do here. I have a Toshiba Chromebook. I had a friend install the latest version of Ubuntu on it for me. For a while, the audio in Ubuntu was working fine, but now I can't hear any audio whatsoever.  How can I fix this? Why does the order of parameters matter for sp_trace_create? Lookup Tables Best Practices: DB Tables... or Enumerations If we have to store the available positions at a company (i.e. Manager, Team Lead, ... etc). What are the best practices for storing it? I have two opinions with comments... "sure, welcoming yours"        Storing it as DB table with columns ID and Name, and deal with it using queries and joins.     Storing it as Enum and forget about the DB table.    In my opinion, I will choose the first solution if I have changing items. So that I won't hard code these options as Enum. I may choose the Enum solution, if I have no doubt that data won't change (for example, Gender: Male, Female).  NOTE: I code in English, and the UI Culture may be Arabic. If I will work with the Enum Solution, I will hard code the culture-based strings in the presentation layer, is it okay from the best practices perspective!!!!  I would like to know your opinions and if my thoughts correspond to what is most recommended "Best Practices"?? Simple past or present perfect? Which is preferable, simple past or present perfect, in situations like this one: I had a conversation with my friend and we planned to do something; shortly afterwards I call him back to announce the accomplishments. My biggest doubt about simple past is that perfect aspect is used to indicate past action (accomplishment) with current relevance, at the same time I'm not sure if I'm allowed to use present perfect, because there's a gap between accomplishing and the current moment, which is a characteristic of simple past. How can I convert my Java program to an .exe file? Proving $\sum_{k=0}^n\binom{2n}{2k} = 2^{2n-1}$ I'm undergraduate student of mathematics.  I need to prove: $$\sum_{k=0}^{n} \binom{2n}{2k}= 2^{2n-1}$$ Can you please help me How to find the best route through multiple points? I am using postgreSQL, postGIS and pgrouting. Now I am really confused on how am I going to find the shortest path between multiple points.   I know how to find it between two points through dijkstra but I am confused how to accomplish the same result with more than two points.   I have done some research and found this:    But still I did not understand if its the right way and how to install it. Why it's true? $\arcsin(x) +\arccos(x) = \frac{\pi}{2}$ The following identity is true for any given $x \in [-1,1]$: $$\arcsin(x) + \arccos(x) = \frac{\pi}{2}$$  But I don't know how to explain it. I understand that the derivative of the equation is a truth clause, but why would the following be true, intuitively?  $$\int^{x}_{C1}\frac{1\cdot dx}{\sqrt{1-x^{2}}} + \int^{x}_{C2}\frac{-1 \cdot dx}{\sqrt{1-x^{2}}} =\\  \arcsin(x) - \arcsin(C1) + \arccos(x) - \arccos(C2) = 0 \\  \text{while } \arcsin(C1) + \arccos(C2) = \frac{\pi}{2}$$  I can't find the right words to explain why this is true?    Edit #1 (25 Jan, 20:10 UTC): The following is a truth clause: $$ \begin{array}{ll} \frac{d}{dx}(\arcsin(x) + \arccos(x)) = \frac{d}{dx}\frac{\pi}{2} \\ \\ \frac{1}{\sqrt{1-x^{2}}} + \frac{-1}{\sqrt{1-x^{2}}} = 0 \end{array} $$  By integrating the last equation, using the limits $k$ (a constant) and $x$ (variable), I get the following:  $$ \begin{array}{ll} \int^x_k\frac{1}{\sqrt{1-x^{2}}}dx + \int^x_k\frac{-1}{\sqrt{1-x^{2}}}dx = \int^x_k0 \\ \\ \arcsin(x) - \arcsin(k) + \arccos(x) - \arccos(k) = m  \text{ (m is a constant)}\\ \\ \arcsin(x) + \arccos(x) = m + \arcsin(k) + \arccos(k) \\ \\ \text{Assuming that } A = m + \arcsin(k) + \arccos(k) = \frac{\pi}{2} \text{ ,for } x \in [-1,1] \end{array} $$ Using Calculus, why is that true for every $x \in [-1,1]$?    Edit #2:  A big mistake of mine was to think that $\int^x_k0 = m \text{ (m is const.)}$, but that isn't true for definite integrals.  Thus the equations from "Edit #1" should be as follows: $$ \begin{array}{ll} \int^x_k\frac{1}{\sqrt{1-x^{2}}}dx + \int^x_k\frac{-1}{\sqrt{1-x^{2}}}dx = \int^x_k0 \\ \\ \arcsin(x) - \arcsin(k) + \arccos(x) - \arccos(k) = 0\\ \\ \arcsin(x) + \arccos(x) = \arcsin(k) + \arccos(k) \\ \\ A = \arcsin(k) + \arccos(k) = \frac{\pi}{2} \text{ ,for } x \in [-1,1] \end{array} $$ Significance contradiction in linear regression: significant t-test for a coefficient vs non-significant overall F-statistic I'm fitting a multiple linear regression model between 4 categorical variables (with 4 levels each) and a numerical output. My dataset has 43 observations.  Regression gives me the following $p$-values from the $t$-test for every slope coefficient: $.15, .67, .27, .02$. Thus, the coefficient for the 4th predictor is significant at $\alpha = .05$ confidence level.  On the other hand, the regression gives me a $p$-value from an overall $F$-test of the null hypothesis that all my slope coefficients are equal to zero. For my dataset, this $p$-value is $.11$.  My question: how should I interpret these results? Which $p$-value should I use and why? Is the coefficient for the 4th variable significantly different from $0$ at the $\alpha = .05$ confidence level?  I've seen a related question, , but there was an opposite situation: high $t$-test $p$-values and low $F$-test $p$-value. Honestly, I don't quite understand why we would need an $F$-test in addition to a $t$-test to see if linear regression coefficients are significantly different from zero. Is the uncertainty principle a property of elementary particles or a result of our measurement tools? What does `:-` mean in a shell script I saw this in the end of an awesome shell script but I can't understand the login here because I think it's being short-handed for a longer command.  spark ${@:-`cat`}   This apears at the end of . Any ideas?  + Marks for some one who extends it into a full segment of code, even if its slower (Better for explanation) Geomagnetic reversal? How to draw a side line in table How do I make the comparator work and then stop? I made a redstone clock that involves a command block with /testfor and a comparator attached to it. Whenever the /testfor works, the comparator turns on, but completely.(meaning it does not turn off after that) I want it to turn on, have a small delay, then turn off. is there some way that i should change this clock, or should I be doing something different with the comparator? Can $3p^4-3p^2+1$ be square number? So I'm trying to power 2 of these  together in series. I know that I have to add the voltage of the two lights together and get a resistor that restricts the power to that level. I have a 9V battery and the lights are 3V each. I brand new to all of this, and understand almost nothing, so any help would be appreciated. Can someone help me choose the correct resistor (And how to identify that resistor with the color branding thing) so two of those lights listed above can be wired in series? Thanks!