Naive palindrome substring check written in C.

Below is a quick and naive implementation of a palindrome substring checker written in C. All characters are considered part of the palindrome (i.e. whitespace and punctuation is not filtered out). Substrings of larger palindromes are also printed separately. #include #include /* * printPalindromes – prints all palindromes in * a string, including substrings of […]

Date formatting for Single Unix Specification(R) versions of “date”

The date command is wonderful for formatting dates, as such date –date=”2010-01-01″ +%Y%j But what happens when you’re on a system whose date command only supports the -u [UTC] and + [for formatting] options? Below is a quick hack in straight C that provides the ability to format a date that you provide. This is […]