Know Your Value.......!

A well-known speaker started off his seminar by holding up a Rupee 500 note.
In the room of 200, he asked,"Who would like this Rupee 500 note?" Hands started going up. He said, " I am going to give this note to one of you but first let me do this. "he proceeded to crumple the note up. He then asked."Who still wants it?"
Still the hands were up in the air. "Well," he replied,"What if I do this?" And he dropped it on the ground and started to grind t into the floor with his shoe. He picked it up, now all crumpled and dirty. "Now who still wants it?"
Still the hands went into the air. "My friends, youhave all learned a very valuable lesson. No matter what I did to the money, you still wanted it becaues it did not decrease in value. It was still worth Rupee 500/-. Many times in our lives, we are dropped, crumpled, and ground into the dirt by the decisions we make and the circumstanes that come our way. We feel as though we are worthless. But no matter what has happened or what will happen, you will never lose your value.

You are special. Don't ever forget it! Never let yesterday's disappointments overshadow tomorrow's dreams.


IPL 5 auction: Chennai Super Kings buy Ravindra Jadeja for whopping $2 million in tie-breaker

Former Pakistan player Azhar Mahmood, who now has a British passport, has been sold to Kings XI Punjab for $200,000. He started with a base price of $100,000. 

Dashing wicketkeeper-batsman Brendon McCullum was the first to be auctioned as he was bought for $900,000 by Kolkata Knight Riders followed by the Indian all-rounder Ravindra Jadeja, who was clinched by Chennai Super Kings for whopping $2 million in the tie-breaker of IPL 5 auction in Bangalore on Saturday. 

Australia's James Faulkner was also grabbed by Kings XI Punjab for $190,000. 

Darren Bravo, who went unsold in the first time, has been bought on his base price by Deccan Chargers for $100,000 while Owais Shah remained unsold in the second time too at a base price of $200,000. 

New Zealand all-rounder Doug Bracewell got lucky at the second time after Delhi Daredevils bought him for $50,000. 

South African seamer Marchant de Lange, who took a seven-for on Test debut, has been bought for $50,000 by Kolkata Knight Riders. 

South Australia batsman Daniel Harris, who had a base price $50,000, sold to Deccan Chargers for $70,000. 

Kevon Cooper, the Trinidad & Tobago all-rounder, has been bought by Rajasthan Royals on base price of $50,000. West Indies opener Lendl Simmons couldn't attract any buyer. 

Lankan all-rounder Thisara Perera, who had a base price of $50,000, was snapped by Mumbai Indians for $650,000. 

Sunil Narine was bought for $700,000 by Kolkata Knight Riders while Romesh Powar has been snapped up by Kings XI Punjab for $160000. 

Lankan spinner Ajantha Mendis went unsold alongwith compatriot Rangana Herath, Graeme Swann, Peter Siddle, Vernon Philander, Xavier Doherty, Mark Boucher, Ramnaresh Sarwan and Lonwabo Tsotsobe. 

Royal Challengers Bangalore bought seamer R Vinay Kumar, who had a base price $100,000, for $1 million. 

Fast bowler RP Singh, who had a base price of $200,000, was bought by Mumbai Indians for $600,000. 

Jadeja, who had a base price of $100,000, was bagged in a tie-breaker between Super Kings and Deccan Chargers. 

The $2 million budget cap for the auction means Super Kings have spent all their money on a single player and cannot participate in the auction any more. 

Delhi Daredevils bought all-rounder Andre Russel, who had a base price of $50,000, for $450,000 while Mitchell Johnson was bought at his base price by the Mumbai Indians for $300,000. 

Deccan Chargers bought Parthiv Patel, who had a base price of $200,000, for $650,000 after quite a fight with the other franchises. 

Rajasthan Royal bought Bradley Hodge for $475,000. Sri Lankan master batsman Mahela Jayawardene has been bought by Delhi Daredevils for $1.4 million. 

Mumbai Indians bought Herschelle Gibbs for $50,000 while Dinesh Chandimal bought by Rajasthan Royals for $50,000. Both the players have been bought on their base prices. 

Muttiah Muralitharan was bought by Royal Challengers Bangalore for $200,000 while England's paceman James Anderson was the first to go unsold in the IPL 5 auction. 

Ian Bell, Upul Tharanga, Adrian Barath, Tamim Iqbal and VVS Laxman went unsold at the IPL 5 auction. 

The auction got a big twist just hours before the players' auction after Sahara India pulled out from the ownership of IPL franchise Pune Warriors. 

Sahara India has been denied replacement for injured Yuvraj Singh for the upcoming fifth edition of Indian Premier League. 

US shuts 16 sports piracy websites

According to the government, the 16 websites provided links to give viewers easy access to other sites that hosted pirated telecasts from the National Football League, National Basketball Association, National Hockey League, World Wrestling Entertainment Inc ("WWE") and TNA Impact Wrestling. The latter is also broadcast on Viacom Inc's Spike TV. 

16 websites that illegally streamed live sports and pay-per-view events over the internet, and charged a Michigan man with running nine of those websites. "These websites and their operators deprive sports leagues and networks of legitimate revenue" in what amounts to "virtual thievery," said US Attorney , who announced the website seizures.

The websites are,,,,,,,,,,,,,, and 

As prosecutors announced the seizure on Thursday, New England Patriots quarterback Tom Brady, expected to start in Sunday's Super Bowl against the New York Giants, admitted to reporters his own use of an illegal website. 

"Last year, you know, I was rehabbing my foot, you know, in Costa Rica, watching the game on an illegal Super Bowl website," he said in a video posted Thursday on the NFL website. "And now I'm actually playing in the game. So it's pretty cool." 

ORA-01093 Close of standby Database

This problem usually occurs in Oracle database to However, this problem also exist in 11gR1 and 11gR2 database and the reason is different. During switchover from Primary to Physical Standby database ORA-1093 error occurs.

SQL> alter database commit to switchover to physical standby;
alter database commit to switchover to physical standby;
ERROR at line 1:
ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected

In case of 10g database you will see switchover status as Session Active.

SQL> select switchover_status from v$database;


Cause of the Problem

This error can also occur when any standby database registered with the Oracle Clusterware is being closed.

2) Running RECOVER MANAGED STANDBY DATABASE on a standby that was previously opened in READ ONLY mode

Solution of the Problem
If the error occurs during switchover in a Data Guard environment, simply re-run the switchover command with the additional clause WITH SESSION SHUTDOWN.

SQL> alter database commit to switchover to {new database role} WITH SESSION SHUTDOWN;

Otherwise stop racgimon using the following command in the database ORACLE_HOME on a single node:

% racgimon stopd {db_name}

Re-issue the original command that failed.

Checked Exceptions Vs Unchecked Exceptions in Java

A checked exception is any subclass of Exception (or Exception itself), excluding class RuntimeException and its subclasses.

Making an exception checked forces client programmers to deal with the possibility that the exception will be thrown. eg, IOException thrown by's read() method
Unchecked exceptions are RuntimeException and any of its subclasses. Class Error and its subclasses also are unchecked.
With an unchecked exception, however, the compiler doesn't force client programmers either to catch the exception or declare it in a throws clause. In fact, client programmers may not even know that the exception could be thrown. eg, StringIndexOutOfBoundsException thrown by String's charAt() method.
Checked exceptions must be caught at compile time. Runtime exceptions do not need to be. Errors often cannot be, as they tend to be unrecoverable.

Windows Phone 8 details are leaked

Details of Microsoft's Windows Phone 8 were leaked.Microsoft CEO Steve Ballmer at Nokia's press conference during CES. Nokia figures to play a major role in Windows Phone's resurgence.
Microsoft is still fighting an uphill battle in getting its phones,which have been critically praised--into the hands of consumers.The next big iteration of its Windows Phone platform appears to address many of the early concerns and brings it to par with competing platforms.

The platform will add support for multicore processors--at a time when Android devices are already moving to quad-core chips--four different screen resolutions, a removable microSD card, and near-field communication, crucial for mobile payments.

Windows Phone 8 will also integrate with the Windows 8 desktop and tablet operating system. The hope is developers can take chunks of their code for one platform and move it to the other. Pocketnews said the company expects 100,000 apps to be available at launch, which it pegged to the fourth quarter. Windows Phone 8 will add native code support, allowing for apps that are more integrated into the devices. Skype may also play a bigger role in the operating system.

Possibly taking a swipe at Research In Motion's shrinking share for its BlackBerrys, Microsoft is adding more business-friendly features such as encryption and allowing companies to build their own proprietary apps into the phone.
The new platform will also be designed to better handle data traffic, opting to go to Wi-Fi and using proxy servers to feed pages to Internet Explorer 10, similar to how Opera Mini can achieve faster browsing times.


Class ArrayIndexOutOfBoundsException

An ArrayIndexOutOfBoundsException is thrown when an out-of-range index is detected by an array object. An out-of-range index occurs when the index is less than zero or greater than or equal to the size of the array.

Class Name:

 Constructor Detail
public ArrayIndexOutOfBoundsException()
Constructs an ArrayIndexOutOfBoundsException with no detail message.

public ArrayIndexOutOfBoundsException(int index)
Constructs a new ArrayIndexOutOfBoundsException class with an argument indicating the illegal index.
         index - the illegal index.

public ArrayIndexOutOfBoundsException(String s)
Constructs an ArrayIndexOutOfBoundsException class with the specified detail message.
         s - the detail message.
In this example we are going to see how we can catch the exceptionArrayIndexOutOfBoundException. ArrayIndexOutOfBoundException is thrown when we have to indicate that an array has been accessed with an illegal index. 
Suppose we have declared an array of int and the size of the array is 6, that means  that this array can store six values. Now suppose if want to access the seventh variable which does not exist, then it will throws the exception ArrayIndexOutOfBound. It means that there is no other value instead after that we are forcing the array to give the next value. 
The code of the program is given below:
        int a[] =new int[6];
                for(int i = 0; i<7; i++){
        }catch(Exception e){


Coding of software components

All software components belong to a particular package VRC. The coding of the software components together with the VRC codes make every software component unique. Since some software components can be maintained by language and by package VRC, for example messages, they also need to be linked to a certain language to code them uniquely. The following software components are linked to a language:

  • forms
  • menus
  • reports
  • messages
  • questions
  • labels
1) Coding of sessions
Code: kkmmmsfvvp000
kk package code
mmm module code
s submodule code
f function code
vv sequence number
p process type
hhh customization type (only 000 for sessions)
For sessions, the customization type is always 000. The vv sequence number is not subjected to strict standards.For standard software sessions or sessions derived from the standard software, the submodule code and the sequence number together are similar to the table number.

The submodule code is only used for the coding of sessions that are newly-developed modifications that are not derived from the existing standard.

2) Coding of tables
Code: kkmmmsvv
kk package code
mmm module code
s submodule code (only numeric)
vv sequence number

Tables that are newly-developed modifications to the standard package (customized software) must be defined as follows: the submodule codes c, l, b, d, j, and o cannot be used, instead the numeric value 9 is used extended by the sequence number. 
As a result, the ranges for the customization types are:
Ranges for customization types:
c 901 - 935
l 936 - 950
b 951 - 965
d 966 - 980
j 981 - 985
o 986 - 995
Figure shows an example of the code of a standard software table. If existing tables are modified, they retain their original codes because the customized tables are part of different package VRCs and, therefore, are uniquely coded.

Standard Software Coding in BAAN ERP

Each software component that is developed or customized with BAAN IV Tools must be coded according to the Baan standards. A standard coding system is laid down by Baan for each software component. This chapter describes the coding of all major software components and how they are made uniquely identifiable by means of the language and the package VRC to which they belong.
The coding system combined with the Baan software directory structure provides a consistent means to store and administrate the various software components by package VRC and module codes.
Each software component must be uniquely identifiable. For this purpose, they are named by means of a standard coding system in which the package VRC is also accounted for.

Coding of package VRCs
Every development or customization effort with BAAN IV Tools takes place within a certain package VRC which stands for Version Release Customer extension. In fact, a package VRC is a certain version of a software package.
The BAAN IV application can contain more than one version of the same package. For example, a package VRC containing the standard software of a package and a package VRC containing the customizations for that package.
If a new package VRC is created, it is derived from a previous VRC. To avoid duplication of software, the new VRC only contains those software components which have changed compared to previous VRCs.

In Figure , the upper VRC is a standard VRC of BAAN IV Common, release a. This VRC contains the standard BAAN IV software which is delivered at the moment of installation. The code of a standard VRC contains no customer-specific extension.

The second VRC is an example of a VRC which contains the customer’s own customizations. This VRC only contains the changes regarding the previous VRC. The version field is extended with the character O, which stands for the customer’s own customizations. The maximum length of the customer extension is four characters. It can be filled with, for example, a two character abbreviation of the customer’s name, followed by a sequence number.
The version field can only be extended with one of the following characters:
L Localizations. This type of VRC contains customizations for a certain country.
B Branch-specific customizations. This type of VRC contains customizations for a certain line of business.
C Customer-specific customization. This type of VRC contains customizations, ordered by the customer and developed by a dealer or partner.
O Own customizations. This type of VRC contains customizations developed by the customer.

General codes
General codes are included in the coding of software components. Certain characters are used to specify the general codes to be able to refer to them when the coding of the separate software components is described. For example, mmm which stands for module code and consists of three positions.
Following, a description of the general codes and there possible values is given.

kk - package code
Package codes are defined by Baan in such a way that they indicate the software’s function. Existing packages are:
tc BAAN IV Common
td BAAN IV Distribution
tg BAAN IV Organizer
tf BAAN IV Finance
ti BAAN IV Manufacturing
tp BAAN IV Project
tr BAAN IV Transportation
ts BAAN IV Service
tu BAAN IV Utilities
tt BAAN IV Tools

mmm - module code
The module code indicates the functions within a package and always consists of three characters in lowercase. Since BAAN IV consists of a large amount of modules, only a few example are used to illustrate the coding of modules, namely:
itm Item Control
sls Sales Control
pur Purchase Control
inv Inventory Control
gld General Ledger

f - function code
The function code indicates the type of action performed by the software components in which the function code is incorporated. The following values are used:
1 maintain
2 process
3 (reserved)
4 print
5 display
6 (reserved)
7 graph
8 auxiliary
9 convert

p - process type
The process type indicates whether the software components in which the process type is incorporated is a main process or a subprocess. The following values are used:
m main process
s subprocess

hhh - customization type
The customization type indicates the type of modification that is made on a standard software component. However, for standard software or modifications derived from standard software, the customization type is left blank or given 000 as a value. For newly-developed modifications, the first two positions should be 00 while the last position should contain one of the following values:
o own development by customer
c customization by dealer
l localization
j junior (compact version)
d dealer-specific version
b business-specific version
h - short customization type
In some cases it suffices to only use one of the customization type characters (o, c, l, j, d, b) in the final position of the customization type. For standard software the customization type is omitted.

s - submodule code
The submodule code is used to indicate the type of modification. For newly-developed modifications, one of the following characters is used:
o own development by customer
c customization by dealer
l localization
j junior (compact version)
d dealer-specific version
b business-specific version
Newly-developed modifications are not derived from an existing standard software component but are entirely new.

Related Posts:

Unix commands used in BAAN ERP

UNIX Commands
Note:  UNIX is case sensitive.  Be sure to type the commands as they are listed.  UNIX considers the capital and lower case versions of the same letter to be totally different.  Be careful.

cd Changes the current working directory to the directory you indicate.   
To move back to your home directory, type cd.
To move to a directory that is not a subdirectory off the current  working directory, you can use a full pathname – one that begins with a slash.  For example, to look around in the /usr directory (where all home directory are stored), you can type
cd /usr

You log in and do some work in your home directory.  Next, you want to move into your budget directory to see which file are there you type:

cd  budget

clear Clears the screen.  This command doesn’t’ affect files or jobs – it just clears the clutter from your screen.


You just tried to use the cat command to lock a word-processing document and your screen is full of gibberish.  Type clear.

cp Copies one or more files.
If you know DOS, you may think that omitting the second filename tells cp to copy a file into the current working directory.  This technique doesn’t work in UNIX – instead, use a period (.) to copy a file into the current directory.

NOTE! What happens if you copy a file to a new name and a file already has that name?  Assuming that you have permission to write (change) the existing file, UNIX blow it away and replaces it with the copied file.  Always use the ls command to check that your filename isn’t already in use.  And use the –I to tell cp to ask before overwriting a file.

cp [-I] oldfiles newfiles
cp [-I] [-r] oldfiles directory [/newfiles]
-I    Ask before you replace an existing file with a copied file
mkdir Creates a new directory.
mkdir directory 
directory – Specifies the name of the new directory.  If the name doesn’t begin with a slash, the new directory is created as a subdirectory of the current working directory.  If the name begins with a slash, the name defines the path from the root directory to a new directory.

You must have permission to write in a directory to create a subdirectory to it.  For the most part, you should create directories in your own home directories or subdirectories of it.

mkdir temp

more Display information one screen at a time so that you can read it easily.
ls |more
You receive a file (new.fil).  To display it on your screen type.

more new.fil
mv renames a file or moves it from directory to another.
mv [-I] oldname newname

ps Display information about your processes (jobs).

You wonder weather the process you ran in the background is still running.  Type:
to see a list of all your processes.  To see more information about them type
ps –l
pwd Display the name of the current working directory.
rm Deletes (removes) a file permanently.

Authorizations for Audit Management

If the audit is running, it is possible to print or purge the audit files.  Also, the integrity of the audit files can be checked.  At least one user, preferably the administrator, must be authorized to perform these actions.
Only the root user is able to grant the authorizations to the user

Sessions and authorizations for audit management
The authorization type is a set, so you can combine those things:
  • None
  • All
  • Print
  • Delete
  • Maintain
Authorizations can be set in a couple of different ways:
  • All
  • Specified
  • Range
Related to:
  • Package
  • Module
  • Table
  • Company
There are different security levels such as print, maintain, delete, and all.  These security levels are granted to user for packages, modules, tables, and companies.  For security reasons, it is not advised to grant audit authorizations to normal users.

Audit Files
We distinguish two different kinds of audit files. Per audited Table there is:
Information File
Sequence File
The sequence file contains the Transaction Data like User, Session, Date and Time and the Record Images, and so on.
The Information file contains General information called the Information Header and Sequence File specific information called Sequence Header.
Information Header
  • Table and Company
  • Status Reuse
  • From Sequence
  • To Sequence
  • Current Sequence
  • Maximum File Size

Sequence Header
  • Sequence Number
  • Creation Date and Time
  • Termination Date and Time
  • Status of Termination
There are files on the Operating System level containing information about how Audit Management is used. 
The most important ones are:
  • ${BSE}/lib/tabledef6.1
  • ${BSE}/lib/auditdef6.1
Some sessions that have their impact on these files are Maintain Database Definitions, Assign Tables to Databases, and Maintain Audit File Directories. Of course, you need to run a conversion to Runtime DD

Audit Management in BAAN ERP

Audit Management, which is used in relation with Databases to record the changes that were made in the data. 

Using Audit Management
Audit management is used to track the changes to an existing application or company table.  The audit data is stored in the files of a database independent format and can be printed per date and time, per session, or per user.  The audit files are created and maintained by a UNIX process that communicates with the bshell.  This process is called the audit server.
For parameter tables within BAAN Software, Audit Management is mandatory to use. For other tables it is optional. It is supposed to be for critical data. 

  • Keep track of all commands which affects the table data (Insert / Update / Delete)
  • Mandatory for Parameter Tables
  • Optional for other Tables
The Implementation of Audit Management

The procedure begins with defining, for each table field, whether or not an audit trail is allowed.  Next, the audit trail field of the database definition is set to yes and the location of the audit files is defined.  Then, the default audit file parameters are specified in the ${BSE}/lib/audit_spec file and various security levels are assigned to all users.  If desired, the parameters of the audit files of particular tables can be changed afterwards.
As a result of this procedure, the changes made to several BAAN IV tables can be tracked.  It is also possible to print the audit data.

Print Range of Audit Files
The purpose of the Print Range of Audit Files session is used to get information from the Audit files.

Related Posts:

Facebook:Steady Growth Big profit

Facebook is now a $3.7 billion company that raked in a cool $1 billion in profits for 2011. And although the company is raising as much as $5 billion in a public offering, Facebook has $3.91 billion in the bank, far more than many of its rivals in the Internet space. Facebook also confirmed that it has 845 million users as of December.

Facebook's financials, first disclosed on Wednesday, show it's a startup no longer. Instead, Facebook has evolved into a mature company with an established track record of generating ever-increasing revenue and profits.
By waiting so long to file for a public offering, Facebook has moved beyond the notion of a money-losing startup. That phase passed in 2008, when the company lost $58 million—the last year Facebook lost money.

Since then, profits have skyrocketed. In the three most recent calendar years that Facebook laid out within its prospectus, three numbers stand out: $229 million, $606 million, and $1.0 billion—the amount, in profits, that Facebook earned for the last three years, including 2011. But Facebook also demonstrated skyrocketing revenues, almost tripling its sales numbers from 2008 to 2009, and growing another 154 percent in 2010. In 2009, Facebook reported $777 million in revenue; in 2010, $1.974 billion, and in 2011, $3.71 billion.

32 or 64 bit version of internet explorer ????

The 64-bit versions of Windows 7 and Vista come with both 32- and 64-bit variations of Internet Explorer. But the operating systems default to using the 32-bit brower.

They do this for a good reason: backward compatibility. Plug-ins have to be rewritten to work with the x64 version, and a lot of plugins have yet to be rewritten. More 64-bit plugins are being released all the time, of course, so this problem isn't as severe as it used to be. For instance, you can now download and install 64-bit versions of Adobe Flash Player and Google Toolbar. But if Windows were to default to running the 64-bit browser tomorrow, it would still result in a lot of frustrated tech support calls.

Nevertheless, if the plugin limitations don't bother you, there are reasons to use Internet Explorer x64. For instance, the 64-bit browser can use 4GB or more of memory.

Yeah, I know. How often do you need that? But the 64-bit browser appears to be faster, as well. In my own, very casual benchmarks, I clocked it performing 7.1 percent faster than the 32-bit version.

Google add WEBRTC to chrome in browser voice and video chat

Chrome's Dev Channel version now has WebRTC, a technology Google acquired in 2010 and open sourced last year that uses Javascript APIs (application programming interfaces) and HTML5 to give browsers native, real-time communications capabilities.

Google has built the WebRTC technology into a test version of Chrome to let the browser run voice and video chat applications within the browser interface.Building industry-leading voice and video capabilities into the browser makes it easier for web developers to incorporate real time communications in their apps.

WebRTC, which is also being supported by browser makers Mozilla and Opera, is being considered for standard status at the W3C and the IETF. Companies like Polycom, Vonage,, Semens and PCCW are developing browser-based applications using the technology, according to Enbom.

[WebRTC] includes the fundamental building blocks for high quality communications on the web such as network, audio and video components used in voice and video chat applications," reads a description. "These components, when implemented in a browser, can be accessed through a Javascript API, enabling developers to easily implement their own RTC web app.

Google acquired WebRTC when it bought Global IP Solutions in 2010 and released it as open-source code in mid-2011. With WebRTC, developers will be able to create voice and video chat applications that execute inside the browser, without users needing to install plug-ins, according to the technology's website.

Now Firefox 10 available for download

Mozilla on Tuesday released the latest version of its Firefox browser. In addition to allowing users to run full-screen apps, Firefox 10 offers the following enhancements:

 The forward button is now hidden until you navigate back.
Most add-ons are now compatible with new versions of Firefox by default.
Anti-Aliasing for WebGL is now implemented.
CSS3 3D-Transforms are now supported.
Mozilla also made some HTML5 changes and noted two bug fixes. The company said that it has fixed a Java-related crash, which Mac OS X users experienced in earlier versions, as well as a crash related to moving bookmarks. Firefox 10 is available immediately as a free download.

Apple iphone application includes hidden tethering

An iPhone developer has acknowledged that a recent update to one of his apps includes the hidden ability to tether the smartphone to a laptop, circumventing carrier fees for the service.

By tethering a smartphone to a laptop, users can share the phone's cellular connection to the Internet with a notebook. Carriers typically levy additional fees for the service: AT&T, for example, charges customers an extra $20 per month for tethering an iPhone, although as part of the deal it also boosts the allowed data usage from 3GB to 5GB.

Although QuasiDisk is billed as a "simple file manager and file viewer" that lets users load files, documents and photos from a third-party FTP server or sync data with a remote device using Apple's own iCloud, it also can be used for tethering, Simpson said in his instructional video.

Facebook Promotes Timeline Movie Maker

Now Facebook released Timeline Movie Maker app in which user's photos, videos and other Facebook activity to create a short personal video.

Apps like Timeline Movie Maker help users see how personal Facebook is to them. When users visit, they can connect the app with their Facebook account. If users do not have Timeline enabled, they will be prompted to do so. After a few minutes of processing, the app produces a video including photos, videos, check-ins and status updates in the same format as the promotional video Facebook used to debut Timeline at f8. Users can change the music or swap photos if they want, then share the video with friends.

Timeline will be mandatory for all users within weeks, but users have been able to opt in since December.During this period, Facebook has taken steps to lead users to discover the new profile through their friends rather than giving the impression the social network is forcing another unwanted change on them.
The app is another example of the unique tactics the social network is using to promote its redesigned profile and part of a new trend of collaboration. The company is showing maturity as it prepares to file for an initial public offering that could raise at least $5 billion for the company. 

Recent reports suggest Facebook could seek to raise $5 billion, lower than the previously rumored $10 billion. By setting a low float, the company could debut above its initial price as Groupon did in November. Zynga, on the other hand, reached for a larger amount in December and only crossed its initial price on Monday

Create and How to use your own Exceptions

Creating Your Own Exception Class

● Steps to follow
– Create a class that extends the RuntimeException or the
Exception class
– Customize the class
● Members and constructors may be added to the class
● Example:
 class HateStringExp extends RuntimeException {
 /* some code */

How To Use Your Own Exceptions
class TestHateString {
 public static void main(String args[]) {
 String input = "invalid input";
 try {
 if (input.equals("invalid input")) {
 throw new HateStringExp();
System.out.println("Accept string.");
 } catch (HateStringExp e) {
 System.out.println("Hate string!”);
 } }

What is difference between throw and throws in Java?

One declares it, and the other one does it

Throw is used to actually throw the exception, whereas throws is declarative for the method. They are not interchangeable. 

public void myMethod(int param) throws MyException
      if (param < 10)
            throw new MyException("Too low!);
    //Blah, Blah, Blah...

The Throw clause can be used in any part of code where you feel a specific exception needs to be thrown to the calling method. 

If a method is throwing an exception, it should either be surrounded by a try catch block to catch it or that method should have the throws clause in its signature. Without the throws clause in the signature the Java compiler does not know what to do with the exception. The throws clause tells the compiler that this particular exception would be handled by the calling method.

Throwing Exception

The throw Keyword
A program can explicitly throw an exception using the throw statement besides the implicit exception thrown
The general format of the throw statement is as follows:

throw ThrowableInstance
ThrowableInstance must be an object of type Throwable or a subclass of Throwable.
2 ways to obtain Throwable object:
Using a parameter into a catch clause

Creating one with a new operator.

try {

throw new NullPointerException("created");

}catch (NullPointerException e) {

throw e; //rethrow the Exception

The throws Keyword
throws " is a keyword defined in the Java programming language. Keywords are basically reserved words which have specific meaning relevant to a compiler in Java programming language likewise the throw keyword indicates the following :
--- The throws keyword in Java programming language is applicable to a method to indicate that the method raises particular type of exception while being processed.
--- The throws keyword in Java programming language takes arguments as a  list of the objects of type java.lang.Throwable class.
--- when we use the throws with a method it is known as ducking. The  method calling a method with a throws clause is needed to be enclosed within the try catch blocks.
This is the general form of a method declaration that includes a throws clause:
         type method-name(parameter-list) throws exception-list

       // body of method

Handling the Unreachable Code Problem - Exception

The multiple catch blocks can generate unreachable code error i.e. if the first catch block contains the Exception class object then the subsequent catch blocks are never executed.  This is known as Unreachable code problem.
System.out.println(3/0);         //here arithmetic exception has come

System.out.println(“Pls. print me.”);

}catch( Exception e){

 System.out.println(“Exception 1.”);


catch(ArithmeticException e1){    //here unreachable code problem has come. Compilation error
System.out.println(“Exception e2”);




To avoid this, the last catch block in multiple catch blocks must contain the generic class object that is called the Exception class. This exception class being the super class of all the exception classes and is capable of  catching any  types of exception. The generic Exception class can also be used with multiple catch blocks.


System.out.println(3/0);    //here arithmetic exception has come

System.out.println(“Pls. print me.”);

}catch( ArithmeticException e){

 System.out.println(“Exception 1.”);


catch(Exception e1){     //OK

System.out.println(“Exception e2”);




The Finally block- Exception

The finally block always executes when the try block exits. This ensures that the finally block is executed even if an unexpected exception occurs. But finally is useful for more than just exception handling — it allows the programmer to avoid having cleanup code accidentally bypassed by a return, continue, or break. Putting cleanup code in a finally block is always a good practice, even when no exceptions are anticipated.

Note: If the JVM exits while the try or catch code is being executed, then the finally block may not execute. Likewise, if the thread executing the try or catch code is interrupted or killed, the finally block may not execute even though the application as a whole continues.


try {

<code to be monitored for exceptions>

} catch (<ExceptionType1> <ObjName>) {

<handler if ExceptionType1 occurs>

} ...

} finally {

<code to be executed before the try block ends>


Multiple Catch- Exception

So far we have seen how to use a single catch block, now we will see how to use more than one catch blocks in a single try block.In Java when we handle the exceptions then we can have multiple catch blocks for a particular try block to handle many different kind of exceptions that may be generated while running the program i.e. you can use more than one catch clause in a single try block however every catch block can handle only one type of exception. this mechanism is necessary when the try block has statement that raise  different type of exceptions.
The syntax for using this clause is given below:-



catch(Exception e1){


catch(Exception e2){


when an exception occurs normal execution is suspended. The runtime system proceeds to find a matching catch block that can handle the exception. If first one catch block has not matched then the second one is matched and so on....


class DivByZero {
public static void main(String args[]) {

System.out.println(3/0);    //here arithmetic exception has come

System.out.println(“Pls. print me.”);

}catch( ArrayIndexOutOfBoundsException e){

 System.out.println(“Exception 1.”); 


catch(ArithmeticException e1){

System.out.println(“Exception e2”);





In this example we have used two catch clause catching the exception ArrayIndexOutOfBoundsException and  Arithmetic Exception in which the statements that may raise exception are kept under the try block. When the program is executed, an exception will be raised. Now that time  the first catch block is skipped and the second catch block handles the error.


Twitter Delicious Facebook Digg Stumbleupon Favorites More