java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
What is a NullPointerException, and how do I fix it?
Size and density of neutron stars Most of the books which I looked at give approximately 10 km as the radius of a neutron star. Just yesterday I looked at a book by Dave Goldberg titled The Universe In the Rearview Mirror (2013) which says that they're "only about 5 km in radius" [p.225]. Is this true, [i.e., is there some recent evidence for this], or did he make a mistake here? How should I deal with becoming discouraged as a graduate student? Can I fine-tune my screen brightness? My laptop is Lenovo T400, and my OS is Ubuntu 10.10. I change the brightness of my screen by pressing the FN key and one of the two keys for increasing/decreasing brightness.  The brightness I feel comfortable is between two consecutive levels that are offered. So I wonder if it is possible to fine-tune the screen's brightness? I ran across this problem in my Analysis class and can't seem to come up with a good solution. Here's the question: Show that if $\lim_{x\to a}f'(x) = A$ then $f'(a)$ exists and equals $A$. $f$ is continuous on $[a,b]$ and differentiable on $(a,b)$.  I tried applying the Mean Value theorem like this: There exists a $c \in (a, x)$ st $f(x)-f(a)=f'(c)(x-a) \implies \frac{f(x)-f(a)}{x-a}=f'(c) \implies f'(a)=\lim_{x\to a}\frac{f(x)-f(a)}{x-a}=\lim_{c\to a}f'(c)=A$  However, I think this is wrong. I am pretty sure the Mean Value theorem is needed, but my application of it seems to be incorrect. Would somebody be able to point me in the right direction? Beamer: Vertical alignment of multi-column ToC Custom pagebreak in align equation Can all fundamental forces be fictitious forces? Where do the bipolar jets of black holes come from? Partition of a set and Hall's theorem What do ref, val and out mean on method parameters? I'm looking for a clear, concise and accurate answer.    Ideally as the actual answer, although links to good explanations welcome.  This also applies to VB.Net, but the keywords are different - ByRef and ByVal. How do I copy to the clipboard in JavaScript? Why would the command "ls *" generate an error about invalid options? There is a thread that talks about ls "*" not showing any files, but I actually wonder why the simple  ls *   command doesn't output anything in my terminal other than  ls: invalid option -- '|' Try 'ls --help' for more information.   while   ls   will list all the files in the current directories as    1                  ferol                      readme.txt  2                  fichier                    sarku  2018               GameShell                  Templates  22223333          '-|h4k3r|-'                 test  3                  hs_err_pid2301.log         test2  CA.txt             important.top.secret.txt   toto.text  CA.zip             JavaBlueJProject           tp1_inf1070  countryInfo.txt    liendur                   'tp1_inf1070_A19(2) (1)'  currency           liensymbolique             tp1_inf1070_A19.tar  curreny            LOL                        Videos  Desktop            Longueuil                 'VirtualBox VMs'  Documents          Music                      words  douffos            numbers                    Zip.zip  Downloads          Pictures  examples.desktop   Public   Any ideas as to why the globbing doesn't take effect here? I'm on Ubuntu, working in the terminal, I don't know if it makes a difference.  Thanks. DataView.Sort - more than just asc/desc (need custom sort) My laptop's cable broke and sadly it seems like I need to buy a new power supply.  What I wonder is, I've found that universal power supplies are much cheaper than the official HP ones. Are they really worth it?  Another question: the original supply has these specs: 65W, 18.5V, 3.5A. However the universal supplies are more powerful (90W, 100W) and come in integer voltages (17V, 18V, 19V, etc). Are they compatible? Should I set them to 18V or 19V? How to access a usb flash drive from the terminal? I only have access to the command line. I need to backup my data (on the user folder) to a pen (USB DOK).    How can I mount a flash drive manually? What should be the copy command? Counting integer partitions of n into exactly k distinct parts size at most M How can I find the number of partitions of $n$ into exactly $k$ distinct parts, where each part is at most $M$?  The number of partitions $p_k(\leq M,n)$ of $n$ into at most $k$ parts, each of size at most $M$, is given by the generating function: $$  \binom{M+k}{k}_{x} = \prod_{j=1}^{k}\frac{1-x^{M+k-j+1}}{1-x^j}= \sum_{n=0}^{kM} p_{k}(\leq M,n) x^n $$  For the number of the partitions $p_k(\mathcal{D},n)$ of $n$ into at most $k$ parts there is the recurrence relationship: $$   p_{k}(\mathcal{D},n) = p_{k}(\mathcal{D},n-k) + p_{k-1}(\mathcal{D},n) $$  But what, if I want to count only the partitions with distinct parts and restricted number of parts and restricted part size?  Update: Now I know the generating function for the number of distinct restricted partitions $p_k(\leq M, \mathcal{D},n)$ of $n$ into exactly $k$ distinct parts, all at most $M$ is $$    \prod_{j=1}^{M} (1+xq^{j}) = \sum_{k,n=0}^{\infty}p_k(\leq M, \mathcal{D},n)x^{k}q^{n} $$ and there is also a recurrence relation $$    p_k(\leq M, \mathcal{D},n) =         p_{k-1}(\leq M-1, \mathcal{D},n-k) +         p_k(\leq M-1, \mathcal{D},n-k) $$ How can I prove this? Could you recommend a book, where I could read about this? How do you return 1 value per row of the max of several columns:  TableName  [Number, Date1, Date2, Date3, Cost]   I need to return something like this:  [Number, Most_Recent_Date, Cost]   Query? jQuery ui tabs Understanding dummy (manual or automated) variable creation in GLM If a factor variable (e.g. gender with levels M and F) is used in the glm formula, dummy variable(s) are created, and can be found in the glm model summary along with their associated coefficients (e.g. genderM)  If, instead of relying on R to split up the factor in this way, the factor is encoded in a series of numeric 0/1 variables (e.g. genderM (1 for M, 0 for F), genderF (1 for F, 0 for M) and these variables are then used as numeric variables in the glm formula, would the coefficient result be any different?  Basically the question is: does R use a different coefficient calculation when working with factor variables versus numeric variables?  Follow-up question (possibly answered by the above): besides just the efficiency of letting R create dummy variables, is there any problem with re-coding factors as a series of numeric 0,1 variables and using those in the model instead? How to find correctly the .bib file?