To my understanding, the following code should print true in both cases, since values are some not changed.  However, when I run the following code it is printing true and false:     public class Test {     public static void main(String[] args) {         HashMap&lt;String, Boolean&gt; map1 = new HashMap&lt;String, Boolean&gt;();         HashMap&lt;String, Boolean&gt; map2 = new HashMap&lt;String, Boolean&gt;();          map1.put("true", Boolean.TRUE);         map1.put("false", Boolean.FALSE);          map2.put("true", Boolean.TRUE);         map2.put("false", Boolean.FALSE);          System.out.println(map1.equals(map2)); // prints true as expected          // prints false even though the values are indeed equal:         System.out.println(map1.values().equals(map2.values()));     }  }   Can some one help me understand why it is printing false in second case.
Did you know that :  Map&lt;Object,Object&gt; m1 = new HashMap&lt;Object, Object&gt;(); Map&lt;Object,Object&gt; m2 = new HashMap&lt;Object, Object&gt;(); System.out.println("m1.equals(m2) = "+m1.equals(m2)); System.out.println("m1.keySet().equals(m2.keySet()) = "             +m1.keySet().equals(m2.keySet())); System.out.println("m1.entrySet().equals(m2.entrySet()) = "             +m1.entrySet().equals(m2.entrySet())); System.out.println("m1.values().equals(m2.values()) = "             +m1.values().equals(m2.values()));   would output :  m1.equals(m2) = true m1.keySet().equals(m2.keySet()) = true m1.entrySet().equals(m2.entrySet()) = true m1.values().equals(m2.values()) = false   This is caused by the fact that AbstractCollection (which HashMap$Values inherits from) does not overrides #equals().  Do you have an idea why this is so ?
Explanation of finite correction factor How to capture ordered STDOUT/STDERR and add timestamp/prefixes? I have 1-band GeoTIFF file. The color interpretation for band is gray. I want a color table in order to transform my Col.tiff to Col.jpeg or Col.png.  I tried putting a color table in this tiff via a .vrt:  gdal_translate -of VRT  Col.tiff Col.vrt   then adding in the .vrt:  &lt;ColorInterp&gt;Palette&lt;/ColorInterp&gt; &lt;ColorTable&gt;    &lt;Entry c1="0" c2="0" c3="255" c4="240"/&gt;    &lt;Entry c1="0" c2="0" c3="254" c4="240"/&gt;    &lt;Entry c1="0" c2="0" c3="253" c4="240"/&gt;    &lt;Entry c1="0" c2="0" c3="252" c4="240"/&gt; &lt;/ColorTable&gt;   And translate again :  gdal_translate Col.vrt Col.tiff   But it answered:  Warning 1: Unable to export color table to GeoTIFF file.  Color tables can only be written to 1 band or 2 bands Byte or UInt16 GeoTIFF files.   How can I do it?  For information, there is gdalinfo for the Band:  Band 1 Block=55x18 Type=Float64, ColorInterp=Gray   Description = Something   Metadata:     GRIB_COMMENT=Something[p]     GRIB_ELEMENT=TMP     GRIB_FORECAST_SECONDS=0 sec     GRIB_REF_TIME=1401926400 sec UTC     GRIB_SHORT_NAME=SMTHG     GRIB_UNIT=[p]     GRIB_VALID_TIME=1401926400 sec UTC Can't install MySQL on Mountain Lion How to make \left, \right pairs of delimiter work over multiple lines? How to prove a cross is not locally homeomorphic to an euclidean space? Consider the subset $X = \{(x, 0) \mid -1 \lt x \lt 1\} \cup \{(0, y) \mid -1 \lt y \lt 1\} \subset \Bbb R^2$. It's just two open segments intersecting at $(0, 0)$.  How do you show that $X$, equipped with the subspace topology of $(\Bbb R^2, \lvert \lvert \cdot \rvert \rvert_2)$, is not locally homeomorphic to an euclidean space because of the point $(0, 0)$ ? TZInfo::DataSourceNotFound error starting Rails v4.1.0 server on Windows SQL-Server: The backup set holds a backup of a database other than the existing Do these define metrics on $\mathbb{R}$? Potential difference across a zero resistance wire US / Mexican border data I'm interested in locating free GIS shapefile data representing the US / Mexican border. I have found a point layer depicting the border crossing points but I'm interested in a polyline feature representing the actual border. A Banach space is reflexive if and only if its dual is reflexive How to show that a Banach space $X$ is reflexive if and only if its dual $X'$ is reflexive? In the android app, looking at bounty details using the i button, the bounty reasons are not shown:        The bounty message can provide important information as to the setter's requirements (who may not be the OP and therefore does not wish to edit the question to do so). For what powers $k$ is the polynomial $n^k-1$ divisible by $(n-1)^2$? How do you prove this?  $$\left(n-1\right)^2\mid\left(n^k-1\right)\Longleftrightarrow\left(n-1\right)\mid k$$ Let $\{K_n \}_{n \in \mathbb{N}}$ be a collection of sets, where $K_n = [n, \infty)$. Why is $\bigcap_{n \in \mathbb{N}} K_{n}$ empty? This question is related to Exercise 2.15 in Baby Rudin, in which the reader is instructed to "[s]how that Theorem 2.36 and its Corollary become false (in $R^1$, for example) if the word 'compact' is replaced by 'closed' or by 'bounded.'"  The relevant theorem and corollary are as follows:  Theorem 2.36: If $\{K_{α}\}$ is a collection of compact subsets of a metric space $X$ such that the intersection of every finite subcollection of $\{K_{α}\}$ is nonempty, then   $\{K_{α}\}$ is nonempty.  Corollary: If $\{K_{n}\}$ is a sequence of nonempty compact sets such that $K_{n}$ contains $K_{n+1},  (n = 1, 2, 3, ...)$, then   $K_n$ is not empty.  My Question: I realize this question and similar ones have been asked elsewhere on MSE, but I've yet to see a straightforward (to me, at least) answer to my question specifically. Usually, for the "closed" part of the exercise, the following collection of closed sets, $\{K_n \}_{n \in \mathbb{N}}$ is used:  $$K_n = [n, \infty), n \in \mathbb{N}.$$  For, the intersection of every finite subcollection of ${K_n}$ is clearly nonempty. Indeed,  $$ \bigcap_{i=1}^{m} K_{n_{i}} = [N, \infty) $$  where $N = \max\{n_1, n_2, ..., n_m\}$.  Then, the assertion is made that   $$ \bigcap_{n=1}^{\infty} K_n = \emptyset. $$  However, I don't see how the same argument can't simply be used, i.e., that, for example, $N \in  \bigcap_{n=1}^{\infty} K_n$ (or maybe, say, $n+1$). Intuitively, this certainly makes sense, I'd say. For, given the archimedean property, it seems that as $n$ approaches infinity, we can always find an $l$ in each increasingly smaller set such that $n &lt; l &lt; \infty$; and so $l \in  \bigcap_{n=1}^{\infty} K_n$.  What is it exactly that I'm misunderstanding or overlooking here? Google Chrome error: Error initializing NSS without a persistent database It was working properly before, suddenly it stopped working. When I tried to open by clicking on its icon, but nothing happens.  As already here are many questions related to this, but none of them are working for me. I already checked  and .  I uninstalled Chrome by following the instructions from .  sudo apt-get purge google-chrome-stable rm ~/.config/google-chrome/ -rf   Again I installed Chrome by:  sudo apt-get install google-chrome-stable   But the problem is still thesame.  When I enter google-chrome in terminal I get following error.  [12289:12323:0723/014456:ERROR:nss_util.cc(744)] Error initializing NSS with a persistent database (sql:/home/maddy/.pki/nssdb): libsoftokn3.so: cannot open shared object file: No such file or directory [12289:12323:0723/014456:ERROR:nss_util.cc(212)] Error initializing NSS without a persistent database: NSS error code: -5925 [12289:12323:0723/014456:FATAL:nss_util.cc(214)] nss_error=-5925, os_error=0 Is there any freely available pointcloud data?   I'm especially interested in dense clouds of small areas(5m to 100m radius) but anything else would be fine too.   I've found that these pages have very nice and easy to access point cloud data. Why are swap partitions discouraged on SSD drives, are they harmful? I often read that one should not place swap partitions on a SSD drive, as this may harm the device. Is this true? Can you please explain the reason to me?  Because I otherwise would have thought that placing swap on an SSD is the best choice, as it's much faster than HDDs and therefore swapping RAM contents to the SSD is not as slow as it would be with the HDD... Why are low-rep users rate-limited when posting questions? I just encountered the following error:  Oops! Your question couldn't be submitted because: users with less than 125 reputation can only post questions every 20 minutes; try again later.  Why do you have this rule? Why 20 minutes? In what order do multiple readied actions with the same trigger resolve? My players have been scheming with rapid entry tactics for the megadungeon I've recently started running. Unfortunately, the monsters are aware of the adventurers, and this has lead to a weird question of priority. Given the following situation (which I'm pretty sure is going to happen next session in some form or another) what happens?     Alice the adventurer readies an action; if her teammate Carlos opens   the door, she's going to throw the alchemists fire through the door,   which should do enough damage to kill any goblins hiding there.      Meanwhile, on the other side of the door, Bob the goblin is lying in   wait. He readies an action; if the door opens, he's going to hit the   switch to open the trapdoor in the next room, which should drop any    pesky adventurers into a pit with spikes at the bottom.      Carlos opens the door.   I know what happens when , but what happens when multiple readied actions get triggered at the same time? My guess would be an opposed reflex save or initiative check of some kind to see who goes first, but that's entirely just intuition speaking. The rulebook doesn't seem to speak to the issue.