Although JavaScript provides a bunch of methods for getting and setting parts of a date object, it lacks a simple way to format dates and times according to a user-specified mask. There are a few scripts out there which provide this functionality, but I’ve never seen one that worked well for me… Most are needlessly bulky or slow, tie in unrelated functionality, use complicated mask syntaxes that more or less require you to read the documentation every time you want to use them, or don’t account for special cases like escaping mask characters within the generated string.
When choosing which special mask characters to use for my JavaScript date formatter, I looked at PHP’s date function and ColdFusion’s discrete dateFormat and timeFormat functions. PHP uses a crazy mix of letters (to me at least, since I’m not a PHP programmer) to represent various date entities, and while I’ll probably never memorize the full list, it does offer the advantages that you can apply both date and time formatting with one function, and that none of the special characters overlap (unlike ColdFusion where m and mm mean different things depending on whether you’re dealing with dates or times). On the other hand, ColdFusion uses very easy to remember special characters for masks. Read more…
Flowplayer is a powerful open source video player for Flash Video (FLV) files. It can be placed on the page and controlled via javascript. It is fully customisable and a great tool. The example below adds the player to your site, loads the video URL using href into the first DIV (this url could be a dynamic variable) then creates a player that loops continuously, autohides the controls, starts on mute, show volume, mute, play/pause and time scrubber bar: Read more…
Open source software has it’s pros and cons. Our CMS of choice at this time in 2009 is still generally is Drupal, especially for the larger sites, but WordPress has come a long way in the last few years, and although still ideal for it’s blogging roots, has now become a much more versatile CMS. So here are some reasons championing WordPress as a CMS…
WordPress is an extremely flexible and expandable content management system. It is an up-to-date software package, and it’s development roots go right back to 2001. It’s a mature and stable product with a large, worldwide user base. In 2006 there were 1,545,703 worldwide downloads and in 2007 there were 3,816,965. New releases in 2008 and 2009, including the multiuser version – WordPress MU – have continued to develop and expand the software. Read more…
Show IP Display visitor’s IP Address in a graphic with this simple php code.
(Please do not link to this image, it is for demonstration only.)
Your IP Address
create a new page, copy the text below and save it as image.php (or whatever you wish)
<?php$img_number=imagecreate(275,25);$backcolor=imagecolorallocate($img_number,102,102,153);$textcolor=imagecolorallocate($img_number,255,255,255);<span id="more-1257"></span>imagefill($img_number,0,0,$backcolor);$number=" Your IP is $_SERVER[REMOTE_ADDR]";Imagestring($img_number,10,5,5,$number,$textcolor);header("Content-type: image/jpeg");imagejpeg($img_number);?>
All you’ll need to display on other pages is the code below.
This post is about 5 useful CSS properties that you should be very familiar with, but will most likely rarely use. I’m not talking about the new fancy CSS3 properties. I’m referring to the old CSS2 properties such as: clip, min-height, white-space, cursor, and display that are widely supported by all browsers. So, don’t miss this post because you might be surprised how useful they are.
1. CSS Clip
The clip property is like a mask. It allows you to mask the content of an element in a rectangle shape. To clip an element: you must specify the position to absolute. Then, specify the top, right, bottom, and left value relative to the element. Read more…
ICANN is pleased to announce the launch of the IDN ccTLD Fast Track Process.
Non-English speakers across the globe will soon have access to the Internet addresses completely in their own language. The Internet Corporation for Assigned Names and Numbers (ICANN), the organization Read more…
As far as Microsoft is concerned, Windows 8 details should be kept under a tight lid, and the company is doing a near perfect job out of keeping mum on any information related to the next iteration of the Windows client and server operating systems. The successors of Windows 7 and Windows Sever 2008 R2, currently labeled with the Windows 8 and Windows 8 Sever codenames, are in planning stage, at this point in time, according to scarce details offered by Microsoft. New details slipped through the Redmond giant’s fingers indicate that Windows 8 is being prepared for a compatibility level as consistent as that of Windows 7, if not more so, at least when it comes down to peripherals. Read more…
Dell has recently published the dell Windows 7 drivers download page whereby you will find the first set of system drivers for the Windows 7 OS systems. According to Dell blog, they posting Dell Windows 7 driver early due to they have received many requests from our business customers that we post our Windows 7 drivers so they can begin testing and qualifying the new OS within their environments. Read more…