Adsense

Tuesday, 30 July 2013

Interesting article on Morning Person's Schedule


Dont know who wrote this. Got it from internet. Would like to share with you all :)
A recent study published in an American Psychological Association journal, Emotion, suggests that early birds are generally happier than night owls.
More than 700 respondents, ranging from ages 17 to 79, were surveyed and asked about their emotional state, health, and preferred time of day.
Self-professed "morning people" reported feeling happier and healthier than night owls. Researchers hypothesize that one of the reasons could be because society caters to a morning person's schedule.
It's certainly true that the working world does. Working "9-to-6" is more than an expression, but a standard shift for many Americans. It also stands to reason that those who like rising with the sun are also the most productive employees in the office.
Do you want to be more like them? Then take note of the tasks these high-functioning, productive, and more awake employees have completed before lunch:
1. They make a work to-do list the day before. Many swear by having a written to-do list, but not everyone agrees on when you need to compose it. According to Andrew Jensen, a business efficiency consultant with Sozo Firm in Shrewsbury, Pa., the opportune time to plan a day's tasks is the night before. "Some people like to do the to-do schedule in the morning, but then they might have already lost office time writing it out," he says. "It helps to do that to-do schedule the night before. It also will help you sleep better.
2. They get a full night's rest. Speaking of sleeping better ... lack of sleep affects your concentration level, and therefore, your productivity. Whatever your gold standard is for a "good night's rest," strive to meet it every work night. Most health experts advise getting a minimum eight hours of shut-eye each night.
3. They avoid hitting snooze. Petitioning for nine more minutes, then nine more, then another nine is a slippery slope that leads to falling back asleep and falling behind on your morning prep. Ultimately it also leads to lateness. "Anyone can be made into a morning person," Jensen says. "Anyone can make morning their most productive time. It could be that for the entire week, you set your alarm clock a little bit earlier, and you get out of bed on the first alarm. It may be a pain at first, but eventually you'll get to the point where you're getting your seven to eight hours of sleep at night, you're waking up with all your energy, and accomplishing the things around the house you need to before going to the office."
4. They exercise. Schedule your Pilates class for the a.m. instead of after work. "Exercise improves mood and energy levels," Jensen says. Not only that, but "there have been studies done on employees who've exercised before work or during the work day. Those employees have been found to have better time-management skills, and an improved mental sharpness. ... Those same studies found these workers are more patient with their peers."
5. They practice a morning ritual. Jensen also recommends instituting a morning routine aside from your exercise routine. Whether you opt to meditate, read the newspaper, or surf the Web, Jensen says "it's important to have that quiet time with just you."
6. They eat breakfast. Food provides the fuel you'll need to concentrate, and breakfast is particularly important since it recharges you after you've fasted all night. Try munching on something light and healthy in the morning, and avoid processed carbs that could zap your energy.
7. They arrive at the office on time. This one is obvious, right? Getting a full night's rest and keeping your sticky fingers off the snooze button should make No. 7 a cakewalk. If you're not a new employee, then you've already figured out the length of your average commute. Allot a safe amount of time to make it to work on schedule.
8. They check in with their boss and/or employees. We all know the cliche about the whole only being as good as the sum of its parts. In other words, if your closest work associates aren't productive, then neither are you. Good workers set priorities that align with their company's goals, and they're transparent about their progress.
9. They tackle the big projects first. You can dive right into work upon arriving in the office, since you made your to-do list the night before. And Jensen suggests starting with the hardest tasks. "Don't jump into meaningless projects when you're at your mental peak for the day," he says.
 10. They avoid morning meetings.If you have any say on meeting times, schedule them in the afternoon. "You should use your prime skills during the prime time of the day. I believe that mornings are the most productive time," Jensen says, also noting that an employer who schedules morning meetings could rob his or her employees of their peak performance, and ultimately cost the company.

The exception to this, he adds, is if your meeting is the most important task of the day. "Sometimes you have to schedule a crucial meeting, or a client meeting, in which case you'd want to plan for a time when employees are at their peak."
11. They allot time for following up on messages. Discern between mindless email/voicemail checking and conducting important business. Jensen's company, Sozo Firm, advises clients that checking their inbox every couple of minutes takes time away from important tasks. Instead, set a schedule to check and respond to email in increments. Consider doing so at the top of each hour, to ensure that clients and colleagues receive prompt responses from you.

12. They take a mid-morning break. Get up and stretch your legs. Or stay seated and indulge in a little Internet surfing. According to Jensen, it's actually good to zone out on Facebook and Twitter or send a personal text message or two. "You should take 10-minute breaks occasionally," he says. "Companies that ban any kind of Facebook [use], texting, or personal calls can find it will be detrimental. Those practices increase employee satisfaction."
Just be sure not to abuse the privilege. "The best employees will respect their employer's time, and the worst-performing employees will find a way to waste time even if the company forbids personal Internet use," Jensen explains.

VPN issues - connection terminated locally by client - solution

Issue:
ISSUE: Secure VPN Connection terminated locally by the Client Reason 442: Failed to enable Virtual Adapter
     
                                                                            Solution:

FIX: Secure VPN Connection terminated locally by the Client Reason 442: Failed to enable Virtual Adapter

 

Press Windows and R key to open Run window, type inservices.msc
Stop the Cisco Systems … service
Stop the Internet Connection Sharing (ICS) service
Right click on ICS service and choose Properties. Then changeStartup type to Disabled or Manual
Start Cisco Systems … service
Done. Now create a VPN connection, error 442 no more !
 

Database interview questions- Triggers with example


A Trigger is a named database object which defines some action that the database should take when some databases related event occurs. Triggers are executed when you issues a data manipulation command like INSERT, DELETE, UPDATE on a table for which the trigger has been created. They are automatically executed and also transparent to the user. But for creating the trigger the user must have the CREATE TRIGGER privilege. In this section we will describe you about the syntax to create and drop the triggers and describe you some examples of how to use them.

CREATE TRIGGER

The general syntax of CREATE TRIGGER is :
 
CREATE TRIGGER trigger_name trigger_time trigger_event

  ON tbl_name

  FOR EACH ROW trigger_statement

By using above statement we can create the new trigger. The trigger can associate only with the table name and that must be refer to a permanent table.

Trigger_time =  BEFORE / AFTER.

Trigger_event = statement that executes the trigger.

The trigger_event = DML Statement : INSERT, UPDATE, DELETE.

We cannot have the two trigger for a given table, which have the same trigger action time and event. For Instance : we cannot have two BEFORE INSERT triggers for same table. But we can have a BEFORE INSERT and BEFORE UPDATE trigger for a same table.

Trigger_statement have the statement that executes when the trigger fires but if you want to execute multiple statement the you have to use the BEGIN?END compound statement.


We can refer the columns of the table that associated with trigger by using the OLD and NEW keyword. OLD.column_name is used to refer the column of an existing row before it is deleted or updated and NEW.column_name is used to refer the column of a new row that is inserted or after updated existing row.

In INSERT trigger we can use only NEW.column_name because there is no old row and in a DELETE trigger we can use only OLD.column_name because there is no new row. But in UPDATE trigger we can use both, OLD.column_name is used to refer the columns of a row before it is updated and NEW.Column_name is used to refer the column of the row after it is updated.

In the following example we are updating the Salary column of Employee table before inserting any record in Emp table. Example :

mysql> SELECT * FROM Employee;
+-----+---------+----------+-------------------+--------+-------+
| Eid | Ename   | City     | Designation       | Salary | Perks |
+-----+---------+----------+-------------------+--------+-------+
| 1   | Rahul   | Delhi    | Manager           | 10300  | 853   |
| 2   | Gaurav  | Mumbai   | Assistant Manager | 10300  | 853   |
| 3   | Chandan | Banglore | Team Leader       | 15450  | 999   |
| 5   | Tapan   | Pune     | Developer         | 20600  | 1111  |
| 6   | Amar    | Chennai  | Developer         | 16000  | 1124  |
| 7   | Santosh | Delhi    | Designer          | 10000  | 865   |
| 8   | Suman   | Pune     | Web Designer      | 20000  | 658   |
+-----+---------+----------+-------------------+--------+-------+
7 rows in set (0.00 sec)
mysql> delimiter //
mysql> CREATE TRIGGER ins_trig BEFORE INSERT ON Emp
    -> FOR EACH ROW
    -> BEGIN
    -> UPDATE Employee SET Salary=Salary-300 WHERE Perks>500;
    -> END;
    -> //
Query OK, 0 rows affected (0.01 sec)
mysql> delimiter ;
mysql> INSERT INTO Emp VALUES(9,'Rajesh','Delhi','Developer',15000,658);
Query OK, 1 row affected (0.05 sec)
mysql> SELECT * FROM Employee;
+-----+---------+----------+-------------------+--------+-------+
| Eid | Ename   | City     | Designation       | Salary | Perks |
+-----+---------+----------+-------------------+--------+-------+
| 1   | Rahul   | Delhi    | Manager           | 10000  | 853   |
| 2   | Gaurav  | Mumbai   | Assistant Manager | 10000  | 853   |
| 3   | Chandan | Banglore | Team Leader       | 15150  | 999   |
| 5   | Tapan   | Pune     | Developer         | 20300  | 1111  |
| 6   | Amar    | Chennai  | Developer         | 15700  | 1124  |
| 7   | Santosh | Delhi    | Designer          | 9700   | 865   |
| 8   | Suman   | Pune     | Web Designer      | 19700  | 658   |
+-----+---------+----------+-------------------+--------+-------+
7 rows in set (0.00 sec)

In the following example we are modifying the salary of Employee table before updating the record of the same table. Example :

mysql> delimiter //
mysql> CREATE TRIGGER updtrigger BEFORE UPDATE ON Employee
    -> FOR EACH ROW
    -> BEGIN
    -> IF NEW.Salary<=500 THEN
    -> SET NEW.Salary=10000;
    -> ELSEIF NEW.Salary>500 THEN
    -> SET NEW.Salary=15000;
    -> END IF;
    -> END
    -> //
Query OK, 0 rows affected (0.01 sec)
mysql> delimiter ;
mysql> UPDATE Employee
    -> SET Salary=500;
Query OK, 5 rows affected (0.04 sec)
Rows matched: 7  Changed: 5  Warnings: 0
mysql> SELECT * FROM Employee;
+-----+---------+----------+-------------------+--------+-------+
| Eid | Ename   | City     | Designation       | Salary | Perks |
+-----+---------+----------+-------------------+--------+-------+
| 1   | Rahul   | Delhi    | Manager           | 10000  | 853   |
| 2   | Gaurav  | Mumbai   | Assistant Manager | 10000  | 853   |
| 3   | Chandan | Banglore | Team Leader       | 10000  | 999   |
| 5   | Tapan   | Pune     | Developer         | 10000  | 1111  |
| 6   | Amar    | Chennai  | Developer         | 10000  | 1124  |
| 7   | Santosh | Delhi    | Designer          | 10000  | 865   |
| 8   | Suman   | Pune     | Web Designer      | 10000  | 658   |
+-----+---------+----------+-------------------+--------+-------+
7 rows in set (0.00 sec)
mysql> UPDATE Employee
    -> SET Salary=1500;
Query OK, 7 rows affected (0.03 sec)
Rows matched: 7  Changed: 7  Warnings: 0
mysql> SELECT * FROM Employee;
+-----+---------+----------+-------------------+--------+-------+
| Eid | Ename   | City     | Designation       | Salary | Perks |
+-----+---------+----------+-------------------+--------+-------+
| 1   | Rahul   | Delhi    | Manager           | 15000  | 853   |
| 2   | Gaurav  | Mumbai   | Assistant Manager | 15000  | 853   |
| 3   | Chandan | Banglore | Team Leader       | 15000  | 999   |
| 5   | Tapan   | Pune     | Developer         | 15000  | 1111  |
| 6   | Amar    | Chennai  | Developer         | 15000  | 1124  |
| 7   | Santosh | Delhi    | Designer          | 15000  | 865   |
| 8   | Suman   | Pune     | Web Designer      | 15000  | 658   |
+-----+---------+----------+-------------------+--------+-------+
7 rows in set (0.01 sec)

DROP TRIGGER

The general syntax of DROP TRIGGER is :
  DROP TRIGGER trigger_name

This statement is used to drop a trigger. Example of Dropping the Trigger :

mysql> DROP TRIGGER updtrigger;
Query OK, 0 rows affected (0.02 sec)

In addition, triggers are commonly used to
  • automatically generate derived column values
  • prevent invalid transactions
  • enforce complex security authorizations
  • enforce referential integrity across nodes in a distributed database
  • enforce complex business rules
  • provide transparent event logging
  • provide sophisticated auditing
  • maintain synchronous table replicates
  • gather statistics on table access

'Was all this worth it?' - The most influential story i ever read


Dont know who wrote this. Got it from internet. Would like to share with you all :)

As the dream of most parents I had acquired a degree in
Software Engineering and joined a company based in USA, the
land of braves and opportunity. When I arrived in the USA, it
was as if a dream had come true.


Here at last I was in the place where I want to be. I decided I
would be staying in this country for about Five years in which
time I would have earned enough money to settle down in India.

My father was a government employee and after his retirement,
the only asset he could acquire was a decent one bedroom flat.


I wanted to do something more than him. I started feeling
homesick and lonely as the time passed. I used to call home and
speak to my parents every week using cheap international phone
cards. Two years passed, two years of Burgers at McDonald's and
pizzas and discos and 2 years watching the foreign exchange
rate getting happy whenever the Rupee value went down.

Finally I decided to get married. Told my parents that I have
only 10 days of holidays and everything must be done within
these 10 days. I got my ticket booked in the cheapest flight.
Was jubilant and was actually enjoying hopping for gifts for
all my friends back home. If I miss anyone then there will be
talks. After reaching home I spent home one week going through
all the photographs of girls and as the time was getting
shorter I was forced to select one candidate.


In-laws told me, to my surprise, that I would have to get
married in 2-3 days, as I will not get anymore holidays. After
the marriage, it was time to return to USA, after giving some
money to my parents and telling the neighbors to look after
them, we returned to USA.


My wife enjoyed this country for about two months and then she
started feeling lonely. The frequency of calling India
increased to twice in a week sometimes 3 times a week. Our
savings started diminishing.

After two more years we started to
have kids. Two lovely kids, a boy and a girl, were gifted to us
by the almighty. Every time I spoke to my parents, they asked
me to come to India so that they can see their grand-children.


Every year I decide to go to India… But part work part
monetary conditions prevented it. Years went by and visiting
India was a distant dream. Then suddenly one day I got a
message that my parents were seriously sick. I tried but I
couldn't get any holidays and thus could not go to India ... The
next message I got was my parents had passed away and as there
was no one to do the last rights the society members had done
whatever they could. I was depressed. My parents had passed
away without seeing their grand children.


After couple more years passed away, much to my children's
dislike and my wife's joy we returned to India to settle down.
I started to look for a suitable property, but to my dismay my
savings were short and the property prices had gone up during
all these years. I had to return to the USA...


My wife refused to come back with me and my children refused to
stay in India... My 2 children and I returned to USA after
promising my wife I would be back for good after two years.

Time passed by, my daughter decided to get married to an
American and my son was happy living in USA... I decided that
had enough and wound-up everything and returned to India... I
had just enough money to buy a decent 02 bedroom flat in a
well-developed locality.


Now I am 60 years old and the only time I go out of the flat is
for the routine visit to the nearby temple. My faithful wife
has also left me and gone to the holy abode.

Sometimes

I wondered was it worth all this?

My father, even after staying in India,

Had a house to his name and I too have
the same nothing more.

I lost my parents and children for just ONE EXTRA BEDROOM.

Looking out from the window I see a lot of children dancing.
This damned cable TV has spoiled our new generation and these
children are losing their values and culture because of it. I
get occasional cards from my children asking I am alright. Well
at least they remember me.


Now perhaps after I die it will be the neighbors again who will
be performing my last rights, God Bless them.

But the question
still
remains 'was all this worth it?'

I am still searching for an answer.................!!!

START THINKING

IS IT JUST FOR ONE EXTRA BEDROOM???

LIFE IS BEYOND THIS …..DON'T JUST LEAVE YOUR LIFE ……..
START LIVING IT …….
LIVE IT AS YOU WANT IT TO BE …

Difference between HTML4 and HTML5


                                 HTML4
                               HTML5
DOCTYPE is much longer as HTML4 is based on SGML-based.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"
http://www.w3.org/TR/html4/strict.dtd">
DOCTYPE is required to enable standards mode for HTML documents.
<!DOCTYPE html>
Audio and Video are not part of HTML4 specification
Audio and Videos are integral part of HTML5 specifications e.g. <audio> and <video> tags
Vector Graphics is possible with the help of technologies such as VML, Silverlight, Flash etc.
Vector graphics is integral part of HTML5 e.g. SVG and canvas
It is almost impossible to get true GeoLocation of user browsing any website especially if it comes to mobile devices.
JS GeoLocation API in HTML5 helps identify location of user browsing any website (provided user allows it)
Browser cache can be used as temporary storage.
Application Cache, Web SQL database and Web storage is available as client side storage. Accessible using JavaScript interface in HTML5 compliant browsers.
Web Sockets are not available. Generally used mechanisms are long polling and streaming.
Full duplex communication channels can be established with Server using Web Sockets. Accessible using JavaScript interface in HTML5 compliant browsers.
Works with all old browsers
Most of modern browser have started supporting HTML5 specification e.g. Firefox, Mozilla, Opera, Chrome, Safari  etc.
Does not allow JavaScript to run in browser. JS runs in same thread as browser interface.
Allows JavaScript to run in background. This is possible due to JS Web worker API in HTML5