I have an ArrayList which contains element of a class Event. Event has two properties, Name and Timestamp. The list now shows ALL events. I want to remove the duplicates with the same name, but different timestamp, and put them in another list. This way the user can click on an event with that name, then select a date.  I am already overriding the function equals (that compares name AND timestamp) for some other functionalities in my application.  How can I solve this?
I want to filter a java.util.Collection based on a predicate.
Subtracting (erasing) polygons from polygon using ArcGIS for Desktop? I have two polygon layers, one is green that represents all non-public right-of-way land. I have another polygon that is just a circle with a specified radius.  I would like my output to be a polygon layer that represents all the white space (the gaps) in the private land polygon layer that is also within the black circle.    How does one do this (In ArcGIS 10.2)? Probability of complete coupon set in $K$ boxes where a box has $N$ distinct coupons? Why does Benford's Law (or Zipf's Law) hold? Both  (if you take a list of values, the distribution of the most significant digit is rougly proportional to the logarithm of the digit) and  (given a corpus of natural language utterances, the frequency of any word is roughly inversely proportional to its rank in the frequency table) are not theorems in a mathematical sense, but they work quite good in the real life.   Does anyone have an idea why this happens?  (see also ) If $L_i/K$ are Galois extensions of number fields, $i=1,\ldots,n$, and $L=L_1\cdots L_n$ is the compositum. Then it's true that a prime $\mathfrak{p}$ of $K$ splits in $L$ if and only if it splits in all of $L_i$. Does this also hold if the $L_i$ are not Galois extensions of $K$?  The proof that I know regarding the compositum uses the fact that the $L_i/K$ are Galois, so is this true in the more general setting and how would one prove it? Twitter Bootstrap - multiple image (thumbnail) carousel - move thumbnails one at a time Import Large Excel File How long can you say "the late so and so"? When you refer to the deceased, you say "the late so and so." How long can you say that? Is JFK referred to as the late John F. Kennedy? How about Abraham Lincoln? Why must a singularity form inside a black hole? Academic papers using Stack Exchange data How to debug an unmet dependencies problem? What does linear time series refer to? In some papers or documents, "linear times series" seems to refer to a time series that can be modeled as a linear AR (auto-regressive) model.   In other places, "linear time series" seems to refer to a time series with a linear trend.   When someone just drops "linear time series" out of the blue without any context, what do they mean usually? How to export/backup Notes in macOS in one go I have a lot of Notes on my machine which I don't want to loose. It's not logical to export them one by one. Is there any way to export them in one go, which would make me either use them on my new   I learned that I could backup ~/Library/Group Containers/group.com.apple.notes but I am not really sure if this would be helpful. This is what I get as for this directory.  $ du -sh ./* 4.0K    ./Library 256K    ./NoteStore.sqlite  32K    ./NoteStore.sqlite-shm 3.0M    ./NoteStore.sqlite-wal   I am running macOS Mojave. Sed -- Replace first k instances of a word in the file I want to replace only the first k instances of a word.  How can I do this?  Eg. Say file foo.txt contains 100 instances occurrences of word 'linux' .  I need to replace first 50 occurrences only. Why aren't Java Collections remove methods generic? Why isn't  generic?    Seems like Collection&lt;E&gt; could have boolean remove(E o);   Then, when you accidentally try to remove (for example) Set&lt;String&gt; instead of each individual String from a Collection&lt;String&gt;, it would be a compile time error instead of a debugging problem later. Maximum area of isosceles triangle with perimeter 6 cm On per-site metas, users are given a rank based on meta participation, and this ranking is seen on the default tab of the users page on each per-site meta. How is this participation numerically calculated to give a ranking? Is it by votes? Something else? Are community wiki posts included in this? Why is cpu_idle called as the last function of the start_kernel routine? I'm reading the  function in /init/main.c.  The last function called in start_kernel is rest_init, and at the end of rest_init, cpu_idle is called.   Why is it called as the last function of the start_kernel routine, and what does it do? Expanding GCDs Reasoning: $\gcd(a,c) \cdot \gcd(b,c) = \gcd(ab,bc,ac,cc)$ I'm just wondering the reason behind being able to do this:  $$\gcd(a,c) \cdot \gcd(b,c) = \gcd(ab,bc,ac,cc)$$  Is there an elementary proof to the reasoning behind this? Let $p$ be a prime number . The order of a $p$-Sylow subgroup of the group $GL_{50}(F_p)$ of invertible $50\times50$ matrices with entries from the finite field $F_p$,equals which of the following    1.$p^{50}$ 2.$p^{125}$ 3.$p^{1250}$ 4.$p^{1225}$    I think order of this  group is $p^{2500}$  .A  sylow p-subgroup of order $P^k$ divides  order of the group but $p^{k+1}$  does not. I confused here how to apply these things . If replicators allowed humans to stop working, why were replicators shut down in the Voyager?