I developed an Angular application and I will consume the RESTful service developed using Java (JAX-RS - Jersey).  This is my service:  @POST @Path("/add") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response addNewContact(Contact instance) {     Contact contact = new Contact(instance.getLastName(), instance.getFirstName(), instance.getPhone_1(),             instance.getPhone_2(), instance.getEmail());     contact.setPicture("Unknown.png");     try {         dao.save(contact);         return Response.status(200).entity(contact).build();     } catch (Exception e) {         return Response.status(400).entity("IMPOSSIBLE D'AJOUTER CETTE PERSONNE").build();     } }   This is the config in web.xml :  &lt;servlet&gt;  &lt;servlet-name&gt;jersey-serlvet&lt;/servlet-name&gt;  &lt;servlet-class&gt;     com.sun.jersey.spi.container.servlet.ServletContainer  &lt;/servlet-class&gt;  &lt;init-param&gt;   &lt;param-name&gt;com.sun.jersey.config.property.packages&lt;/param-name&gt;   &lt;param-value&gt;ma.restfull.services&lt;/param-value&gt;  &lt;/init-param&gt;  &lt;init-param&gt;   &lt;param-name&gt;com.sun.jersey.api.json.POJOMappingFeature&lt;/param-name&gt;       &lt;param-value&gt;true&lt;/param-value&gt;  &lt;/init-param&gt;  &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; &lt;/servlet&gt;  &lt;servlet-mapping&gt; &lt;servlet-name&gt;jersey-serlvet&lt;/servlet-name&gt; &lt;url-pattern&gt;/api/*&lt;/url-pattern&gt; &lt;/servlet-mapping&gt;   My entity is this:   @AllArgsConstructor @NoArgsConstructor @Entity(name = "contact") public class Contact {  @Id @GeneratedValue private int id;  @Column(name = "first_name", length = 50, nullable = false, unique = false, updatable = true, insertable = true) @Getter @Setter private String firstName;  @Column(name = "last_name", length = 50, nullable = false, unique = false, updatable = true, insertable = true) @Getter @Setter private String lastName;  @Column(name = "phone_1", nullable = true, unique = false, updatable = true, insertable = true) @Getter @Setter private String phone_1;  @Column(name = "phone_2", nullable = true, unique = false, updatable = true, insertable = true) @Getter @Setter private String phone_2;  @Column(name = "email", nullable = true, unique = true, updatable = true, insertable = true) @Getter @Setter private String email;  @Column(name = "picture", nullable = true, unique = false, updatable = true, insertable = true) @Getter @Setter private String picture;  public Contact(String lastName, String firstName, String phone_1, String phone_2, String email) {     super();     this.firstName = firstName;     this.lastName = lastName;     this.phone_1 = phone_1;     this.phone_2 = phone_2;     this.email = email; } }   but, when I send the request I get this   the object sent by Angular is like this:   Object { lastName: "Nom", firstName: "Prénom", phone_1: "12346565464", phone_2: "1234567890", email: "aaa@aaa.com", id: 0, picture: "Unknown.png" }
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?
Can I choose to delay my turn in combat? In D&amp;D 4e there was an option to Delay your initiative:     Perform your actions as desired and adjust your initiative to your new   position in the order.   Does this rule to change initiative order still exist in 5th edition? I cannot find it in the PHB. I've got a recipe that calls for some buttermilk, but none on-hand. Is there some way I could use some common ingredient(s) as a substitute? Dependency error while installing WINE Every time I try to install "WINE" VIA the Software Center on Ubuntu 12.10, I get this error:  The following packages have unmet dependencies:  wine1.4: PreDepends: dpkg (&gt;= 1.15.7.2~) but 1.16.7ubuntu6 is to be installed          Depends: libc6 (&gt;= 2.14) but 2.15-0ubuntu20 is to be installed          Depends: wine1.4-amd64 (= 1.4.1-0ubuntu1) but 1.4.1-0ubuntu1 is to be installed          Depends: wine1.4-i386 (= 1.4.1-0ubuntu1) but it is not going to be installed   When I try installing it VIA the terminal, this is what I get:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  wine1.4 : Depends: wine1.4-i386 (= 1.4.1-0ubuntu1) but it is not installable            Recommends: gnome-exe-thumbnailer but it is not going to be installed or                        kde-runtime but it is not going to be installed            Recommends: ttf-droid            Recommends: ttf-mscorefonts-installer but it is not going to be installed            Recommends: ttf-umefont but it is not going to be installed            Recommends: ttf-unfonts-core but it is not going to be installed            Recommends: winbind but it is not going to be installed            Recommends: winetricks but it is not going to be installed E: Unable to correct problems, you have held broken packages.   how do I fix this? If we're implementing , why don't we also require that users have at least 1.5 times the amount of reputation needed to ask their current question in order to answer their current question?  I believe this would really reduce the amount of non-answers that should have been edits to the original question, or perhaps a comment under another answer.  Edit  Inspired by marcog's excellent suggestion , perhaps it would make more sense to set a minimum amount of time that must pass before you can answer your own question. New users would need to wait in the neighborhood of six hours, while users with more reputation could answer their own question within minutes if they discovered the solution on their own.  This would get in the way of the behavior that we don't want, which is people posting answers that should have been edits while not annoying most. Files greater than 1 GB and older than 6 months I want to find files which are greater than 1 GB and older than 6 months in entire server. How to write a command for this? Series prove or disprove statement Let $a_n$ be a sequence. $\lim_{n\to\infty} a_n =0 $ then the series: $\sum_{n=1}^\infty a_n, \ \sum_{n=1}^\infty (a_n+a_{n+1}) $ converge and diverge together.  It doesn't seem right, there are no convergence tests that fit this question yet every counterexample I try does not seem to work. Is this how I should see the sum? $\sum_{n=1}^\infty (a_n+a_{n+1})=2\sum_{n=1}^\infty a_n +a_{n+1}$ If so then there's no real difference between the two series since you multiply it by a constant and add just one more value. How does one solve the matrix equation $AX+XB=C$ for $X$? It doesn't seem too difficult. I tried many times but failed.  I'm an adult student... I am now vexed about Gilbert Strang - An Introduction to Linear Algebra. I don't even understand a single word in Wikipedia: . If you have ever use some nice workable materials or lecture notes? You can generously upload and share the links of the lecture notes and assignments. Different subjects/ topics are welcome, as long as you deem they are nice and workable.   The problem origins from a system of diff equation, using undetermined coefficients (matrix) to find the particular solution. Try $y_p=X\begin{pmatrix}   e^{\alpha t} \\ e^{\beta t} \end{pmatrix}$  $\dot{y}+Ay=C\begin{pmatrix} e^{\alpha t} \\ e^{\beta t}\end{pmatrix}$   $\dot{y_p}=X\begin{pmatrix} \alpha &amp; 0 \\ 0 &amp; \beta \end{pmatrix} \begin{pmatrix}e^{\alpha t} \\ e^{\beta t}\end{pmatrix}$  substitute $\dot{y_p}$ and $y_p$ into the original differential equation..  $X\begin{pmatrix} \alpha &amp; 0 \\ 0 &amp; \beta \end{pmatrix}+AX=C$ AIC versus Likelihood Ratio Test in Model Variable Selection The software that I am currently using to build a model compares a "current run" model to a "reference model" and reports (where applicable) both a chi-squared p-value based on likelihood ratio tests and AIC values for each model.  I know that one advantage of AIC over likelihood ratio tests is that AIC can be compared on non-nested models.  However, I am not aware of any reason why AIC couldn't or shouldn't be compared on nested models.  In my model, when comparing nested models for variable selection, I'm finding several cases where the likelihood ratio test and the AIC comparison are suggesting opposite conclusions.  Since both are based on likelihood calculations, I'm struggling to interpret these results.  However the documentation of my software says (without explaining),   "If two models are nested (i.e. one is a sub-set of the other) then the more usual chi-squared test is the most appropriate to use. If the models are not nested, the AIC can be used..."  Can anyone elaborate on this and/or explain why AIC is not as helpful as likelihood ratio tests on nested models? Wrong user when logging into Data Explorer I think I'm having the same issue as reported in this question:    When I log into SEDE with the same OpenID account I use for SE, a different user comes up ("James Wiseman" on Stack Exchange and "adsense" in Data Explorer).  Is there anything I can do personally to rectify this, or must I rely on the admins? How to add new item in existing string array in C#.net?  I need to preserve the existing data. Can a spell be prepared once and cast multiple times? Two seasonal periods in ARIMA using R I'm currently using R to predict a time series with these instructions:  X &lt;- ts(datas, frequency=24) X.arima &lt;- Arima(X, order=c(2,1,0), seasonal=c(1,1,1)) pred &lt;- predict(X.arima, n.ahead=24) plot.ts(pred$pred)   As you can see I've data each hour, and I chose the seasonal period of 24 (one day).  I would like to improve my forecasting using an additional seasonal period in order to include the seasonal component of the week (seasonal length of 7*24=168 data)  Is there any method for this? How do you do it?  UPDATE: I've read  (your) blog page, maybe can I use the external regressors to simulate a second seasonal period? Prove the following in $S_n$:  Let $\alpha = (a_1,a_2,\ldots,a_s)$ be a cycle and let $\pi$ be a permutation in $S_n$. Then $\pi\alpha\pi^{-1}$ is the cycle $(\pi(a_1),\ldots,\pi(a_s)).$     I'm not sure where to even start. I am writing my thesis,  and i am in restructuring phase - sorting theorems where they should belong thematically. And it would be helpful to have all the proofs hidden so i am not laden with the additional information.  Is it possible to add something like hideproof to documentclass options to omit them when compiling the latex file. Let $D := \{z \in \mathbb{C}: |z| &lt; 1\}$ and $f\colon D \rightarrow \mathbb{C}$ be holomorphic. Suppose $\lvert f(z)\rvert \leq 1$ on $D$, show that $$\frac{|f(0)| - |z|}{1 + |f(0)||z|} \leq |f(z)| \leq \frac{|f(0)| + |z|}{1 - |f(0)||z|} \ \forall z \in D.$$  I have tried using Cauchy Integral Formula to $f$ and expanding $f$ at $0$, but I have no idea why $f(0)$ appears in the inequality in the former case. Both answers and hints are appreciated and thanks in advance! What is the proper way to explain the twin paradox? I’m able to copy-paste from any application to any application. I’m able to copy from a comment or from a question or from an answer. I’m able to paste to a question or answer. However, if I attempt to paste into a comment, nothing happens. I am able to subsequently paste into another application, confirming that the text is actually on the clipboard.   However, copying SE links will paste them successfully, but all other text - including other links - still fails. This leads me to believe that it’s a SE issue and not an Apple one.   This has been an issue since 11.0 beta and persists through iOS 13 release. Say I have a huge text file (>2GB) and I just want to cat the lines X to Y (e.g. 57890000 to 57890010).  From what I understand I can do this by piping head into tail or viceversa, i.e.   head -A /path/to/file | tail -B   or alternatively  tail -C /path/to/file | head -D   where A,B,C and D can be computed from the number of lines in the file, X and Y.  But there are two problems with this approach:   You have to compute A,B,C and D. The commands could pipe to each other many more lines than I am interested in reading (e.g. if I am reading just a few lines in the middle of a huge file)   Is there a way to have the shell just work with and output the lines I want? (while providing only X and Y)? How to stop a script from running if it's not root (and echo "Not running as root! Exiting...") Here's my source:  #!/bin/bash  echo "Running script to free general cached memory!" echo ""; echo "Script must be run as root!"; echo ""; echo "Clearing swap!"; swapoff -a &amp;&amp; swapon -a; echo ""; echo "Clear inodes and page file!"; echo 1 &gt; /proc/sys/vm/drop_caches; echo "";   It clears caches and stuff, and it echoes that it needs to be run as root in the terminal. I basically just want the script to cease running if it detects it's not being executed as root.   Example:  "Running script to free general cached memory!" "Warning: script must be run as root or with elevated privileges!" "Error: script not running as root or with sudo! Exiting..."   If run with elevated privileges, it just runs as normal. Any ideas? Thanks! How to find a point on a line at a given distance from a given point on the same line (given the equation of the line)? You are given a point P(x,y) on a line of equation ax + by + c = 0. I want another point, Q(a,b) on the same line which is at a distance d from P. There will be two points. I want to find both and know which side of P each one lies.  There are related questions in this forum, but I didn't get what I am exactly looking for. Sorry for beating around the bush, and thanks for any help... Please give me an elaborate explanation. Thanks once again!!!