Sunday, July 19, 2009

Watir - An Automated Testing Tool for Web Applications

Hi to All,

I like to share you a best testing tool for all web developers for their web applications. It is platform independent tool, you can test your application which was created with any programming language like PHP, RoR, J2EE, Dot Net, etc.,

Steps to Install and work with watir.

1. Download ruby and follow the installation instructions.

2. gem update --system.

3. gem install watir ( recent version of watir will automatically get install )

Note This gem will test the application with IE browser as default. If you want to check with FireFox browser then you should install "firewatir" and for chrome browser "chromewatir".

supporting gems will automatically get install, perhaps one of the significant gem to co-ordinate with windows api, you should install a gem called "windows-pr" i.e gem install windows-pr

This windows-pr gem will resolve the following error:
Ruby/lib/ruby/gems/1.8/gems/windows-pr-0.9.3/lib/windows/thread.rb:59: uninitialized constant Windows::API::Error (NameError)

Get start to work by follow the watir tutorial

Hope this will help some one or mine too!

Friday, July 3, 2009

Get Start/Switch your projects with Ruby On Rails


For this past few years i missed to read an wonderful article about the succession of Ruby on Rails. This article explains us "How Ruby on Rails succeeded and intention to Create this?" Dont ever miss any one to read this article. Just click the below link and start to work with Ruby on Rails.

http://tinyurl.com/kopbwe

For each and every programmers or technicians or business development managers, this article should read and need to get know about Ruby On Rails(ROR).

Especially in India, so much of them didnt even know about this framework and language. Some bigger companies are not yet started to accomodate this simple framework( rails ) with the base powerful language (ruby). They should come over and start to work on this technology. Its the only language now the direct competitor for Java in the whole world. In Denmark, it almost 90% of programmers using this framework.


It Benefits a lot. In Brief,

-> Reduce the number of hours to develop a application.
-> Reduce the number of developers involved to create a application.
-> Reduce the stress, energy to create the applications by the developers.
-> Easy to learn the framework.
-> More compatible with all platforms.
-> Easy to implement the Agile methods.

Finally, Last but not Least, its everthing "OPEN SOURCE". Get think over the above advantages and start / switch your projects with Ruby On Rails.

Happy coding and will see you in another information.

Friday, June 26, 2009

01.01.2020 அன்றைய தலைப்புச் செய்திகள்

குறிப்பு : இதில் கூறப்படும் செய்திகள் யார் மனதையும் புண்படுத்தும் நோக்கில் எழுதப்பட்டவை அல்ல; சிரித்துவிட்டு மறந்துவிடுங்கள்; சிரித்துவிட்டு சில விஷயங்களைக் குறித்துச் சிந்தித்தாலும் சரி...

தேதி : 01.01.2020

1.எட்டாவது முறையாக முதல்வராகப் பதவியேற்றார் 95 வயதாகும் கலைஞர் கருணாநிதி.

2.வரும் சட்டமன்றத் தேர்தலில் எங்களுக்கு ஒரு வாய்ப்புக் கொடுங்கள் – விஜயகாந்த் அறிக்கை.

3.இந்தியாவின் மக்கள்தொகை 220 கோடியை எட்டி மகத்தான சாதனை

4.காஷ்மீர் பிரச்சினையில் விரைவில் சுமூகத் தீர்வு காணப்படும் – பிரதமர் ராகுல் காந்தி அறிக்கை.

5. பெட்ரோல் விலை சற்றே சரிவு – விலை லிட்டருக்கு ரூ. 999 மட்டுமே.

6.நான்கு வழி தேசிய நெடுஞ்சாலை வேலைகள் விரைவில் முடிவடையும். நாடாளுமன்றத்தில் அமைச்சர் உறுதி

7.பின்லேடன் சுற்றி வளைக்கப்பட்டான் – அமெரிக்கா அறிவிப்பு

8.திரிஷாவினுடைய இளைய மகள் ரஜினியின் புதிய படத்தில் கதாநாயகியாக நடிக்கிறார். படத்தின் பெயர் எம்.ஜி.ஆர்.


9. ஐஸ்வர்யாராயின் ஏழாவது திருமணம் - சல்மான், விவேக், அபிஷேக் பங்கேற்பு

10. சன் டிவியில் "கோலங்கள்" 4,450 வது பாகத்தைத் தொட்டது.

11. பிரேமானந்தாவின் அப்பீல் மனுவை விசாரித்த உச்சநீதிமன்ற நீதிபதி அவர் நிரபராதி எனக் கூறி விடுவித்தார்.

12. இந்தியக் கிரிக்கெட் அணியின் பயிற்சியாளர் கங்குலி தன் பதவியை ராஜினாமா செய்தார்.

13. சச்சின் டெண்டுல்கர் ஒருநாள் போட்டிகளில் இருந்து ஓய்வு பெறப்போவதாகத் தெரிவித்தார். ஆனால் தொடர்ந்து டெஸ்ட் போட்டிகளில் விளையாடுவார்.

14.வரலாறு காணாத உயர்வு : பங்குச் சந்தை சென்செக்ஸ் 34,000 புள்ளிகளைத் தொட்டது.

இத்துடன் இச்செய்தி முடிவடைகிறது.மீண்டும் செய்திகள் இரவு 7:30 மணிக்கு .செய்தியை உடனுக்குடன் தெரிந்து கொள்ள எதாவது நியூஸ் சேனல் லை பார்க்கவும் .உங்களிடம் இருந்து விடை பெறுவது உங்கள் "கோகுல்" ..நன்றி!

Thursday, June 25, 2009

Stored Procedures in MySQL

Most of the programmer are not using the stored procedures in any of the technologies. But it has lot of benefits and advantages. If you are frequently doing a same functionality in server-side / client-side programming we are creating a function or method to optimize the code. similar like that, if you are going to use a query frequently on your app then you should use the stored procedure / functions in the backend thats on databases.

Here is the example code in MySQL for using the stored procedures and functions:

Stored Procedures in MySQL:

Syntax

CREATE
[DEFINER = { user | CURRENT_USER }]
PROCEDURE sp_name ([proc_parameter[,...]])
[characteristic ...] routine_body

proc_parameter:
[ IN | OUT | INOUT ] param_name type

characteristic:
LANGUAGE SQL
| [NOT] DETERMINISTIC
| { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }
| SQL SECURITY { DEFINER | INVOKER }
| COMMENT 'string'

routine_body:
Valid SQL procedure statement

Sample PHP source code

//connection here....

$query = mysql_query("CALL procedure_name(value1, value2, ....)");

Hope this will help some one or mine too!

Saturday, June 20, 2009

WiFi BroadBand Services Started in Chennai

A Good News to all Chennai people. Wi-Fi BroadBand Services started in chennai by Zylog Systems India Limited. So no more worries with the wired or USB broadband connections. We can survive the city with online mode at any time.

Soon you can stay connected from just about anywhere - in your bedroom, in a hotel room, in a conference room at work, in your car and even on a train! And all this, at hi-speeds which can be upto 3 times faster. That’s not all, it is even more secure and affordable than conventional broadband. Go ahead, explore the great new world of Wi5!

Wi5 is available in three prepaid plans: for Rs. 550, Rs. 1000 and Rs. 1750. The Rs. 550 plan offers speeds of 1 Mbps, while Rs. 1000 brings 2 Mbps and the last 4 Mbps. Ofcourse, these are theoretical, and practical speeds are generally much lower. There is no information available on download limits nor on payment procedures. We also wonder if the company will offer postpaid plans?

To do some yayo effects on your appliction or website

Hi to All,

I would like to share a wonderful resource to build your application or websites more attractive and ajaxy. Here is the Link:

Click Here and Apply More Effects

Enjoy with this wonderful effects.

Monday, April 20, 2009

JavaScript Validation functions

Below javascript functions will definitely useful to validate html elements in our web page.

/* return a string where left & right spaces are removed */
function trim(s){ return s.replace(/^\s*|\s*$/g,”"); }

/* true if ’s’ is a 4 digit year, false if not */
function isYear(s){ return (s.search(/^\d{4}$/) == -1) ? false:true; }

/* true if ’s’ is empty, false if not */
function isEmpty(s){ return (trim(s).length > 0) ? false:true; }

/* true if ’s’ is a valid email address, false if not */
function isEmail(s){ return (trim(s).search(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/) == -1) ? false:true; }

/* true if ’s’ is in date format, false if not! ex: 01-01-2004, 1-1-2004, 01-1-2004 - all valid format */
function isDateFormat(s){ return (trim(s).search(/^(\d{1,2})(-)(\d{1,2})(-)(\d{4}$)/) == -1) ? false:true; }

/* true if ’s’ is a valid date value, false if not */
function isDateValid (s){
var ar = s.split(”-”);
var m = parseInt(ar[0],10) - 1, d = parseInt(ar[1],10), y = parseInt(ar[2],10);
var dD = new Date(y,m,d);
return ((d==dD.getDate()) && (m==dD.getMonth()) && (y==dD.getFullYear()));
}

/* true if ’s’ is a number (w/ or w/out unary +/-, w/ or w/out a dot), false if not! ex: 100, 10., 100.99 */
function isNumber(s){ return (trim(s).search(/^([+-]{0,1}\d{1,}([.]{0,1}\d*)*)$/) == -1) ? false:true; }

/* true if ’s’ is a whole number (w/ or w/out unary +/- symbol), false if not */
function isWholeNumber(s){ return (trim(s).search(/^([+-](\d+)|(\d+))$/) == -1) ? false:true; }

/* true if ’s’ is valid password (only all of these [0-9,a-z,A-Z,_-]), false if not. */
function isPasswordCombinationValid(s){
if(s.search(/^([-_a-z\d]+)$/i) == -1) return false; /* only these [0-9,a-z,A-Z,_-] */
if(s.search(/[a-z]/i) == -1) return false; /* letters */
if(s.search(/\d/) == -1) return false; /* digits */
if(s.search(/[-_]/) == -1) return false; /* _ & - */
return true;
}

/* true if ’s’ is a valid user id (only any combination of these [0-9,a-z,A-Z,_]), false if not */
function isUserIdCombinationValid(s){ return (s.search(/^([_a-z\d]+)$/i) == -1) ? false:true; }

/* true if ’s’ is in the format (99)999-999 */
function isTel_Fax(s){ return (s.search(/^([(])(\d{1,2})([)])(\d{3,3})(-)(\d{4,4})/) == -1) ? false:true; }

/* true if ’s’ is a valid program code (only any combination of these [0-9,a-z,A-Z,_]), false if not */
function isProgCodeCombinationValid(s){ return (s.search(/^([_a-z\d]+)$/i) == -1) ? false:true; }