Search a CSV-file with python
How do I check whether a file exists without exceptions?
First: I'm obviously not talking about logging in and then automatically launching Terminal.app.  In , you used to be able to type &gt;console in the username field on the login screen and go directly into a command line terminal session.  I haven't done it in years until the other day. However, now, when I try it, my computer just locks up. I can't cancel, and it never sends me to a terminal session.  Is it even possible to do this anymore? If not, does anybody know when it was removed? It seems odd that typing &gt;console would cause the machine to lock up if it wasn't recognizing it in some way. Plot points:   I think the man was one-armed or had one damaged/withered arm. He is an artist when we meet him. He's picked up by aliens to represent earth in a galactic armada. Put in a ship with other aliens only there so a representative of their species can be said to be present - but not expected to actually contribute much to the coming fight. Fight is to protect against invaders from another galaxy. Somehow or other, their ship and crew become integral to winning the war. Let $V$ be an n-dimensional vector space over $\mathbb{R}$ and $T:V \rightarrow V$ be linear. Call a vector $v \in V$ cyclic if $V$ is spanned by $\{v, \ Tv, \ T^2v,..\}$.  Question:  Show that $v$ is cyclic for $T$ then there is some $k \geq 1$ such that   $$B=\{v, \ Tv,..T^{k-1}v \}$$ is linearly independent in $V$ and that $T^kv$ lies in  the span of $B$.  Thoughts:  If we suppose that no such $k$ exists, then every subset of the form $\{v, \ Tv,..T^{l-1}v \}$ is linearly dependent, or it is linearly dependent with $T^lv$ not lying in it span.  There are in effect then two cases to consider.  Suppose every subset of the form $\{v, \ Tv,..T^{l-1}v \}$ is linearly dependent. Then $T^{l-1}$ can be expressed as a linear combination of $v,...,T^{l-2}v$. Now, $\{v, \ Tv,..T^{l-2}v \}$ is also linearly dependent by assumption and so we can express $T^{l-2}$ as a linear combination of  $v,...,T^{l-3}v$ etc... Continuing in this way, we show that $T^{l-1}v= \lambda v$ for some $\lambda \in \mathbb{R}$. Thus $$B=\{ \mu v \ | \ \mu \ \text{is an eigenvalue of} \ T^mv \ \text{for some} \ m \}$$ This is 'at best' countably infinite, and therefore could not span $V$ even if it were 1-dimensional, wince our base field is $\mathbb{R}$, which is uncountable.  Suppose then that $B$ is linearly independent for some $k$ but that $T^kv$ does not lie in its span. I can't see how to progress this argument.  Note: This question is for second year Undergraduates, and I think there must be some more simple approach; even the first part surprises me if we need to argue using the uncountability of $\mathbb{R}$, so any alternative approaches are also appreciated. Countability of disjoint intervals According this problem/solution set from an MIT class (http://ocw.mit.edu/courses/mathematics/18-100c-analysis-i-spring-2006/exams/exam1_sol.pdf), the assertion:  "Every collection of disjoint intervals in R is countable."  is True, because "every interval contains a rational number", and the rationals are countable.  It seems to me this should be False, with possible counterexample:  { [x,x] | x is an element of R}  ie the set of all singelton intervals on R. Why isn't this a valid counterexample? Are "beginner questions" allowed on Stack Overflow? T-SQL: How to update just date part of datetime field? I can't seem to find a satisfactory answer to this anywhere on the web. While  poses a related question, I don't think it sufficiently answers mine...  During the opening chapters of Jedi Search, Luke addresses the new Senate on the need to find new Jedi talent, or Force sensitive individuals. During this proposal, he cites that the most fruitful leads of Jedi potential are in the descendants of Jedi Knights: as Force sensitivity is hereditary. The book even discusses the notion that Leia should be comparatively well attuned to the Force, due to her being the child of Anakin Skywalker.  I understand that the concept of the Jedi as a totally celibate and monastic order was something that was retconned into the lore after Episode II: Attack of the Clones, and that there are examples of entire nuclear Jedi families exist (such as Andur Sunrider and Plo Koon)...  But if Force-manipulative ability is passed down genetically (as a potentially mutative property of their genetic makeup), why would the Jedi order be so numerous if they practice Chastity?  Even if procreation is not expressly forbidden (as in the pre-retcon Expanded Universe): why would Jedi need special permission to produce more Jedi potential children?  How are more Jedi created, if not through procreation? Has their profusion been deliberately retarded, and if so why? is there another explanation for their (pre-empirical) plenitude? Is there a function $f\colon\mathbb{R}\to\mathbb{R}$ such that every non-empty open interval is mapped onto $\mathbb{R}$? I wonder  whether there is a function $f\colon\Bbb R\to\Bbb R$ with the folowing characteristic?   for every two real numbers $\alpha,\beta,\alpha\lt\beta$,  $$\{f(x):x\in(\alpha,\beta)\}=\Bbb R$$   I can't  say such a function does not exist, neither can I construct a example  Thanks a lot! What is the difference between using a colon and a semi-colon to join two sentences? I've seen a few questions on this site relating to semi-colons, which I believe I correctly understand, but what I'm not as clear about is colons.  For example:     The man ate the apple; it tasted good.   Is this not correctly also written as:     The man ate the apple: it tasted good.   In this case, what is the difference between the two sentences? What is the relationship between size of object with distance? How does the size/length of an object vary with distance?   Is it a logarithmic relationship? exponential? linear?   I plotted a curve of the size/length of an object for different distances from the camera, and the curve looked exponential/logarithmic. I was trying to understand the reasoning behind that. Man travelling alone across a planet, thinks about a fearsome creature that he hears behind him About fifteen years ago I read a short story about a man on a planet (possibly Mars or the Moon), travelling alone between bases. It's written in the first person and as he's walking across the planet, he's thinking to himself about this fearsome creature that preys on people. It sneaks up on them, makes some noise and then attacks them. Just as he turns the final corner of the canyon he was walking through and sees the door to the other base, he hears the creature behind him making its noise and the story ends.  It was in a short story collection but I don't remember the name of the story or the book it was in. Any help would be much appreciated. Sometimes, others just inform us about things without us asking them, other times they do not do that even if we ask them. I want a verb for when others do not give us information — whether because they do not like to or they just don't give it, but we cannot directly ask them to — but we actively extract the information from them sometimes without them being aware of it.   So the word I am looking for shouldn't be only for cases where we coerce or force others to give us information, and it shouldn't be only for cases where others do not like to give us information.  Example:     I needed that information. But I couldn't ask her for it, or most   probably she would not give to me even if I asked her. So, I ....   the information I wanted.   It could be a phrasal verb and so not just a single word, but I couldn't devise a  blank suitable for all possibilities!   Two verbs I've already had but I think are not suitable:  to give someone the third degree   To prize something from/out of somebody Account not acting as an administrator correctly My account, david, is in the Administrators group on a Windows 7 machine.  I am still having problems with programs that I should be able to use, such as SQL Server. Specifically, my account seems to not have correct permissions when I am working.  I know with an Administrator account I should have full access. How can I force my account (david) to act like an admin account and have full access to everything? Get the subdomain from a URL Getting the subdomain from a URL sounds easy at first.  http://www.domain.example   Scan for the first period then return whatever came after the "http://" ...  Then you remember  http://super.duper.domain.example   Oh. So then you think, okay, find the last period, go back a word and get everything before!   Then you remember  http://super.duper.domain.co.uk   And you're back to square one. Anyone have any great ideas besides storing a list of all TLDs? An ideal whose radical is maximal is primary I've got to prove that an ideal $Q$ whose radical is a maximal ideal is a primary ideal. That is, I want to prove that if $xy\in Q$, then $x\in Q$ or $y^n\in Q$ for some $n&gt;0$.    I've been trying for a while and I'm not sure where to begin. All I've got is that if $\text{Rad}(Q)$ is maximal and by definition it's the intersection of all prime ideals $P_i$ containing $Q$, then it must be equal to each of these $P_i$. So there is only 1 prime ideal containing $Q$, namely $\text{Rad}(Q)$.  Could anyone point me in the right direction? Thanks for any replies. Make account merges propagate to chat When two accounts are merged, all the posts/votes are moved over to the "master" account, and the other account ("slave"?) is deleted. The merge is propagated network-wide, so a similar thing happens on each site.  But, this does not happen to the chat user. The "slave" chat user is kept, with a 404 parent profile link. I feel that the chat user should be merged as well, re attributing all the chat messages.  Thoughts? What's the best way to build a string of delimited items in Java? Puzzle: Find largest rectangle (maximal rectangle problem) I've got a couple of URL autocomplete suggestions where Chrome suggests the wrong URL consistently.   How can I delete the incorrect entry from the address bar's suggestion list? The page I want shows up too but it's never the first result. I have been having a discussion regarding the Shape Water cantrip from the Elemental Evil Player's Companion. A friend and I are trying to come to an accurate view of how this spell actually functions.   Some example questions:   Must the targeted water be within a 5 foot cube area, or does it need to be of a volume not exceeding 125 cubic feet? If you shape water that is within a 5 foot cube, can the final shape you animate it to extend outside the cube? Can you cause the shaping to affect ice and snow, or only liquid water? Would you be able to carry a globe of water alongside you over distances?   Really, there are two parts:    What can be targeted by the spell? What are the limitations on the 'shape and animate' portion of the spell?   The answer I am looking for, if possible, would use the language of the spell, possibly with precedent from other game text, to clearly define the limitations of this cantrip.