How to avoid NoMethodError for nil elements when accessing nested hashes?
Ruby Style: How to check whether a nested hash element exists
Let $R$ be a commutative ring with finitely many maximal ideals $\mathfrak m_1,\ldots,\mathfrak m_n$. Let $M$ be a finitely generated module. Then there exists an element $x\in M$ such that $\frac{x}{1}\not\in\mathfrak m_iM_{{\mathfrak m}_i}$ for every $i=1,\dots,n$.    I cannot prove that such an element there exists. I was trying to prove it by induction on $n$. If $n=1$ it is true by Nakayama, so suppose it is true for $n-1$. Then for every $i$ I can find an $x_i\in M$ such that $\frac{x_i}{1}\not\in \mathfrak m_jM_{\mathfrak m_j}$ for every $j\neq i$. If $\frac{x_i}{1}\not\in \mathfrak m_iM_{\mathfrak m_i}$ for some $i$ we are done, so suppose $\frac{x_i}{1}\in\ m_iM_{m_i}$ for every $i$. I don't know how to go on, could you help me? Show that $d_2$ defined by $d_2(x,y)=\frac{|x-y|}{1+|x-y|}$ is a metric I am pretty sure that this is such a stupid, stupid question, but how do you prove that $d_2(x,y)={|x-y|\over {1+|x-y|}}$ satisfying the third condition to be a metric, which is the triangle inequality.   I know that I should really be able to do this, but I just can't, I keep seeing a contradiction. Please help me. How to remove RVM (Ruby Version Manager) from my system Force new users to go through animated tutorial before they post for the first time Do not allow people to post the minute they created an account.  Let them ask the question but not allow them to post.  Let them stew for 30 minutes and force them through a nice animated tutorial on what they should do before they post and enforcing the fact that bad questions will not get an answer.  If they had a Need to know! basic rules introduction forced on them asking them at the end to check a box I understand! some might ask better questions and help the community instead of flooding the site with bad questions.  The presentation should be on a timer without the ability to skip and highlight the similar questions asked before that might give them the answer.  Also for the first next 9 posts they should have to check a box next to the first 5 of each similar questions before posting.  I do not mean to be harsh, but the truth is I see more negative votes on questions then positive. It's like 90% of the time people give -1 to first questions. Proof of a formula involving Euler's totient function: $\varphi (mn) = \varphi (m) \varphi (n) \cdot \frac{d}{\varphi (d)}$ Maxing out gear with maxed out smithing, enchanting and alchemy I have level 100 smithing, enchanting and alchemy. I also have some nice enchanted gear, fortify smithing and alchemy.   How high should I be able to get my fortified equipment?  Currently I'm around 29% for alchemy and smithing.  How high can I get fortify smithing and fortify enchanting potions without using the console (cheating)? And how? Currently I get +147% and +32% respectively.  Is something like this possible without using the console(or photoshop)? Connect to Linux by name rather than IP Checking if file is checked out through CSOM Star rating in AJAX with Ruby On Rails Does it make a difference if your URL path ends in a trailing slash or not? Does it make any difference to SEO ratings what-so-ever if your url has a trailing slash:  http://www.example.com/some/slug/paths/   as opposed to one that does not:  http://www.example.com/some/slug/paths What is the difference between "twenty-four-hour shift" and twenty-four hour shift"? Just read somewhere about this puzzling puzzle:  What is the difference between:   I'm doing a twenty four-hour shift tonight. I'm doing a twenty-four hour shift tonight. I'm doing a twenty-four-hour shift tonight.   I know number 1 is 20 x 4 hours. Number 2 and 3 is the same as far as I know. Is this true? Some things I know:  omega_1 is the first uncountable ordinal, made up of all of the countable ordinals f is not necessarily continuous    For this proof, I currently have x as a condensation point in my range, and I know that (x - (1/n) , x + (1/n) ) is uncountable and everything to the left and right of this interval is countable. I understand that I want to shrink this interval small enough just to x (which will be my constant), making everything around x eventually countable. I also understand that this will eventually make all of the elements in omega_1 go to x but I am having a hard time seeing where my contradiction comes in. I also am struggling with writing this proof in a presentable fashion.   Thank you! How do I set environment variables from Java? Do internal forces cause change in velocity? I refer to the usage of "don't" as an imperative to tell someone what not to do. As in,     Hey! Don't you dare touch that button!   When it is used in the interrogative or as part of a statement, "don't" can be expanded like most other contractions. It either just breaks up right in the sentence, or surrounds the subject.     Don't you love me, Juanromeo? -> Do you not love me, Juanromeo?      I don't love you, Marijuliet. -> I do not love you, Marijuliet.   However, I have no idea how one breaks up the imperative. "Do you not dare[...]" sounds like it's a lead up to a question, "You do not dare[...]" comes across as a statement moreso than a command, and "Do not you dare[...]" just sounds silly.  "Don't" is a bit unique among "not" contractions (at least that I know of) because it is the only one that can be used in an imperative sense. Couldn't, shouldn't, wouldn't, haven't, isn't, doesn't, aren't, can't... none of these can be used in an imperative sense because you cannot command someone to could, should, etc.  Is it possible to expand the don't contraction when it is used as part of a command? Or is its unique case such that it exists as its own linguistic construct? How can I recover photo files from a memory card with a corrupt filesystem? I know this is not specifically a photography issue but since many of us with prosumer/professional-level DLSRs use Compact Flash cards, it is bound to happen to others as well.  I have a Sandisk 16GB Ultra card that occasionally had the camera reporting inability to access the card. I had to reinsert the card to continue using it. I was able to read the card and transfer the photo files to my computer drive. Today, the same thing happened again, just that nearing the capacity of the card, it failed one last time and the camera was subsequently unable to read it anymore. Despite reinsertion.  My other CF cards never once exhibited this problem, so it's pretty much isolated to this card.  The card is similarly unrecognisable on my computer CF card reader. I think the filesystem is toast, but I suspect the photo files are still intact. I would like to find ways where I can inspect the raw binary data in the card and hopefully recover the photos? Logging individual application network usage in Windows 7 There are many answers here detailing programs that will monitor and log internet usage for a pc, but I need that usage to be logged and broken down, detailing which applications consumed that data.  I've noted there are several that give a real-time feed of each application's data usage (NetLimiter, Win7 Resource Monitor), but I can't find one that will log such data.  Anyone know of one?  Need to track down which program is using up a friend's bandwidth! How to correctly post a Q&A style question (i.e.self answer) without it failing minimal understanding As I understand it Q&amp;A style questions are  but a self answered question should be judged independently of the answer. Often after I've solved a problem I would like to share the question and answer on stack overflow (and have on a couple of occasions) but how to show &quot;minimal understanding of the problem&quot; is always challenging. For example I have been looking into the following question  How can I plot a straight line in the JMonkey Engine library I'm trying to plot straight lines between vertices that I specify using the JMonkey Engine 3D graphics library. So for example if I was to try to plot between: (2,0,0) (-1,0,1) (0,1,1) (1,1,1) (1,4,0) Then I would get:   This is something I do (and forget how to do) relatively often and the answer is harder to find than you'd imagine ( provides everything needed to figure it out but its spread out over several posts and isn't a complete solution on its own). Therefore I want to provide a Q&amp;A for it but at present this question feels like it would fail the minimal understanding test  Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work  Should I make up some imaginary problem? (Probably the final source code messed up a bit) Or mention in the question that I’m self answering to assuage some of the normal &quot;This is not a do your work for you site&quot; comments. Why are SMD LEDs shipped in a sealed bag containing desiccant? I had a selection of 0805 LEDs in my last Mouser order and was a bit surprised to discover they arrived in heat-sealed (rather than folded and taped with sticker) bags containing a desiccant bag and some sort of litmus-esque paper indicator saying something about baking them if the dots on it went pink (instead of blue).    A quantity of through-hole LEDs I had in the same order just came in the regular ESD-protective bag, folded over with a sticker.  What's up with SMD LEDs that they work so hard to keep them dry? Surely their dryness can't be assured once they're installed. Does it have to do with their solderability or something? Why would that be different than other SMD parts? How to color particles based on the texture of the object from which they are emitted, using the "grid" emission setting?