I am trying to pass an int array to the next activity using Intent. Here is the code. to send  Intent mIntent=new Intent(getApplicationContext(),activityvogel.class); mIntent.putExtra("stock",stock); startActivity(mIntent);}   to get  Bundle extras = getIntent().getExtras();         int stock [] = extras.getIntArray("stock");   but i always get numberformatexception here is my logcat     15015-15015/com.example.pantelis.ptyxiakh E/AndroidRuntime﹕ FATAL   EXCEPTION: main       Process: com.example.pantelis.ptyxiakh, PID: 15015       java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.pantelis.ptyxiakh/com.example.pantelis.ptyxiakh.activityvogel}:   java.lang.NumberFormatException: Invalid int: "null"               at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)               at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2442)               at android.app.ActivityThread.access$800(ActivityThread.java:156)               at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1351)               at android.os.Handler.dispatchMessage(Handler.java:102)               at android.os.Looper.loop(Looper.java:211)               at android.app.ActivityThread.main(ActivityThread.java:5389)               at java.lang.reflect.Method.invoke(Native Method)               at java.lang.reflect.Method.invoke(Method.java:372)               at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)        Caused by: java.lang.NumberFormatException: Invalid int: "null"               at java.lang.Integer.invalidInt(Integer.java:138)               at java.lang.Integer.parseInt(Integer.java:358)               at java.lang.Integer.parseInt(Integer.java:334)               at com.example.pantelis.ptyxiakh.NextActivity.onCreate(NextActivity.java:41)               at com.example.pantelis.ptyxiakh.activityvogel.onCreate(activityvogel.java:19)               at android.app.Activity.performCreate(Activity.java:5990)               at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)               at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2332)               at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2442)               at android.app.ActivityThread.access$800(ActivityThread.java:156)               at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1351)               at android.os.Handler.dispatchMessage(Handler.java:102)               at android.os.Looper.loop(Looper.java:211)               at android.app.ActivityThread.main(ActivityThread.java:5389)               at java.lang.reflect.Method.invoke(Native Method)               at java.lang.reflect.Method.invoke(Method.java:372)               at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)   i would be grateful if anyone could help
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?
Proving set of interiors is open I mistakenly typed cd // instead of cd /. To my surprise, current directory showed up as //.   What is that directory? Why does it exist?  apple@snipped $ pwd /home/apple apple@snipped $ cd / apple@snipped $ pwd / apple@snipped $ cd // apple@snipped $ pwd // apple@snipped $ cd /// apple@snipped $ pwd / How do I remove all specific characters at the end of a string in PHP? Trackpad not working after update to Ubuntu 14.10 on Dell Inspiron 15R I am trying to calculate the final velocities of two equal mass 2-dimensional circles after an elastic collision. I have tried to figure it out using formulas I know from high school physics, but nothing seems to work. My known variables are:   initial x and y velocities for each circle x and y distances between the centres of the circles at the time of the collision   The variables I would like to solve for are:   final x and y velocities for each circle   Here are diagrams showing all the variables: Change font size of the verbatim environment MAXDOP not working? I wanted to test out MAXDOP on my computer. So I set MAXDOP to 2 for a specific query. However, when I looked at my logical processors in Task Manager as I ran the query, it looked like they were all being used. I thought that it would only be using 2 logical processors if MAXDOP was set to 2? Does anyone know what is happening? Please see image below.  Another issue is, the DOP returned by the execution plan said 1. Now I know that setting MAXDOP does not mean SQL Server will actually use the number set. However, given that it seemed all my 4 logical processors were being used to process the query, it made it even more strange to see DOP 1.  This is the query I ran:   This was what happened as I ran it (i.e. it looks like all 4 logical processors are being used to run the query): Proving that two vector spaces of equal dimension are isomorphic Given the following problem     Let $U$ and $V$ be finite dimensional vector spaces, such that $\dim(U) = \dim(V)$. Prove that $U$ and $V$ are isomorphic.   I was just wondering if somebody could critique and validate my proof.  Proof  Two vector spaces $U$ and $V$ are isomorphic if and only if there exists a bijection $\phi: U \to V$. That is, an invertible linear map between the two. Let $\dim(U) = \dim(V) = n$ and let $\left\{u_1, \dots, u_n\right\}$ and $\left\{v_1, \dots, v_n\right\}$ be bases for $U$ and $V$, respectively. It follows that any vector $u \in U$ can be written as  $$ u = c_1u_1 + \cdots + c_nu_n $$  We define $\phi: U \to V$ as  $$ \phi(c_1u_1 + \cdots + c_nu_n) = c_1v_1 + \cdots + c_nv_n $$  Observe that $\phi$ is invertible. That is, given a vector  $$ v = d_1v_1 + \cdots + d_nv_n $$  in $V$, we define $\phi^{-1}: V \to U$ as  $$ \phi^{-1}(d_1v_1 + \cdots + d_nv_n) = d_1u_1 + \cdots + d_nu_n $$  Since there exists a bijection between $U$ and $V$, they are isomorphic. Problem Statement  Let $f(x) = x^3 + ax^2 + bx + c$ and $g(x) = x^3 + bx^2 + cx + a$ where $a,b,c$ are integers with $c\not=0$   Suppose that the following conditions hold:   $f(1)=0$ the roots of $g(x)=0$ are the squares of the roots of $f(x)=0$      $$\text{Find the value of} \: \: a^{2013} + b^{2013} + c^{2013}$$   My attempt  Let $f(x) = (x-p)(x-q)(x-r) \: \:$ and $g(x) = (x - p^2)(x-q^2)(x-r^2)$  Expanding we get $$f(x) = x^3 - (p + q + r)x^2 + (pq + pr + qr)x - pqr$$  $$g(x) = x^3 - (p^2 + q^2 + r^2)x^2 + (p^2q^2 + p^2r^2 + r^2q^2)x - p^2q^2r^2$$  And so we have $$a = -(p+q+r) = -p^2q^2r^2$$ $$b = pq + pr + qr = p^2 + q^2 + r^2$$ $$c = -pqr = p^2q^2 + p^2r^2 + r^2q^2$$  Then we get the following relations  $$a = -c^2$$ $$b = a^2 - 2b \implies 3b = a^2 \implies b = \frac{c^4}{3}$$  From $f(1) = 0$ we have $a + b + c = -1 \implies \dfrac{c^4}{3} + c - c^2 = -1$  However, upon graphing this function, I saw that there are no integer solutions for $c$. Have I done something wrong?  Edit  For future readers, my approach can simplified alot if you replace $r$ with $1$ since $f(1) = g(1) = 0$ Why "?v=hash" is added to my URLs? I'm new to wordpress, I set up everything, but there's something that bothers me: on every single URL or link, there's a "?v=hash" appended everywhere (example.com/?v=d21feabed96b).  I tried to see inspect every plugin, I don't understand how this parameter is added.  It looks like it's added in js, because if I see the source, there's no trace of this hash, but I can see in firebug live source.  Plugins installed:   jetpack sumome wp-piwik wp super cache woocommerce   Theme: Storefront  I tried to disable everything, but still I get this hash, does anyone knows how and why it's added?  I'm also using cloudflare How can I check if a directory exists in a Bash shell script? What command can be used to check if a directory exists or not, within a Bash shell script? Prove the following inequality:   $$\dfrac{e^x + e^{-x}}2 \le e^{\frac{x^2}{2}}$$   This should be solved using Taylor series.  I tried expanding the left to the 5th degree and the right site to the 3rd degree, but it didn't help.  Any tips? Find all integral solutions of $y^2=x^3+7$ Find all integral solutions of $y^2 = x^3+7$.  I tried to use many different moduli, but it never works. With modulo $9$, you can get $x$ is divisible by $3$. Can I install any iOS version I wish by picking and choosing which firmware to restore? URLs are linked despite being inside a code span Command for creating a directory and navigating into it directly? Finding a permutation, and number of, from powers of the permutation I'm having trouble understanding the simple "planetary" model of the atom that I'm being taught in my basic chemistry course.   In particular,    I can't see how a negatively charged electron can stay in "orbit" around a positively charged nucleus. Even if the electron actually orbits the nucleus, wouldn't that orbit eventually decay?  I can't reconcile the rapidly moving electrons required by the planetary model with the way atoms are described as forming bonds. If electrons are zooming around in orbits, how do they suddenly "stop" to form bonds.     I understand that certain aspects of quantum mechanics  to address these problems, and that there are  of atoms. My question here is whether the planetary model itself addresses these concerns in some way (that I'm missing) and whether I'm right to be uncomfortable with it. How do I set environment variables? I'm trying to set up Apache Tomcat on my pc, and it wants me to set up an environment variable for CATALINA_HOME.  Does any know how to do this? Can I still use the older Airport Utility 5.5.3 if I install the 6.0 version of Airport Utility?