Object Equality in Typescript I'm creating a lib on vectors in typescript. My very first test failed:).  It's related to object equality in TypeScript/JavaScript but I can't find a way to make the test green. No object equality is mentioned in typescript's official doc .  Could someone please give me a hand ?  This is the source code.  class Vector {     x: number;     y: number;      constructor(x: number, y: number) {         this.x = x;         this.y = y;     }      add(that: Vector) {         return new Vector(this.x + that.x, this.y + that.y);     } }  export = Vector;   Then I have a unit test on this class as follows    var Vector = require("../lib/vector")   describe("vector", function () {   it("should add another vector", function () {     var v1 = new Vector(1, 1);     var v2 = new Vector(2, 3);     expect(v1.add(v2)).toEqual(new Vector(3, 4));   }); });   When executed obtains the following error  Failures:  1) vector should add another vector 1.1) Expected Vector({ x: 3, y: 4 }) to be Vector({ x: 3, y: 4 }).
How to determine equality for two JavaScript objects? A strict equality operator will tell you if two object types are equal. However, is there a way to tell if two objects are equal, much like the hash code value in Java?  Stack Overflow question  is similar to this question, but requires a more academic answer. The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution.
Proving normality of affine schemes One of the exercises in Ravi Vakil's algebraic geometry notes, Ex. $5.4.$I(b), is to show that    $$ \operatorname{Spec}\left(k[x_1, \ldots, x_n]/(x_1^2 + \cdots + x_m^2)\right) $$   is normal, where $k$ is any field of $\operatorname{char}(k)\neq 2$, and $n \geq m \geq 3$.    I have absolutely no idea how to get started on this. Is there anyone that could give a hint as to how one would approach this problem? I've read some great on-topic example questions on Area 51.  My questions:   Should a proposed site's "Great On-Topic Example" questions be automatically included in its beta? Will a proposed site's "Great On-Topic Example" questions be automatically included in its beta? How do I get attention for one of my own questions without a good answer? Is it possible to save a Diablo 3 chat session or save some in game notes No more disk space: How can I find what is taking up the space? I've run into a problem on one of my servers running 16.04: there is no disk space left.  I have no idea what is taking up the space. Is there a command to list the current directory sizes, so I can traverse and end up in the directory taking up all the space? What are LiDAR returns? Can someone help with an explanation and some references, in order to understand the nature of return pulses within a LiDAR system. I want to make a long shadow just like in this image.  I can create this shadow with shapes and by deleting the unwanted shadows after rasterizing the layer. But it's not very reusable. I can't resize the layer after rasterizing it.  Is there any easy way to make a long shadow like in the image below? What are Guinan's powers from Star Trek: TNG? In Star Trek: The Next Generation episode "" (Season 2, Episode 16) Q seems disturbed by the presence of Guinan to the point of raising his hands as if to use his powers on her. Guinan responds by raising her hands as if to cast a "magic" spell of her own.   Is it ever established what powers she or her race may possess? Using some matlab (I know it's cheating) I found that: $$k=0 =&gt; Result=1$$ $$k=1 =&gt; Result=1$$ $$k=2 =&gt; Result=2$$ $$k=3 =&gt; Result=5$$ $$k=4 =&gt; Result=15$$ $$k=5 =&gt; Result=52$$ $$k=6 =&gt; Result=203$$  This sequence is puzzling... Deploy a project using Git push no Get More in Plugin Manager in qgis 2 + ubuntu 13.04 After upgrade of qgis 1.8 to qgis 2.0 I couldn't find the choice "Get more" in Plugin Manager and I can't install plugins. When will "Present Perfect vs. Past Tense" cases be affected by culture? Regarding actions taken in the past, besides the differences those two tenses have semantically, my teacher shared that it could be a British vs American English case.   When talking about past action, British prefers present perfect because they take into account that the effect from their past action still happens until now. As for American, they prefer to state the action only. It happened in the past, so past tense it is.     I have had dinner. [British]   vs.      I had dinner. [American]   I hope to hear it from the native speakers, both British and American. What do you think about this? Is it true?  If it is, I don't think it can apply to all cases of past actions. There have to be cases when both style agree to use the same tenses. Could you please help me define the situation when this kind of difference applies and when doesn't? Image data URI and SEO Do you think the use of image data URI is SEO friendly?   On the one hand saves you a HTTP request. On the other hand it really messes up your code. Especially for image files larger than 20KB or moving GIF image files of up to 200KB, the quantity of code inserted is enormous. As Googlebot reads usually from top to bottom, all data after the image data URI encoding will be harder to rank well in Google.   Consider that image data URI is not in the CSS files as they should normally be and for the time being I can use only TinyMCE editor which provides me with just two options, either insert image with the image data URI method or the traditional image link.   I would like to know which is more search engine friendly. Are C++ Templates just Macros in disguise? Why are my textures pink? Empty intersection and empty union Given $S \hookrightarrow T$ construct $U ≈ T$ disjoint from $S$ in Z set theory? I've noticed an interesting phenomenon in the user interfaces of many famous applications, they're moving away from the glossy complex to a more dull and bare minimum design.  Why the sudden change? It also appears that most of these companies have adopted this design around the same time, was that linked to some new study?  Examples: On this link (Sentinel1  for a SLC product), the resolution is written as a range from the highest corresponding to low incidence angle, to the lowest resolution corresponding to high incidence angle.  My question is how is the resolution related in general to the incidence angle? And if they are really related, why is the resolution affected by the change in the incidence angle? $\varepsilon$-number countability without choice Let $\alpha\mapsto\varepsilon_\alpha$ be the enumeration of the $\varepsilon$-numbers--that is, those $\alpha$ such that $\omega^\alpha=\alpha$--by the ordinals.  If we know that countable unions of countable sets are countable, (slightly weaker than countable choice), then we can show fairly easily that $\varepsilon_\alpha$ is countable iff $\alpha$ is countable.  I think I saw a result at some point that $\varepsilon_0$ is countable without relying on any choice principle (though I can't recall where I saw that). Is this true? More generally, for which $\alpha$ can we conclude that $\varepsilon_\alpha$ is countable in ZF?  Update: I have been able to prove (in ZF) that if $\varepsilon_\alpha$ is countable, then $|\alpha|&lt;\aleph_1$, so that's one direction. I'm still a bit uncertain about the answers I've got so far.