Occasionally, a git source code repository needs to have something removed from it permanently, even from the history.
It is not as easy to produce dates in this format in Java as it should be. I needed to format dates like this for creating an XML Sitemap file.
I got an email from somebody named Lindrian about the article I had written about using regular expressions to find comments in source code: ostermiller.org/findcomment.html Lindrian sent me a link explaining how he had made improvements to the regular expressions I had used: regex101.com/r/wI3fU3
Since I spent about six months of my professional life working on TripAdvisor’s hotel availability comparison feature, I thought a little writeup about it here would be appropriate. If you fill in the form over on the right you will be taken to a page on TripAdvisor that shows hotels that are available for the dates that you chose.
Dilate by One
Dilate is a function that accepts a black and white image. It is also known by the names “grow”, “bolden”, and “expand”. It turns on pixels which were near pixels that were on originally, thereby thickening the items in the image.
A singly linked list is a common data structure familiar to all computer scientists. A singly linked list is made of nodes where each node has a pointer to the next node (or null to end the list). A singly linked list is often used as a stack (or last in first out queue (LIFO)) because adding a new first element, removing the existing first element, and examining the first element are very fast O(1) operations.
When working with singly linked list, you are typically given a link to the first node. Common operations on a singly linked list are iterating through all the nodes, adding to the list, or deleting from the list. Algorithms for these operations generally require a well formed linked list. That is a linked list without loops or cycles in it.
If you have ever programmed using Java IO, you will quickly run into a situation in which a class creates data on an OutputStream and you need to send it to another class that expects to read the data from an input stream. You’ll soon be asking the question, “How do I convert an OutputStream to an InputStream?”
Nowhere in Java will you find a OutpStreamToInputStreamConverter class. Luckily, there are several ways to go about this.
If you have ever programmed using Java IO, you will quickly run into a situation in which a class creates data on a Writer and you need to send it to another class that expects to read the data from a Reader. You’ll soon be asking the question, “How do I convert a Writer to a Reader?”
Nowhere in Java will you find a WriterToReaderConverter class. Luckily, there are several ways to go about this.
Many text editors have advanced find (and replace) features. I recently wrote an article about finding C style comments in source code. A similar technique can be used to find comments in HTML files.