Fix “Firebug’s log limit has been reached.”

Posted by – February 4, 2010

You open Firebug and are trying to fix some thing in your way-cool-AJAX app. And in you notice something that says “Firebug’s log limit has been reached.” giving you an option to do some thing with preferences. You go to “about:config” and start wondering what to do now? Search for “extensions.firebug.console.logLimit” and increase it from 500 to some thing that suites you better. And thats it. :-)

Share LAMP Web Development Blog:
  • Print this article!
  • Turn this article into a PDF!
  • E-mail this story to a friend!
  • Digg
  • del.icio.us
  • Facebook
  • Slashdot
  • Mixx
  • Google Bookmarks
  • FriendFeed
  • IndianPad
  • LinkedIn
  • Live
  • MSN Reporter
  • Netvibes
  • Sphinn
  • NewsVine
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Twitthis
  • Wikio IT
  • Yahoo! Bookmarks
  • Yahoo! Buzz

Ubuntu 9.10 – Karmic Koala

Posted by – November 2, 2009

This is bit dramatic.
Day one, a conversation between me and Dr. Abhishek on phone
Dr.: So whats this with new release of Ubuntu, the Koala…have you heard about it, any idea…?
Me: Yeah, I dont think it will be much different in terms of kernel or any thing related to core, though I do expect changes in UI…
Dr.: hmm…is this LTS?
Me: Nopes, if you are looking for LTS then better wait for six months. I guess I will also wait for LTS. I am too lazy to update my laptops…
Dr.: OK
Day two, on Facebook.
Sukhi’s wall post says, “I am waiting for Karmic Koala” and my comment, “I am not going to install Koala”
Day three, on Facebook.
Sukhi’s wall post is all gaga about Koala.
Last day, Dr. Abhishek’s wall post on Facebook indicates he has installed Koala and he likes it…
I ping him and asked him about this breach and he says he “aiwen hi” downloaded the ISO, created a live version, used it and could not resist installing it.
:-|
Today morning, I have successfully upgraded my Ubuntu 9.04 to Ubuntu 9.10. :-)
Updating or installing Ubuntu is breeze. For a dummy, who can just read English, here are the steps to do it, you will need a 1GB USB stick or a pen drive:
a) Download the latest ISO from http://www.ubuntu.com and save it to C:/ drive or any other place where you have enough space to save a DVD movie. You will be most probably downloading a 32 bit Desktop version.
b) Download Unetbootin for Windows XP or Windows Vist or whichever Windows you are using.
c) Insert your USB/Pen drive in USB and run unetbootin.
d) Choose the ISO option and browse for the ISO file you have downloaded in step a), choose the USB drive which will be in most cases already selected and let unetbootin do rest of the things.
e) As soon as unetbootin finishes it will ask you to reboot or exit. Save your work if you are doing and reboot.
f) In most of the cases your laptop or desktop will boot and show you a screen with options saying something like “Default” and “OEM”. Use arrow keys and select “Default” and hit enter gently with your fingers ;-)
g) In 99.9% cases your computer will show you the familiar Ubuntu logo, in remaining cases you need to contact a geek.
h) Your computer will show you a slick desktop. If you have not disconnected your DSL and other plugins from your computer, you will surprised to know that everything works. Unlike Windows, you dont need to add a device driver or software and reboot your machine.
i) Click Application or press “Alt+F1″ and browse the applications. Check out Open Office, its no where near to MS Office but it will still serve well and its free!
j) If any moment you feel Ubuntu is worth installing, click the install button on your Ubuntu desktop. Installing Ubuntu is very easy but demands a bit of computer knowledge. Let the installer decide what is best for you and 99% chances are that you will have dual boot system in 15-20 minutes. Ready to use.

Did I mention that I was browsing Internet on same laptop at the same time when I was installing Ubuntu 9.04? Can an average Joe do this on Windows?

Share LAMP Web Development Blog:
  • Print this article!
  • Turn this article into a PDF!
  • E-mail this story to a friend!
  • Digg
  • del.icio.us
  • Facebook
  • Slashdot
  • Mixx
  • Google Bookmarks
  • FriendFeed
  • IndianPad
  • LinkedIn
  • Live
  • MSN Reporter
  • Netvibes
  • Sphinn
  • NewsVine
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Twitthis
  • Wikio IT
  • Yahoo! Bookmarks
  • Yahoo! Buzz

Error Reporting

Posted by – March 25, 2009

PHP has come a long way. I used to program with Global vars then $HTTP_POST_VARS and then $_POST and even did a foreach to convert all Posted/Get-ed vars to their respective variable names. But I never faced any issue till the time I started using error_reporting(E_ALL).
My life changed. Initially I started pulling my hairs and then I realised that I will be bald very soon and then started concentrating on writing better code. Avoiding on the fly variables. Yesterday at work, I again realised the value of error_reporting(E_ALL).I created a small piece of code and tested it in a temp php file. It looked superb. I ported the code to production environment and it started breaking. I thought for a while. May be I have introduced some parse errors. I ran a php -l test and didnt see any syntax error. I read the whole code line by line. Even did a diff. Still the temporary php code was running fine and the code in production environment was not working fine. :-/

I decided to look at the code bit later. After a break of 15 minutes I decided to write a unit test and capture everything. And then I found a notice message telling me I was accessing an index that didn’t exist. I looked at my data set. It was a long range of number, 6184 to be precise and an index value 280 was not set. I looked at my temp file and found my code was not going thru error reporting and production environment was set up to halt at all notices and warnings. Damn it!

Share LAMP Web Development Blog:
  • Print this article!
  • Turn this article into a PDF!
  • E-mail this story to a friend!
  • Digg
  • del.icio.us
  • Facebook
  • Slashdot
  • Mixx
  • Google Bookmarks
  • FriendFeed
  • IndianPad
  • LinkedIn
  • Live
  • MSN Reporter
  • Netvibes
  • Sphinn
  • NewsVine
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Twitthis
  • Wikio IT
  • Yahoo! Bookmarks
  • Yahoo! Buzz

Drop down menus with jQuery

Posted by – March 18, 2009

After attempting sliding menus with jQuery I developed drop down menus using lists.

Here is the code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html>
  <head>
  <title>Drop Down Menus With jQuery</title>
  <script type="text/javascript" src="js/jquery.js"></script>
  <script type="text/javascript">
  function mainmenu(){
  $("#nav ul" ).css({display: "none"}); // Opera Fix
  $("#nav>li" ).hover(
function(){
$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
},
function(){
$(this).find('ul:first').css({visibility: "hidden"});
});
}
$(document).ready(function(){
mainmenu();
});
</script>
<style type="text/css">
#nav, #nav ul{
margin:0;
padding:0;
list-style-type:none;
list-style-position:outside;
position:relative;
}
#nav>li{
float:left;
position:relative;
}
#nav>li>a{
font-size:12px;
font-family: arial;
color:#000000;
padding:5px;
text-decoration:none;
border: 1px solid #ddd;
background:#eee;
}
#nav ul {
position:absolute;
dispay:none;
}
#nav a{
display:block;
}
#nav>li>ul>li>a{
font-size:12px;
font-family: arial;
color:#000000;
padding:3px;
text-decoration:none;
border: 1px solid #aaa;
background:#bbb;
}
</style>
</head>
<body>
<ul id="nav">
<li><a href="">HTML</a></li>
<li><a href="#" >CSS</a>
<ul>
<li><a href="#">CSS 1</a></li>
<li><a href="#">CSS 2</a></li>
<li><a href="#">CSS 3</a></li>
</ul>
</li>
<li><a href="#" >Javascript</a>
<ul>
<li><a href="#">Mootools</a></li>
<li><a href="#">Prototype</a></li>
<li><a href="#">jQuery</a></li>
<li><a href="#">Yahoo! UI</a></li>
<li><a href="#">Dojo</a></li>
<li><a href="#">Mochi Kit</a></li>
</ul>
</li>
</ul>
</body>
</html>
Share LAMP Web Development Blog:
  • Print this article!
  • Turn this article into a PDF!
  • E-mail this story to a friend!
  • Digg
  • del.icio.us
  • Facebook
  • Slashdot
  • Mixx
  • Google Bookmarks
  • FriendFeed
  • IndianPad
  • LinkedIn
  • Live
  • MSN Reporter
  • Netvibes
  • Sphinn
  • NewsVine
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Twitthis
  • Wikio IT
  • Yahoo! Bookmarks
  • Yahoo! Buzz

Sliding menus with Jquery

Posted by – February 26, 2009

I have been avoiding Jquery for quite some time. I was just turning myself blind to Jquery. Jaquery? What Jquery? :-/

Damn it! I have been spelling jQuery as Jquery. :D

I wanted some thing similar to accordion effect. There are tons of JavaScript frameworks offering this but I didnt want myself to be again copying huge/minified file/s and then reading hell lot of documentations figuring out how and why and ….

Phew #:-S

Now following is a snippet of code from my dear Kaddu. Obviously you will need jQuery.

<html>
<head><title>Tree</title>
<script type="text/javascript" language="javascript" src="js/jquery.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function(){
$('.level-1').hide();
$('.top').css('cursor','pointer').bind('click',viewList);
});
this.viewList = function (){
var id	 = $(this).attr('id');
var spId = id.split('_');
$('#ul_'+spId[1]).slideToggle();
}
</script>
</head>
<body>
<ul>
<li class="top" id="li_1"> 1
<ul class="level-1" id="ul_1"> <li>1.1</li>
<ol>
<li>1.1.1</li>
<li>1.1.2</li>
<li>1.1.3</li>
</ol>
</ul>
</li>
<li class="top" id="li_2"> 2
<ul class="level-1" id="ul_2"> <li>2.1</li>
<ol>
<li>2.1.1</li>
<li>2.1.2</li>
<li>2.1.3</li>
</ol>
</ul>
</li>
<li class="top" id="li_3"> 3
<ul class="level-1" id="ul_3"> <li>3.1</li>
<ol>
<li>3.1.1</li>
<li>3.1.2</li>
<li>3.1.3</li>
</ol>
</ul>
</li>
</ul>
</body>
</html>

Now, you can change lis to divs to spans to ps or what not. You just need IDs and thats it. You have a sliding menu. :-)

Share LAMP Web Development Blog:
  • Print this article!
  • Turn this article into a PDF!
  • E-mail this story to a friend!
  • Digg
  • del.icio.us
  • Facebook
  • Slashdot
  • Mixx
  • Google Bookmarks
  • FriendFeed
  • IndianPad
  • LinkedIn
  • Live
  • MSN Reporter
  • Netvibes
  • Sphinn
  • NewsVine
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Twitthis
  • Wikio IT
  • Yahoo! Bookmarks
  • Yahoo! Buzz