Needed a quick way to add leading zeros to numbers for a js countdown script. Not hard to do, now I can look at this post for the code when I need it again.
function addLeadingZeros(n, totalDigits)
{
if(!totalDigits)totalDigits = 2;
n = String(n);
while (n.length < totalDigits)
n [...]
Wordpress is great software. I love the UI. I don’t like the extra clutter in the dashboard and neither do some of my clients. Getting rid of it (or adding to it) is fairly easy. See http://codex.wordpress.org/Dashboard_Widgets_API for all that you can do.
If you just need to quickly trim down the dashboard use [...]
Found a great time tracking application for windows : Time Sheet .
You can train it to associate an application/document title with a project and track the time entered.
From the website:
"TimeSheet is a powerful automated time & task recording tool for professionals.
It will improve your accountability by increasing the billable hours: let the [...]
Sometimes whitespace in user entered data can be annoying. Even more annoying if it is imported data, or better yet your fault for not trimming the input. Anyway, its a simple matter to trim a field in MYSQL – see the query below , preserved here for posterity.
UPDATE tablename
SET fieldName = TRIM(fieldName)
Vimeo does not (at the time of this writing) have an iPhone/Pad version of their embed code. After seeing this solution , I had a need to do something similar but with all Vimeo embeds sitewide.
jQuery to the rescue and must be included for this to work – best used in a dom ready event.
[...]
Sometimes Youtube or other embeds may not work in a given site layout.
Here is a bit of jQuery that loops over each object or embed tag and sizes them according to a maximum width, while respecting the aspect ratio.
Since this is a javascript solution, a visitor must have js enabled for the resizing to [...]
http://www.lovelycharts.com/ is a slick site for creating all sorts of diagrams and organizational documents.
Matt Giger has written an AS3 class that allows access to the MOUSE_WHEEL event on OS X. It uses javascript injection via ExternalInterface to proxy the event from the browser. Check it here