Burning glass Technologies

Burning glass Technologies
Checktronix India Private Limited

Thursday, November 11, 2010

Redhat Linux-Installation

Installing Red Hat Enterprise Linux in Graphical Mode

Steps:

1.Boot your system from the CD your instructor will Provide. This will start Anaconda,the Red Hat Enterprise Linux installer.
2.Press ENTER at the boot:Prompt.
3.choose the appropriate language for your region.
4.choose the appropriate keyboard layout for your region.
5.choose NFS image for the installation method.
6.you will now be prompted to do some network configuration.Select Use dynamic IP configuration(BOOTP/DHCP). Deselect Enable IPV6 support.
7.Enter the following information to configure the installation source:
  • NFS Server Name:192.168.0.254.
  • Red Hat Enterprise Linux directory:/var/ftp/pub
8.At this point Anaconda will retrieve the necessary installation image and probe the system for its monitor and mouse type.when this is completed,you will be presented with a welcome screen.
Click Next.
9.Select Skip entering Installation Number and click Next.Confirm by clicking skip.
10.Anaconda next checks if red hat Enterprise Linux is already installed on this system.If yes, it will offer you the option to perform an upgrade instead of a fresh installation.
Choose Install Red Hat Enterprises Linux and click Next.
11.Select Remove Linux partitions on selected devices,Create default layout and Review and modify partitioning layout, then click Next.
12.Use the default Boot Loader settings unless the instructor advises otherwise. Do not create a Boot Loader password.
13.choose DHCP for networking and check the activate on boot check box.
14. Set the time zone as appropriate for your location;Implement UTC if the instructor suggests it.
15. Set the root password to redhat.
16. Use the default set of packages.
17. you Should now be at the About to install screen. Click Next to begin.
18.Track the Progress of filesystem formatting by switching to tty5(Ctrl-Alt-F5 will take you there;Ctrl-Alt-F6 will return you to the installer)
19. After the reboot following the installation, complete the initial set up tool;.Create a user account of your choice.Do not register the machine with Red Hat Network. Select No,I prefer to register at a later time followed by No thanks, I'll connect later.Select Enable Firewall when prompted to configure the firewall.Use the default values for all other settings.
2o. Once you have completed the installation and the newly-installed system has booted,log in as root and examine the following.
  • /root/install.log
  • /var/log/messages
  • /var/log/dmesg

Monday, October 25, 2010

Silent Sound Technology

You are in a movie theater or noicy restaurent or a bus etc where there is lot of noice around is big issue while talking on a mobile phone. But in the future this problem is eliminated with ”silent sounds”, a new technology unveiled at the CeBIT fair,that transforms lip movements into a computer-generated voice for the listener at the other end of the phone.
Silent Sound’ technology aims to notice every movements of the lips and transform them into sounds, which could help people who lose voices to speak, and allow people to make silent calls without bothering others. Rather than making any sounds, your handset would decipher the movements your mouth makes by measuring muscle activity, then convert this into speech that the person on the other end of the call can hear. So, basically, it reads your lips.This technology also helping people who have lost their voice due to illness or accident to telling a trusted friend your PIN number over the phone without anyone eavesdropping — assuming no lip-readers are around.

Thursday, April 22, 2010

Perl Array

Today we can learn some thing about Array in perl.

An array variable starts with an @ symbol.

DEFINING AN ARRAY:

@num=(1,2,3,4);

@str=(‘hi’,’hello’,hey’);

COMBINING OF ARRAY:

Two array can be combined easily in perl

For Eg:

1.pl:

@num=(1,2,3,4);

@str=(‘hi’,’hello’,hey’);

@combine=(@num,@str);

Print “@combine\n”;

o/p: 1 2 3 4 hi hello hey

Simplify:

While declaring string in array we no need to waste time by giving quotes for that special quoting function is there qw.

Eg:

2.pl:

@color=qw(black green white);

CREATING A LIST USING RANGE OPERATOR:

@num=(1..20);

Will have no from 1 to 100

@letter=(‘a’..’z’);

One Example for swaping of numbers.

Its very easy in perl

3.pl

($a,$b)=(1,2);

print "before swap\n";

print "a=$a\n";

print "b=$b\n";

print "after swap";

($a,$b)=($b,$a);

print "after swap\n";

print "a=$a\n";

print "b=$b\n";

o/p:

before swap

a=1

b=2

after swap

a=2

b=1

TO FIND END OF ARRAY:

Just declare $#array name

4.pl

@num=(1..20);

print $#num;

o/p:

19.

Index starts from 0.

Monday, April 12, 2010

NEW GALAXY
A team of scientists from the UK and the US has discovered a galaxy far away from us which is churning out stars 250 times faster than our Milky Way. The discovery of the galaxy, about 10 billion light years away from the earth, will help researchers understand how the Milky Way was formed.

Galaxy SMM J2135- 0102 has four distinct star- forming regions, each of which is 100 times brighter than Milky Way locations such as the Orion Nebula. The team which discovered the galaxy was led by scientists from the UK's Durham University.

It also included researchers from European Southern University and the Massachusetts based Harvard- Smithsonian Center for Astrophysics." The new galaxy is forming stars at about 250 suns per year. Our Milky Way is forming about two suns per year," lead scientist Mark Swinbank of Durham University said. Because of the time it takes light to reach the earth, the scientists observed the galaxy as it would have appeared 10 billion years ago - just three billion years after the Big Bang.

PERL INTRO

INRODUCTION TO PERL:
Perl stands for Practical Extraction and Reporting Language. Perl is a general-purpose, high level, interpreted and dynamic computer programming language with a vast number of uses. Perl was invented by Larry Wall, a linguist working as a systems administrator at NASA in 1987. Today Perl is found in varied applications such as finance, manufacturing, genetics, the military etc to process large data sets. Perl is used to be one of the most popular languages for developing web applications. At that time, Perl is used to write CGI scripts. Perl is very good and optimized for problems that handle 90% of text and 10% of other. Perl is best for short and small programs that can be entered and run on a single command line.
Perl run well on UNIX and Windows systems. If you develop Perl for UNIX system, it can be portable to Windows system as well.
Download and install ActivePerl
You first need to download ActivePerl the latest version from http://www.activestate.com/activeperl/ . You can also find the installation files for other systems and versions via following link http://www.activestate.com/activeperl/downloads/
To install ActivePerl just double click on the installation file. It will guide you through steps with options. Just make your own choices and click next.
To check you installation you can open command line through Run windows and type following command: perl –version or perl -v. If you installed Perl successfully, you will see the version and copyright information.
FIRST PERL PROGRAM
First, you open the Open Notepad or Notepad++ and type the following code:
1. #E:/usr/bin/perl
2. print "Hello World!\n";
You can save the Perl source code file with any name and extensions you want. Perl source code file should has extension *.pl or *.ple (Perl executable).
Running the program:
Go to cmd prompt-> type perl filename.pl
Let's look at the program in more details.
The first line of the program is a special comment. Comments in Perl program start from the pound sign (#) to the rest of line. There is no sign for block comment.
The second line starts with print statement followed by a string “Hello World” and then followed by a semi-comma. Every Perl statement has to be ended with a semi-comma (;).

Tuesday, March 23, 2010

VIRTUAL MACHINE INSTALLATION

In order to run VirtualBox on your machine, you need:
• Reasonably powerful x86 hardware. Any recent Intel or AMD processor should do.
• Memory. Depending on what guest operating systems you want to run, you will need at least 512 MB of RAM (but probably more, and the more the better). Basically, you will need whatever your host operating system needs to run comfortably, plus the amount that the guest operating system needs.
• Hard disk space. While VirtualBox itself is very lean (a typical installation will only need about 30 MB of hard disk space), the virtual machines will require fairly huge files on disk to represent their own hard disk storage. So, to install Windows XP, for example, you will need a file that will easily grow to several GB in size.

VIRTUAL MACHINE INSTALLATION
Step 1: After you installed the virtual box open the virtual machine wizard(All Programs->Sun Virtual Box) Click the “NEW” button.
Step 2: Provide the VN name(user defined) and select the OS type(For Eg., if you want to use Windows XP as your virtual os select Windows XP)
Step 3: Select Base Memory size. The Size should not be more than 50%. (Eg your RAM size is 1024 MB(1 GB) then memory size should not be more than 512 Mb i.e <512)
Step 4: Select Virtual Hard Disk(.vdi). If its not created in host OS follow the below steps.
Step 5: Select VHD(Virtual Hard Disk) type->Dynamic Storage is the preferable one.
Step 6: Select the VHD Location and Size
Step 7: Click Finish. Your VM has created.
Step 8: Before you Starting you VM review your settings.
Step 9: You can launch your VM

Tuesday, March 16, 2010

Message of the day

More than 12,000 laptops go missing at US airports a week!

Researchers consider that the first search engine was Archie, created in 1990 by Alan Emtage, a student at McGill University in Montreal, Canada.

Thursday, March 11, 2010

Message of the day

The computer programming language ADA was named in honor of Augusta Ada King. The U.S. Defense Department named the language after the Countess of Lovelace and daughter of Lord Byron because she helped finance and program what is thought to be the first computer, the “analytical engine” designed by Charles Babbage.

Sample PHP code for creating forgot password feature in any website

Find below the sample php code which can be used for implementing the forgot password feature.


$email_to=$_POST['email'];

if ($email_to == "") // Email address cannot be empty
{
header("Location: mail-password.php?send=Email not entered");
}
else
{
if(is_valid_email($email_to)) // check the valid email address or not
{
$to=$email_to;
$subject="QualityPoint Password"; // Your subject
// From
$header = 'From: info@qualitypointtech.net' . "\r\n" .
'Reply-To: info@qualitypointtech.net' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
//add code for selecting $userid and $pass for user table for the input $email_to.
// Your message
$messages.="Forgot password - qualitypointtech.net \r\n";
$messages.="-------------------------------------- \r\n";
$messages.= "Your login information to our website is- \r\n";
$messages.="UserId: $userid \r\n";
$messages.="Password: $pass \r\n";
$messages.="-------------------------------------- \r\n";

// send email
$sentmail = mail($to,$subject,$messages,$header);

if($sentmail) //if your email succesfully sent
{
header("Location: mail-password.php?send=Password has been sent to your email id");
}
else // Cannot send password to your e-mail address
{
header("Location: mail-password.php?send=Not able to send email");
}
}

else //Email address has not been found in our database
{
header("Location: mail-password.php?send=Email address not found");
}
}


function is_valid_email( $address )
{
$rx = "^[a-z0-9\\_\\.\\-]+\\@[a-z0-9\\-]+\\.[a-z0-9\\_\\.\\-]+\\.?[a-z]{1,4}$";
return (preg_match("~".$rx."~i", $address));
}




The step involved are,
1. First provide a form with input text box with name "email" for allowing the user to enter his email id.

2. On submitting this form, the "email" will be posted to the php page mail-password.php.

3. From user table, query the password corresponding to the entered email id. (If you have stored the password in encrypted form then reset it with default/random password and send this default/random password to the user)

4. Validate the email id.

5. Prepare the email message and send it using php mail() function.

Wednesday, March 10, 2010

Welcome To Editorial Team Blog

It's been a pleasure having you all here. A common platform to share our views. Educate others what we learnt, about new technologies, skills. But nothing close to proprietory of BGT's nature.

Monday, March 8, 2010

Virtualization

Virtualization:

Virtualization is extending the computer so that it can run multiple os. For eg: We can run Linux on our Windows machine.

Uses of Virtualization:

one can run software written for one operating system on another(Even if the the real computer hardware is no longer supported by the virtual os)

After installation the virtual box is act as container, we can copy transport and back up between hosts.


One can save a particualr state and revert back.

It reduce the hardware and electricity costs.

Currently,Sun VirtualBox runs on the following host operating systems:


Windows hosts:

Windows XP, all service packs (32-bit)
Windows Server 2003 (32-bit)
Windows Vista (32-bit and 64-bit[1]).
Windows Server 2008 (32-bit and 64-bit)
Windows 7 (32-bit and 64-bit)

Mac OS X hosts:[2]

10.5 (Leopard, 32-bit)
10.6 (Snow Leopard, 32-bit and 64-bit)


Linux hosts (32-bit and 64-bit[3]). Among others, this includes:

Debian GNU/Linux 3.1 ("sarge"), 4.0 ("etch") and 5.0 ("lenny")
Fedora Core 4 to 11
Gentoo Linux
Redhat Enterprise Linux 4 and 5

MESSAGE OF THE DAY

Computer-Virus

Virus Name: Elk Cloner
When: 1982
Created and Distributed on: Apple II computer
Creator: Richard Skrenta. 15-years-old boy.
Damage: Didn’t do any damage, but displayed only the following message:

Elk Cloner: The program with a personality

It will get on all your disks
It will infiltrate your chips
Yes it’s Cloner!

It will stick to you like glue
It will modify RAM too
Send in the Cloner!

Interesting facts

The first domain name registered is symbolics.com

Google makes changes small-and-often. They will sometimes trial a particular feature with a set of users from a given network subnet; for example Excite@Home users often get to see new features. They aren’t told of this, just presented with the new UI and observed how they use it.

Friday, March 5, 2010

An overview of Regular Expression

Regular expressions are a pattern matching standard for string parsing and replacement. They are used on a wide range of platforms and programming environment

Sample Eg:

RegexMatches
abcabcabcabc
23412345

Anchors:

^ Start of line
\A Start of String
$ End of Line
\Z End of String
\b Word boundary
\B Not word boundary
\< Start of Word
\> End of Word

Model Building Related

You can go through this url in order to gain some more knowledge about names

http://names.mongabay.com/
http://lifesmith.com/comnames.html
Gallery is the php based Photo management application.

It is extensively using cache mechanism in server side to render the images and data quickly.

This server-side cache will be an head-ache when debugging the Gallery application after making any changes on it. i-e Gallery will show the previous result from cache, it won't reflect the latest code/data/image change.

In this situation we need to clear the Gallery cache.

Find below the steps for clearing Gallery Cache.


Go to below url from your browser

http://www.domain.com/gallery/lib/support/index.php
(Remember to replace the domain.com with your actual domain)



Enter the Gallery setup password and click "Verify me".

The "Gallery Support" page will be displayed.




In the above page click on "cache maintenance"




Clicking "Clear Cache" on the above Cache Maintenance screen will clear the Gallery Cache.

Clear the "Derivative" only when it is really required.