please help me i keep my appliction keep crashing when i open it E/: Cannot load libgui-plugin D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.example.ayushjain.myapplication33, PID: 24308     java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.ayushjain.myapplication33/com.example.ayushjain.myapplication33.Main2Activity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2911)         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2989)         at android.app.ActivityThread.-wrap11(Unknown Source:0)         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1688)         at android.os.Handler.dispatchMessage(Handler.java:106)         at android.os.Looper.loop(Looper.java:164)         at android.app.ActivityThread.main(ActivityThread.java:6753)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:482)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)      Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference         at com.example.ayushjain.myapplication33.Main2Activity.onCreate(Main2Activity.java:37)         at android.app.Activity.performCreate(Activity.java:7041)         at android.app.Activity.performCreate(Activity.java:7032)         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1231)         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2864)         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2989)          at android.app.ActivityThread.-wrap11(Unknown Source:0)          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1688)          at android.os.Handler.dispatchMessage(Handler.java:106)          at android.os.Looper.loop(Looper.java:164)          at android.app.ActivityThread.main(ActivityThread.java:6753)          at java.lang.reflect.Method.invoke(Native Method)          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:482)          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
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?
I'm working on creating an illustration that I will need in many, different guises in differential geometry/manifold theory etc. Following on from a previous (answered) question of mine (, I want to show how two coordinate lines in the plane originate from two curves on a surface via the chosen map:  \begin{tikzpicture}     \begin{axis}[             name=mfd,             declare function={                     f(\x,\y)=10-(\x^2+\y^2);             },                   declare function={                     c_x(\t)=(cos(\t)+(sin(5*\t)/10))/3+1;             },                   declare function={                     c_y(\t)=(sin(\t))/2-1;             },                   declare function={                     c_z(\t)=f(c_x(\t),c_y(\t));             },           ]                    \addplot3[surf,domain=-2:2,domain y=-2:2,]{f(x,y)};             \addplot3[black,opacity=1.0,variable=t,domain=0:360,dashed,thin] ({c_x(t)},{c_y(t)},{c_z(t)});             \addplot3[black,opacity=1.0,variable=t,domain=-2:2,thin] (t,-1.2,{f(t,-1.2)});             \addplot3[black,opacity=1.0,variable=t,domain=-2:2,thin] (0.8,t,{f(t,-1.2)});             \addplot3[black,opacity=1.0,only marks,mark=text,text mark=$\cdot$] (1,-1,{f(1,-1)}) coordinate (a);     \end{axis}     \begin{axis}[             at={($(mfd.north east)+(1cm,-2cm)$)},             anchor=north west,             declare function={                     c_x(\t)=(cos(\t)+(sin(5*\t)/10))/3+1;             },                   declare function={                     c_y(\t)=(sin(\t))/2-1;             }            ]                    \addplot[variable=t,domain=0:360]({c_x(t)},{c_y(t)});             \addplot[black,opacity=1.0,only marks,mark=text,text mark=$\cdot$] (1,-1) coordinate (b);             \addplot[variable=t,domain=0.6:1.4](t,-1.2);             \addplot[variable=t,domain=-1.5:-0.5](0.8,t);     \end{axis}     \draw [-stealth, shorten &lt;= 3pt, shorten &gt;= 3pt] (a) to[bend left] (b); \end{tikzpicture}   However, I have a couple of problems:   The curves representing the coordinate axes pulled back from the plane via the coordinate map insist on being closed off with a straight line - is there a way to avoid that? I want to draw all the black curves with a thin, dashed line, but I probably don't understand how to set those options. What am I doing wrong?   I apologise if these questions are rather elementary, but I find the relevant manuals difficult to search through; they seem to be meant for reading cover to cover rather than reference. integral roots for $f(x) = 41$ if $f(x) = 37$ has 5 distinct integral roots. What is the difference between /sbin/nologin and /bin/false? I have often heard it recommended that a user account should be disabled by setting its shell to /bin/false. But, on my existing Linux systems, I see that a great number of existing accounts (all of them service accounts) have a shell of /sbin/nologin instead.  I see from the man page that /sbin/nologin prints a message to the user saying the account is disabled, and then exits. Presumably /bin/false would not print anything.  I also see that /sbin/nologin is listed in /etc/shells, while /bin/false is not.  The man page says that FTP will disable access for users with a shell not listed in /etc/shells and implies that other programs may do the same. Does that mean that somebody could FTP in with an account that has /sbin/nologin as its shell?  What is the difference here? Which one of these should I use to disable a user account, and in what circumstances? What other effects does a listing in /etc/shells have? Are "white" and "black" ever capitalized when referring to people? How to embed Stack Overflow flair in a WordPress.com (free) blog? Has anyone successfully embedded their  on a WordPress.com-hosted blog?  The free hosted version of  (not )  from all posts before publishing. So they to strip out just about anything I can add to embed my Stack Overflow flair.  Note: I'll be switching to a paid, hosted site in the future (fixing the problem), but I'm looking for a quick, short-term solution. How can I recover files from partitioned disk? Prove there's a simple path of length $k$ in a simple graph $G$ where all the vertices have degree of at least $k$.   Relevant definitions:  $G$ is a simple graph that consists of a vertex set $V(G) = \{v_1, v_2, ..., v_n\}$ and an edge set $E(G) = \{e_1, e_2, ..., e_m\}$ where each edge is an ordered pair of vertices. The edge $\{u,v\}$ is denoted $uv$.  A walk of length $k$ is a sequence $v_0,e_1,v_1,e_2,...,e_k,v_k$ of vertices and edges such that $e_i=v_{i-1}v_i$ for all $i$. A path is a walk with no repeated vertex.   My attempt:  Induction, for $k=1$ it's obvious.  Suppose for $k-1$ and we'll prove for $k$.  Let $G$ be a simple graph such that $\forall v \in V : d(v)\ge k$.  We can assume that there are at least $k+1$ vertices since there are $k$ neighbours to every vertex.  Let $v_0$ be some vertex, it has $k$ neighbours, we'll move to one of its neighbours say $v_1$ and remove $v_0$. So now there are $k$ vertices with a degree of at least $k-1$ and from the induction hypothesis we'll have a path of length $k$.  Is using only $k$ vertices from $n$ right? Does it keep the generality when using only all the neighbours of $v_0$? Finding out the area of a triangle if the coordinates of the three vertices are given What is the simplest way to find out the area of a triangle if the coordinates of the three vertices are given in $x$-$y$ plane?   One approach is to find the length of each side from the coordinates given and then apply . Is this the best way possible?   Is it possible to compare the area of triangles with their coordinates provided without actually calculating side lengths? I read a very special book a few years back. We follow a boy who lives in a world where, if one moves far enough in a direction, that person gets distended and changed in size.   The boy works on laying tracks for the train, on which his city is. The city has to continually keep moving or it also will get squashed.   It's like a world like if one end is pinched and then dragged out like a piece of rubber string or bubble gum.   The book is not older than 10 years I think.  Hope I was clear enough... Stack Overflow is not getting refreshed automatically Stack&nbsp;Overflow is not getting refreshed automatically. I have to press F5 explicitly to refresh the website. What might be the issue? Tall curly brace I would like to put a tall (long) left curly bracket on the left side of the following:  \documentclass[12pt]{article}  \begin{document}  \noindent c: $\{$1, ..., n$\}$ $\rightarrow$ $\{$1, ..., n$\}$, such that  \hspace{20 mm}  \noindent c($a_i$) = $a_{i+1}$ for 1 $\le$ $i$ &lt; $l$  \hspace{20 mm}  \noindent c($a_l$) = $a_1$   \end{document}   Please let me know if you can help. Thanks! I own a MicroMax A100. I want to install the latest version of a different ROM (Samsung or Nexus).  Is it possible? If so, can you tell me how?  If not, can I install a ROM made for a different device, but from the same manufacturer? For example, could I install a ROM for the MicroMax A110, which is the successor of A100? I can't update 12.04 LTS. The Update Manager shows this:  CD/DVD 'Ubuntu 12.04 LTS _Precise Pangolin_ - Release i386 (20120423)' is required Please insert the above CD/DVD into the drive '/media/cdrom/' to install software packages from it.   The image I downloaded and burned to CD is from  the PC (Intel x86) desktop CD version. I burned many CDs but the result is the same. I have Solaris 8 OS installed in French.  Is it possible to switch from French to English without reinstalling the OS ? If yes how ?  When locale -a i have this :  POSIX common en_US.UTF-8 C iso_8859_1 en_CA en_CA.ISO8859-1 en_US en_US.ISO8859-1 en_US.ISO8859-15 en_US.ISO8859-15@euro fr_CA fr_CA.ISO8859-1 iso_8859_15 th th_TH th_TH.TIS620   Even when I try to edit /etc/default/init with :  LANG=en_US.ISO8859-15 LC_COLLATE=en_US.ISO8859-15 LC_CTYPE=en_US.ISO8859-15 LC_MESSAGES=en_US.ISO8859-15 LC_MONETARY=en_US.ISO8859-15 LC_NUMERIC=en_US.ISO8859-15 LC_TIME=en_US.ISO8859-15 LC_ALL=en_US.ISO8859-15   and reboot : nothing happens.  To verify the result i always use date and when i reboot : i also have the date in french.  P.S : I have to do this configuration in a computer which isn't here in my office, so i have to this manipulation in a an another computer here in my office and if it works, i'll do it to the other computer.  So the computer here is configured in English and i have to switch it to French. Here is the content of my ~./dt :  C                     errorlog              sessionlogs Desktop               errorlog.old          sessions Trash                 errorlog.older        simulateur.dtwmrc appconfig             help                  startlog appmanager            icons                 startlog.old asr.dtwmrc            outils.dtwmrc         startlog.older bin                   palettes              tmp bookmarks             sdtfonts              types dtwmrc                sdtpcaction.conf      wsmenu en_US.ISO8859-15      sdtpcaction.conf.bak   Thanks How do you get assembler output from C/C++ source in gcc? How does one do this?  If I want to analyze how something is getting compiled, how would I get the emitted assembly code? From question . You have to use \r when replacing text for a newline, like this  :%s/%/\r/g   But when replacing end of lines and newlines for a character, you can do it like:  :%s/\n/%/g    What section of the manual documents these behaviors, and what's the reasoning behind them? What is $dx$ in integration? Can't run a shell script So I have this script:  #!/bin/bash # Flips the screen (hopefully)  syntax_error=0 orientation=0  current_orientation="$(xrandr -q --verbose | grep 'connected' | egrep -o  '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')" case $current_orientation in         normal)                 current_orientation=0         ;;         left)                 current_orientation=1         ;;         inverted)                 current_orientation=2         ;;         right)                 current_orientation=3         ;; esac  if [ $current_orientation -eq 0 ]; then         orientation=2 fi  if [ $current_orientation -eq 2 ]; then         orientation=0 fi method=evdev  # LENOVO S10-3t CHANGE ==&gt; Hard Coded my device number to 11!!!!!!!!  device=11  swap=0 invert_x=0 invert_y=0 real_topx=0 real_topy=0 real_bottomx=4020 real_bottomy=4020  case $orientation in         0)                 swap=0                 invert_x=0                 invert_y=0                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomx                 bottomy=$real_bottomy         ;;         1)                 swap=1                 invert_x=1                 invert_y=0                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomy                 bottomy=$real_bottomx         ;;         2 )                 swap=0                 invert_x=1                 invert_y=1                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomx                 bottomy=$real_bottomy         ;;         3 )                 swap=1                 invert_x=0                 invert_y=1                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomy                 bottomy=$real_bottomx         ;; esac  if [ $method = "evdev" ]; then         xinput set-prop "$device" "Evdev Axes Swap" $swap         xinput set-prop "$device" "Evdev Axes Swap" $swap         xinput set-prop "$device" "Evdev Axis Inversion" $invert_x $invert_y         xinput set-prop "$device" "Evdev Axis Calibration" $topx $bottomx $topy $bottomy         if [ $orientation = 2 ]; then                            xrandr -o inverted         fi         if [ $orientation = 0 ]; then                 xrandr -o normal         fi fi  #   It's for flipping screen in my Lenovo S10-3t. I copied it from the netbook's wiki page, and added the #!/bin/bash at the top. The filename is flipscreen.sh. How can I make it work? Difference between  and  in Java Why is diamond transparent while graphite is not? Diamond and graphite are both made of the same atom, carbon. Diamond has a tetrahedron structure while graphite has a flat hexagonal structure. Why is diamond transparent while graphite is not (at least not with more than a couple of layers)?