'variable' not defined in Python
Best way to return multiple values from a function?
A book I once owned and read back in late-80's or early-90's that I have not been able to identify title &amp; author for:  It was a SF story concerning tiny native lifeforms, living on either a planetoid or possibly a dead/neutron star, that evolve at a seemingly accelerated time rate. Most of their story is told in the few days of observation (from orbit) by a human expedition to the planet, during which time-frame the race below progresses from stone-age tech level to being more advanced than the human observers, and eventually flying up to meet the humans in small advanced craft powered by micro-singularities... one of which accidentally 'disintegrates' the tip of a human scientist's nose in the process. Compare nullable types in Linq to Sql I have a Category entity which has a Nullable ParentId field. When the method below is executing and the categoryId is null, the result seems null however there are categories which has null ParentId value.  What is the problem in here, what am I missing?  public IEnumerable&lt;ICategory&gt; GetSubCategories(long? categoryId) {     var subCategories = this.Repository.Categories.Where(c =&gt; c.ParentId == categoryId)         .ToList().Cast&lt;ICategory&gt;();      return subCategories; }   By the way, when I change the condition to (c.ParentId == null),  result seems normal. How to move boot and root partitions to another drive Showing that the sample mean and variance are independent by showing two distribution are the same Is there some sort of classification of all minimal non-cyclic groups? Does there exist some sort of classification of all minimal non-cyclic groups (non-cyclic groups, such that all their proper subgroups are cyclic)  I know the following classes of such groups:  1) $C_p × C_p$, where $p$ is a prime  2) $Q_8$  3) $\langle a,b | a^p = b^{q^m} = 1, b^{−1}ab = a^{r}\rangle$, where $p$ and $q$ are distinct primes and $r ≡ 1 \pmod q$, $r^q ≡1 \pmod p$.  (These three classes completely cover the case, when our group is finite: )  4)$C_{p^{\infty}}$, where $p$ is a prime  5)$(\{ \frac{n}{p^m}| m, n \in \mathbb{Z} \}, +)$, where $p$ is a prime  (These two classes completely cover the case, when our group is infinite abelian: )  6)Infinite non-abelian groups, such that all their nontrivial proper subgroups are isomorphic to $C_{p}$ for a fixed prime $p$ (Tarski monster groups)  7)Infinite non-abelian groups, such that all their nontrivial proper subgroups are isomorphic to $C_{\infty}$ ().  However, I do not know, whether there exists anything, that does not fall into these classes. I only know, that if such groups exist, they have to be infinite non-abelian. Problem  The sequence $(a_n)_{n=1}^\infty$ is given by recurrence relation:   $a_1=\sqrt2$, $a_{n+1}=\sqrt{2+a_n}$.   Evaluate the limit $\lim_{n\to\infty} a_n$.  Solution   Show that the sequence $(a_n)_{n=1}^\infty$ is monotonic. The statement $$V(n): a_n &lt; a_{n+1}$$ holds for $n = 1$, that is $\sqrt2 &lt; \sqrt{2+\sqrt2}$. Let us assume the statement holds for $n$ and show that $V(n) \implies V(n+1)$. We have that $$a_n &lt; a_{n+1}.$$ Adding 2 to both sides and taking square roots, we have that $$\sqrt{2+a_n} &lt; \sqrt{2+a_{n+1}},$$ that is $a_{n+1} &lt; a_{n+2}$ by definition. Find bounds for $a_n$. The statement $$W(n): 0 &lt; a_n &lt; 2$$ holds for $n=1$, that is $0 &lt; \sqrt2 &lt; 2$. Let us assume the statement holds for $n$ and show that $W(n) \implies W(n+1)$. We have that $$0 &lt; a_n &lt; 2.$$ Adding two and taking square roots, we have that $$0 &lt; \sqrt2 &lt; \sqrt{2+a_n} &lt; \sqrt4 = 2.$$ The limit $\lim_{n\to\infty} a_n$ exists, because $(a_n)_{n=1}^\infty$ is a bounded monotonic sequence. Let $A = \lim_{n\to\infty} a_n$. Therefore the limit $\lim_{n \to\infty} a_{n+1}$ exists as well and $\lim_{n \to\infty} a_{n+1} = A$. (For $(n_k)_{k=1}^\infty = (2,3,4, \dots)$, we have that $(a_{n_k})_{k=1}^\infty$ is a subsequence of $(a_n)_{n=1}^\infty$, from which the statement follows.) We have that $a_{n+1} = f(a_n)$. That means that $A = \lim_{n\to\infty} a_n = \lim_{n \to\infty} {f(a_n)} = f(\lim_{n \to\infty} a_n) = f(A) = \sqrt{2 + A}$. Solving the equation $A = \sqrt{2 + A}$, we get $A = -1 \lor A = 2$. Putting it all together, we get that $A = 2$, because the terms of the sequence are increasing and $a_1 &gt; 0$.   Is my solution correct? $\mathbb Q[x]/(x^2+1)$ is not isomorphic to $\mathbb Q[x]/(x^2+2)$ How to create a Wi-Fi Hotspot (in Access Point mode)? How to setup an Access Point (AP) mode Wi-Fi Hotspot?  Point to be noted: Wireless access points aren't the same as ad hoc networks. They differ significantly. In short, ad hoc networks aren't supported on newer devices and most Android, Windows Phone and Blackberry devices (and maybe iOS devices too), whereas AP mode Wi-Fi hotspots are. To get an idea about AP mode hotspots, ad hoc networks and their difference, refer to . JavaScript: Bitwise shift of long long number I need to bitwise shift a value 64 times in JavaScript. But JavaScript starts rounding after 32.  For example:  for(var j = 0; j &lt; 64; j++) {     mask = mask &lt;&lt; 1;     console.log(mask); }   This prints value from 0 to 1073741824 but then rounds of and starts printing 0. When you earn one tag badge, and then don't click "Track the next one" in the tag badge progress tracking box for a while, and then earn a second tag badge, that box continues to show "Congratulations, you earned [the same badge as before]", rather than updating to show that you've actually earned another tag badge since then.  For instance, right now  looks like this:    Even though I  a few weeks ago and then  yesterday, my profile hasn't updated to show the new achievement.  I also didn't get the "cipher" tag badge until after the 3am watershed, even though tag badges usually appear as soon as I visit my profile after earning them (for instance, I earned the "tags" tag badge on meta.SFF.SE today the very instant I clicked on my own profile there after having become eligible for the badge). Even when I went to look at the list of my progress towards different tag badges on Puzzling, which I thought would jog the system into realising I'd actually earned the badge, "cipher" still showed up as 99/100 score even after I'd gone well past 100, until last night when the badge was finally awarded and "cipher" disappeared from my list of badges to track.  TL;DR: if I don't click "Track the next one", my tag badges update slower than they should.  It's a very unimportant bug, but there must be more people than just me who like to see the "Congratulations" thing there for a while and rest on their laurels before moving on to track their progress towards the next milestone. NSInvocation for Dummies? How exactly does NSInvocation work? Is there a good introduction?  I’m specifically having issues understanding how the following code (from Cocoa Programming for Mac OS X, 3rd Edition) works, but then also be able to apply the concepts independently of the tutorial sample. The code:  - (void)insertObject:(Person *)p inEmployeesAtIndex:(int)index {     NSLog(@"adding %@ to %@", p, employees);     // Add inverse of this operation to undo stack     NSUndoManager *undo = [self undoManager];     [[undo prepareWithInvocationTarget:self] removeObjectFromEmployeesAtIndex:index];     if (![undo isUndoing])         [undo setActionName:@"Insert Person"];      // Finally, add person to the array     [employees insertObject:p atIndex:index]; }  - (void)removeObjectFromEmployeesAtIndex:(int)index {     Person *p = [employees objectAtIndex:index];     NSLog(@"removing %@ from %@", p, employees);     // Add inverse of this operation to undo stack     NSUndoManager *undo = [self undoManager];     [[undo prepareWithInvocationTarget:self] insertObject:p                                        inEmployeesAtIndex:index];     if (![undo isUndoing])         [undo setActionName:@"Delete Person"];      // Finally, remove person from array     [employees removeObjectAtIndex:index]; }   I get what it’s trying to do. (BTW, employees is an NSArray of a custom Person class.)  Being a .NET guy, I try to associate unfamiliar Obj-C and Cocoa concepts to roughly analogous .NET concepts. Is this similar to .NET’s delegate concept, but untyped?   This isn’t 100% clear from the book, so I’m looking for something supplemental from real Cocoa/Obj-C experts, again with the goal that I understand the fundamental concept beneath the simple(-ish) example. I'm really looking to be able to independently apply the knowledge -- up until chapter 9, I was having no difficulty doing that. But now ...    Thanks in advance! Remount drive without physically disconnecting? So I have unmounted a usb external hard drive but I went to re-mount it.  Is there a command that I can use to remount the drive?  Only way I know to re-mount a drive is to disconnect the usb cable from my Mac and reconnect it. How do I get the number of days between two dates in JavaScript? How do I get the number of days between two dates in JavaScript? For example, given two dates in input boxes:  &lt;input id="first" value="1/1/2000"/&gt; &lt;input id="second" value="1/1/2001"/&gt;  &lt;script&gt;   alert(datediff("day", first, second)); // what goes here? &lt;/script&gt; Was the blue fire from Crimes of Grindlewald Fiendfyre? In Crimes of Grindlewald, Grindelwald uses a powerful blue flame that takes on the shape of monsters. Was this Fiendfyre? Story about protagonist finding a world that has died with a museum Why is "bicycle" pronounced differently from other obviously related words? How can I display additional boot and shutdown information on the Windows 7 welcome screen? There is a small tweak, I believe it is a registry key, that allows to display additional information on the Welcome and Shutting down screens of Windows 7 (and most likely Vista, too). I have activated this tweak on one of my systems; unfortunately I forgot how I did it, and I can't seem to find the website that originally gave me that information.  Usually, the Windows 7 welcome screen will just display "Welcome" when logging in. With the tweak activated, my Welcome screen gives status information such as "Loading user settings" or "Preparing desktop". When shutting down, the default screen simply says "Shutting down". With the tweak activated, it gives additional status information such as "Stopping Windows services". This appears the same way that Windows gives information when updates are installed or configured during the startup or shutdown procedure, and I find them quite helpful in getting a feel for what task takes how long during that process.  The only setting I was able to find is the Boot log checkbox on the Boot tab of the msconfig application. However, this results in Windows displaying console logs of drivers it is loading, etc., instead of the animated Windows title. This is NOT the setting I am looking for. The "additional boot information" setting that I have activated on this system still displays the regular animated Windows logo, and only replaces the strings displayed on the blue Welcome and Shutdown screens.  Could someone direct me to the registry key (or whatever setting) that is used to get this behaviour?  Edit: Here are a few pictures of the enhanced Welcome and Shutdown screens taken with my mobile phone—they're in German though.   Login screen "Waiting for User Profile Service"   Login screen "Preparing desktop"   Logout screen "Stopping Windows services": How do I export the code documentation in C# / VisualStudio 2008? I have always made a point of writing nice code comments for classes and methods with the C# xml syntax. I always expected to easily be able to export them later on.  Today I actually have to do so, but am having trouble finding out how. Is there something I'm missing? I want to go Menu->Build->Build Code Documentation, but there is no option to do that, there. Is it permissible to use somebody else's words (without quotations) to describe a concept once their work is cited? Quite often one comes across a really succinct and precise explanation of a concept. I'm wondering if it is permissible to use this explanation verbatim, if the source work is cited in your paper (next to the explanation)? What's in question here is at most 3 sentences. Can't do comparison on PageReference