TIL Parity check with %
The result of modulo operator (%) varies between programming languages especially when one of the operand is negative.
Today I Learnt
View All TagsThe result of modulo operator (%) varies between programming languages especially when one of the operand is negative.
While working on an Android app, I had some issues with the SQLite database and wanted to delete it. This db is stored in the app's internal data directory (/data/data/com.cshubh.myapp
), which is inaccessible using file managers on the device.
TIL that some companies allow typo tolerance in passwords. Instead of simply rejecting a login attempt with small mistakes, they accept some common typos like an accidental uppercase or an extra character.
TIL that those flat servers used in data centers are called pizza box servers. I came across this term while reading Computer Networking: A Top-Down Approach 8th Edition.
TIL that browsers store all the bookmarks in a single JSON file.
Brave stores it at this path: %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Bookmarks
This is particularly useful if you want to programmatically manipulate or work with your bookmarks.
See Stack Overflow: Parser for Exported Bookmarks HTML file of Google Chrome and Mozilla in Java
TIL that LinkedList
overrides equals and hashCode, but ArrayDeque doesn't!
This means that regardless of the contents of ArrayDeque
, it gives the same hashCode
value.
This bit me when using Deque<T> dq = new ArrayDeque<>();
See Stack Overflow: Why doesn't ArrayDeque override equals() and hashCode()?