[How to] disable the Windows Boot Manager after installing Vista

I recently upgraded my mom’s PC from XP to Vista. As far as I can tell, the Vista installer copies your old XP files into a folder called Windows.old, and you can’t boot into XP once Vista is installed in that partition… but for some reason, every time I’ve installed Windows Vista the computer boots into a “Windows Boot Manager” where you can pick whether to boot into your Vista installation or an “Earlier version of Windows”. This screen comes up even if you got rid of your “earlier version”.

By default, there’s a 30-second countdown before it boots into your default (Vista) installation. Naturally, we want to skip this menu entirely and boot straight into Vista. Here’s how to disable the Windows Boot Manager and boot straight into Vista:

  • Don’t try to change anything in msconfig, it only lets you reduce the countdown to a minimum of 3 seconds.
  • This setting can be changed easily from within Vista, so don’t download any programs, especially those that cost six dollars.
  1. Bring up the “System” information window by pressing Windows Key + Pause/Break (or: Control Panel -> System, or right click My Computer -> Properties).
  2. In the left sidebar, click Advanced system settings to bring up the System Properties window.
  3. In the Advanced tab, under Startup and Recovery, click the Settings… button.
  4. Uncheck the box next to “Time to display list of operating systems:”, and make sure Vista is selected as your Default Operating System.

The next time your system boots, it will boot Vista instantly instead of showing the boot manager.

Posted in how to, software | 4 Comments

[How to] round corners on images with JavaScript

Something I’ve come to love about the JQuery JavaScript library is that, no matter what client-side scripting challenges arise these days, my first thought is “I bet there’s an easy way to do this with JQuery!”. I recently worked on a website where the client wanted rounded corners on a lot of the site’s elements, including images. A quick Google search found this jquery.corner plugin; which was, as most JQuery plugins are, extremely simple to implement and adapt for my own project.

The corner plugin has a bunch of ways to add corner effects to div elements, but unfortunately you can’t apply it directly to an image. Back to Google, I found a way to make it work with images: wrap it in a div and apply the corner code to the div element. This is good, but not best for our purposes. We still have to apply styles to make the divs match the size of their child image elements.

Objective:
To loop through all divs of a certain class, and automatically resize them to match their child image elements.

We’ll put this code inside our $(document).ready(function(){ … }) block so it runs as soon as the document is ready to run code.

We want to apply this code to all divs of a certain class, we’ll say class=”round-corners” in this example. To loop through every div of this class and run code on it, we use the wonderful JQuery.each function.

First, select images with a parent div element of this class (“round-corners”):
$(‘div.round-corners > img’)
and run the JQuery.each function to loop through:
$(‘div.round-corners > img’).each(function(id){ … })

Within this loop we want to select the image, and set the height and width of its parent div element. An easy way to do this is with the .height and .width functions. These functions are both accessors and modifiers, as is the case with many functions in JQuery.
Select the parent element of the selected image:
$(this).parent(‘div.round-corners’)
get the height of the image we’ve selected:
$(this).height()
so the whole line to set the height will look like this:
$(this).parent(‘div.round-corners’).height( $(this).height() );
Repeat for the width property with the .width function.

That should do it. Let’s take a look at the source for the whole page:

<script type="text/javascript" src="jquery.js"></script><script type="text/javascript" src="jquery.corner.js"></script><script type="text/javascript">$(document).ready(function(){ $('div.round-corners > img').each(function(id){     $(this).parent('div.round-corners').height( $(this).height() ).width( $(this).width() ); })$('.round-corners').corner();})</script><div class="round-corners"><img src="P3040004.JPG" alt="P3040004.JPG" /></div>

<div style="height: 130px; background-color: rgb(255, 0, 0);" class="round-corners">This is just a regular div with no image inside, but it will have round corners too!</div>

<div class="round-corners"><img src="bluehills.jpg" alt="bluehills.jpg" /></div>

An idea for improving this script would be to use the .wrap function to automatically wrap the images in divs

Have fun rounding corners, and please use them responsibly.

Posted in code, how to, web | 2 Comments

I finally found a ‘linkify’ bookmarklet!

Updated Dec. 2008, Looks like moving from Blogger to WordPress broke this post quite a bit :)

I’ve been looking for a bookmarklet that would turn plain-text URLs into clickable links for a while, because it got tedious opening big blocks of plain-text links in Google Reader or in torrent trackers. I had it on my to-do list to write one, but I happened upon one that had already been written at squarefree.com’s bookmarklets site. ..I just wouldn’t have guessed the name.

To make this worthwhile, here are my 3 favorite bookmarklets:

  1. Linkify – Turns plain text URLs into clickable links. Try it out here if you want: http://www.dmack.ca
  2. Hide visited links – makes visited links invisible (in real time, even). Try them on the above url once you make it a link.
  3. Remove redirects – a good way to get around a lot of interstitial ads. Removes redirect scripts from urls in this format: http://www.example.com/out.php?url=http://www.example.org/

Post your favorite bookmarklets in the comments section!

Posted in tech, web | 3 Comments