Creating your own MP3 Player Part 1: Adding files to your playlist

Recently I decided I wanted to make my own MP3 player for Windows, first just to keep my skills sharp and second because not too pleased with some of the offerings out there, so I figured why not just create my own with the features I am looking for. So as I get pieces done I will blog about it in the hopes that it can help just a single programmer out there.

HtmlHelper image helper

Even notice that there’s no helper method for images in the HtmlHelper class, you have everything just nothing for images, well that ends today.

Be careful in life

You know it’s never a good thing to try and screw a developer. We as a group stick together like glue, and when you try to screw one it’s not long before the rest of the development world knows it. When you hire someone to create you a website, always discuss price before hand that way the situation I find myself in wont ever happen to another developer.

Simple image rollovers with jQuery

Today we’re going to look at an easy way to accomplish image rollovers with jQuery. I’ve seen some convoluted ways of accomplishing this task, but this method is so simple, it takes about 4 or 5 lines of simple jQuery code.

First the jQuery code, which will utilize the hover function in jQuery. The code looks like so

<script type="text/javascript">
    $(document).ready(function () {
        function () {
            this.src = this.src.replace("_normal", "_over");
        function () {
            this.src = this.src.replace("_over", "_normal");

Notice that in hover we pass in 2 functions, which replaces the end of the image name with the hover state and the normal state (you can change this to match your naming convention if you like),
I prefer using the naming convention Image1_normal and Image1_over to differentiate between the hover states of the images.

Now all you need to do is add the markup to your images, like so

<a href="#"><img src="Image1_normal" class="rollover"/></a>
<a href="#"><img src="Image2_normal" class="rollover"/></a>

NOTE: Be sure to add the class rollover too the images which you are using for your rollovers, this way jQuery knows what to look for.

Hope you find this useful, and thanks for reading. Happy Coding!

Scrape links off HTML document

Recently I had a project to create a spider that would crawl a given site and return all the links from it. Now I know this can sound like a daunting task, especially for a new programmer, but I assure you it’s not nearly as complex as one would think. You actually have a couple different options, for the sake of this post I’m going to concentrate on two of them: