Archive for the ‘How to’ Category
How to search in Opera
November 13th, 2008 at 3:20 am No CommentsHere are a couple of ways that Opera makes it easier to search the Internet and to search for text on a website…
How to add HTML content to the DOM using Prototype
October 13th, 2008 at 1:55 am No CommentsSee that red beetle in the upper-right hand corner? I create that after the page loads, using Prototype. In fact, all the auxillary content in the header is created after the page loads. It’s not site content and it’s not navigation; it’s just for fun, so why load it before the “real” content, right?!
Ok, first, to add content using Prototype, I recommend that you already know or have the content you want to add to the DOM. For example, I wanted to add that red beetle to the DOM using Prototype. I already had the HTML coded up and here’s what it looked like…
<a href="#" onclick="beetles(); return false;">
<img src="/images/beetle1.png" alt="" id="beetle1" border="0" />
</a>
It’s a lot easier if you know and have the HTML code you’re trying to duplicate in Prototype. So, to add this content to the DOM after the page has loaded, we use the following Prototype functions: Element constructor, Element.insert, Element.update and document.observe. And here’s what the Prototype code looks like…
document.observe('dom:loaded', function() {
var linkBeetle1 = new Element('a', {
href: '#',
onclick: 'beetles(); return false;'
});
var beetle1 = new Element('img', {
src: '/images/beetle1.png',
id: 'beetle1',
alt: '',
border: '0',
});
linkBeetle1.update(beetle1);
$('header').insert(linkBeetle1);
};
new Element – creates a new HTML element with the provided attributes.
.update – updates/replaces the content of the element with the provided content. In this case, we’re attaching the <img> to the <a href> tag.
.insert – attaches the newly created element into the document to the element you specify.
document.observe(‘dom:loaded’… – this will make it so that the content is loaded after the page has been loaded (but before the images are loaded).
And that’s all there is to it!
How to lose 4.4 lbs in one night
August 20th, 2008 at 2:13 am No CommentsI lost 4.4 lbs playing hockey tonight. I had back-to-back games. The first game was at 8:30 PM; it was a playoff ice game We won 7-6, I had 4 assists. After that I had to drive to the Bladium for my second, inline game at 11:00 PM. We lost 5-3, I had 1 goal.
Before game 1, in the locker room.

Read the rest of this entry »
How to watch the Olympics
August 16th, 2008 at 11:22 pm No CommentsBored on a Saturday night, I decided to watch some Olympics. I had two ping pong matches going, two fencing matches and a softball game.
By far the best event was team ping pong, Hong Kong vs Korea. It was riveting, back-and-forth, really close except for the very very last match where Ko (Hong Kong) got annihilated by Oh (Korea), 11-3. There’s no audio commentary so you can really hear the action. And the crowd really gets into it too, they chant and everything, it’s awesome! Korea ended up winning, now they’re going to play Austria for the bronze medal.
How to make a panorama in Photoshop
July 21st, 2008 at 1:44 am No CommentsPhotoshop CS3 makes creating a panorama so easy, the only thing you need are the photos for it to stitch together. Read the rest of this entry »


























