Image of step into for saveEmployee method:  I am learning Spring+JDBC, and trying to get SQL date-datatype into Java as java.util.Date or java.sql.Date object, and running into null pointer exception.  Code in the main method for inserting data into Employeetabke that causes exception:  //the following parses date string into java.util.date     ApplicationContext ctx = new ClassPathXmlApplicationContext("spring.xml");     EmployeeDAO empDao = (EmployeeDAO)ctx.getBean("employeeDao");     Employee employee = new Employee();     employee.setName("Robert");     //the following parses date string into java.util.date     employee.setJoining_Date((new SimpleDateFormat("MM/dd/yyyy")).parse("12/30/2016"));     employee.setSalary(200);     employee.setsSN("837463");   Definition of the setters in Employee.java model class:  import java.sql.Date  public void setJoining_Date(java.util.Date joining_Date) {         this.joining_Date = new java.sql.Date(joining_Date.getTime()); } public void setJoining_Date(Date joining_Date){         this.joining_Date = joining_Date; }   Method:  public void saveEmployee(Employee e){     this.jdbcTemplate.update(this.employee_insert, new Object[]{e.getName(), e.getJoining_Date(), e.getSalary(), e.getsSN()});     }   Exception:  Exception in thread "main" java.lang.NullPointerException     at com.springdao.EmployeeDaoImpl.saveEmployee(EmployeeDaoImpl.java:49)     at com.springclient.EmployeeExec.main(EmployeeExec.java:28)   Please also advise about best practices regarding implementing such code.  Spring.xml:  &lt;beans xmlns="http://www.springframework.org/schema/beans"             xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance"             xsi:schemaLocation ="http://www.springframework.org/schema/beans             http://www.springframework.org/schema/beans/spring-beans-                2.0.xsd"&gt;      &lt;bean id ="dataSource" class               ="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;       &lt;property name ="driverClassName" value ="com.mysql.jdbc.Driver"/&gt;       &lt;property name ="url" value ="jdbc:mysql://localhost:3306/branch_db"/&gt;       &lt;property name ="username" value ="root"/&gt;       &lt;property name ="password" value ="root"/&gt;     &lt;/bean&gt;      &lt;bean id ="jdbcTemplate" class                      ="org.springframework.jdbc.core.JdbcTemplate"&gt;       &lt;property name ="dataSource" ref ="dataSource"/&gt;     &lt;/bean&gt;      &lt;bean id ="employeeDao" class  ="com.springdao.EmployeeDaoImpl"&gt;       &lt;property name ="jdbcTemplate" ref ="jdbcTemplate"/&gt;     &lt;/bean&gt;  &lt;/beans&gt;
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?
How to create wifi hotspot in Ubuntu 17.10 Multi document printing from document library? Is there any one have solution for print multiple documents from Document library? User has option to select multiple documents or single document or inside folder.  I found commercial product "Unbounded Printing Services for SharePoint". But is so expensive. Please share me if you have any thoughts. "invalid use of incomplete type" error with partial template specialization The following code:  template &lt;typename S, typename T&gt; struct foo {    void bar(); };  template &lt;typename T&gt; void foo &lt;int, T&gt;::bar() { }   gives me the error  invalid use of incomplete type 'struct foo&lt;int, T&gt;' declaration of 'struct foo&lt;int, T&gt;'   (I'm using gcc.) Is my syntax for partial specialization wrong? Note that if I remove the second argument:  template &lt;typename S&gt; struct foo {    void bar(); };  template &lt;&gt; void foo &lt;int&gt;::bar() { }   then it compiles correctly. Korean characters scrambled [XeLaTeX; Noto Sans Korean]? I was trying to find a font which has obsolete jamo and the right combining behaviour. Yesterday I found out about , which seems to have both of these. However, when I use it in XeTeX, I get some seemingly-arbitrary hanja (or blank spaces) instead of the expected characters.  (I’m guessing the composing behaviour will fix itself when the right characters are selected. And yes, I know that Code2000 is working perfectly in this example, but unfortunately it is the ugliest font in the world. :p)  MWE:  \documentclass{article} \usepackage{fontspec}  % 1. precomposed: U+BB47 % 2. separate jamo: U+1106, U+116E, U+11BA % 3. obsolete [separate jamo]: U+113B, U+119F, U+11EB \newcommand\test[1]{#1 &amp; {\fontspec{#1}{뭇; 뭇; ᄻᆟᇫ}} \\}  \begin{document}  \begin{tabular}{rl} \test{Arial Unicode MS} \test{Batang} \test{Code2000} \test{Gulim} \test{GungSeo} \test{HeadLineA} \test{Nanum Brush Script} \test{Nanum Myeongjo} \test{Nanum Pen Script} \test{Noto Sans Korean} \test{PCMyungjo} \test{PilGi} \test{Adobe Gothic Std} \test{Adobe Myungjo Std} \test{Apple SD Gothic Neo} \test{AppleGothic} \test{AppleMyungjo} \end{tabular}  \end{document} I have a file with values organized in columns, and separated by commas, as in the file below:   324,01,1,113333600000,1,, 016,01,1,134954200000,1,, 770,01,1,109069200000,1,, 853,01,1,111518800000,1,,   When I use the following awk command, the delimiter is being changed from commas to spaces   Code:  awk -F, '{$4=$4/1024}{print $0}'   The output becomes:   324 01 1 110677343.75 1   016 01 1 131791210.93 1   770 01 1 106512890.62 1   853 01 1 108905078.12 1    How can I change the value of the field without changing the delimiter? Evaluate the integral $\int e^{-x}x^n dx$ Evaluating the integral $\int_{0}^{\infty}  e^{-x}x^n dx$ where n=0,1,2 ...   1st Integration by part: let $a=x^n$, $da= nx^{n-1} dx$, Also $db=e^{-x}$, $b=-e^{-x}$ We have $$ -x^n e^{-x} + n\int x^{n-1}e^{-x} dx$$  2nd: let $a=x^{n-1}, da= (n-1)x^{n-2}, db= e^{-x}, b= -e^{-x}$ We have $$-x^n e^{-x} + n\left[x^{n-1}(-e^{-x}) - \int(n-1)x^{n-2}\cdot -e^{-x}\right]$$  How would you find the general form? What would it be? What is the correct way to install proprietary ATI Catalyst Video Drivers (fglrx) directly from AMD? Local BLAST Copy Number per Hit I generated a series of local BLAST databases using makeblastdb of metagenomic data and am searching for the presence of a particular gene. While I can do the normal BLAST analysis looking at e-values, % identity, etc. I haven't been able to figure out how to determine how many times a given sequence exists in the database.  So: given a BLAST database of metagenomic data where a particular gene may exist multiple times, how do I determine the copy number of a given BLAST hit?  Thanks in advance. Wrap Caption Around TikZ Figure What would you call a person who systematically dumps his work on you in a bid to evade responsibilities (with a work philosophy that when you don't learn or do it, you are never given the responsibilities and thus have no fear of making mistakes) but cluelessly whines to the same people around him for not having all the benefits that they (the higher ranking hardest working colleagues) earn.  PS: Owing to a bad management (Racial discrimination, Poor work ethic,ignorance, etc), if it helps. It would be easier to ask for a user's password only once during registration.  The problem: The user could make a mistake while typing the password once because of hiding letters.  The solution: The user could have a toggle button for showing or hiding the password.    Working example with . This approach could be used on the registration or login page.   Are there any benefits to asking a user's password twice during registration vs just not masking the password? Why would you ask twice?  P.S. :        Users make more errors when they can't see what they're typing while filling in a form. They therefore feel less confident. This double degradation of the user experience means that people are more likely to give up and never log in to your site at all, leading to lost business. (Or, in the case of intranets, increased support calls.)   The more uncertain users feel about typing passwords, the more likely they are to (a) employ overly simple passwords and/or (b) copy-paste passwords from a file on their computer. Both behaviors lead to a true loss of security.      Update: I created a . So you may use it if you want to.    Update 2: .  Update 3: Internet Explorer 10 added a toggle password visibility icon. It looks like this:    Update 4: Article about .  Update 5: Example with . I have the following table:     \documentclass[a4paper,preprint,aps,                    unsortedaddress]{revtex4}     \usepackage[top=2.5cm,bottom=2.5cm,                 left=3.5cm,right=2.5cm]{geometry}     \usepackage{longtable,array,booktabs}      \ifdefined\mc        \renewcommand{\mc}{\multicolumn}     \else        \newcommand{\mc}{\multicolumn}     \fi      \begin{document}           \setlength\LTleft{-3.0cm}         \setlength\LTright{-2.0cm}          \scriptsize      \begin{longtable}{ l r @{--} p{1.3cm} &gt;{\centering}p{2.6cm}                         *{4}{p{1.25cm}} p{2.1cm}}                    %% headers and footers      \caption{Table} \\      \hline\hline     \endfirsthead      \mc{9}{c}{\tablename\ \thetable\ -- \emph{Continued from previous page}} \\      \hline     aaaaaaaaaaaaaaaaaaaaaaaa &amp; \mc{2}{c}{bbb--ccc} &amp; ddd &amp; eee &amp; fff &amp; ggg &amp; hhh &amp; iii \\     \hline     \endhead      \hline     \mc{9}{r}{\emph{Continued on next page}} \\     \endfoot      \hline\hline     \endlastfoot      %% body of table          aaaaaaaaaaaaaaaaaaaaaaaa &amp; \mc{2}{c}{bbb--ccc} &amp; ddd &amp; eee &amp; fff &amp; ggg &amp; hhh &amp; iii \\     aaaaaaaaaaaaaaaaaaaaaaaa &amp; bbb &amp; ccc &amp; ddd &amp; eee &amp; fff &amp; ggg &amp; hhh &amp; iii \\     aaaaaaaaaaaaaaaaaaaaaaaa &amp; bbb &amp; ccc &amp; ddd &amp; eee &amp; fff &amp; ggg &amp; hhh &amp; iii \\     aaaaaaaaaaaaaaaaaaaaaaaa &amp; bbb &amp; ccc &amp; ddd &amp; eee &amp; fff &amp; ggg &amp; hhh &amp; iii \\      \end{longtable}     \end{document}   which I would like to shift to the left by setting \setlength\LTleft{-3.0cm}  and \setlength\LTright{-2.0cm}. Furthermore, I have to apply \scriptsize for the table. However, none of these commands are working with revtex4. Could you please provide a solution to this problem? (This question is the same as in , but I cannot sign up with that username.)  If it is not possible, an alternative solution would also be useful for me. For this case, I attached the first page of my real table. Check to see if an email is already in the database using prepared statements How to determine $\int x^2 e^{-x^2}\mathrm dx$? I was wondering how to determine $$\int x^2 e^{-x^2}\mathrm dx?$$ I tried to move the exponential into the integrator, and apply integration by parts, but that will make the integrand more complicated. Thank you! Fixed Field of $\sigma, \tau$ Let $k$ be a field and let $K=k(x)$ be the rational function field in one variable over $k$. Let $\DeclareMathOperator{\aut}{Aut}\sigma, \tau \in \aut(K)$ s.t. $$\sigma\left(\frac {f(x)}{ g(x)}\right)=\frac {f(1/x)}{g(1/x)}\qquad \&amp;\qquad \tau\left(\frac {f(x)}{ g(x)}\right)=\frac {f(1-x)}{g(1-x)}.$$ Find the fixed field $F$ of $&lt;\sigma, \tau&gt;$. Determine $\DeclareMathOperator{\gal}{Gal}\gal(k/F)$. Find an $h \in F$ so that $F=k(h)$.   Now for the first automorphism $\sigma$, I think if I concentrate on $k[x]$ it will give me some idea. Now, if $f(x)=a_0+a_1x+a_2x^2+ \cdots + a_nx^n \in k[x]$ then if $x^n \sigma(f(x))=f(x)$ the case will be $a_i=a_{n-i}$ $\forall i=0(1)[n/2]$. So all the funtions in $K$ which will be fixed by $\sigma$ are of the form $\frac {f(x)}{ g(x)}$ where $f(x)=a_0+a_1x+a_2x^2+ \cdots + a_nx^n$ and $g(x)=b_0+b_1x+b_2x^2+ \cdots + b_nx^n$ such that $a_i=a_{n-i}$ $\forall i=0(1)[n/2]$ and $b_i=b_{n-i}$ $\forall i=0(1)[n/2]$.   Please check whether am I right or not?  And any ideas for the rest of the part? Do I need a visa for Paris, if my connecting flight stops for 24 hours in Paris? Do I need visa for Paris, if my connecting flight stops at Paris for 24hrs and I want to visit Paris during that 24hrs? I have US B1 visa. I'll be travelling from San Francisco to Bangalore (India) via Paris. I hold Indian passport. If yes, what is the procedure for that visa? Assume that $A$ is an $n\times n$  real matrix, i.e. $$A^T=-A.$$  Since $\det(A-\lambda I)=\det(A^T-\lambda I)$, $A$ and $A^T$ have the same eigenvalues. On the other hand, $A^T$ and $-A$ also have the same eigenvalues. Thus if $\lambda$ is an eigenvalue of $A$, so is $-\lambda$. If $n$ is odd, $\lambda = 0 $ is an eigenvalue.  A curious search in Google returns  the nonzero eigenvalues of $A$ are all pure imaginary and thus are of the form $iλ_1, −iλ_1, iλ_2, −iλ_2,$ … where each of the $λ_k$ are real.   Here is my question:     How can I prove the fact that "the nonzero eigenvalues of $A$ are all pure imaginary"? In a bash shell script, writing a for loop that iterates over string values How do I return a longitude and latitude from Google Maps JavaScript geocoder? I'm just starting to learn LaTeX. I tried typing \begin{equation*}  (math goes here)  \end{equation*}  and I got a whole bunch of errors. It seems LaTeX interpreted the empty line as the equation: when it saw nothing there, I guess it just ended math mode? It then said my other commands needed $'s so I assume that's what happened. When I typed \begin{equation*} (math goes here) \end{equation*}  everything was fine. So I'm confused. If LaTeX sees an empty line in an environment, does it just interpret this as me changing my mind, and deciding not to use the declared environment?