Blogger Tips: May 2008

Friday, May 2, 2008

Background images for adsense ads

Hmm guys..Wanna add background image to yourr adsense ad so that it looks better..

Ok then here is the trick..






Put_Google_Ads_code_here



Edit the above code properly as below..

Replace Put_Google_Ads_code_here with your adsense code.
Replace your_image_width with the width of your image
Replace your_image_height with the height of your image
Replace your_image_path with your image file's url

After editing put this code in the place you need your ads to appear(with background image)

When you choose the background colour and border colour in Adsense for content setup please try to use colours matching with your back ground image..

Remove the Nav Bar

Hi are u bored of the blogger nav bar.Me too got bored of it and finally got rid of it.So i think i should explain to you how i removed the blogger nav bar.

Here is the trick
Goto Blogger Template>Edit Html

and paste the following code just before the Variable definitions

#navbar-iframe
{
display: none !important;
}


Variable defenition start with something like this

/* Variable definitions
====================

type="color" default="#fff" value="#ffffff">


Save and publish your template and the nav bar is gone.

Big Regex Improvements for Firefox 3 Beta 5

Having just posted my latest project, Asciible, that relies heavily (well, entirely) on client-side regular expressions, I've been paying closer attention to efficiency concerns. I don't know if I'd really consider myself to be a Firefox "fan boy", but it is my browser of choice, and I have to admit that I was surprised to find that IE7 was kicking FF2's butt when it came to executing String.replace().

To give you a real world context for my tests, Asciible simply searches through a text input and replaces special characters with their ASCII equivalents. Even all the custom options rely solely on simple String.replace()'s. So in fairness, be aware that this limited test does not represent an overall analysis of the regular expression engine. With that said, in this limited context IE was taking about 10% of the time it was taking Firefox to complete. I was even able to achieve nearly the same efficiency in FF2 by using a simple for loop and a character hash table - yuck.

After noticing this, I went and downloaded Firefox 3, Beta 4 and ran my tests again. I was disappointed to find only marginal improvements.

So time advances until earlier today when I was taking a look at the release notes for Firefox 3 Beta 5, and I couldn't help but notice they were touting some major performance improvements - specifically to the JavaScript engine. So with curiosity in hand I downloaded, installed, and ran my tests again. To spare you the suspense - no, Firefox did not put IE to shame, and in truth it was still the slower of the two. However it did show BIG improvements - and I'm happy to see that the regular expression engine has been given some serious attention. All in all, FF3 Beta 5 was completing the test in less than half the time it was taking FF2. For visualization purposes:

String.replace() comparison for IE7, FF2, and FF3 Beta 5

This is good news, especially since FF3 is still in beta. There's no guarantee that there will be further improvements in the final release, but the optimizations thus far are already outstanding, and certainly enough to leave me with my fingers crossed.