« first day (3748 days earlier)      last day (1207 days later) » 

12:00 AM
After an instrument has been assembled, extra components will be found on the bench. (source)
 
12:37 AM
 
 
6 hours later…
6:37 AM
reads a book
 
7:17 AM
posted on January 26, 2021

 
 
2 hours later…
8:49 AM
holy that borderlands session yesterday just went too long yawn
 
 
2 hours later…
11:01 AM
Is there a way to convert 8-bits into a character in Java?
For example, 01100001 -> 'a'
 
sounds google-able
 
Found
Lol I wasn't able to write it properly on google
Pardon
 
np
 
 
1 hour later…
12:12 PM
@Wietlol would ConcurrentHashMap violate LSP? The Map interface accepts null keys and the ConcurrentHashMap does not and throws a NPE?
 
not sure
 
ConcurrentHashMap extends Map
 
I always would stay away from null if possible
but I suppose it would indeed violate LSP a little
if Map explicitly allows null keys
 
it does
 
if it doesnt and just HashMap allows them, then it is probably a leaky abstraction
/javadoc java.util.Map#put
 
it does?
/javadoc Map#containsKey
 
lol
key==null ? k==null
"if key is null... wait... you sure it is null?"
 
haha yes
 
oh wait
key and k
nvm
 
12:19 PM
:P
2
Q: Does overloading (not overriding) break the Liskov subsitution principle?

Edgar NavasardyanThere are tons of discussions out there about the LSP, but all of them seem to be excessively blurred. AFAIK, LSP states that to properly override (not overload) a superclass method in a child, one should assure that the child method: does not yield a new type of exception that in no scenario ...

the important part
E.g. in Java we have a notion of Map (similar to Dict in Python) and there're 2 different implementations: HashMap and LinkedHashMap. One doesn't preserve order of addition, the other one - does. But in the contract (in the interface and its docs) no one said that the order should be preserved. So if our code used HashMap and then we replaced it with LinkedHashMap - it still does everything what was required by the parent's docs and signatures.

There's yet another implementation: ConcurrentHashMap. Now that one violates LSP. Because HashMap, LinkedHashMap could have null keys while Concurr
 
> Because HashMap, LinkedHashMap could have null keys while ConcurrentHashMap can't.
that is wrong though
that is not the reason for LSP violation
> Returns true if this map contains a mapping for the specified key. More formally, returns true if and only if this map contains a mapping for a key k such that (key==null ? k==null : key.equals(k)). (There can be at most one such mapping.)
this is the reason
Because Map#containsKey describes that null keys are allowed
which correlates to HashMap and LinkedHashMap indeed allowing null keys
but correlation is not causation
 
12:38 PM
interesting point
 
 
3 hours later…
3:31 PM
hello
please how to wrie the lamba of the following
CellStyleBehaviour<ListCell> defaultBehaviour = new CellStyleBehaviour<ListCell>() {
@Override
public ListCell doStyle(WCustomListbox table, Object field, int rowIndex, int columnIndex,
ListCell stylable) {
return getDefaultCellComponent( table, field, rowIndex, columnIndex,
stylable);
}
};
 
eli
4:02 PM
In many-to-one releation if two entity shares the same child entity the response Api return one child with all datas but the second one return only ID. May i know what i'm missing ?
E.g result with ID 1 has the same measument unit as 3 but in id no 3 the measument unit is not populated.
only id get returned
 
 
6 hours later…
10:03 PM
farts
 
 
1 hour later…
11:13 PM
@OakBot it smells ewww..
 
@PayelSenapati Type /help to see all my commands.
 

« first day (3748 days earlier)      last day (1207 days later) »