.:: Welcome To My Personal Blog ::.

Sunday, April 24, 2011

Beginner's Guide To Travel With Perl - Part 9

Sorting:

There is a built-in sort function/subroutine in Perl for sorting array elements. This is done by just writing "sort @name_of_the_array;". But it sorts the elements alphabetically according to their ASCII value. This sort function sorts lexically
Example:
use strict;
main(@ARGV);
sub main
{
    my @arr = ("abc", "abcd", "defg", "def", "ijklm", "ijkl", "nop", "nop", "aaa", "AAA");
    print "before sort : @arr\n";        #before sort : abc abcd defg def ijklm ijkl nop nop aaa AAA
    @arr = sort @arr;
    print "after sort : @arr\n";        #after sort : AAA aaa abc abcd def defg ijkl ijklm nop nop
}

Friday, April 22, 2011

Programming with C Tutorial - Part 1

Now-a-days, C is the basic language to learn programming. To learn programming using C is so much easy. Here, the basic things and fundamentals of C programming will be described. Hope it will help the beginners.

C Character Set:

C uses the uppercase letters A - Z,  the lowercase letters a - z,  the digits 0 - 9, and certain special characters
as building blocks to  form basic  program elements (e.g., constants, variables, operators, expressions, etc.).
The special characters are -
+     -     *     /     =     %     &     #     !     ?     ^     "     '     ~     \ 
|     <     >     (     )     [     ]     {     }     :     ;     .     ,     _      (blank space)

Thursday, April 21, 2011

Web designing - HTML Tutorial - 8

HTML Forms:

Forms in HTML are used with <form> tag. It starts with <form> and ends with </form>. <form> tag has some attributes like "name", "action", "method" etc.

There are several input elements in HTML form. Some of them are text field, password field, radio button, check box, button (submit or reset), drop down list etc.

Web designing - HTML Tutorial - 7

Lists in HTML:

Lists are of two kinds. They are -
                                               1. ordered list
                                               2. unordered list

For unordered list, <ul> tag is used - <ul> for starting and </ul> for ending the tag. ul stands for "unordered list".
For ordered list, <ol> tag is used - <ol> for starting and </ol> for ending the tag. ol stands for "ordered list".

<li> tag is used for each list element - <li> is for starting and </li> for ending.

Web designing - HTML Tutorial - 6

Formatting Text:
 
While typing in a word processor (i.e. Microsoft Office or Open Office), we can write our text with different formatting. In HTML, we can also do the same. Let's say something about the formatting.
  • Bold: "<b>" tag is used. "<b>" for start and "</b>" for end;
  • Strong: "<strong>" tag is used. "<strong>" for start and "</strong>" for end;

Popular Posts