using member of outer class in a inner class makes null exception?
What is a NullPointerException, and how do I fix it?
Proving $\sum_{k=0}^n(-1)^k\binom nk=0$ $_SERVER["REMOTE_ADDR"] gives server IP rather than visitor IP What is a use case where one would use an SObject as a Map key? using Ajax with 3 consecutive drop down lists depending on eachother What is the meaning of “runneth” in ? Totally ordering the power set of a well ordered set. Let's say I take a set $S$, where $S$ can be well ordered. From what I understand, one can use that well ordering to totally order $\mathscr{P}(S)$.  How does a body actually use the well ordering of $S$ to construct a total ordering of $\mathscr{P}(S)$?  Perhaps construct is too strong a word. Is there a way to prove that a total ordering of $\mathscr{P}(S)$ just exists, no need to explicitly state what it is, since that might be very difficult. Points disappear when zooming past certain scale in ArcMap? My points are disappearing when I zoom in past 300,000 in ArcMap.  I tried to repair geometry, but it doesn't fix anything?    I also checked the scale extents and those are turned off.  I can export the points to a new shapefile/feature class, but I'd like to not have to do that.    I'm using 10.1 on Windows 7 x64. Can Rails Routing Helpers (i.e. mymodel_path(model)) be Used in Models? Say I have a Rails Model called Thing. Thing has a url attribute that can optionally be set to a URL somewhere on the Internet. In view code, I need logic that does the following:  &lt;% if thing.url.blank? %&gt; &lt;%= link_to('Text', thing_path(thing)) %&gt; &lt;% else %&gt; &lt;%= link_to('Text', thing.url) %&gt; &lt;% end %&gt;   This conditional logic in the view is ugly. Of course, I could build a helper function, which would change the view to this:  &lt;%= thing_link('Text', thing) %&gt;   That solves the verbosity problem, but I would really prefer having the functionality in the model itself. In which case, the view code would be:  &lt;%= link_to('Text', thing.link) %&gt;   This, obviously, would require a link method on the model. Here's what it would need to contain:  def link   (self.url.blank?) ? thing_path(self) : self.url end   To the point of the question, thing_path() is an undefined method inside Model code. I'm assuming it's possible to "pull in" some helper methods into the model, but how? And is there a real reason that routing only operates at the controller and view layers of the app? I can think of lots of cases where model code may need to deal with URLs (integrating with external systems, etc). How to prove that total number of non-isomorphic labelled trees of order $n$ is $n^{n-2}$? I predicted the formula by finding total number of non-isomorphic labelled trees of order 1 is 1 , order 2 is 1,order 3 is 3,order 4 is 16,order 5 is 125.But how do i prove it ? I am beginner in graph theory so i will be very thankful if i get some simple approach to solve the problem(Not by using some difficult theorems). What makes a field not groupable I'm trying to use an aggregate query, but one of the fields I want to group by is not groupable (saw it in the soql error and then verified groupable=false in the metadata).  It's just a number field that holds an integer (number 2,0 in salesforce field spec-speak).  Is there a trick to make it groupable?  Any way around this problem? I don't want to write hundreds of lines of code just to average a list by this field. When to use "If I was" vs. "If I were"? If I was... If I were...   When is it correct to use "If I was" vs. "If I were" in standard English? I have found film reels some with tails of film others not. Is there a way of telling if they have been exposed/used in a camera? Film types are for 35mm and one Kodak Advantix. Recently my wife and I traveled to Italy and before we left we got about 85% of our money in travelers checks and the other 15% we carried on in cash. When we arrived there, no one would take our travelers checks and many places did not accept credit cards. Eventually, we found some currency exchange places that would take the travelers checks and give us Euro's, but at a 7-15% fee, which was not really a very fun surprise.   While I was under the impression that it is safer to use travelers checks, it seems that they were not really accepted (the usual explanation being fraud). So the question is, is it best to just exchange your currency at home and carry all of it with you when you travel or are there other alternatives to carrying cash that are safer and cost effective? Is there a single word or very short phrase to describe the act of contemptuously referring to someone by using a diminutive "nickname", with which that person is not normally associated?  For example, referring to Henry Wadsworth Longfellow as Hank Longfellow? Or William Penn as Billy Penn? I have two areas of my house which are cantilevered. One is a bay area which extends about 2'. The other is the bottom of a fireplace box (gas fireplace). I have placed two layers of R-13 (I think) insulation in this area, but inside the house it's like a heat sink where all of the heat is sucked out ... very cold to the touch in the winter time. Obviously there must be a better way to insulate this area.  My question is, what is the best way to insulate a cantilevered area so as to allow the inside area of the house to not be so cold in the winter time? Setting up a download page requiring a user to fill a form before downloading anything In the Drupal site I'm setting up, there's a Download page containing several links to download softwares.   What is the best way to "bind" the softwares to the page, put them anywhere online and place a direct link in the page?   Does anyone know a module that would show a contact form when a user clicks one of the "Download" buttons, preventing him from downloading unless he properly completes the form?  Our goal is to receive the contact information of any person downloading our software. What is the state-of-the-art method for automatically executing custom scripts upon USB device plug-in under current Linux distributions like Debian/CentOS/Fedora?  For example if you want to automatically mount/copy some files/umount a USB mass storage device based on its UUID (or device ID etc.). Sequence of positive integers such that their reciprocals are in arithmetic progression Extracting raster values at points using Open Source GIS? How do I autohide the top panel in Unity? When windows are not maximized, the top panel is basically wasted space for me in Unity.  Is there a way to make it autohide? i.e. make it appear on mouse over.