Based on a question I answered on StackOverflow, I thought it would be a good idea to put this out in public for everyone to see.
This is an example of PasswordTransformationMethod
that, in a password field, would display a paradigmic asterisk *, instead of the generic dot •.
A basic Java class that allows storage of multiple values per key. It uses a HashMap
on top of a List
to dictate the organization of the data.
Just like jQuery's extend
, this code will allow you to replace existing values of an array with new values, based solely on matching keys.
A Python function that parses through a sorted list (descending order) using a binary search method to determine if an element is present. Best case O(1), worst case O(log n), and uses very low memory.
This code is designed to allow one to find all autocorrect suggestions of a word based on the letters close to it on a given keyboard (the following examples using QWERTY). That is to say, if the string "trf" is given, "red" would be a good result (one key left on the keyboard for each letter).