I've got model like this:    class Model {   from: number;   values: { [id: string]: number };   originalValues: { [id: string]: number }; }     Then I create arr = Model[] = [];  I need to check whether values match originalValues and that's how I do it:   for (let edited of this.arr) {   edited.model.forEach(m =&gt; {     if (Object.values(m.originalValues) == Object.values(m.values)) {     // console.log(equal);     } else {       // not equal     }   });   But even though they are equal, I always get not equal. Example of how values and original values look like:  originalValues: {11c33aaaaaaaaasafsdf33: 23.5} What I'm doing wrong here?
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.
What does the decay constant mean? In my curriculum, the  is "the probability of decay per unit time"  To me, this seems non-sensical, as the decay constant can be greater than one, which would imply that a particle has a probability of decaying in a time span that is greater than 1.  Can someone explain this? Closed form for $\int_0^\infty\frac{1}{(1+x^2)^s}\,dx$ when $s\in (0.5,\infty)\setminus\mathbb{N}$ How do I redirect a domain to another domain locally? My /etc/hosts file looks like this:  127.0.0.1       localhost 10.20.7.67      testsitealpha.dev othersite.dev   testsitebeta.dev   The first two work. The last one doesn't. Why not? How do I make it work? The reason I am doing this, is because I have a test server (othersite.com), which is on the local network, but it's ip can vary. e.g. 10.20.7.98 one day, 10.20.7.35 another, etc.  So, how do I make my system always resolve testsitebeta.dev to the same ip as othersite.dev? I have seen similar posts but none seem to work. I simply need to remove the dots in the ToC between the chapter titles and the page numbers. I think the page numbers should line up (as if there were dots). This is using the memoir class. Here is my ToC info:  %%%% Do the ToC \let\oldtoc\tableofcontents \renewcommand{\tableofcontents}{\clearpage\pagestyle{toc}\oldtoc}  \renewcommand{\contentsname}{TABLE OF CONTENTS} \renewcommand{\listfigurename}{LIST OF FIGURES} \renewcommand{\listtablename}{LIST OF TABLES} \renewcommand*{\tocheadstart}{\vspace*{-\topfiddle}} \renewcommand*{\aftertoctitle}{\thispagestyle{plain}%   \par\nobreak \mbox{}\hfill{\normalfont Page}\par\nobreak} \renewcommand*{\cftchapterfont}{\normalfont} \renewcommand*{\cftchapterpagefont}{\normalfont} \renewcommand*{\cftchapterleader}{%   \cftchapterfont\cftdotfill{\cftchapterdotsep}} \renewcommand*{\cftchapterdotsep}{\cftdotsep} %\renewcommand*{\cftchaptername}{CHAPTER~} %%% no extra space before the entry \setlength{\cftbeforechapterskip}{0pt plus 0pt} %% no extra 'chapter' space in LoF/LoT \renewcommand*{\insertchapterspace}{}   I tried everything that was suggested. Nothing seemed to make any difference. I am stuck with this format. Any suggestions would be greately appreciated! I am building a drupal site using Views, search API module and user-points module.  I created the "database server", and indexed many fields of nodes.  I created a search page using views and the search API, that present content (image, title etc.) In addition, I want to add to every content in this search view the name of the author that wrote it, his author picture.  I add the Indexed Content: Author relationship. Unfortunately, I can't find a way to add the author picture and the current total point to my view.  Can somebody advice how to do that? Can't execute a MySQL stored procedure from Java Show $\text{Hom}_{Ab}(A,\mathbb{Q}) = \{0\}$ for finite $A$ I have a finite abelian group $A$ and I have shown that $A\otimes\mathbb{Q} \cong \{0\}$, the trivial group.  Now I want to show that $\text{Hom}_{\textbf{Ab}}(A,\mathbb{Q}) = \{0\}$, i.e we only have the trivial zero group homomorphism from $A$ to $\mathbb{Q}$.  The question I'm trying to solve is phrased in such a way that $\text{Hom}_{\textbf{Ab}}(A,\mathbb{Q}) = \{0\}$ should fall out almost automagically once you have that the tensor product collapses but I'm really stuck on this even though some people I talked to said it was really easy.  Some thoughts:   I've tried to assume the existence of a nontrivial homorphism $A \to    \mathbb{Q}$ to generate a contradiction but with no success. We have the Tensor-hom adjunction theorem stating that for abelian groups $A,B,C$ we have a natural bijection  $$\text{Hom}_{\textbf{Ab}}(A\otimes B,C) \cong \text{Hom}_{\textbf{Ab}}(B ,\text{Hom}_{Ab}(A,C))$$ and by plugging in our particular groups we get that:   $$\text{Hom}_{\textbf{Ab}}(A\otimes \mathbb{Q},\mathbb{Q})\cong\text{Hom}_{\textbf{Ab}}(\mathbb{Q} ,\text{Hom}_{Ab}(A,\mathbb{Q}))$$  Since $A\otimes\mathbb{Q} \cong \{0\} \implies \text{Hom}_{\textbf{Ab}}(\mathbb{Q} ,\text{Hom}_{Ab}(A,\mathbb{Q})) = \{0\}$ so we only have the trivial morphism from $\mathbb{Q} \to \text{Hom}_{Ab}(A,\mathbb{Q})$ but I don't think this implies that $\text{Hom}_{Ab}(A,\mathbb{Q}) = \{0\}$ and I'm not sure if this reasoning helps me at all. Finding the conjugate hyperbola Assume we are given a general proper hyperbola $  a_{11}x^2 + 2 a_{12} x y + a_{22} y^2 + 2 a_{13}x +2 a_{23}y + a_{33} = 0$ with  $D =\det \begin{pmatrix}   a_{11} &amp; a_{12} \\   a_{12} &amp; a_{22} \end{pmatrix} &lt; 0$ and $ A = \det \begin{pmatrix}   a_{11} &amp; a_{12} &amp; a_{13} \\   a_{12} &amp; a_{22} &amp; a_{23} \\   a_{13} &amp; a_{23} &amp; a_{33} \end{pmatrix} \neq 0$.  Is there an easy way to find the implicit description of the conjugate hyperbola?  I could translate and rotate the hyperbola and obtain a canonical representation of the form $\frac{x^2}{a^2} - \frac{y^2}{b^2} = \pm 1$, find the conjugate of the canonical one and the transform back. However, I'm looking for a more straightforward way to achieve this. Draw a graph in Latex with Tikz Why do metals only glow red, yellow and white and not through the full range of the spectrum? Why are votes anonymous? Let's make with the transparency and have them publicly attributed Could I have a hint for testing the convergence of the following series please?  $$\sum_{n=2}^\infty\frac{1}{(\ln n)^{\ln n}}$$  I am very appreciative for your help. On the recent changes to flagging and limits Looks like flagging has been affected by releases today. Are these intended effects?   Higher daily limits (appear doubled for me, flagging of posts limit also doubled).  Explained by Shog9 below. Soft comment deletion  - e.g. for "accept rate" obsolete comments - it does in fact work, but the immediate feedback is gone.  This is fixed now. Has the throttling rate changed?  Seems possible to repeated flag without waiting 5 seconds.  If it was broken, it isn't anymore. Old soft deletions that were neither categorised as "helpful" or "declined" have all become "helpful".   If limits have been updated, can we get the new formula published? Not changed, as confirmed by Shog9. Reducing size of KML file (after converting from Shapefile) Multiple Inheritance in C# Since multiple inheritance is bad (it makes the source more complicated) C# does not provide such a pattern directly. But sometimes it would be helpful to have this ability. For instance I'm able to implement the missing multiple inheritance pattern using interfaces and three classes like that: public interface IFirst { void FirstMethod(); } public interface ISecond { void SecondMethod(); }  public class First:IFirst  {      public void FirstMethod() { Console.WriteLine(&quot;First&quot;); }  }  public class Second:ISecond  {      public void SecondMethod() { Console.WriteLine(&quot;Second&quot;); }  }  public class FirstAndSecond: IFirst, ISecond {     First first = new First();     Second second = new Second();     public void FirstMethod() { first.FirstMethod(); }     public void SecondMethod() { second.SecondMethod(); } }  Every time I add a method to one of the interfaces I need to change the class FirstAndSecond as well. Is there a way to inject multiple existing classes into one new class like it is possible in C++? Maybe there is a solution using some kind of code generation? Or it may look like this (imaginary c# syntax): public class FirstAndSecond: IFirst from First, ISecond from Second { }  So that there won't be a need to update the class FirstAndSecond when I modify one of the interfaces.  EDIT Maybe it would be better to consider a practical example: You have an existing class (e.g. a text based TCP client based on ITextTcpClient) which you do already use at different locations inside your project.  Now you feel the need to create a component of your class to be easy accessible for windows forms developers. As far as I know you currently have two ways to do this:  Write a new class that is inherited from components and implements the interface of the TextTcpClient class using an instance of the class itself as shown with FirstAndSecond.  Write a new class that inherits from TextTcpClient and somehow implements IComponent (haven't actually tried this yet).   In both cases you need to do work per method and not per class. Since you know that we will need all the methods of TextTcpClient and Component it would be the easiest solution to just combine those two into one class. To avoid conflicts this may be done by code generation where the result could be altered afterwards but typing this by hand is a pure pain in the ass. I am running centos 5.8 with cpanel. Lately I am getting reports that my swap is full , but there is a lot of free memory  to use.  top - 10:33:43 up 133 days, 17:00,  1 user,  load average: 0.05, 0.03, 0.05   Tasks: 170 total,   1 running, 169 sleeping,   0 stopped,   0 zombie   Cpu(s):  2.1%us,  0.5%sy,  0.0%ni, 97.2%id,  0.0%wa,  0.0%hi,  0.2%si,  0.0%st   Mem:  24726100k total,  8255368k used, 16470732k free,   599560k buffers   Swap:  1046520k total,   984740k used,    61780k free,  3641828k cached     How do I solve this? The unused ram memory should be used instead of the swap. Or should I increase the swap ( and how do I do that ? ).  Thanks I  here on MSO today, but it was found to have been asked .  I'm not concerned by this (better to be found by more than one user) but, I noticed that the wording in the closure statement is factually incorrect:    No it doesn't have an answer - Not even a sniff of one!  This statement, logically, should be factually accurate and reflect the existence of answers and include singular/plural references to them - or at a minimum use language that covers both scenarios.  Edit: As a result of my question,  and the bug in question has been remedied, but this question still remains valid. Just a quick question from an Objective-C beginner: what does the asterisk in the parenthesis mean in the following sample code? Is it a pointer? Thanks in advance.  #import &lt;Foundation/Foundation.h&gt;  @interface Tire : NSObject @end @implementation Tire  - (NSString *) description {    return (@"I am a tire."); }  @end Going to any question on the site brings an error page Suppose $f$ and $g$ are entire functions, and $|f(z)| \leq |g(z)|$ for all $z \in \mathbb{C}$, Prove that $f(z)=cg(z)$.   My try :  I consider $h(z)=\frac{f(z)}{g(z)}$. If I prove that $h(z)$ is entire, using the fact that $|h(z)|\leq 1$, the result follows immediately from Liouville's theorem.  To prove that $h(z)$ is entire, I have to prove that $h(z)$ has removable singularities at possible zeros of $g(z)$.  Suppose $g(z_0)=0 \Rightarrow |g(z_0)|=0 \Rightarrow |f(z_0)|=0$, BUT what if $z_0$ be a root of of order $k$ of $g(z)$ (i.e. $f^{(n)}(z_0) = 0 $ for all $ 0 \leq n \leq k-1$) and be a zero of order $m$ of $f(z)$ and $k&gt;m$ ?  And if that's not the case, how to rigorously show that $z_0$ is a removable singularity ?  Thank you all in advance.