I am trying to create a 10X10 grid of JButtons. I have tried using a 2D array to instantiate the buttons but I get a NullPointerException error
What is a NullPointerException, and how do I fix it?
Rejection of text containing SQL statements OK, I've been having weird problems for the last 1/2 hour trying to  on StackOverflow, and I keep getting this result (on Firefox 3.6)     The connection was reset      The connection to the server was reset while the page was loading.         The site could be temporarily unavailable or too busy. Try again in a few        moments.   If you are unable to load any pages, check your computer's network        connection.   If your computer or network is protected by a firewall or proxy, make sure        that Firefox is permitted to access the Web.      The problem seems to occur when I try to post some code with 'd--- table' in it, where 'd---' is replaced by the word drop.  I cannot post the following 3 lines, in either SO or this site, if they include the well-known SQL statements DROP.  stat.executeUpdate('d--- table if exists people;'); stat.executeUpdate('create table people (name, occupation);'); prep = conn.prepareStatement(...     'insert into people values (?, ?);');   test again:  'dro* table' 'drop ball' drop the table drop fable drop    t*ble droptable   drop a table  The evil words for me are "drop" and "table"... how come you guys can post? :(  edit: Could someone please suggest another online site that is not stackoverflow that is a quick way to try out a POST request of a text field?  UPDATE: Never mind. I don't know what the answer is, but the same problem occurs on Google's website. So it's not stackoverflow. Now to go to my IT Dept... Prove that $\sqrt 2 + \sqrt 3$ is irrational I have proved in earlier exercises of this book that $\sqrt 2$ and $\sqrt 3$ are irrational. Then, the sum of two irrational numbers is an irrational number. Thus, $\sqrt 2 + \sqrt 3$ is irrational. My first question is, is this reasoning correct?  Secondly, the book wants me to use the fact that if $n$ is an integer that is not a perfect square, then $\sqrt n$ is irrational. This means that $\sqrt 6$ is irrational. How are we to use this fact? Can we reason as follows:  $\sqrt 6$ is irrational  $\Rightarrow \sqrt{2 \cdot 3}$ is irrational.  $\Rightarrow \sqrt 2 \cdot \sqrt 3$ is irrational  $\Rightarrow \sqrt 2$ or $\sqrt 3$ or both are irrational.  $\Rightarrow \sqrt 2 + \sqrt 3$ is irrational.  Is this way of reasoning correct? I've just bought my first Mac, a Macbook pro(with an hdd), and I'm thinking in buying an ssd and replace the hdd. But the computer came with no dvd of the OS. I know that in the hdd there is a restore partition, but if I remove the hdd, how can I install the OS? Undefined reference to vtable Why do shell script comparisons often use x$VAR = xyes? I see this often in the build scripts of projects that use autotools (autoconf, automake).  When somebody wants to check the value of a shell variable, they frequently use this idiom:  if test "x$SHELL_VAR" = "xyes"; then ...   What is the advantage to this over simply checking the value like this:  if test $SHELL_VAR = "yes"; then ...   I figure there must be some reason that I see this so often, but I can't figure out what it is. C# compiler error: "cannot have instance field initializers in structs" Negative pressure How is negative pressure created in a fluid system?Isn't it counter intuitive that we are reducing the pressure of a system containing no molecules(zero pressure) to a lower value? Symbolizing layer with graduated colors by date/time field? I've got a layer of polygons where each has a date associated with it.  I want to color the polygons with graduated colors, but I want the colors to start with the newest polygons and fade to the oldest polygons.  So far I haven't been able to find a way to do this in ArcMap (&lt;= 9.3.1) other than to create a new field and calculate some integer or float value based on the date.  Is it possible to use a date or time field directly?   The data is natively a date-time value There are far too many records to use any unique-value renderer Converting the date to a numerical field is an answer for a different question. Given: $a = qb + r$. Then it holds that $\gcd(a,b)=\gcd(b,r)$. That doesn't sound logical to me. Why is this so?    Addendum by LePressentiment on 11/29/2013: (in the interest of  and averting a duplicate)  What's the intuition behind this result? I only recognise the proof and examples solely due to algebraic properties and formal definitions; I'd like to apprehend the result naturally. Node only partially rendered near edge of plot I'm trying to draw a relatively simple chart of a number line, and when one of the nodes is too close to the edge of the plot, it gets cut off.  The code:  \documentclass{article}  \usepackage{natbib} \usepackage{graphicx} \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture} \begin{axis}[   width=\columnwidth,   axis y line=none,   axis lines=left,   axis line style={-},   xmin=0,   xmax=1,   ymin=0,   ymax=1,   xlabel=$\mu$,   scatter/classes={o={mark=*}},   restrict y to domain=0:1,   xtick={0,1} ] \draw[ultra thin] (axis cs:0, 0) -- (axis cs:0,.05); \draw[ultra thin] (axis cs:.4, 0) -- (axis cs:.4,.05); \node[coordinate,label=above:{$B$}] at (axis cs:0.0,0.05) {}; \node[coordinate,label=above:{$A$}] at (axis cs:0.4,0.05) {}; \node[coordinate,label=above:{$b$}] at (axis cs:0.2,0.02) {}; \node[coordinate,label=above:{$a$}] at (axis cs:0.7,0.02) {}; \end{axis}; \end{tikzpicture} \end{document}   The Result:    How do I get the B to fully render? Assume   $$\lim_{n\to \infty}{x_ny_n}=0$$  then  $$\lim_{n\to \infty}{x_n}=0$$ or $$\lim_{n\to \infty}{y_n}=0$$  I couldnt find two series who disprove that.. just hint please thanks Prove that $\gcd(a^n - 1, a^m - 1) = a^{\gcd(n, m)} - 1$ For all $a, m, n \in \mathbb{Z}^+$,   $$\gcd(a^n - 1, a^m - 1) = a^{\gcd(n, m)} - 1$$ Quote unquote (or end-quote), unseparated by the actual quotation Elmah: How to get JSON HTTP request body from error report VLC Media Player Green Line I am using Ubuntu 14.10 64bit and the latest version of VLC media player, when I play a video (MP4, MKV AVI etc... it doesn't matter) at the bottom of the screen there is a green line It isn't an issue with my OS, YouTube, and the default media player work fine. Has anyone else had this issue? and if so is there a fix or is it just a software bug? Which tables are safe to clear? My cursor is moving by every selection by large increments!  Normally when I use Blender, I am able to select and move objects to any coordinate. Now, all of the sudden, when I select an object or mesh the selection moves by an inch or so in each direction.  How do I reset it to normal? Why is this limit $\lim_{n \to \infty}(1 + \frac{1}{n})^n$ equal to $e$? I dont get it, if I look at $$\lim \limits_{n \to \infty}\left(1 + \frac{1}{n}\right)^n = e$$    It seems like it should be $1$ because $1 \over n$ is almost zero and $1^\infty$ is still $1$ Connectivity, Path Connectivity and Differentiability I have two questions which pertain to differentiability, connectivity and path connectivity. Ocasionally, I will encounter an author who defines connectivity in the following way:   An open subset $U$ of $\mathbb{R}^n$ is said to be connected if and only if given two points $a$ and $b$ of $U$ there exists a differentiable mapping $\phi: \mathbb{R} \rightarrow U$ such that $\phi(0) = a$ and $\phi(1) = b$.   This particular example is from Edward's Advanced Calculus of Several Variables p 84. Now, this is obviously not the standard definition we learn from topology which has nothing to do with differentiability but rather whether there exists two nonempty open subsets that comprise a separation. It also seems to me that what the author is really defining what it means for a space to be "smoothly path connected", which of course implies connectivity and, it seems to me, considerably more.  My first question is: Is "smoothly path connected", as defined above actually equivalent to "connected", in the topological sense, in $\mathbb{R}^n$?  Next, in Vector Calculus by Baxandall and Liebeck on p 150 the authors state the existence of a continuous path $\alpha$ from the closed interval $[0,1]$ to an open subset $D$ of $\mathbb{R}^n$ where $\alpha (0) = a \in D$ and $\alpha(1) = b \in D$ guarantees the existence of a differentiable path with the same properties. This claim is stated without proof.   My second question is: Can someone provide a reference to a proof of the above claim or explain why it is so? What are the differences between "su", "sudo -s", "sudo -i", "sudo su"?