We don't talk about pointers in Java, so why do we use the term NullPointerException in Java? I think the exception name NullReferenceException makes more sense.
Was this an oversight?  Or is it to do with the JVM?
Why is there not a simpler way to calculate the standard deviation? Steps of getting standard deviation. :        Work out the average (mean value) of your set of numbers   Work out the difference between each number and the mean   Square the differences   Add up the square of all the differences   Divide this by one less than the number of numbers in your set -   this is called the variance   Take the square root of the variance and you've got the standard   deviation      Am I missing out something, or why do we need to square the differences in step 3?  Why not simply do a Abs (multiply all negative numbers by -1) in step 3?  Also, my second question is why do we need to divide by one less than the number of numbers in the set in step 5? why not simply divide by the number of numbers? Say you have the infinitely continued fraction: $$x+\cfrac{1}{x^2+\cfrac{1}{x^3+\cfrac{1}{x^4+\ddots}}}$$ When $x=1$, you can see that it's $$1+\cfrac{1}{1+\cfrac{1}{1+\cfrac{1}{1+\ddots}}}$$ which converges upon the golden ratio $\phi = 1.61803398875...$. What if I were to plug in $x=2$? $$2+\cfrac{1}{4+\cfrac{1}{8+\cfrac{1}{16+\ddots}}}$$ Using a caluclator, it seems to converge upon the irrational number: $2.24248109286...$ Is there any way I can represent this irrational number algebraically? Find the sum of $\sum \limits_{n=1}^{\infty} \frac{2^{-n}(n+3)}{(n+1)(n+2)}$ I'm looking for a fantasy book I read about 10 years ago. I don't remember a lot of it, but there are a few things I still know:   The setting was in medieval times. There was no traveling dimensions. I can't recall whether there was magic or not. It wasn't on Earth, but on some invented world. I believe it was a trilogy, with a focus on the son of some nobility. The goal for the characters was to collect a certain number of stones or gems (I believe there were 5 of them), all in certain colours. Every stone has a certain power attached to it. I believe it started out with one or two characters, but the group grew and every character had a certain colour stone at the end. What is important about the gems is that they are unique. It's not part of a bigger magic system, but they are artefacts from somewhere.   There are some minor incidents I can recall vividly:   They build up a fellowship with some stereotypical fantasy builds: an old school fighter, a minstrel, a female archer and probably more. At one point, they mention that if one of the guards in a country falls asleep on duty, he will be kept awake by his garrison/brothers in arms for seven days. At some point the minstrel falls asleep, and the old fighter teaches him how to stay awake. They travel through a forest full of leeches and other insects to reach one of the stones. Also, I seem to recall there was a member of an underground evil organisation among the nobility, who tried to poison someone and were able to do that because they built up an immunity to the poison.   Does anyone has a clue what this series might be?   Suggestions by kind people, but not what I'm looking for, are:   The Seventh Tower Deltora Quest Diadem Westria Sword of Heavens series SF novel -- the only human on a space station full of aliens Some things I remember:   Pretty sure the author was female The novel had won some award or other The title was one word (I think) and it started with "I" (I think) It would have come out in the mid to late 90s or early 2000s It was a paperback or trade paperback, in English.  The book was originally written in English as far as I know. The cover, if I remember correctly, had an orangish background.   The plot involved a sole human representative to what was effectively an alien "United Nations" type of organization.  There were myriad types of aliens, many of whom were completely biologically incompatible.  Even the ones that could live in the same conditions generally found each other either repugnant or incomprehensible.  The main character ended up feeling incredibly lonely and was "set up" with a superficially similar humanoid female, but found their pheromones were incompatible and it was still difficult to communicate. The cardinality of a language over a set of variables $V$ with $\#V= κ$ In predicate logic, to define a language, we consider the following $3$ sets:  (1) $V$, the set of variables;  (2) $F$, the sets of function symbols;  (3) $P$, the set of predicate symbols with their arities.   Now I am concidering about determine the cardinality of a language over a set with arbitary cardinality, $κ$(Note that $κ$ can be either finite, countablely infinite or uncountablely infinite ).  May I please ask:  If the cardinality of $V$, $\#V = κ$, what conditions on $V$ , $F$ and $P$ will give us a language over $V$, $F$ and $P$ with cardinality $κ$?  And may I please ask if it is the fact that if $\kappa$ is finite, then to get a language with cardinality $\kappa$ we need $(V+F+P)^{&lt;\omega}=(\kappa+F+P)^{&lt;\omega}=\kappa$, so we can never have a language of cardinality $\kappa$. I think it is something weird here. Am I wrong with something?  I had googled it but I have get nothing from websites, now I am confused. Could someone please help? Thanks so much!  EDIT: Latter I am told that in my course, the cardinality of a language refers to the set of expression instead of this of the set of strings. So now I need to consider further about when a string makes sense.  EDIT':Now I am considering that if we can find out a general way to determine the cardinality of expression, which may related to combinatorics. See this question:  Any help would be appreciate. I'm looking for a library/method to parse an html file with more html specific features than generic xml parsing libraries. How can I prevent Overflow for the Gamma function? I have a Dirichlet distribution from which I'm maximizing $\alpha$ by calculating the log likelihood with the following equation  $p\left(s|\alpha\right) = \sum\limits_{i=1}^O\log\left(\frac{n_i!}{\prod\limits_{j=1}^kn_{ij}!}\frac{\Gamma\left(\alpha_0\right)}{\Gamma\left(\sum\limits_{j=1}^k\left(n_{ij}+a_j\right)\right)} \prod\limits_{j=1}^k \frac{\Gamma\left(n_{ij}+\alpha_j\right)}{\Gamma\left(\alpha_j\right)}\right)$  I have a python script to calculate the log likelihood. It works for small values, but when $n_{ij}$ gets high $\Gamma\left(\sum\limits_{j=1}^k\left(n_{ij}+a_j\right)\right)$ and $\Gamma\left(n_{ij}+\alpha_j\right)$ python runs into overflow error (the max for math.gamma is between 171 and 172).   Is there a way to change the likelihood function so that $\Gamma\left(\sum\limits_{j=1}^k\left(n_{ij}+a_j\right)\right)$ and $\Gamma\left(n_{ij}+\alpha_j\right)$ don't run into overflow errors. Can I just divide the values in $\Gamma$ by for example 100, if I then compare the likelihood between $p(s|\alpha)$ with different $\alpha$ values do the best $\alpha$ values still have the highest likelihood? GridBox/packed array behaviour My Arcpy code is not working in ArcMap 10.1 because an error with the last line:      Error 000824: The tool is not licensed.    I have all my extensions turned on, so I don't know why I would be getting this error. It seems I only need to import arcpy.sa.   Did I do this correctly, or are there other modules that should be imported for this code to work?  import arcpy, os, string, glob, sys from arcpy import env from arcpy.sa import *  env.workspace = r"C:\VMshared\small_example_valley8\SD2part" outFolder = r"C:/VMshared/small_example_valley8/SDpartINT/INT"  for rasterFile in arcpy.ListRasters("*.tif"):     oName, oExt = os.path.splitext(rasterFile + ".tif")     outRaster = os.path.join(outFolder, oName + ".tif")      arcpy.gp.Int_sa(rasterFile,outRaster) What is a "hat"? What exactly is a hat?  I have seen a lot of people arguing the significance of hats and the limited edition hats. I know the hats are sort of linked to the Winterbash stuff, but what exactly is a hat, what does it do, how do I get one?  Is there a full list of hats? I am using Ubuntu 12.10.  Please outline the different ways I can upgrade to 13.04. Does addition imply an order? Consider any integer, suppose a number 3. We can break any such integer down into a sequence of 1's. So, we can write: $$ 3\equiv1+1+1 $$ 3 represents what we get when we add 1 to 1 to another 1. Conceptually, what I am getting confused with, is the fact that notionally, at least according to this definition, there is one unit at the beginning, to which we add another, and yet a third. There seems to be a sequence here, which would imply there being an order. Am I missing something obvious? Way to list "Contact Us" email address on web site, yet reduce likelihood of spam? What's a good way to list a "Contact Us" email address on a web site, while reducing the likelihood it will get spammed?  Is putting the email address in an image the best technique, or are there others? I'm developing a GIS application with java Spring Framework and GeoTools library. I have some vector layer. I want to get this layers with wms and wfs protocols. I've downloaded geoserver code. It includes module as bellow:   Main Module Core Platform Module Web Map Service Module Web Feature Service Module and etc.   Can I use Web Map Service Module and Web Feature Service Module of Geoserver in my project? If yes, How? I want a sample code to use these modules apart from geoserver. Help me please. How to find image coordinates of the rendered vertex? I have a simple mesh of a cube.  I would like to know what are the coordinates of each vertex in the rendered image (i.e. for each 3d vertex I'd like to know it's pixel coordinates).  Is there a way to do this?  Clarification:  I'm experimenting with a pose estimation algorithm (i.e. finding out the 3d pose of the object) from a (set of) 2d image(s).  Instead of taking an image of a real object with a real camera I synthetically render the image of a cube using blender.  In this way I know the pose of the object and the intrinsics of the camera, so I can easily validate the results of the pose estimation algorithm. Pose estimation algorithms usually require to provide them with world points on the object and the corresponding image points.  So what I'm looking for is a way to produce a dump of correspondences of the 3d point &lt;--> image point as a byproduct of the rendering procedure. Thanks, Alex Finding the limit of $(1-\cos x)/x^2$ What is the best Java email address validation method? What are the good email address validation libraries for Java?  Are there any alternatives to ? Some fields like Economics and Maths have their work in progress published as "working papers" with notes like "work in progress, do not cite or quote without the author's permission."Sometimes they upload these to their own websites or to their universities websites. I don't see much of this going on in my own field (sociology). I have heard from people that are afraid of having their work scooped or that fear that work published in this way will not be considered as "unpublished" by journals and conferences.  What are the advantages of making work in progress available in this way? Recovering a accidently deleted file in Ubuntu I'm using ubuntu 9.10 and accidently deleted a specific file within a directory on my system. I checked in the Trash bin and could not locate the file. I deleted it 10mins ago, are there any tools available that I can recovery this file? It's a really important file.  Any help would be highly appreciated  My partition is ext4