I have a function on $\mathbb{R}^2$ defined as $d((x_1, x_2), (y_1, y_2)) = |x_2 - y_2|$ if $x_1 = y_1$ and $d((x_1, x_2), (y_1, y_2)) = |x_1 - y_1| + |x_2| + |y_2|$ otherwise. I want to prove that it is a metric.  I can do it only by considering many cases which is quite lengthy. Can it be proven neatly?
Can anyone please tell me whether the following function $d:\mathbb{R}^2 \times \mathbb{R}^2 \to  \mathbb{R}$ is really a metric or not on $\mathbb{R}^2$.  $$ d((x_1,x_2),(y_1,y_2))= \begin{cases} |x_1-y_1|, &amp;\text{ if } x_2=y_2\\ |x_1|+|y_1|+|x_2-y_2|, &amp;\text{ if } x_2 \neq y_2. \end{cases} $$  If it really is indeed a metric, please give the proof of triangle inequality.(I'm OK with the other two conditions).
jQuery If DIV Doesn't Have Class "x" I'm taking my first crack at  with jQuery. I'm getting my data onto my page, but I'm having some trouble with the JSON data that is returned for Date data types. Basically, I'm getting a string back that looks like this:  /Date(1224043200000)/   From someone totally new to JSON - How do I format this to a short date format? Should this be handled somewhere in the jQuery code? I've tried the jQuery.UI.datepicker plugin using $.datepicker.formatDate() without any success.  FYI: Here's the solution I came up with using a combination of the answers here:  function getMismatch(id) {   $.getJSON("Main.aspx?Callback=GetMismatch",     { MismatchId: id },      function (result) {       $("#AuthMerchId").text(result.AuthorizationMerchantId);       $("#SttlMerchId").text(result.SettlementMerchantId);       $("#CreateDate").text(formatJSONDate(Date(result.AppendDts)));       $("#ExpireDate").text(formatJSONDate(Date(result.ExpiresDts)));       $("#LastUpdate").text(formatJSONDate(Date(result.LastUpdateDts)));       $("#LastUpdatedBy").text(result.LastUpdateNt);       $("#ProcessIn").text(result.ProcessIn);     }   );    return false; }  function formatJSONDate(jsonDate) {   var newDate = dateFormat(jsonDate, "mm/dd/yyyy");   return newDate; }   This solution got my object from the callback method and displayed the dates on the page properly using the date format library. CreateService get error: ERROR_INVALID_ADDRESS (0x000001e7) How do you format the day of the month to say "11th", "21st" or "23rd" (ordinal indicator)? BSOD: Driver State Power Failure For the past two weeks, I've been getting this BSOD error on my Lenovo laptop. I have even reset my laptop ("rest this PC"), but it's still happening.  My laptop details:     I have the latest Nvidia driver for my Nvidia Geforce MX150: 431.60 released on 23 Jul 2019.  I have the latest BIOS for my laptop: 8TCN53WW15  released on 15 Jul 2019.     I have run WhoCrashed, it says it says the problem was caused by some driver which could not be identified. If I get to know the problematic driver I will update/uninstall it.  How can I analyze my dump files, so that I can find the problematic driver?  Edit 1: If you get "Oops there was a problem with the network" on google drive page while accessing dump files, just click on download. They will be downloaded. I don't know what's causing this. Number of equivalence classes of matrices under switching rows and columns I have been thinking about this problem:  Suppose we have all $R$ by $C$ matrices, where the values are integers in $[1,n]$. Two matrices are equivalent under interchanging rows and columns. For example,   1 5     0 0       would be equal to itself and to  0 0 1 5   and would be equal to  0 0  5 1   and would be equal to   5 1 0 0   How many unique such matrices are there?  Any ideas how to go about it? Any help much appreciated! Layers with same coordinates not lining up I have a project where I have a few layers (State of Texas, cities, roads, etc.). They are all resaved and projected to NAD83 / UTM zone 14N EPSG: 26914. The project CRS is also NAD83 / UTM zone 14N EPSG: 26914 and on the fly projection is enabled. I added a text delimited file and cannot get them to line up. I checked the attribute table of the delimited file and the coordinates are correct. I cross-checked this with a point close to where a few of the points from the delimited file are and they are very close so in theory they should be lining up. I tried to save the delimited file and save it with the same projection and add the shp file back in and that did not work. Anyone have any ideas? I can't think of anything else to try. Not enough memory to load specified image I built a computer recently and I've tried to use Ubuntu and Linux Mint, both trying to install from a 32gb USB 2.0 flash drive, without success. There is no other operating system on the computer and with each OS I get the same error:  Not enough memory to load specified image. boot: _   I'm new to Linux, so I don't know whether this is related to the OS.  Hardware details:   Ryzen 3 1300x   MSI x370 gaming plus motherboard   8g Kingston hyper fury x black ddr4   nvidia gtx 760   evga 500w b psu   toshiba 500gb ssd     I need to resolve this quickly if possible Let $T$ and $T^{'}$ be topologies on set $X$ such that $T \leq T^{'}$. If $(X,T^{'})$ is path-connected, is $(X,T)$ path connected? Let $T$ and $T^{'}$ be topologies on set $X$ such that $T \leq T^{'}$. If $(X,T^{'})$ is path-connected, is $(X,T)$ path-connected?  I think it is, and I tried to prove it by contradiction, but I got stuck. Any hint helps! Prove that $n=\dfrac{5^{125}-1}{5^{25}-1}$ is a composite number   My attempt,  Let $x=5^{25}$, so that $5^{125}-1=x^5-1=(x-1)(x^4+x^3+x^2+x+1)$  $=(x^4+9x^2+1+6x^3+6x+2x^2-5x^3-10x^2-5x)(x-1)$  $=((x^2+3x+1)^2-5x(x+1)^2)(x-1)$  I'm stuck at this point and don't know how to continue anymore. Hope someone can provide a detailed solution. Thanks a lot. Ephemeral error message: "cryptsetup: unknown fstype, bad password or options?" I activated disk encryption for my Ubuntu 15.10 64bit installation and get every time after entering the (correct) password the error message:  cryptsetup: unknown fstype, bad password or options?  But after few seconds (without any further interaction) this error message is replaced by the expected message:  cryptsetup: sda5_crypt set up successfully  That's it and the system is started.  Any suggestions what could be the problem? Is it merely cosmetic or serious? Combining style numeric with style authoryear in BibLaTeX I haven't had a lot of experience with biblatex so far and I decided to use the numeric style for citations in the text. However, the authoryear style for the bibliography is much nicer. I know, I can't actually combine numeric citestyle with authoryear bibstyle.  That brings me to my question: How can I achieve using the numeric citestyle and the formatting of authoryear in the bibliography? Request root privilege from within a script Pass a PHP string to a JavaScript variable (and escape newlines) What is the easiest way to encode a PHP string for output to a JavaScript variable?  I have a PHP string which includes quotes and newlines.  I need the contents of this string to be put into a JavaScript variable.  Normally, I would just construct my JavaScript in a PHP file, à la:  &lt;script&gt;   var myvar = "&lt;?php echo $myVarValue;?&gt;"; &lt;/script&gt;   However, this doesn't work when $myVarValue contains quotes or newlines. I have the following code that will remove lines with the pattern banana and 2 lines after it:  sed '/banana/I,+2 d' file   So far, so good! But I need it to remove 2 lines before banana, but I can't get it with a “minus sign” or whatever (similar to what grep -v -B2 banana file should do but doesn't):  teresaejunior@localhost ~ &gt; LC_ALL=C sed '-2,/banana/I d' file sed: invalid option -- '2' teresaejunior@localhost ~ &gt; LC_ALL=C sed '/banana/I,-2 d' file sed: -e expression #1, char 16: unexpected `,' teresaejunior@localhost ~ &gt; LC_ALL=C sed '/banana/I,2- d' file sed: -e expression #1, char 17: unknown command: `-' Travel grant for undergraduate researcher for attending conference I am an undergraduate student doing independent research. My research work is selected for presentation at a very reputed conference in the US. I am from India. I cannot afford to attend the conference at all. How should I fund my trip? The travel grant for students available from the conference is very low. It can hardly buy me a one way ticket. What are my options? What Happens to electrons after Alpha Decay and Nuclear Fission? Where do the electrons go? In alpha decay do 2 electrons follow the alpha particle and make stable Helium or does the larger daughter nucleus become an anion?  Also what do the electrons do in the mixture of fission and alpha decay? With Beryllium-8 it decays into two alpha particles and 4 lonely electrons or do you get two Helium atoms?If someone could add an entry to Holocron it would be greatly appreciated, thanks. What is the difference between parseInt() and Number()? Position of a relative clause before/after a verb I'm not sure about the sentence structure below:  All kinds of problems arise that smaller animals or plants do not have to cope with.  It looks like that works as a relative pronoun for all kinds of problems, but I couldn't find such usage in my dictionary or online. This sentence could be divided into  There are all kinds of problems. Smaller animals or plants do not have to cope with all kinds of problems.  But, I can't figure out where 'arise' fits. If you have any thoughts, please share them. Suppose $E/F$ is a field extension and $\alpha, \beta \in E$ are algebraic over $F$. Then it is not too hard to see that when $\alpha$ is nonzero, $1/\alpha$ is also algebraic. If $a_0 + a_1\alpha + \cdots + a_n \alpha^n = 0$, then dividing by $\alpha^{n}$ gives $$a_0\frac{1}{\alpha^n} + a_1\frac{1}{\alpha^{n-1}} + \cdots + a_n = 0.$$     Is there a similar elementary way to show that $\alpha + \beta$ and $\alpha \beta$ are also algebraic (i.e. finding an explicit formula for a polynomial that has $\alpha + \beta$ or $\alpha\beta$ as its root)?    The only proof I know for this fact is the one where you show that $F(\alpha, \beta) / F$ is a finite field extension and thus an algebraic extension.