Tutorial: AJAX with jQuery

Posted on 1 Comment

jQuery is a very powerful JavaScript framework, and to put in their own terms, is The Write Less, Do More JavaScript library. jQuery’s slogan indeed holds true to its claim, as you’ll discover as soon as you start coding using jQuery. Although jQuery has an extensive set of API and a collection of many functions in its arsenal, I would be concentrating more on the AJAX capabilities of jQuery in this tutorial.

Most of the modern websites, irrespective of whether they offer a simple or a complex interface, usually use AJAX for some task or the other. While designing in order to cater to today’s needs, it becomes almost indispensable to use AJAX to make the end-user experience faster and more pleasant. So, if you had been deferring the use of AJAX till now owing to it’s complexity in raw JavaScript, here is your chance to start using it with utmost ease.

It is really amazing to see how much simplified AJAX is with jQuery. The developers have seemingly (and painstakingly) done a lot of hard work behind the scenes to make it easy for the web developer to implement even the most complex JavaScript concepts, including AJAX.

For the purpose of demostrating AJAX, I’ll be making use of a simple web application (that I designed using HTML, PHP, jQuery, CSS and MySQL). I call it the Albums Database.

Continue reading Tutorial: AJAX with jQuery

Enabling 3D effects in KDE 4

Posted on 1 Comment

KDE 4 comes with it’s own set of cool 3D effects built-in, but disabled by default. In order to enjoy these effects, you need to enable them manually through the Desktop section of System Settings. But in some cases, enabling 3D can get painfully difficult, as was in my case.

3D can be enabled through one of two options – XRender and OpenGL. Effects using XRender are quite slow and inferior to what is offered by OpenGL.

Enabling 3D with XRender normally works well on almost all machines, but problems start when you try to enable 3D using OpenGL. The most common error that pops us when trying to do so is:

Failed to activate desktop effects using the given configuration options. Settings will be reverted to their previous values

Here are some simple steps to make sure you can enable OpenGL 3D effects without errors and problems.

To start with, make sure you have:

  • Proper video drivers installed (proprietary drivers in case of NVIDIA and ATI) and 3D acceleration enabled.
  • The xorg.conf file setup properly.

In most situations, these sections are usually missing from the file xorg.conf (found in /etc/X11):

Section "Files"
    ModulePath     "/usr/lib/xorg/modules/extensions/nvidia"
    ModulePath     "/usr/lib/xorg/modules/extensions"
    ModulePath     "/usr/lib/xorg/modules"
EndSection
Section "Screen"
    Option       "AddARGBGLXVisuals" "True"
EndSection

Continue reading Enabling 3D effects in KDE 4

Puppy Linux – A pocket-size atom bomb

Posted on 15 Comments

The category of small-sized Linux distributions (or mini distributions) is fast evolving. Every now and then we see a new mini distro coming out, sometimes as a light-weight edition of an already established distro and sometimes based on an innovative concept. The likes of this category involve Damn Small Linux, Yellow Dog, SliTaz, and Puppy Linux. But believe me, Puppy Linux is not yet another mini distro. It is an everything OS. Puppy comes as an installable livecd, and can be installed on a number of medium, such as hard-disk, USB pen drive, external hard-disk and more.

I happened to have my first stint with Puppy about 3-4 months ago, when I found it bundled with a local computer magazine in a companion disk; it was Puppy Linux 3. Since that very day, I knowingly or unknowingly became a hard-core fan of the distribution.

A month later, Puppy 4.0 was released and I upgraded from version 3 to version 4. As now I’ve spend considerable amount of time with this beautiful distro, I am in a state to mention some points about its goodness.

Waking up Puppy
Puppy’s boot process is a no thrills-and-frills thing. The booting is plain, but the developers have made it to look impossibly simple. We see a black screen with only relevant boot-time messages appearing, nothing more, nothing less.

The booting time is not large (about 35-40 seconds) and is almost the same when booting from hard-disk or livecd. That is a considerable improvement in the booting time of a livecd.

The interface
Once the booting has completed, Puppy logs you in as the ‘root’ user and takes you directly to the main interface. No password is by default required to login. Puppy uses JWM as the desktop environment which is extremely light-weight (occupies less space). So the interface is quite simplistic, sometimes primitive, and comes with a limited set of functionality. But there are so many other options in Puppy which will never let you feel the lack of features in JWM. Basic customizations are very easy, like changing the wallpaper, window decoration, icon theme, GTK theme, etc.

Setting up and configuring Puppy
Although Puppy detects and configures most of your hardware and other settings, there could be some areas that need to be setup by you. Say, for example, setting up an Internet connection, setting up a printer, and so on. Puppy makes it extremely easy to accomplish these common configuration tasks by providing you with a number of easy-to-follow wizards. And guess what? There is even a wizard for all other wizards by the name ‘Wizard wizard’ which serves as a central point to all configuration tasks. For installing new software, Puppy comes with its own package manager, PETget.

All-in-all, most configuration tasks in Puppy are very easy which are otherwise difficult in many other Linux distros.

Play me baby
Throw just any multimedia file at it and it will play! That’s what Puppy has to offer in this department. With the xine engine pre-installed, the multimedia application – gxine – is capable of playing just any audio or video format you have heard of (and even the ones you haven’t heard of). Although I would personally prefer a more feature-rich player than gxine, it proves a wise choice to save space. Puppy also comes with software for ripping CDs, DVDs, editing metatags and recording audio. It even has a Puppy community-made audio player Pmusic.

To complete the multimedia section, it includes Pburn – a very nice community-made software for burning CDs/DVDs and comes with sufficient options for authoring discs. Puppy even has an ISO file editor!

Internet
No Firefox! But Puppy comes with a light-weight cousin of  Firefox – Seamonkey – adored by many for its speed. And it’s not just a browser, it’s a complete suite of applications – a browser, a mail client, an address book, and a HTML editor. After you have easily setup your Internet connection, you’ll be all set to browse the web (Seamonkey), chat with friends (Ayttm), check email (Seamonkey), talk through VoIP (Psip) or download stuff (Pwget, gFTP, Pctorrent).

Fun & Work
Puppy contains many popular office utilities, like Abiword (documents), Gnumeric (spreadsheets), a pdf viewer, personal organizer (to-do, calender, contacts), scientific calculator, and even a CHM file viewer. In the fun section, there are more than a couple of games that could keep you busy for a long time.

Miscellaneous utilities
Puppy comes with some additional stuff, like a personal blogging system (PPLOG), a personal wiki system (DidiWiki), partition manager (GParted), archiver (XArchive), scanner software (XSane), firewall, torrent creator and many more such software.

Killing the Puppy
Not literally. I mean shutting down Puppy. And believe me, even if you have had enough Puppy experience, shutting it down would be just like killing a lively little being on your computer. The experience is most of the time so interactive and fun-filled (and not to mention ‘light’), you would want to switch it on again very soon. And Puppy boasts of the fastest shutdown time around. It shuts down in a mere 5 seconds or so, when most of the other well-known Linux distributions take 10-20 seconds for the same task.

Puppy also offers the feature of saving your current session to a file of desired size during shutdown or reboot for future use. The ‘current session’ includes all your custom settings (wallpaper, theme), newly installed packages etc.

Conclusion
Puppy Linux proves that even simplicity has the power to get all the things done. The basic interface may require sometime from you to get you accustomed to it, but you’ll like it afterwards.

It doesn’t matter whether you are a Linux newbie or a seasoned Linux user, you will like Puppy as much as I did. This has to be one of the best Linux distros around. And it certainly deserves more attention than it is getting right now. Puppy is a tiny atom bomb – loaded with plethora software and utilities – that you can carry in your pocket – in your pen drive, CD, etc. Puppy has so much to offer in so little a size!

Vista & Ubuntu – the similarities

Posted on 10 Comments

VS

Windows Vista and Ubuntu Linux – both are totally disparate entities and I am talking about similarities? Yup, I sure am. And I have reasons to believe this.

Most of us know what Vista is. Vista is the latest edition to the most popular operating system (OS) lineup – Windows. For those who are unfamiliar with Ubuntu, Ubuntu is one of the most popular Linux-based OS that is available for free.

Here I discuss some of the similarities that I have noted in due course of my usage of both the operating systems.

Computer
In both, the name given to the central access point to all the disks and partitions on a computer is “Computer”. In earlier versions of Windows, we used to know it with the name “My Computer”.

Sub-folders in user profile folder
The default folders present in the user profile folder (or the home folder) are something like – Documents, Music, Pictures, Videos – in both the OSes.

Graphical effects
Starting from Ubuntu 7.10, both the OSes have given stress on providing graphical desktop effects to the end user. In Ubuntu, the effects are a result of Compiz Fusion software. In Vista, the most common and appealing effect is Flip 3D.

Creation of a new folder
When a new file/folder is created within another folder in either of the OS, the newly created item rearranges itself automatically in alphabetical order with respect to the other items contained by the parent folder. This wasn’t the case in earlier versions of Windows.

Renaming file
When a file is renamed (by right-clicking and choosing “Rename” or by pressing F2) in either of OSes, only the name of the file is selected, leaving the file extension unselected.

Navigation strip
When a folder within a folder within a folder (and so on…) is visited, a navigation strip appears near the top of the explorer/file manager window. In both the OSes, this navigation strip is very similar looking and a helpful aid.

Verdict
Does this imply anything? Were Vista’s features inspired by Ubuntu? Or Ubuntu’s features by Vista? Or neither of the cases. It’s upto you to decide. 😉

Note: The similarities between Vista and Ubuntu are primarily because of the desktop environment used by Ubuntu – GNOME. So, these similarities are common between Vista and many other Linux distributions that use the latest version of GNOME.

Install Shockwave in Linux using Wine

Posted on 39 Comments


Adobe Shockwave is an advanced platform for 3D applications on the Internet, and online games benefit the most out of it. But unfortunately, Adobe never released a version of Shockwave for the Linux platform.

If you are a Linux user, worry not. Using Wine, you can easily play for favorite games made using Shockwave. Wine is a software that allows running Windows applications on Linux. Wine is an open-source, free software, and is now available as a stable 1.0 version.

Here’s what you need to do:

  1. Install the latest version of Wine.
  2. Install the latest version of Shockwave for Windows using Wine. To do that, open command-line (Konsole/Terminal) and cd to the folder where Shockwave’s installer has been stored. Next, issue the command: wine Shockwave_Installer_Slim.exe. This will install Shockwave as it does in Windows.
  3. Next, install the latest version of Mozilla Firefox for Windows using Wine, in the similar way as above.
  4. After it’s installation, open Firefox, go to the desired URL containing your favorite Shockwave application, and viola! The Shockwave application is ready to be used.

The screenshot in the beginning of this post shows Miniclip’s Table Tennis game being played in Google Chrome installed in Linux using Wine.

[ To installed Google Chrome using Wine on Linux, refer to this excellent tutorial ]