Saturday, October 30, 2010

More Eye Candy

  












Even better!
Added AWN. Removed the Analog Clock Widget on Desktop.
Got the System Tray back with AWN's Systray applet.
(You would notice there wasn't a system tray in last build!!!)

Kudos To AWN Developers!!!

ext2Read : A tool to access Linux Ext2/3/4 File Systems from windows

Here's a nice post about ext2Read

http://www.howtogeek.com/howto/33387/how-to-browse-your-linux-partition-from-windows/

And here's the link to download:

http://sourceforge.net/projects/ext2read/files/

Friday, October 29, 2010

a nice KUbuntu Desktop



Ingredients:

Widgets on Desktop : Analog Clock
Widgets on Panel : Menu and Show Desktop

Wallpaper: Abstract-RayOfLight.

Desktop Theme : Air

No System Tray or Any Annoying Notifications. Extremely clean.

Monday, October 25, 2010

Home Grown : 11. PHP Session Management

You must know about PHP's session management. This demo lets you to see how the authentication is done in conjunction with PHP's session management. Look how we have used AJAX to minimize the number of pages and ease up the process flow. We can add SSL for securely sending password to server. We can declare user's profile and accordingly set UI using his Preferences. This way we can provide a personalized experience to users. I'll round up things with this.
There are still a number of things that we can do by combining PHP and JavaScript through AJAX. So there'll be more here, just as soon as I stumble upon them...

Download the Project from
HERE .

Home Grown : 10. Listing files in a folder on Server

This page will help you list the files in a directory in appropriate way.
I've coded a function that will give back appropriate file Size. Also I'm listing them according to their creation date so latest files will be on top.

Download the Project from
HERE .

Home Grown : 9. Database backup with php

Why would we need a Mysql Backup tool using PHP?

Well there may be many reasons, when you don't have access to the Database through cpanel/the hosting provider's phpmyadmin panel (Usually admins have them, so they might not give you the full access to the hosting account). All you're concerned is with data in the database. So you can use this php code to backup the database as a SQL file. This is very handy when you want to manually sync the online database with your local database.
In out Tutorial project you have this as Page 7. The code is really simple. We make a connection to the database in question. Then we get table structure and later we fetch the data in tables and add it to querystrings to be added to the sql file.

Download the Project from
HERE .

Home Grown : 8. DataGridView like View

We have reached easily to the paginated view of the data. Now we are going editability to this form. It's really simple. We use JavaScript to modify the DOM and and when editing is done we save the modified data to the database.

We have following files: 1. phpDataGrid.php and 2. saveDataGrid.php

I made sure that I have unique id for each element of the row and somehow I got hold of that id in the JavaScript. So I pass the row no to my AJAX function. I have a button which performs two tasks depending what we want it to do. One is in edit mode it replaces the text of required fields with input boxes. And in save mode it saves modified data and replaces the input boxes with the modified data.
Really it's simple juggling of data around. I have spans for all editable elements so that I can modify their innerHTML easily. I also use labels to get hold of and set the text very easily. I have used the value of button edit (edit and save respectively) to determine modes. After save we get to see either success/Failure at the end of the row.

You can also add delete right next to edit. Also you can have a small form for new row of data somewhere at the start or end of page. This way we can build ASP.Net's DataGridView like page in PHP.

Download the Project from
HERE .

Home Grown : 7. AJAX AutoSuggest

There are many JavaScript libraries out there that provide autosuggest/autocomplete functionality. I stumbled upon the prototype Library that provides autosuggest functionality in a quite easy way. We need following:
1. Prototype JavaScript Library:
http://prototype.conio.net/

2. A frontend page: Here you can find page phpAutoSuggest.php to be that frontend. We need the id of the field for which we want autoSuggest. Also we need to create a span and pass its Id to the Prototype Javascript. Also needed is a backend page that will give us the set of values that we want displayed as options. That is hintURL.php. Once again we are using help_topic table in mysql database on our local Mysql server. We search for the URL.

After creating all above we simple create a new autocompleter as new Ajax.autocompleter() to which we pass the id of field, id of span and the name of backend page.

When we type something in URL field we get a list of matching options. The trick here is in coding the backend page correctly i.e. we should generate appropriate entries in resultset which is not difficult. We are usually needed to use something like %word% in the query. Also we need to give unordered list formatted output to the autocompleter function. You can apply css to the result. You can fiddle with the appearance of the result so as to match your page. You'll find firebug very helpful while debugging this. Or on chrome similar functionality is provided via 'Inspect Element'. Next we move to editable fields, or how best to implement ASP.Net's datagridview like page in PHP.

Download the Project from HERE .

Home Grown : 6. Pagination with page jump

Today we're going to add a small snippet of code to our previous paginate example and we're going to get page Jump functionality. Now you may ask why is this important? Simply when you have a large number of records arranged sequentially and the user has some general idea where he wants to go so he can just enter an approximate page number and jump there thus saving him so many scrolls through records of literally no importance to him.

How do we implement this?
It's really simple as we can see that the pagination PHP code passes the page number as a GET parameter in the URL. So we code a small form for user to enter the page number to and we name the input field as page and set the request method as GET. So when this form is submitted the page value that the user has entered will be available to the PAGINATE script in the form of Page parameter.

Now this example just stirs the surface, and there are so many things that we can add here. Like automatically taking current page number in the page field. Or clicking clear should clear the page field and take us to first page. We can implement these things as needed. Using the page jump facility our web page becomes very navigational. Next we'll handle the autosuggest functionality.

Download the Project from
HERE .

Home Grown : 5. Pagination with PHP

This might not be that important topic from a web designer's point of view, but when we design an online system concerning data, the presentation of the data becomes very important. Usually the database contains hundreds of entries. And we would be hard pressed to write appropriate queries to retrieve the exact amount of data and to represent it as such. So here we take a look at a small solution that needs us to define What Data, How Much data per page & How to represent that data and then takes care of everything.

First lets create a database that will hold our hundreds of entries. Okay lets use mysql database (on your mysql server) itself. We'll create a page to paginate help_topic table. We'll use ps_pagination.php from PHPSense.
We have placed ps_paginate file in scripts. We include it in our PHP Page. After we create a connetion to database and fetch required data using a suitable query. Next we create a PS_Pagination object with the required parameters and recieve a Resultset for our page.
We represent this resultset into a table. Next to generate the links we call the render functions that PS_Pagination object supports. That's it.
This is Page No. 3 in the Example Project. So go through the code while I write a simple control to get you the GoTo page functionality. But that in next tutorial.

Download the Project from
HERE .

Home Grown : 4. NetBeans IDE for PHP development

I'm using the Netbeans IDE for PHP development for last 3-4 Months. There might be something better but for now Netbeans suffices my needs. Still I encourage you to seek alternatives. Perhaps you might get something better.
Now you must question : NetBeans is a Java IDE. So why use it for PHP? Well all I can say is that, because it supports PHP. And whatever support it provides is more than enough for me - at least as of now. So we install NetBeans Full Version which comes with all the goodies and also it has PHP support.

It supports syntax highlighting for PHP, HTML, JavaScript and CSS. Intelligent autoSuggest is also provided. AutoSuggest works great with HTML and PHP. It's a bit shaky with JavaScript mostly due to JavaScript's loosely typed nature. But then I'm not much good with JavaScript either - hmmm I was doing a joke, serious. Anyway but what little highliting etc works that should be more than enough. Actually I use Mozilla Firefox's FireBug extension to debug JavaScript and trust me it's a GodSend. It lets you do everything that you can expect from a decent debugger. For me the best functionality is step through. It lets you see runtime values of variables so that you know if there's some stupid spelling mistake messing with things. So FireBug's very highly recommended. You can also use Google Chrome which has similar functionality inbuild through "Inspect Element".

With Netbeans we have inherent support for a PHP project and we get templates to for various files. Also integrated is Symphony Framework and that one I'm yet to tinker with. We are also provided with PHP code clips through Tools > Palette > PHP Code Clips.
Using Projects window we can arrange the files in our Website as suits our need. We get tabs for multipple open files that makes navigation easier.

For CSS we get a style builder which lets us see the output and lists all parameters we can change. This makes working with CSS styles a breaze. For HTML we have autocompletion of end tags and syntax highlighting. Also is indentation which helps us keep track of blocks even in HTML.
the major shortcoming of Netbeans is its slow since it runs on Java. But still all above features coupled with the nice simple interface make Netbeans a very good IDE.


Download the Project from
HERE .

Home Grown : 3. A simple AJAX Example

For AJAX you need two things - Some JavaScript on the frontend to make an Asynchronous Request and Something on the Server side to handle that request.
We create a XMLHttpRequest object and send a request to the server. When we receive the response, we use JavaScript to modify the page according to the server response.
I hope you've gotten and installed the tutorial project and have it working proper.
So here we have a button which calls a JavaScript function to make the xmlhttprequest. On server side we have a simple PHP page that replies with some text. Our JavaScript then modifies the page(Or in this case the text input field).
That's all AJAX. How can this small technique help us?
Well, if you're good with JavaScript and have some innovative mind you can make magic with AJAX. Have you seen the so called infolinks? These are double underlined words on some websites that open a small pop-up (Usually an advertisement) related to that word. See how beautiful this is. You have a double underlined word, you hover your mouse over it and voilla you're presented with something related to that word. And since the result is coming from the server you can use all kind of metadata to provide something as good as the user is expecting.
You must have seen Google's new image search? See how beautifully it arranges the images. And the pop-up effect. And the dynamic loading of pages. It's the beauty of AJAX. If you have the imagination, the creativity you can make magic. So pull out those JavaScript books and start messing the webpages.

Download the Project from
HERE .

Home Grown : 2. LAMP - modelling a website

Here we'll take a look at how a website looks from a programmers perspectives. We'll take a look at what constitutes it and what should we use for which purpose.

1. HTML: A website has the HTML pages which constitute the look and feel or in other words The Front-end. Plain text files with embedded tags that dictate the Presentation of Information.

2. CSS: We use Cascaded Style Sheets to enhance the looks. We can design colour themes and appearance of text and various page elements. CSS styling thus is a very important part of our exercises. Every HTML tag has some standard attributes which we can manipulate through CSS for streamlined look. We can also define various styling for different portions of our website.

3. JavaScript: JavaScript is the client-side script. We use JavaScript to perform certain operations at client-side that can ease processing of request on Server. E.g. Form Validation. With introduction of technologies like AJAX JavaScript's use has increased. Also with various libraries like jQuery JavaScript is used to provide various effects for page elements. These days JavaScript has become as indispensable as CSS for an aesthetically pleasing website.

4. Server side Programming: This is something that resides at server and takes care of your requests and responds to you with appropriate response. At first people used to have programs accepting user request and produce appropriate response. Those were (somewhere still are) cgi(Common Gateway Interface) programs. Later with the advent of server-side programming techniques we ended up with frameworks/Technologies that ease processing of Requests. Here we're using PHP to code our website. PHP is easy to learn, loosely typed, and very powerful.

What we'll have and where it will be?

Of course everything will be on the server. Since we're building this in PHP we won't have any actual HTML pages. All pages will be PHP only. It's just an HTML Page sans any PHP code in it. This works since the browser is not concerned with the URL - whether the page served is a HTML or PHP - but rather if the response is in correct format.

On server for the sake of ease of access we group similar files in folders. So we have a 'CSS' folder in which we put all CSS files. Another folder 'scripts' stores all our Java Scripts. Similarly we can put all PHP pages into another folder. This is necessary for very big websites where we have hundreds of pages.

Tools: What is required?
This is something that you'll have to decide for yourself. There are many suites/IDE's that allow you to build beautiful websites. For this I'm using Netbeans IDE. It has very good support for HTML, CSS and PHP. The JavaScript support is okay. So you cna start from there.
There are many other IDE's for PHP. You can try them too.
I use firebug Firefox Extension for JavaScript debu‌gging. It's excellent for debugging and also for checking the DOM tree and other things.

Download the Project from
HERE .

Home Grown : 1. AJAX-LAMP Introduction

What is AJAX? What is LAMP?

LAMP-> Linux Apache Mysql PHP. The acronym stands for the powerful applications we can build by using these four components. Linux is the OS. Apache is the Web Server. Mysql is the Database. And PHP is the language of choice for Server Programming. Thus these four together make for a powerful combination.

AJAX means Asynchronous Javascript And XML. AJAX is not a language but a technology which allows us to make server requests using Javascript without leaving current page and depending on the response we can Modify current page's content with the help of Javascript.
One simple example would be user enter something in one part of our page and he wants some operation done on that data without leaving the page. Lets say user has a form where he enters his ID and he wants to check whether he's there in the database or not, before filling a lengthy form. Here AJAX comes handy. Using AJAX we can send a request to server as soon he's entered his ID and check for it's existance.
These days AJAX is used widely to do a variety of tasks. Usually the pages load the Important matter so that the User can go on with whatever he's doing on the page and remaining stuff is loaded per request or in staggered manner. Also using AJAX we can do so many small tasks (like checking User ID in above case) very efficiently.

Download the Project from
HERE .

Wednesday, October 20, 2010

Linux is not Windows

Original Article : http://linux.oneandoneis2.org/LNW.htm


In the following article, I refer to the GNU/Linux OS and various Free & Open-Source Software (FOSS) projects under the catch-all name of "Linux". It scans better.

Linux != Windows
(Linux is Not Windows)

If you've been pointed at this page, then the chances are you're a relatively new Linux user who's having some problems making the switch from Windows to Linux. This causes many problems for many people, hence this article was written. Many individual issues arise from this single problem, so the page is broken down into multiple problem areas.

Problem #1: Linux isn't exactly the same as Windows.

You'd be amazed how many people make this complaint. They come to Linux, expecting to find essentially a free, open-source version of Windows. Quite often, this is what they've been told to expect by over-zealous Linux users. However, it's a paradoxical hope.
The specific reasons why people try Linux vary wildly, but the overall reason boils down to one thing: They hope Linux will be better than Windows. Common yardsticks for measuring success are cost, choice, performance, and security. There are many others. But every Windows user who tries Linux, does so because they hope it will be better than what they've got.
Therein lies the problem.

Tuesday, October 12, 2010

Ubuntu 10.10 Review

Well, I went through a number of reviews so I had a basic idea what to expect. And after going through the install and an hour's session I did found out most similar things. Although I had some novel experiences as well.

So lets start with the start.
1. Installation:
I put my freshly burned CD into the drive and restarted the Machine. It took quite a while to get to the Try/Install ubuntu screen. And in between the drive slept. By slept I mean really went to sleep. I was at splash screen. The dots were moving on and on. And then they just stopped moving. The drive stopped spinning and even harddisk also became idle. I waited for a while but nothing. So I had to press [space bar] a number of times to get it
started again. Weird. But slowly though, I got to the Try/Install Ubuntu Screen. I wanted to reboot and check for the weird behaviour but I wanted to get to the OS asap. So I moved on to Install Ubuntu.

Thursday, October 7, 2010

IBus for marathi input

Start IBus:

Navigate to the menu:

System >> Preferences >> IBus Preferences

You will see a message which reads:


IBus daemon is not started. Do you want to start it now?

Click, "Yes"

Tuesday, October 5, 2010

Customization Freeze

I'm freezing my Ubuntu Customization and Beautification Project today.

I've done many interesting things to my Ubuntu Distro to get this beautiful desktop. I've obtained the optimum setting. Whatever I do forward from this point of time would probably mess up this. So I'm calling it a day.

The only feel I have right now is AWE at how Linux lets us customize everything. And trust me you can't do this kind of thing with other Proprietary software.

Here I'll summarize the customizations. Many of these we have already covered before in this post.

Friday, October 1, 2010

Multiple signatures in GMAIL

These days I;m not writing much but once in a while I come upon something which is simply great and very helpful to all of us. Well that must go here (With credits of course!)

*******************************************************************************
Source: http://www.makeuseof.com/tag/manage-multiple-signatures-gmail-browser-plugins/
By Justin Pot

Gmail is superior to desktop clients like Outlook or Thunderbird in almost every way. It’s faster, accessible from any browser and (being from Google) includes amazing search capabilities. I’ve given up email clients altogether in favor of Gmail, and I don’t think I’m alone.
One shortcoming of Gmail, or so I’m told by people