Let $M$ be a metric space with metric distance function $d(x, y)$, for $x, y \in M$. Assume that $M$ has only a countable or finite number of points, and assume that $M$ is connected.  Fix some point $a \in M$. Prove the function $f: M \to \mathbb R$ defined by $f(x) = d(a,x)$ is a continuous function on $M$.  I am having trouble with this proof. I am thinking that I should compare it to a Lipschitz function using the triangle inequality, but I am not sure if that is right.
The question is (from Topology without tears) that: Let $(X,d)$ be a metric space and $\tau$ the corresponding topology on $X$. Fix $a \in X$. Prove that the map $f:(X,\tau) \rightarrow \mathbb{R}$ defined by $f(x) = d(a,x)$ is continuous.  My first attempt was that let an open ball, $B_{\epsilon}(a)\subset \mathbb{R}$ and show that $f^{-1}(B_{\epsilon}(a)) \subset \tau$. Since $f(x) = d(a,x)$, $f^{-1}(B_{\epsilon}(a))=B_{\epsilon}(a) \in \tau$.   I am pretty sure the last sentence is wrong. I am not sure if every open ball is an open set in topology induced by metric space.  Please give me some hint and direction. Thanks
Form of the Classical EM Lagrangian So I know that for an electromagnetic field in a vacuum the Lagrangian is $$\mathcal L=-\frac 1 4 F^{\mu\nu} F_{\mu\nu},$$ the standard model tells me this. What I want to know is if there is an elementary argument (based on symmetry perhaps) as to why it has this form. I have done some searching/reading on this, but have only ever found authors jumping straight to the expression and sometimes saying something to the effect that it is the "simplest possible". Why won't this work?  I'm trying to make an instance of a class delete itself.  &gt;&gt;&gt; class A():     def kill(self):         del self   &gt;&gt;&gt; a = A() &gt;&gt;&gt; a.kill() &gt;&gt;&gt; a &lt;__main__.A instance at 0x01F23170&gt; Add/Show comments focuses text box by default If I open a post using the mobile theme, which has many comments, there is a link at the footer "add/show n more comments". If this link is clicked, the comments are loaded and displayed.   At the moment the text area is automatically focused which is not a great experience (in my opinion), as you have to close the editor and scroll back to the top if you just wanted to read the comments, without adding a new one.  Would it be possible to either   not focus the text area by default and to load only the comments add a new link for adding a comment Array Modifier - Fit Curve too short I want to create a simple road. To do this I first want to apply an 'Array Modifier' which fits the curve. So in the Array modifier I changed the 'Fit Type' from 'Fixed Count' to 'Fit Curve'. But now the Path is much shorter than the road it self.  And If I extrude the curve the road goes even longer and longer. Is there a way the road is as long as the path? I looked up a few grammar-teaching websites (in Chinese language). The website says many people do not use the phrase "A xxx of" correctly because they do not identify the subject of the phrase correctly.   The website says phrases like "A range of; A high percentage of" is singular, while "a number of; a group of; a couple of; a total of" is plural.  Therefore according to the website, the correct sentences should be as follows.     A wide range of courses is available. ("A wide range" is the subject)      A high percentage of peptides that are made of amino acids is present   in the sample. ("A high percentage" is the subject)      A number/ group/ couple of people were killed in the earthquake.("people" is the subject )       A total of 230 employees were laid off. ("employees" is the subject)   I don't get the pattern here. All of this looks (or should I use "look"?) arbitrary to me. In fact I thought this phrase is supposed to be arbitrary and whether the phrase is plural or singular should depend on the the person's own judgment.   How do I identify the correct subject in the "A xxx of" phrase? How do you compare two folders and copy the difference to a third folder? You've got three folders:   folder current, which contains your current files folder old, which contains an older version of the same files folder difference, which is just an empty folder   How do you compare old with current and copy the files which are different (or entirely new) in current to difference?    I have searched all around and it seems like a simple thing to tackle, but I can't get it to work in my particular example. Most sources suggested the use of rsync so I ended up with the following command:  rsync -ac --compare-dest=../old/ new/ difference/   What this does however, is copies all the files from new to difference, even those which are the same as in old.  In case it helps (maybe the command is fine and the fault lies elsewhere), this is how I tested this:   I made the three folders. I made several text files with different contents in old. I copied the files from old to new. I changed the contents of some of the files in new and added a few additional files. I ran the above command and checked the results in difference.   I have been looking for a solution for the past couple of days and I'd really appreciate some help. It doesn't necessarily have to be using rsync, but I'd like to know what I'm doing wrong if possible. CSV text files loading error / crash in QGIS 2.18.8 I got a problem when I try to load tab-separated text files in the "Create a layer from the delimited text file" tab (that one with de comma symbol). After normally selecting the X and Y fields and clicking OK, the reference coordinate system (SRC) selector screen appears, then the program closes by itself. I had uploaded more than a hundred of this type of file by the same procedure in the previous version of QGIS (2.14 Essen) and have no problem, but since I updated to version 2.18.8 (Las Palmas) I can not load any files or .CSV type.   Do anyone knows what's happening? Am I doing anything wrong? What is a good introductory book on quantum mechanics? Are delphi variables initialized with a value by default? I'm new to Delphi, and I've been running some tests to see what object variables and stack variables are initialized to by default:  TInstanceVariables = class   fBoolean: boolean; // always starts off as false   fInteger: integer; // always starts off as zero   fObject: TObject; // always starts off as nil end;   This is the behaviour I'm used to from other languages, but I'm wondering if it's safe to rely on it in Delphi?  For example, I'm wondering if it might depend on a compiler setting, or perhaps work differently on different machines.  Is it normal to rely on default initialized values for objects, or do you explicitly set all instance variables in the constructor?  As for stack (procedure-level) variables, my tests are showing that unitialized booleans are true, unitialized integers are 2129993264, and uninialized objects are just invalid pointers (i.e. not nil).  I'm guessing the norm is to always set procedure-level variables before accessing them? So I am in an introductory linear algebra(with proofs) class, and I came across the following theorem:  If $S$ is a subspace of a vector space $V(F)$ and is generated by $\{a_1,...,a_n\}$ then any subset $\{b_1,...,b_m\}$ of $S$ with $m&gt;n$ is linearly dependent.   The proof in the textbook is done through induction (as most proofs regarding finite sets are) but I really do not follow it and I feel there is a simpler way of doing it. A hint would be appreciated. Workaround for Android 4.4 not being able to write to SD cards? How does the kernel prevent a malicious program from reading all of physical RAM? If I write a program that tries to read memory at every possible address, and I run it on a "full" Unix, it will not be able to access all of the physical RAM.  But how does the operating system prevent it from doing so?  I am more familiar with small CPU architectures where any piece of assembly code can access everything. I don't understand how a program (the kernel) can detect such malicious operations. What's the name for the property of a function $f$ that means $f(f(x))=x$? I can think of several examples of functions such that twice application of the function is equivalent to no application of it.   Additive inverse Multiplicative inverse Fourier transform Complex conjugation Any group built up from $\mathbb{Z}_2$, applying (one of) the $\mathbb{Z}_2$ parts' operation.   "Idempotent" came to mind, but that's wrong. It means $f(f(x)) = f(x)$, not $f(f(x))=x$.  What is the word for this "flip-flop" property? Geometry with Trigonometry From the given figure, prove that      $$\cot\ \theta=\cot\ A+\cot\ B+\cot\ C$$     I could not even start to the first point. Please help me to solve this.  Thanks in advance When I run:  tex algorithms.dtx   for example, I get this message.    ! Undefined control sequence. l.34 \documentclass                    {ltxdoc} ?   Help? Is smell a bad way of determining whether meat is still good? I have always relied on my sense of smell to determine whether meat (most often chicken) is bad and I thought it was reliable. However, I have just heard that [1] smell is not always reliable, since some of the toxins produced by bacteria won't cause any smell whatsoever and you won't be able to notice that the meat is off until after you've eaten it.   Is this true? If yes, is this true for all meat or only for some? Is there a more reliable way of determining whether meat is still good.  [1] "Heard that" isn't very reliable; so that's why I'm asking the question here. :) Programmatically selecting non adjacent Cells Regular expression to extract URL from an HTML link I’m a newbie in Python. I’m learning regexes, but I need help here.  Here comes the HTML source:  &lt;a href="http://www.ptop.se" target="_blank"&gt;http://www.ptop.se&lt;/a&gt;   I’m trying to code a tool that only prints out http://ptop.se. Can you help me please? Can ASP.NET MVC generate elements with lower case name and id attributes Expectation of Exit Time of Brownian Motion from Interval I am trying to solve the following:  Let $W_t$ be a brownian motion and $a,b &gt;0.$  Define $\tau$ to be the exit time of $W_t$ from $[-a,b]$, that is $$\tau = \inf\{t \ge 0\ :\ W_{t}(\omega) \notin [-a,b]\}.$$  Show that $\tau$ is integrable and compute $\mathbb{E}(\tau)$.  I have seen this stated without proof multiple places that $\mathbb{E}(\tau)=ab.$  What is the logical argument that backs up this statement?  How are we guaranteed $\tau$ is integrable?