I am getting a Null Pointer Exception. And i have used the long text data type in the ms access table to for date and description      try          {          int z1=1,z2=2;              String s=JOptionPane.showInputDialog("enter the date(DD/MM/YEAR)");          String s1=JOptionPane.showInputDialog("enter data into your dairy");          pstmt=conn.prepareStatement(" INSERT  INTO  Table2(date,description) values(?,?)");          pstmt.setString(z1, s);          pstmt.setString(z2, s1);          pstmt.executeUpdate();          JOptionPane.showMessageDialog(null, "Data enterd successfully");          update1();          close();          }           catch(Exception e1)          {              JOptionPane.showMessageDialog(null, "Data Insertion failed.This date may already exist or may be some other error");              JOptionPane.showMessageDialog(null, "ERROR:"+e1.getMessage());           }   I have used data type long text for date and description in the ms access table.
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?
Tuning PostGIS for production environments? What PostGIS documentation have you come across that has been helpful when tuning PostGIS for a production environment?  I would like to get together with my DBA to setup a Postgresql/PostGIS installation that is fit for production. I have read that there is some tweaking involved to achieve this, and I was hoping to find the answer on the .  So far I have found some documents on the OpenGeo site helpful, .  And this  is the kind of information I have found helpful, this is probably just basic DB stuff but to me its good stuff.  I would be interested to see what resources have helped others in achieving a stable production installation of PostGIS. Where do I find the current C or C++ standard documents? tasks package: items are in two line with 4 columns and 4 items I write some choice questions into beamer frame, after some research, here is my code:  \documentclass[aspectratio=169]{beamer} \usetheme{Berkeley} \usepackage{tasks,CJK} \begin{document} \begin{CJK*}{utf8}{bsmi} \begin{frame} \transwipe 1.Which one you want to choose? \begin{tasks}[counter-format=tsk[A].,debug=true](4) \task A \task B \task C \task D \end{tasks} \end{frame} \end{CJK*} \end{document}   output with pdflatex:  But I don't want the D choice goto the second line, I want them stay in one line, what should I do? A simple stupid question that I should already know the answer to:  Is this true: $\left|z^5\right| = \left|z\right|^5$ where z is a complex number with a non-zero imaginary component.  Thanks in advance. Flagging summary improvement: filters Here is my flagging summary on SU:   Your flagging history   32 posts flagged as requiring moderator attention    2 are waiting for review   3 were marked valid   1 were marked invalid   (older flags were not recorded valid/invalid)    2 posts marked as spam    It is too complicated to look for invalid flags. Would it be possible to make filters on the top of the page (like on favorites for example) with:  By date, By type (off-topic, spam, dupes), By status (accepted, pending, rejected)  It would make it easier for reviewers to check their flagging and eventually know what to improve on.  Or is there another easy way to audit this? New passport and entrance Schengen I am from Brazil and travel a lot in Schengen countries. Under the rules of Schengen visa (3 months stay in a 6 months period). In my passport are the entrance and exit stamps, also to chec the days I stay in Schengen.  I need a new passport and will get this in Brazil. So in this new passport are NOT the stamps. Does this mean I start new with the Schengen visa rule? I seems like. The new passport is empty. Or do I miss something? It would be great because I am almost on my 90 days stay in the period of 180 days. How to properly set up a PDO connection Can an Indian citizen holding a valid USA visa visit Colombia without a visa? I am planning to travel to Colombia for about a week to attend an academic conference. I am an Indian passport holder currently living in USA with a F-1 visa. Do I need to obtain a visa beforehand from the Colombian consulate?  I have found   that claim that Indian citizens holding a valid USA visa are not required to apply for Colombian visa.     However, I am not sure if these sources are "official" and trustworthy.Is there a more official source? Also, does this rule apply to "tourists" only? Does anyone have any personal experience with this rule? If $G$ is isomorphic to $H$, then ${\rm Aut}(G)$ is isomorphic to ${\rm Aut}(H)$ If a group $G$ is isomorphic to $H$, prove that ${\rm Aut}(G)$ is isomorphic to ${\rm Aut}(H)$.   Can someone provide a step by step solution? Explaining along the way our strategy in proving this. As a follow-up to :  From what I've seen, this should work as expected:  void greet(){   char c[] = "Hello";   greetWith(c);   return; }   but this will cause undefined behavior:  char *greet(){    char c[] = "Hello";   return c; }   If I'm right, what's the best way to fix the second greet function? In an embedded environment? On a desktop? "invalid EFI file path" while booting Windows I just got my new working notebook with Windows 8 pre-installed. After installing Ubuntu 12.10 the grub menu says that there is an "invalid EFI file path" and it won't boot Windows. Ubuntu works fine...  Is there anything I can do about this? Interpretation of R's lm() output The help pages in R assume I know what those numbers mean, but I don't. I'm trying to really intuitively understand every number here. I will just post the output and comment on what I found out. There might (will) be mistakes, as I'll just write what I assume. Mainly I'd like to know what the t-value in the coefficients mean, and why they print the residual standard error.   Call: lm(formula = iris$Sepal.Width ~ iris$Petal.Width)  Residuals:      Min       1Q   Median       3Q      Max  -1.09907 -0.23626 -0.01064  0.23345  1.17532    This is a 5-point-summary of the residuals (their mean is always 0, right?). The numbers can be used (I'm guessing here) to quickly see if there are any big outliers. Also you can already see it here if the residuals are far from normally distributed (they should be normally distributed).  Coefficients:                  Estimate Std. Error t value Pr(&gt;|t|)     (Intercept)       3.30843    0.06210  53.278  &lt; 2e-16 *** iris$Petal.Width -0.20936    0.04374  -4.786 4.07e-06 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1    Estimates $\hat{\beta_i}$, computed by least squares regression. Also, the standard error is $\sigma_{\beta_i}$. I'd like to know how this is calculated.  I have no idea where the t-value and the corresponding p-value come from. I know $\hat{\beta}$ should be normal distributed, but how is the t-value calculated?  Residual standard error: 0.407 on 148 degrees of freedom   $\sqrt{ \frac{1}{n-p} \epsilon^T\epsilon }$, I guess. But why do we calculate that, and what does it tell us?  Multiple R-squared: 0.134,  Adjusted R-squared: 0.1282    $ R^2 = \frac{s_\hat{y}^2}{s_y^2} $, which is $ \frac{\sum_{i=1}^n (\hat{y_i}-\bar{y})^2}{\sum_{i=1}^n (y_i-\bar{y})^2} $. The ratio is close to 1 if the points lie on a straight line, and 0 if they are random.  What is the adjusted R-squared?  F-statistic: 22.91 on 1 and 148 DF,  p-value: 4.073e-06    F and p for the whole model, not only for single $\beta_i$s as previous. The F value is $ \frac{s^2_{\hat{y}}}{\sum\epsilon_i} $. The bigger it grows, the more unlikely it is that the $\beta$'s do not have any effect at all. Get the size of the screen, current web page and browser window I want to have a page-filling and -breaking longtable, so I decided to try xltabular. Unfortunately xltabular seems to screw up the booktabs rules in the normal tabular environments, see:  \documentclass{article} \usepackage{booktabs, xltabular} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tabular} \begin{document} \begin{tabular}{ccc}     \toprule     col1 &amp; col2 &amp; col3 \\     \midrule     row 2: &amp; more and moooooooooooore &amp; test \\     \bottomrule \end{tabular} \end{document}     Not loading xltabular resolves the issue.  Did I miss some package option or some incompatibilities? Is there a better package than xltabular which doesn't break booktabs?  (I am using TeXLive 2019 and compile with lualatex)    EDIT (by Skillmon)  I reduced the bug to the following MWE (which doesn't make much sense on its own), it looks like booktabs tries to be smart detecting something, but fails badly.  \documentclass{article} \usepackage{longtable} \let\xltabular\relax \usepackage{booktabs}  \begin{document} \begin{tabular}{ccc}     \toprule     col1 &amp; col2 &amp; col3 \\     \midrule     row 2: &amp; more and moooooooooooore &amp; test \\     \bottomrule \end{tabular} \end{document}   It seems to suffice that longtable is loaded and \xltabular is defined (even if it's just \relax). Is there a difference in meaning among 'should', 'happens to', or 'should happen to'? Roman numerals become “too wide” in table of contents I have a really strange situation here. My PC works fine, at least in most cases, but there's one thing that I can't deal with. When I try to copy a file from my pendrive, everything is ok -- I got 16-19M/s , it works pretty well. But when I try to copy something to the same pendrive, my PC freezes. The mouse pointer stops moving for a sec or two, then it moves a little bit and it stops again. When something is playing, for example, in Amarok, the sound acts like a machine gun. The speed jumps from 500K/s to 15M/s, average 8M/s. This occurs only when I'm copying something to a pendrive. When the process of copying is done, everything backs to normal.   I tried everything -- other pendrive, a different USB port on front panel or those ports from back, I even changed the USB pins on motherboard (front panel), but no matter where I put my USB stick, it's always the same. I tried different filesystem -- fat32, ext4. I have no problem with the device on Windows, on my laptop. It has to be my PC or something in my system. I have no idea what to look for. I'm using Debian testing with standalone Openbox. My PC is kind of old -- Pentium D 3GHz, 1GiB of RAM, 1,5TB WD Green disk. If you have something that would help me to solve this issue, I'd be glad to hear that.  I don't know what else info I should provide, but if you need something, just ask, I'll update this post as soon as possible.  I tried to reproduce this problem on ubuntu 13.04 live cd. I mounted my encrypted partition + encrypted swap and connected my pendrive to a usb port. Next I tried to start some apps, and now I have ~820MiB in RAM and about 400MiB in SWAP. There's no problem with copying, no freezing at all, everything is as it should be. So, it looks like it's a fault of the system, but where exactly? What would cause such a weird behavior? Showing that $\lnot Q \lor (\lnot Q \land R) = \lnot Q$ without a truth table I've done a truth table after reducing it to this and it seems to be equal to $\neg Q$:  $$\lnot Q \lor (\lnot Q \land R) = \lnot Q$$  But when I try to show it without a truth table (with just transformations), I end up in a loop between that and:  $$\lnot Q \land (\lnot Q \lor R)$$  Is there a way to show this is true without using a truth table? What am I missing?!  Thanks in advance! For instance, does the compiler know to translate  string s = "test " + "this " + "function";   to  string s = "test this function";   and thus avoid the performance hit with the string concatenation? What Is Exponentiation?