
Monday, June 20, 2011
AJAXify phpMyAdmin Interface - GSOC 2011 - Fourth week

Monday, June 13, 2011
AJAXify phpMyAdmin Interface - GSOC 2011 - Third week
There were no previously done related works on that, so I had to start it form the beginning and there were no any codes which I could reuse in my implementation. I chose the db_structure.js file to handle the ajax behavior in this insertion.
- Initially I added the ajax class for the insert link and then wrote the action for that insert link click in db_structure.js file. The action is $("td.insert_table a.ajax").live('click'). After click action it popups the "insert_table_dialog" dialog which carries the "insertForm"

- Then I implemented the action which triggers when the "Go" button in "insertRowTable" is clicked. That is $("#insertForm .insertRowTable.ajax input[value=Go]").live('click') and it basically post the insert form to the db_structure.php and then after the record is successfully inserted it reloads the "tablesForm" in the db->structure with newly inserted values. I used "$().load()" function to load the tableForm with new values.
- Then I implemented the click action of the "Go" button at the "action_panel" in the insertForm. That is "$("#buttonYes.ajax").live('click')". In that case I had to handle the different "submit_types" and "after_insert" types. When user select the "new_insert" in after_insert list the "Insert table" dialog should re popup. So I used "trigger('click')" function to trigger the insert click automatically.
Sunday, June 5, 2011
AJAXify phpMyAdmin Interface - GSOC 2011 - Second week
First I added the class="ajax" attribute to the "Add a new user link" when the Ajax in enabled. Then It became supporting to the same logic in $("#fieldset_add_user a.ajax").live("click") event.
At that point when we click on the "Add a new User" link, it successfully popups the dialog box which is carrying the "Add user" form and after we submit it correctly create that user. But still its not done. Because I had to reload the "db specific user rights" table at the db->privileges tab.
After discussing with Marc I decided to use a post command to get the updated "db specific user rights" table in db->privileges and replace it with the current table. So in oder to do so I had to remove the echoes of the "db specific user rights" form in server_privileges.php file and use the PMA_ajaxResponse() to pass the string of the table object as a json string.
Then I had to face a problem of not parsing the json string correctly and outputs error. So I used the $.parseJSON() function to parse the json string at the server_privileges.js file. Then it worked fine and reloaded the "db specific user rights" table with newly added user.
Then Marc directed me to a new scenario in host->databases->check_privileges->"Add a new user" which gave some errors because of my modification. Finally I have modified the logic which corrects the error and now the feature is working correctly.

Now the "Add a new user" in db->privileges option works fine with the ajax behavior and I think it will help to improve the usability of PMA.
Next week I'm going to work with modifying the "Insert for a table" option in db->structure, which will apply the ajax behavior to it.
Friday, May 27, 2011
AJAXify phpMyAdmin Interface - GSOC 2011 - First week
My first task is give the ajax behavior to the "Create Table" option in the navigation panel of the database. Initially when we click on the "Create Table" option it directs the content frame to a new page. So I wanted to give a dialog box which loads the create table form and then submit it using ajax.
First I went through a similar feature in the "database->structure" and "database->operation" by using the "create_table_form_minimal" form. At that case I got some knowledge on how we can use dialog boxes for this kind of scenario. Then I tried to find out of them what are the code segments which I can reuse for my task. There were three actions which used for "Create Table" option in "function.js". Those are
("#create_table_form_minimal").live('submit') - triggers when the initial form has submit.
("#create_table_form input[name=do_save_data]").live('click') - triggers when the save button clicks in the form.
("#create_table_form.ajax input[name=submit_num_fields]").live('click') - triggers when the add new column option clicks.
Out of those I realized that the second and third actions are common to both cases. I had to add a new action instead of the first one.
Then I planed how to structure my new option. After discussing with Marc I decided to add my code the "navigation.js" so it is logical and easy to use in the future. Then I developed the (#newtable).live('click') action in "naviation.js" file and after discuss with Marc I put the common logic to the "PMA_createTableDialog()" function in the "fucntion.js" file.
Finally Marc requested a modification on changing the "Add 'x' column(s) Go" option to the top of the create table form and I did that. Now the "Create Table" option in the navigation panel works fine and I think the modification added some more usability on that.
I have successfully finished my first task of my project. Next I 'm willing to work with adding the ajax behavior to the "database->privileges" option.
Saturday, April 30, 2011
AJAXify phpMyAdmin Interface - Gsoc 2011
Saturday, April 23, 2011
Optical Character recognition with Tesseract
the imprinted credit card account number and the introduction of a transaction. Most of the modern scanners provides the feature of OCR enabling for the images scanned using it which will directly output the text content of the scanned image. This concept helps to save a huge time which will waste on rewriting the image contents. There are lots of pattern recognition and image processing activities involved with this field and this is an very interesting and research area in the current computing word.
Wednesday, October 27, 2010
My project on SahanaOCR Gsoc 2010
This is my first post after about 8 months from my last post. Since I was very busy on the training period and the Gsoc competition I was unable to write a post o my blog. How ever again I managed to find some time to write a blogpost fortunately. So I decided to continue the blogpost on SahanaOCR project from where I have stopped at my last post.

So as I mentioned earlier since I have worked with the SahanaOCR system before I came up with the idea of applying for the Gsoc competition for the SahanaOCR project. So I have wrote a proposal on the project with discussing the major implementations and developments that I'm going to do in the project in the session. Here is my project proposal, So you may have a better idea on how to write acceptable project proposal for the Gsoc competition.

My project extension plan was to improve the most necessary features of the current project. The proposal propose 5 main ideas for the existinng Sahana OCR project
Make the system platform independent
Integrate the Tesseract code to the project
Adding the feature of differentiating the different forms by a bar-code embedded to the forms automatically handles those forms.
Read the labels of the data fields and identify the type of data field so can give restrictions to the Tesseract to identify the numbers or letters separately.
Automatically send the data to the databases of the relevant modules
So after completing these steps the Sahana OCR project will be able to complete the process of extracting data from forms with a great accuracy.
After being active on the Sahana mailing list and exchanged lot of ideas on the project with earlier mentors and contributors they have accepted my project proposal for the Gsoc 2010 competition. that was a day which gave me the same happiness as I passed my Advance Level exam. My mentor was Mr. Gihan Chamara who was graduated from my department last year. During the whole project he was the great strength for me and also Mr chamindra, Mr Jo and Mr Hayesha guided me to make this task success. I have started my project implementations on the 24th May and it gave me lot of memorable experiences to my life during the whole project time which ran up to 10th September.
It taught me how to plane a project, how to overcome the challenges we met during that, how to behave withing the public communities, how to get helps form others as well as some more things which were new to me.
Here is the wiki page that I have maintained during the project and you can get the more information on the technical details and how the project ran by referring that.
Here is the link for my project report which I have submitted at the end of the project period and it contains all the details of the current status of the project.
Here is my project branch which I have submitted my code in the Launchpad.
Even though the Gsoc competition and over my effort on the SahanaOCR has not over. So my wish is to continue on working with it and be with it until it became a applicable standalone product.
