python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Dynamic return type based on input argument type
I'm trying to write a small function that takes two lists and sorts one based on the elements of the other. So something like:
List<Integer> keys = Arrays.asList(3, 5, 2, 4, 1);
List<String&g...
PebNischl
Votes: 0
Answers: 2
why does Guava's Sets::hashCodeImpl have a weird loop update with double complement?
Guava computes the hash code of a set like this:
static int hashCodeImpl(Set<?> s) {
int hashCode = 0;
for(Iterator var2 = s.iterator(); var2.hasNext(); hashCode = ~(~hashCode)) {
...
Just Me
Votes: 0
Answers: 1
bloom filter prevention from brute force attack
bloom filter are amazing when inputs are purely random. If we know the bloom filter size and fpp, we can very easily derive the number of hashfunction used. By Default all the libraries use some hashi...
best wishes
Votes: 0
Answers: 0
Ratelimiting with fairness/sharing
I am looking at any library/implementation which implements rate-limiting like Guava ratelimiter. However I am also trying to ensure fairness.
For example, lets say there are 3 queues Q1, Q2, Q3 each ...
rents
Votes: 0
Answers: 1