Saturday, October 25, 2008

Fedora 9 on lenovo 3000 N200

My lenovo 3000 N200 was sick last week.
I have a dual boot win xp and fedora 9 setup. It worked for a few months..Then the agony...
The laptop would shutdown suddenly, or while booting and sometimes it even would wake up by itself although it was shutdown (like a zombie). Scary !!.

After some initial struggle and making dozens of calls to Lenovo support centre, a techie told me that N200 has a problem with BIOS and I had to reset it to defaults.

Well I did it. Guess what - my windows xp BSOD started showing up on startup.
Fedora 9 also was crashing now.

Luckily I had fedora 9 setup cd and after a re-install things were normal with fedora. However the windows BSOD persists.
Tried to get hold of a windows XP cd, but unfortunately though I am able to but up with win xp, it simply says setup is now checking.... and simply hangs with Black screen...Seems like it's not able to detect HDD

Anyway I got fedora 9 with internet working fine.
However I had a problem with sound. As per a forum i setup sound and it worked like a charm. The fix was:
In /etc/modprobe.d/alsa-base add a line
options snd-hda-intel model=lenovo.
Restart, voila sound's good.

Next with fedora, i was not able to play mp3,
After some searching around, I got a cool tool for fedora 9, it is named easylife - an opensource project. This installs all the required software on fedora at one go. Like skype, adobe, flash, etc. Everything is taken care under the hood.
next flash on fedora was not working..
Had to checkout if it was 64 bit installation using $uname -a
Yes it was for me and hence followed below instructions:

Installation on Fedora 64-bit

The following steps are required for Fedora 64-bit users.

First install the Adobe YUM repository, as stated above:

[mirandam@charon Download]$ sudo mkdir -p /usr/lib/mozilla/plugins
[mirandam@charon Download]$ sudo yum install nspluginwrapper.{i386,x86_64} pulseaudio-libs.i386 libflashsupport.i386
[mirandam@charon Download]$ sudo yum install flash-plugin

[mirandam@charon Download]$ sudo mozilla-plugin-config -i -g -v

This was adapted from the Fedora 9 Release Notes.

NOTE - PulseAudio - I was able to hear sound properly in both Gnome and KDE in Firefox when PulseAudio was enabled.

I'm yet to try this link to revive win xp.. http://forums.lenovo.com/lnv/board/message?board.id=N_Series_Lenovo_3000&thread.id=269

Friday, October 10, 2008

Jquery

It is :
* simple (include a javascript into ur existing page and you start playing with Jquery),
* light weight(core is just 20KB), pluggable/ extensible(thousands of plugins) and
* easy to use (implicit event handling, expression evaluation and function chaining to name a few).

Client-side
Also a jquery-form plugin( http://malsup.com/jquery/form/ ) makes HTTP form post much more easier.
This takes care of marshalling the HTML input fields automatically , make a form post and deal with the HTTP response.

Server-side
There is some work done already on (spring MVC + jquery) http://www.infoq.com/articles/First-Cup-Web-2.0-Joel-Confino
Tried a prototype using this and jquery-form. Actually it works well with Xstream and Jettison mapped driver .
Also converting the existing spring MVC controller to have AJAX capability is just a matter of setting a custom Json View instead of existing Velocity
view.

Data can be transferred from browser to server in either of the format:
JSON(Java script object notation) or XML.
JSON is simple as it gives you a java like object graph and is more popular in open source community.
However it lacks XML flexibility (like having attributes,etc)

Obviously, having an IDE for jQuery would make development easier. Searched around for an IDE with JS code completion and debugging capabilities.
There are few of them to evaluate - Aptana and Spket IDE.

JQuery... Ahh kids play, is it really? find out yourself http://www.youtube.com/watch?v=8mwKq7_JlS8
How it works : http://docs.jquery.com/How_jQuery_Works
Best practises
http://www.smashingmagazine.com/2008/09/16/jquery-examples-and-best-practices/
Examples http://www.noupe.com/jquery/50-amazing-jquery-examples-part1.html