Guess when the QuickTime plugin loaded

I've got a dual-core Opteron, QuickTime 7.5, Firefox 2.0.0.14.  Good luck figuring out when the CPU pegging, memory leaking Firefox 2 loaded QuickTime.

Emailing a calendar with Outlook 2007

At first glance Outlook 2007 appears to be a new look slapped onto Outlook 2003. The preferences are almost identical and the most noticeable change is Office ribbon. There are a number of subtle changes though, and one that I just found today is the ability to email your calendar to someone.

Launch Outlook and in Calendar or Folder View right click on the calendar name and choose "Send via E-mail…". A blank message will open and a dialog window with options will present itself.

You can choose which calendar to use (if you have multiple), set working hours, change the layout and choose how much detail to include. Predefined date ranges are Today, Tomorrow, Next 7 days, next 30 days, Whole calendar and the option to choose a custom range.

The Daily Schedule layout shows all of your appointments and free time while List of Events only shows appointments. Both options also attach a .ics file to the email. This one of those features that is a huge help when trying to schedule a block of time with someone, and unfortunately I've only discovered it recently.


List of Events Layout


Daily Schedule Layout

Generic Paging Links with ColdFusion

This is basically a port of the WordPress paginate_links function from PHP to ColdFusion, with a few enhancements. The original function was written by Michael D Adams (trac ticket).

Changes include the ability to control page size via a query string parameter, the ability to restrict the maximum page size (overriding the value of page_size) and a threshold (show_all_threshold) for displaying all pages. show_all_threshold is useful in cases where you may have a small number of pages and would like to display links to each of them.

Sample Usage

<cfparam name="url.pagenum" default="12" />
<cfparam name="url.nrecords" default="20" />
<cfoutput>
paginate_links(link_format="?pagenum=%PAGE%", end_size=2, mid_size=3, current=#url.pagenum#, total=260, page_size=#url.nrecords#)
#paginate_links(link_format="?pagenum=%PAGE%", end_size=2, mid_size=3, current=url.pagenum, total=260, page_size=url.nrecords)#
 
paginate_links(link_format="?pagenum=%PAGE%", end_size=2, mid_size=3, show_all_threshold=15, current=#url.pagenum#, total=350, page_size=#url.nrecords#)
#paginate_links(link_format="?pagenum=%PAGE%", end_size=2, mid_size=3, show_all_threshold=15, current=url.pagenum, total=350, page_size=url.nrecords)#
 
paginate_links(link_format="?pagenum=%PAGE%", end_size=2, mid_size=3, current=#url.pagenum#, total=300, page_size=#url.nrecords#
#paginate_links(link_format="?pagenum=%PAGE%", end_size=2, mid_size=3, current=url.pagenum, total=300, page_size=url.nrecords)#
</cfoutput>

Output

paginate_links(link_format="?pagenum=%PAGE%", end_size=2, mid_size=3, current=12, total=260, page_size=20)

« Previous12345678910111213Next »

paginate_links(link_format="?pagenum=%PAGE%", end_size=2, mid_size=3, show_all_threshold=15, current=12, total=350, page_size=20)

« Previous1291011121314151718Next »

paginate_links(link_format="?pagenum=%PAGE%", end_size=2, mid_size=3, current=12, total=300, page_size=20)

« Previous129101112131415Next »

Code

<cffunction name="paginate_links" access="public" output="false" returntype="any" hint="Return links to paginated results, heavily based on paginate_links() <http://trac.wordpress.org/ticket/3159> from WordPress <http://wordpress.org/> by Michael D Adams <http://blogwaffe.com/>">
  <cfargument name="link_format" required="YES" type="string" default="" hint="Link format.  Use %PAGE% for the page number placeholder (required), %SHOW% for the paging size (optional)" />
  <cfargument name="prev_next" required="YES" type="boolean" default="true" hint="Show previous/next links" />
  <cfargument name="prev_text" required="YES" type="string" default="&laquo;&nbsp;Previous" hint="Text for 'Previous Page' link" />
  <cfargument name="next_text" required="YES" type="string" default="Next&nbsp;&raquo;" hint="Text for 'Next Page' link" />
  <cfargument name="end_size" required="YES" type="numeric" default="1" hint="How many numbers on either end including the end" />
  <cfargument name="mid_size" required="YES" type="numeric" default="2" hint="How many numbers to either side of current not including current" />
  <cfargument name="current" required="YES" type="numeric" default="" hint="Currently active page" />
  <cfargument name="total" required="YES" type="numeric" default="1" hint="Total number of results.  Number of pages will be calculated by total/page_size" />
  <cfargument name="page_size" required="YES" type="numeric" default="20" hint="Number of results to show per page" />
  <cfargument name="max_page_size" required="YES" type="numeric" default="50" hint="Maximum number of results to show per page, to prevent abuse." />
  <cfargument name="show_all" required="YES" type="boolean" default="false" hint="Show all page numbers (ignore end_size, mid_size)" />
  <cfargument name="show_all_threshold" required="YES" type="numeric" default="0" hint="Show all page numbers ONLY if the total number of pages is <= this value.  0 to ignore." />
 
  <cfargument name="prev_class" required="YES" type="string" default="page-numbers pn-prev" hint="Class(es) to use for Previous Page link" />
  <cfargument name="next_class" required="YES" type="string" default="page-numbers pn-next" hint="Class(es) to use for Next Page link" />
  <cfargument name="current_class" required="YES" type="string" default="page-numbers pn-current" hint="Class(es) to use for Next Page link" />
  <cfargument name="dots_class" required="YES" type="string" default="page-numbers pn-dots" hint="Class(es) to use for dots span" />
  <cfargument name="page_numbers_class" required="YES" type="string" default="page-numbers" hint="Class(es) to use for page numbers" />
 
  <cfargument name="return_type" required="YES" type="string" default="text" hint="Valid types are array, text" />
 
  <cfscript>
	var page_links = ArrayNew(1);
	var link = '';
	var n = 0;
	var dots = false;
	var num_pages = Round( arguments.total / arguments.page_size ); // Total number of pages
 
	// Sanity checks
  if( arguments.end_size LT 0 ) {
  	arguments.end_size = 1;
 	}
 
  if( arguments.mid_size LTE 0 ) {
  	arguments.mid_size = 2;
 	}
 
 	if( arguments.max_page_size ) {
 		arguments.page_size = Min( arguments.page_size, arguments.max_page_size );
 	}
 
 	// If we are within our show all threshold, enable the display of all pages
	if( arguments.show_all_threshold GTE num_pages ) {
		arguments.show_all = true;
	}
 
  // Add Previous Page link if current page is 2+, and we want to show next/prev links
	if( arguments.prev_next AND arguments.current AND arguments.current GT 1 ) {
		link = ReplaceNoCase( arguments.link_format, '%PAGE%', arguments.current - 1 );
		link = ReplaceNoCase( link, '%SHOW%', arguments.page_size );
		ArrayAppend(page_links, '<a class="#arguments.prev_class#" href="#link#">#arguments.prev_text#</a>' );
	}
 
	// Build internal page number links
	for( n = 1; n LTE num_pages; n=n+1 ) {
		if( n EQ arguments.current ) {
			ArrayAppend( page_links, '<span class="#arguments.current_class#">#n#</span>' );
			dots = true;
		} else {
			if( arguments.show_all OR ( n LTE arguments.end_size OR ( arguments.current AND n GTE arguments.current - arguments.mid_size AND n LTE arguments.current + arguments.mid_size ) OR n GT num_pages - arguments.end_size ) ) {
				link = ReplaceNoCase( arguments.link_format, '%PAGE%', n );
				link = ReplaceNoCase( link, '%SHOW%', arguments.page_size );
				ArrayAppend( page_links, '<a class="#arguments.page_numbers_class#" href="#link#">#n#</a>' );
				dots = true;
			} else if( dots AND NOT arguments.show_all ) {
				ArrayAppend( page_links, '<span class="#arguments.dots_class#">...</span>' );
				dots = false;
			}
		}
	}
 
  // Add Next Page link if current page LT total, and we want to show next/prev links
	if( arguments.prev_next AND arguments.current AND arguments.current LT num_pages ) {
		link = ReplaceNoCase( arguments.link_format, '%PAGE%', arguments.current + 1 );
		link = ReplaceNoCase( link, '%SHOW%', arguments.page_size );
		ArrayAppend(page_links, '<a class="#arguments.next_class#" href="#link#">#arguments.next_text#</a>' );
	}
 
 
  if( arguments.return_type EQ "array" ) {
  	return page_links;
  } else {
  	return ArrayToList(page_links, "");
  }
  </cfscript>
</cffunction>

VMware Fusion 2 Beta Released

VMware just announced a public beta of their OS X virtualization product, Fusion. Fusion 2.0 will be a free upgrade to all registered users.

Already it addresses a number of issues I've had including:

  • Multiple monitor support
  • Correctly handles plugging & unplugging display
  • Option to use one or all displays in Full Screen mode
  • Handles changes to resolution and display orientation automatically
  • Allow USB mice/tablets in a virtual machine without custom configuration
    Note: I just barely wrote about how to work around this in Fusion 1.1.2.
  • Virtual machines in Bridged networking mode now know when your Mac's network connection is available or becomes unavailable, and will refresh their network address automatically
    Note:
    This is HUGE. When I'm moving between home and my downtown office networking is always an issue.
  • DirectX 9.0 with Shader Model 2 graphics

Full release notes are here, lightweight notes and sample videos are here, download Fusion 2 beta here.