Getting String character by Character in bash

Sometimes you may need to get string character by character or need to looping through the string. In python programming language, you can do this job very easily.

See below example in python.

your_string="Hello"
for c in your_string :
        print (c)

This will give output as,

H
e
l
l
o


We can do same thing in bash shell scripting also,

see below bash shell scripting example.

#getting ord value of chars.
your_string="Hello"
echo $your_string | awk -v ORS="" '{ gsub(/./,"&\n") ; print }' | \
while read char
do
echo $char
done


Cheers.... ! Happy looping through the string !

Functions for ord and chr in bash shell scripting

In python there are couple of useful function. these are ord function and chr function.

ord function in python - it take character as an argument and return its ASCII value.

chr function - it takes integer values as an argument and returns character that is equivalent to the integer value.

I am going to introduce function to do same thing in bash shell scripting. I named it as ord.

ord() {

  LC_CTYPE=C printf '%d' "'$1"
  return $LC_CTYPE

}



My next function is chr function. it takes integer value as an argument and returns correspponding ASCII value.

chr() {
  [ "$1" -lt 256 ] || return 1
  printf "\\$(printf '%03o' "$1")"
}

My Life as a Systems Engineer

I am a Bsc. Engineering graduate in Computer Engineering who has acquired  expert knowledge in developing systems under Linux platform. I have gained 4+ years of experience in doing shell scripting, awk scripting, python, and java developing. I am professionally qualified in CCNA.

Working was fun as well as challenging day by day, where I invited most of the challenges to my life. Time to go to bed and time to wake was not according to the clock but according to the work which are pending or to find a new thing every day. It can be twelve clock in the midnight or twelve clock in the day time I was in front of the laptop programming code.


Freelance working has kept me in a high place which I took the membership in November having a good response rate, not cancelling any orders where my buyers has graduated me for Level 1.


Q6 : If you are the HRM of this company how can you prevent such scenarios?

See this post for Whole Question. 



Q6: If you are the HRM of this company how can you prevent such scenarios?

To achieve the set goals and objectives of the organization the human resources which play the major role in an organization should be managed and used in an efficient and effective way. Human resource management impact employee behavior, attitudes, performance, intelligent, skills and knowledge. The labor within the organization should be managed according to philosophies, politics, procedures and practices of Human Resource Management to get the maximized economic return from labor resources by decreasing the wastage of materials and equipment. The human resource management in an organization should be done by experts or a specially qualified person for benefits otherwise it will more lead to more strict rules and regulations and only managers people not thinking that the people are a resource which can be developed and trained to retrain for a long period of time which will be very advantageous for the company’s future. HR manage always make sure the workers that they are not doing a job but it is their own career and help them grow and develop by themselves.

The HR manager should be like honey in a Bee hive where all bees get together in making the Bee hive using honey and if there is anybody doing harm all the bees get together in protecting the Bee Hive. Likewise the workers will be willingly to work towards the productivity and future of the company when HRM is integrated into business strategy. The HR Manager should be fair to all employees at any level, cooperative and always should give a helping hand for the employees in their work. He should lead the workers administrate the internal functions such as checking the attendance of workers, organizing trainings depending the training needs of the organization. He should strategically win the good will of the employees and counsel workers. He should change systematically for different situations in order to maintain the flexibility for the employees to approach. If the HRM is not integrated property it will cause high rate of resignations within a short period of time.

The motivation and interest of the employees will be a poor the employees will criticize the organization always and there will be a loss in the output.

In the case study of MR. Kamal an effective and efficient HR Manager is the first person to realize the stress that which Kamal is undergoing. He is getting absent frequently and behavior has changed when working. As a first step the HR Manager discuss about this with Mr. Kamal and understand the situation of unwillingness to report the work. He will analyze the problem and arrive at conclusions to be discussed in three different aspects. One aspect is the Management and Mr. Kamal. He is facing difficulties with the policies, rules and regulations which newly introduced or weather he needs increments, bonus, promotion or an appreciation for his 20 years of service. HR Manager should understand which one of the following be the cause and must take immediate actions having discussions with the Management. Another aspect is the sub-ordinates of Mr. Kamal. Those who are in the same level as Mr. Kamal weather they are cooperative, team work or weather the juniors make troubles for him. The HR Manager can advise them informing about the situation of Mr. Kamal to be more friendly and polite to him. One the other hand may be he is unable to carry out the duties with the new technologies or else he needs special training to carry out work. So the responsibility of HR Manager is to send Mr. Kamal for suitable trainings so that he is conversant with his work. May be his change of position as for 20 years he was handling the same correspondence and it has become boring. So HR Manager can discuss with the managers and can help to look forward changing positions. If it is his mental ill health that he is facing the stress he can be granted some leaves to take SOME and come back to work with a refreshing mind.

Q5: How will the company react on Kamal’s behaviour?

See this post for Whole Question. 



Q5: How will the company react on Kamal’s behaviour?

The Reaction of the Company can be shown in two ways. One way which will be advantageous for Mr. Kamal to continue the work without stress and the other way company will take decisions in the punitive way which is disadvantageous for Mr. Kamal.

As Mr. Kamal has worked 20 years of long service, the company has a good image of his work. The management will question him and discuss the problems he is facing at this moment. This will lead to a mutual understanding between Mr. Kamal and the management and will get some relief for his stress. On the other way the managers will be able to understand and analyze the problem of this person who has worked for 20 years with no Job Stress and why he has suddenly undergoing such a thing. The managers who have similar type of experience will counsel him on reducing “Job Stress”, engage in activities to reduce the stress, manage the responsibilities so that work load get reduced and will remain some extra time to rest. The board of managers will analyze the cases for the stress weather it is a training need, change of position, physical ill health, too much workload salary increment or problems with sub-ordinates.

The management will take necessary actions for the problems that they feel that those are the causes for Mr. Kamal’s stress immediately for the future of Mr. Kamal as well as the company as under the clause that he was a being a faithful worker.

The behavior of Mr. Kamal may have been a problem to his department or the overall productivity of the company as he has been absent for no reason. The company will give 1st warning. 2nd warning with regard to absenteeism verbally or by writing. If he continues to do so a fine also can be charged or the salary will be deducted for the no of days absent.

They also can ask for a valid medical certificate prove his sickness which he cannot provide and they will make sure that it is by purpose that he has been absent and it will automatically convert to a disciplinary auction. If the productivity of the company also had been affected he will get the last warning can lead to compulsory leave transfer, demotion and stoppage of increment and promotion. If he had to undergo punishments as such his job stress will more increased and end up in a mental illness which cause to resign from the Job or the Company will terminate him due to ill health and under disciplinary actions. The interdiction can also be a punishment taken till the announcement the date to be present for the job. 

Q4 : What is the impact of Kamal’s thinking and behaviour on the productivity of the company he serve?

See this post for Whole Question. 

Q4: What is the impact of Kamal’s thinking and behaviour on the productivity of the company he serve?

It the case study Mr. Kamal he has been absent for two days pretending that he is sick and thinking of getting absent for few more days. Absenteeism affects the productivity of the company direct as the other employees have to do the work behalf of absent employee and it will be too much workload for him/her or else he/she has to continue shifts until he returns. When the work which need to be done by two persons is carried out by one person the work will be slow down and it can affect the daily targets of the company. When daily targets are not met automatically it will affect the productivity of the company. As Mr. Kamal hold the senior position his absent will hinder the work with stress during his working hours. So it will affect the other employees of the staff including the top management. The juniors cannot get any advice as he is stressed out and the will work on the way they wish and the work they do will not contribute the productivity of the company. The colleges will have a bad impression on him as he tend to use isolated and they will not help him in the work as  he is not friendly and cooperative as before. When working as a team if team spirit is lost finally it will affect the output as in this case the past which need to be handled by Mr. Kamal is not carried out until and had not work as a team the output cannot be achieved. The juniors will also try to follow him by the way it is not a good sign for them.

Productivity is the efficient and effective way of converting inputs into outputs. The inputs are the machinery, materials, equipment and labor. All these inputs had to be managed and used in a manner to get optimum use without wastage. The machinery need to be serviced, repair and has to be handled by trained personals to use properly. The materials need to be put in the right place at the right time and equipment should be used without any wastage. There by all these are controlled by labors.


Labor plays the major role in productivity of the company. Labor productivity is the fact which governs the productivity of the company. Labor can be categorized as unskilled, semi-skilled and skilled. It is advantageous for the company to make its labor trained and skilled in order to achieve the goals and objectives through productivity. Most of the companies are comparing productivity. Through facts and figures not by the achievements of labor productivity weather the goals and objectives set to labor. 

Q3 : What is the impact of Kamal’s thinking and behaviour on his family and children?

See this post for Whole Question. 


Q3: What is the impact of Kamal’s thinking and behaviour on his family and children?

Kamal’s thinking at this situation is to overcome the stress of Job Dissatisfaction. He has come to the level of thinking about resignation from the Job. The behavior of Mr. Kamal has an impact on his family and children due to the poor decisions made by him and his distressed well-being. Economically it will affect the family which may be they have to undergo a financial crisis if takes the decision of leaving the Job until he gets a new satisfied employment with a good remuneration. One day he will utilize all the leaves so that when there are no leaves to be utilized he will have to go for no pay leaves which results a deductions of the salary. It will affect the education of his children as he has no money to spend on children’s education. If he gets 3 medical leaves at a stretch he has to provide a valid medical certificate which he cannot provide because he took the leave for no reason. It will cause a problematic situation in the company and he will get more stressed out as it is to terminate from the job.

The behavior of Kamal affect interaction and relationship among the family members.
Parent-child Relationship – when Mr. Kamal is missing at the table every morning to take breakfast with the children. They feel uncomfortable and tend to think many things about this unnatural behavior. If they are small age children as they cannot understand the situation. Children will be sad.
Leadership – As the head of the family the children are in need of the leadership of their father and learn many things from their father’s behavior and they will get a bad impression on about their father.

Laughter – It is sad that laughter is a good mediation to overcome bad situations laughing together with the family members also can reduce stress. It is an essentiality within the family so that they may like to laugh together and share the happiness. But at this time they all will lose it.
Interaction between the family members Mr. Kamal has become isolated from the family. When the interaction among family members are hindered not only him but them also get depressed.
Communication – Not everybody in the family are mind ready so he need to communicate the situation he faces so that others can understand him better and help him to overcome stress.
If he continue work along with stress it will affect his family in the same way. It is said that “stress makes people angry” so at home he will get angry for slightest and other family members also suffer with the same capacity.


Relation between Husband and Wife – The Relationship between Husband and wife is broken in the situation as Mr. Kamal tend to take poor decision by himself and will be in a stressful mood all the time. 

Q2: How it (1 above) affects Kamal’s Job Satisfaction and his decision?

See this post for Whole Question.

Answer for Q1

Q2: Job Satisfaction

Job Satisfaction can be simply defined as “weather an individual is content with the job he does” Locke (1976) defined Job Satisfaction as “A pleasurable or positive emotional state resulting from the appraisal of one’s job or job experiences”. Also he forwarded a theory called “Range of affect Theory” or the “Job Satisfaction Model”. The theory describes the connection between the one who has the job. Furthermore how much value is given to the Job. The dispositional approach was proposed by Thomothy A. Judge, Edwin A. Locke and Cathy C by “Core self-evaluations Model” Which says that Job Satisfaction is governed by an Individual. Another theory put forward with “Equity Theory” which shows and other workers. As a summary according to many researches job satisfaction is an emotional well-being which is governed by an individual which has an effect on equality between employer and other workers. The factors which influence the job satisfaction are as follows.
Increasing cooperation between the workers organizing trips, functions, outing to create the feeling of “one family” between the workers and employer.
Develop Career – Having training to develop the weaknesses of the employees and helping of the higher studies/courses.

Introducing Technology – By introducing new technologies among workers which in turn make working easier.

Highly qualified HR Manager – Having a highly qualified HR manager in the work place to discuss the problems faced by employees and HR Manager should understand strategically. Solve the problems.
Relationship With Co-workers – when the person is happy cooperative and helpful with his/her co-workers.

Relationship with superiors/Management – When a person is satisfied with the decisions taken by the management the rules and regulations and the way their immediate superiors handle them.
Working Environment – Pleasant working environment with all the necessary facilities attract the employees to work with an interest.

Equality – Treating all the employees equally irrespective of their levels (Executive, Junior, Labor ) and allowing the employees to understand that each and every person is important for the running of the company.
Security of the Employment – When the employee are on temporary or contract basis they are always on doubt when will they can be terminated by the employment so tend to search by the opportunities or more secure jobs. If the employees are permanent they are satisfied with the employment.
Self-Motivation – Giving good remuneration, increments, attractive bonus, annual bonus as the employees are very much concern about the money that they receive.

Interest – Some employees might do a job which he/she has no interest of doing but in the sake of earning money or any other reason they are performing the responsibilities such employees should be identified by the company and should give a job they wish.
Job dissatisfaction occur with all the factors listed above are not met by the employee and the Company. Depending on the emotions, personality and mentality of the person are one of these factors will make the job dissatisfied for any Employees.
In the case Study Mr. Kamal gets up in the morning thinking about the stressful working day and planning to get absent without any responsible cause. It shows that he is dissatisfied with the job he does. It can be the influence of any factors listed above. As he had served for the company may be he expected to get a promotion. Salary increment or an award in recognition of his 20 years of service. He says that the work is hard and boredom may be that he has lost the interest due to working on the same thing for a long period. He is in need of a change of position or a change in the working environments. He thinks that working in this company is a waste of time for the reason that his career has not being enhanced by the company though trainings and experiencing. Whereas within the working environment he has not being treated well or fairly compared to other employees in his level.
On account he is at the stage of job stress and poor decision making by the cause of “Job Dissatisfaction”

Decision Making is taking actions based on the objectives and goals of an individual to be achieved or people make certain decisions to overcome problems, stressfulness. Decision Making is interdependent on many factors such as personality, attitudes, education, emotions, time and the situation. A decision taken at a stressful situation vary from decision taken at a calm situation. Decision taken at this time will be completely different in 20 years’ time. As Mr. Kamal is in a situation of “Job Dissatisfaction” his decisions can be not correct or cause problematic situations to himself, company and his family. He has taken the decision of getting absent which will give more stress to him with 2 days’ workload and when the productivity gets slow down there can be issues with the management resulting deductions in the salary which affect his family.

Draw basic shapes in turtle package in Python

I am going to demonstrate on  how draw basic geometric shapes using turtle package of python. First of  all the turtle package should be installed. Then we need to import turtle package into your python script.

Use the given below command.

import turtle

Turtle package is ready to use. Now you need to create object in Turtle.

turtle = Turtle()

Turtle is like a pen in your hand. Therefore you need to lift the pen to draw something. Use following command. to to up the pen.

turtle.up()

Move your pen to desired position. you need to define the place where your pen moves to.

turtle.goto(0,0)

I moved my pen to (0,0) coordinate. Now I am ready to draw something using my turtle pen. Now I am going to draw straight line. I am starting my line from point (0,0) and ending my line at point (100,100)

turtle.goto(100,100)

Then I need to tell my turtle pen to down to my canvas.

turtle.down()

Before drawing I need to set my pen width. I set my pen width to 5.

turtle.width(width=5)

Draw Straight line,

#!/usr/bin/python

import turtle
turtle = turtle.Turtle () turtle.up() turtle.goto(0,0) turtle.down () turtle.goto(100.,100) turtle.width(10

Now We can Draw simple circle.  To draw a circle we need starting point as well as radius. I am going to use following set of commands to draw circle.

#!/usr/bin/python

import turtle

turtle = turtle.Turtle ()

turtle.up() turtle.goto(0,0) turtle.down () turtle.circle(100) turtle.width(10)
I need to fill my Circle with Blue colour and line colour should be black.

#!/usr/bin/python

import turtle
turtle = turtle.Turtle ()
turtle.up() turtle.color("black","blue") turtle.goto(0,0) turtle.begin_fill() turtle.down () turtle.circle(100) turtle.width(10) turtle.end_fill()

begin_fill and end_fill functions are used to start and end fillings.


Draw rectrangle in turtle.

#!/usr/bin/python

import turtle

turtle = turtle.Turtle ()
turtle.color("blue") # line colour turtle.up() turtle.goto(0,0) # starting point turtle.down() turtle.forward(90) turtle.right(90) turtle.forward(100) # length of rectrangle turtle.right(90) turtle.forward(90) turtle.right(90) turtle.forward(100) # width of rectrangle


forward function is used to move pen forward to specific distance and right function is used to turn pen to right side by given angle . As well as there is left functions also. It used to turn your pen to left side by given angle.

#!/usr/bin/python

import turtle

turtle = turtle.Turtle ()
turtle.color("blue") # line colour turtle.up() turtle.goto(0,0) # starting point turtle.down() turtle.forward(200) turtle.left(120) turtle.forward(200) turtle.left(120) turtle.forward(200) turn.left(120)


Now you can draw basic shapes using turtle graphics. Try to draw complex figures !

Cheers !!!





Converting raw_input to input from python 3.0

The raw_input function is not in used after python 3.0 . raw_input function has been replaced by input function.

raw_input function is used for getting user inputs. This function mostly used in python 2.7

Now this function is replaced.

Both input and raw_input functions are belongs to sys package. Therefore sys package should import to your python script.

import sys


See below Example for usage of this function.

 your_input = input ("Please Type Something :")


Not only the raw_input function.

print command also converted into a function. To print something on the python shell, type following command.

print ("Hello World !"); 

Analyzing the Reasons for High Rate of Resignations

ABC Company (Pvt) ltd is a medium scale company that performs well in the export market. They produce export quality children’s garments.

Their employees consist two layers:
•    Production/Operational Staff
•    Administration Staff

The Production staff hierarchy consists of a quality assurance manager, a production manager, and three supervisors and 175 Operational Staff. The administration staff consists of the two directors, two managers, an accountant and two executives.

Recently, the directors have noticed an increase in the employee turnover in the operational staff. They wish to find out why this is so although their salaries are above average when compared with other companies in the market.

The following feedback was noted after conducting a survey from the Operational Staff.

•    The Operational staff receives minimum benefits. Benefits seem to only be given to personal in executives’ roles and above.
•    Employees are eligible to minimum leave.
•    Their work is not appreciated enough.
•    Employees have no clear understanding of how their individual/group work standards have been evaluate and hence leading them to feel less appreciated.
•    Minimum promotions. As an example Individuals rarely get the opportunity to be nominated to position above their positions. Operative to tam leader. Therefore leading them to lose interest to perform better.

Feel free to E-Mail your answers to us, our help will always be there until the last end of a code

Questions
1.    Analyze the Organizational Situation according to the Human Resource Context?

2.    If you were Consultant to this Organization, What sort of actions would you suggest to put these firm back on track?

Contract of Employment

All the people who work for another person irrespective of his/her status receive a pay. The person who gives the service is called as an Employer and one who takes the service and gives a payment is called as an Employee. The Employer and Employee relationship starts with the Industrial Revolution. The Employees who had power at that time took the maximum use from the people who worked for them without a pay. The people who suffered working for employees as slaves started to rebel against this system of rendering the service.  With the help of many reformers and International Labor Organization Governments interfered and made laws for the welfare of the Workers.
The Contract of the Employment is the written or oral legal bond between the Employer and the Employee. By this bond the Employee should render service to the employer in his/her capacity while the Employer should pay him/her for the service rendered to him.

The contract of Employment includes the following:
•    Full Name
•    Designation and the type of the job
•    Address
•    Starting Date of the Employment and Ending date
•    Nature of the Employment (Permanent, Temporary)
•    Duties and Responsibilities
•    Working Hours
•    Remuneration and increments
•    Disciplinary Actions

A contract of Employment should be given to each and every person who comes to work along with the Implied and Expressed terms.
Implied Terms-The terms which are not stated verbally or in writing but should be known by the employee.
Expressed Terms- The terms stated verbally or in writing with regard to the Contract of the Employment.

Performance of an Employee

The Success of a Business depends on the effectiveness of the employees. In other words how well the employees perform in order to achieve the Organizational goals.

It is the responsibility of the organization to ensure that the employees perform well in their duties and to develop if there is anybody performing poorly.

The Organization has to link their goals with the goals of the Employee to create effective performance from the workers. For this various type of Organizations adopt various methods according to their requirements to analyze the performance of its employees. It is commonly called as Performance Appraisal.

Performance Appraisal- This is a series of steps taken in order to evaluate the performance of an Individual in the job they carried out, rewarding for the good performance and taking corrective actions for poor performance. This can be carried out Quarterly, bi annually or annually. It is better to have an appraisal bi annually so that an employee has time to correct weak points at the end of the year.

STEPS TO CONDUCT A PERFORMANCE APPRAISAL

Step1 – Pre Planning
The employee should e made known with regard to the appraisal and his/her duties and responsibilities. She/he should clearly understand the performance expected from him/her and the time limit.

Step 2- Review of Performance
This should be carried out before the Appraisal meeting in order to ensure that the performance is up to the expected standard and it is in the correct path and if it is not decisions should be taken in order to take it to the correct path.

Step 3- Evaluating the Performance
The actual Performance is evaluated with the expected standard of Performance using relevant facts and data. Also the evaluation is carried out for the actions taken at the review for the weak points.

Step 4 – Appraisal Meeting
This should be an informal but critical meeting with the employee consist around two to three people such as Immediate Superior, Departmental Head and Senior or HR Manager. The Actions to be taken in the future should be discussed along with the strong and weak points. It is very important to reward the good performance and give advice to develop weaknesses.

Motivation

Motivation is an act within a person. It can be enhanced or decreased by others or by a situation that arises. In an Organization if people are highly motivated the productivity can be easily increased. The Motivation drives the people work beyond their capacity efficiently and effectively. If the workers are lacking motivation there can be many problems. Employees get frequently absent, late attendance, quarrels, less productivity, low quality output. Motivation need to obtained through the people from the people it can be taken directly or by forcing.

Motivation enhances the productivity of an Organization, high quality output. It is the Organization which had to motivate people to work.

Motivational Framework
Need to be satisfied- People have different needs to be satisfied for that they need money. They come to work for money.

How to satisfy the need- People can work hard to earn more money. Doing night shifts to get Over Time Paid

Behavioral changes- If the employees are paid more they will be happy and will be motivated better.
Outcome- To pay more for the workers there should be more profits to the Organization for that workers had do their best.

Results- There can be rewards for those who have worked harder. For those who are not working well are not paid properly.

Test- The employees had to categorized according to motivated and demotivated.

Selection and Induction

Once the Recruitment Process is done the very next step to be performed is the Selection of the right candidate.
There are many ways of selecting the suitable candidate:

Interviews
Tests
Reference checking
Medical Checking

By using any of these methods a qualified and experienced person can be selected. Selection should be done irrespective of age, religion and ethnicity. Usually the top Management takes the decision with the help of the Unit Manager.

Once the respective candidate is selected for the position, on the day he/she comes to work the induction or the introduction to the new Organizational culture need to be given otherwise the new person may give incorrect information about the Organization so that he will be dissatisfied on the first day itself.
There two types of Induction
General Induction
Unit Induction

General Induction- This is the method of introducing about the Organization to the new employee. Its culture, the expected behavior and briefly about the Organizational history.

Unit Induction- This is done by the head of the Unit which he is supposed to work. He has to introduce him to the new colleagues and lead the new employee to perform his duties.

The Selection and the Induction process should be done properly so that the new employee will not leave the job at early stages, If he leaves the job at early stages it is a waste of money and time of the Organization.

The Recruitment Process

The recruitment process plays an important task in an organization. An organization need man power to achieve its goals and objectives. The employees had to work effectively and efficiently to carry out the set strategies. Recruitment is a process which means that it contains a set of activities which need to be performed well by the Human Resource Management team of the Organization.
The process Involves,

  1. Setting out the Strategies to achieve the goals and objectives
  2. Identification of the man power needs 
  3. Preparation of Job Description and job Specification
  4. Deciding the Recruitment Method
  5. Implement the decided method of Recruitment
  6. Evaluate the recruitment method
 Setting out the Strategies to achieve the goals and objectives
The strategies need o be adopted by any Organization in order to achieve the goals and objectives.


Identification of the man power needs 
To carry out the set strategies the employees should be available within the organization. The persons selected should be match to perform the duties and responsibilities assigned to him/her. Right person, right place at the right time.

Preparation of Job Description and job Specification

Job Description gives the roles to be carried out the by the newly recruiting employee to the Organization. Job Specification gives necessary experience and qualifications applicable to the position.

Deciding the Recruitment Method
The method to be used to recruit employees vary with from Organization to Organization. It can be external or internal.

Implement the decided method of Recruitment
As soon as possible when the method of recruitment is decided it need to be carried out.

Evaluate the recruitment method
This step is very necessary as it gives an idea how to make it more success in future. Evaluation can be done based on weather person recruited matched to that position.

Business Leaders lesson 3

Roles of a Business Leader

The roles or the functions which a person should have to become a good leader are as follows: The nature of a Business Leader and the characteristics of a Business Leader are described in the Lesson 1 and Lesson 2.

1. Achievement of Goals- A good leader should identify the goals which need to be achieved and form strategies to achieve them. Also he should take his followers towards these goals. He uses different methods to reach the goals with his followers and chooses the best method to be used. The goals need to be described and explained to his followers.

2.  Formation- One of the main roles of a leader is to form the Organization in a way to achieve the goals. The organization need to be structured methodically delegating the responsibilities using the best method to be used.

3.  Managing- The Employees and their activities need to be managed in a way that they work to achieve the goals, identify their mistakes correct them. Also he should make sure that activities are set in line with objectives of the organization.

4.  Motivation – A good leader always should encourage his followers to win the challenges towards the journey of achieving goals. Also he should use methods to motivate them. When times of defeat a leader must be able to encourage them towards until victory comes.

5. Representation- As a leader he should stand behalf of his followers at times of success as well as failures. Leader is the representation of his group of followers.

6. Assessment- A leader should asses the performance of his followers and carefully study where the performance is not up to the standard and need to take corrective action. Also he should appreciate the good performance.

7. Introducing New Methods- The Leader should take the first step to introduce new technologies methods to his group and to use them whenever the need arise.

Business Leaders lesson 2

From the Lesson 1 We have learnt who is a Business Leader, now we will see the characteristics possess by a Good Business Leader.

Click here to read our Lesson 1 on Business leaders.


Characteristics of a Good Business Leader

1. A good Business Leader takes the employees towards the goals other than asking them to achieve the goals.

2. When an employee makes a mistake a good business leader never punish he employee but says to learn from the mistakes.

3. Depending on the situation the practices, rules and regulations of the Company can adjusted.

4. Based on the situation, there can be flexible hours

5. The Employees treat a good leader with gratitude and follow him even he is not in their presence.

6. Ability to take up challenges

7. All are treated equally

8. The duties & responsibilities are divided among all the employees depending on their capabilities.

9. No strict rules to minimize the cost.

10. Possesses the ability of solving problems tactfully

11. The job is meeting threats and overcoming them for a good leader.

12. Always efficient and cheerful when working

13. Open handed regardless of the person

14. All the employees untimely work with him.

15. Ready to help at any time

Business Leaders Lesson 1

Of every hundred new business establishments started approximately 50 or one half out of Business within two years. By the end of the 5 years, only one third of the original one hundred still be in Business”. 
George Terry



According to George Terry when a business emerges to the world most of businesses are unable to retain themselves in the world for long period of time. A major cause for this can be inefficient leadership to the Business. Most of the CEOs, Managers stay inside glass rooms and never come out to lead the employees of the Business. Leaders are emerged among any group of people. It can be from schools, universities and community. The main characteristics of a good leader is he should have followers to him who will respect him and he should be able to influence them towards achieving the common as well as individual objectives

The employees of any company are group of people working together to achieve the goals of the Company. There should a person to lead them towards these goals otherwise they will work only to achieve their goals. A good Leader is usually be able to have followers and be able to influence them. In a Business environment always the top management should be able to become good leaders as well; otherwise the goals cannot be achieved together.

English Lesson Two - Prepositions

UNDER
 We use under to show that something is below.

Example : The Cat is under the table
This means that the cat is below the table.

ON
We use on to say that something is kept on top.

Example : The Book is on the table
This means that the book is kept on top of the table.

IN
We use in to say that something is put inside.

Example : The book is in the cupboard.
This means that the book is kept inside the cupboard.

ABOVE
We use above to say that something is over than the other.

Example : The temperature is above the average.
This means that the temperature is over than the average temperature.

AT
We use at to say a time period

Example : She went to bed at night
This means that she has gone to bed when it is night time

ABOUT
We use about to say related to some incidence, person and something

Example : I am curious about the spending the vacation in that island
The person is talking about the incident of spending the vacation

Example : I want to know about that person?
The person uses about to relate to another person

BETWEEN
We use between to say something is surrounded by two.

Example : There is a wall between Tom and Jerry
This means that the wall is in the middle of Tom and Jerry.

AMONG
We use among to say that something is positioned within something.

Example : The Boy is among his classmates.
This means that the boy is positioned within his classmates.

FOR
We use for to refer something specifically

Example : I like to go for a walk every morning
In this sentence walking every morning is specifically meant by using for

Example :  He was known to me for five years
This shows a specific time period.

TO
We use to inorder to show an action

Example :  We like to sit at the back
The action in this action is sitting which is showed using to

FROM
We use from to show a beginning

Example :  We started our journey from Greenwoods.
The beginning of the journey has been shown using from.




Note: There are many prepositions you can come across in the English Language.

How to install ntfs file system in CentOS

When the flash drive is mounted  to CentOS, the CentOs does not detect the ntfs filesystem. So the some packages need to be installed. Basically the fuse and fuse-ntfs-3g packages are needed to detect flash drives in ntfs file system.

To install the above packages, the yum command given below should be issued.
yum install fuse fuse-ntfs-3g
The following message shows  "No package fuse-ntfs-3g available"
This message arose due to the fact that the rpmforge  is not enabled in the available repositories by default or rpmforge repository is not installed. So first you should enable or install the rpmforge repository.

I have used following yum command to enable the rpmforge repository. I received the following messages. This message means rpmforge is not available in the my system.

The following command should be isuued to get the rpmforge rpm package downloaded .

 wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

 To install the downloaded rpm file, isuue this command.

 rpm -Uvh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

 The package is ready to be enabled. The first command to be issued in the process of enabling.

 yum --enablerepo=rpmforge

 Now the system is ready for the installation of fuse and fuse-ntfs-3g packages.

 yum install fuse fuse-ntfs-3g

I issued both the enabling command and the installation command together. see the below output.

 You have successfully installed ntfs file system in Centos !!! Now you can mount your flash drive to the Centos System. !!!

Job Stress

Job stress can be considered as a major problem prevailed among working people. This occurs when things are not going well in the working place for the employee. This is disadvantageous not only to the Employee but only to the Employer as well.
Consequences of Job Stress

The Employer
The needed productivity cannot be obtained
The work performed can have many mistakes which will affect the Company
Too much work load for the existing workers
Affect the reputation of the Company
Waste of time in useless interviews
Not being able to develop the person
Affect the team work


The Employee
The work cannot be performed well
Cannot give the maximum to the Company as the person is stressed out
Frequent Absenteeism
Will confront the Organization
Resignations
Doing only the Job
Affect Interpersonal relationships.

When a person is working with Job Stress the work done will not be effective and there will no benefit to the Company. Job Stress occur due to various reasons and the reasons will depend on the person. The responsibility of the Human Resource Manager is to identify these kind of problems and to find solutions in order to be advantageous to the Company and to make highly qualified Work Force.

English Grammar lesson One

Most people make mistakes when using “THE” and “A” in sentences, here is some tips to avoid that mistake.

THE” is usually called as a definite article also. When using “the” in an article make sure that it is specific, that you exactly know what you are talking about.

A” is usually called as Indefinite article. If you don’t know exactly what you are talking about use the article “A”.

She owns a Cat- In this sentence the one who says this doesn’t know anything about the cat.
She owns the cat- The person who says this know about the cat exactly.

Exercise
Write as much of sentences you come across with “A” and “THE” and see what it means. You can do this exercise and send it to us; we are free to help you at any time.
Eg:
 I am going to the House- This shows that the person knows very well about the house she/he is going to.
I am buying an egg- The person is buying any egg out of so many eggs there is no definite or specific egg that she/he wants.


Email
etutionlk@gmail.com

Evolution of Human resource Management

Modern Day Human Resource Management and its development evolved from far beyond the history from centuries to centuries with the introduction of Industrial system to the world.
Pre – Industrial Era-Beginning of the Employer and Employee relationship. The prevailed system was that the land owners had labors who work for them (The lands were given by the King for their military service done to the country) and the cultivation was given by them to the land owners and whatever is remaining can be taken by them. The system of Feudalism was brought to an end.
Industrial Revolution- With the emergence of new factories people started to work for a pay and the concept of Management arose in these factories. Many laborers worked in these factories it became difficult to control them. Due to this more strict rules and regulations were imparted on the workers and labor exploitation began.

Scientific System of Management- The credit of Introducing the Scientific Management goes to Fredrick Taylor, also known as the “Father of Scientific Management”. He studied the Job demands and came to a conclusion that there should be one best way to do a particular job in minimum time.
The Industrial Welfare Movement-Due to this Labor exploitation people organized themselves to win their rights and made the owners to know that they are humans and cannot work in the way they wanted. So the business organization began to work for the welfare of the workers.

Early Industrial Psychology- The owners began to think that workers need their minds set freely inorder to work effectively and cannot be treated as machines and human play an important role towards the development of a business.

The Human Relations Movement- The workers organized themselves to convene that they need good working conditions to carry out their work and good interrelationships.

The Labor Movement – The people fought for their rights at the work place and finally achieved what they wanted. The Management became flexible towards the workers.

Personal Management- Something called personal management emerged which made to be known that human need to be managed tactfully to get maximum from them but not just with strict rules and regulations.

Human Resource Management and Development of HRM- The Personal Management gradually changed into Human Resource Management where people (employees) were to be treated as a resource that can be developed.

Tips to write a Short Story

A short story can be simply defined as a story which is written in short form but with a charming nature to attract the readers so that the person who read the story can make an impact on others by dictating the story from mouth to mouth.

A short Story starts from nowhere and ends with nowhere, and it is well focused on one incident. The mainly focused incident should be very clear, outstanding and should win the hearts of the people. For a creative writer two people talking each in a bus can be a Short Story. A Dog walking on the road can create a lovely short story. All it matters to a short story is the Incident. There can be one or many characters involved along with main character. Also it can be categorized as a type of rumor written on piece of paper or a book. Each story has its own style and the style of writing depends on the incident and writer.

Always Short things are sweet likewise a short story to be sweet it need to have attractive as well as creative words. Each story having its own specialization creates a new person in the readers mind. The expressions says what is hidden inside a person’s mind, the words detect what the person has in his mind. When writing a short story the words, sentences, phrases should be relevant to the story and each and every word should be helpful to bring the incident up unlike in a novel, a novel so many sentences and phrases which are not very relevant but in a short story every letter should contribute towards the main incident in order to keep it short.

Human Resource Management

Human, living beings is why the world is. Human Resources is the why the Business is. Human are the major input of a Business towards achieving the goals of the Organization. The Success of a Business depends on how success is it’s employees. It is the reason why it should be done by a highly qualified person. The employees of a company should be matched to their abilities and specialization and the suitable person at the most needed time need to be there at the correct place to carry out the work. Therefore recruitment places an important role in an organization.


Recruitment –Recruitment is a process which gives an opportunity for interested people to apply for the vacancies in an Organization. This Process has many steps such as Announcing the vacancy to internal Staff and the external parties selecting the most appropriate person and inducing the person to the job responsibilities and working environment. The most important thing in this process is to make the selected person to work effectively with Job satisfaction and to make him/her to serve the Company for a long period of time.

Put the correct or wrong mark for these statement based on the text on Human Resource Management

  1. The Success of a business depends on its Employees.
  2. If you hire the wrong person it will not affect the Company.
  3. Simply Recruitment is advertising the Job Vacancy Only.
  4. Recruitment process becomes a success if the hired person stayed with the company for long period of time.
  5. Recruitment can be conducted by any person in the Organization using any methods.

How to Plan for an Effective Training

In Today’s Context most of the Organizations has identified that training is an important function which enhances the quality of work force. Immediate improvements in people can be seen after an effective training program as it is well structured and targeted.
The Training Cycle
This is a sequence of steps which need to be followed in order to do proper training

  • A training Policy need to be developed - Each Organization has its own Training Policies depending on the Business they do, the resources it has and the need. This can be weather to get external resource personal or to get the help from experienced managers of the Organization. The training methods to be used one day or residential. Seminar type or Group discussions.
  •  Training Needs- The training need can be arise in different times at different aspects; the most appropriate thing is to identify what type of training is necessary for immediate improvement among the staff. The type of training which need to be conducted can be identified by doing surveys, observing how they perform their and having discussion with the managers about the weaknesses of the staff.
  • Planning the Training Program-   This need to be done very carefully in a cost effective manner in order to get the maximum benefits.
  • Carry out the Training- The training need to be carried out for all the staff that is in need of the training.
  • Evaluate Training-Evaluation of the training program plays an important role as it helps to reduce the gaps arose in the last training program held.

Commonly Used Training Methods
  1. Lecture Method
  2. Coaching
  3. Role Plays
  4. Case Study Method
  5. Seminar Method
  6. Residential Method

Get street,town and country from google api

In this tutorial, I am going to show you how to get street,town and country values of given postal code.

$postcode = "your postal code goes here";

// Sanitize their postcode:
$search_code = urlencode($postcode);
$url = 'http://maps.googleapis.com/maps/api/geocode/json?address=' . $search_code . '&sensor=false';
$json = json_decode(file_get_contents($url));



$lat = $json->results[0]->geometry->location->lat;
$lng = $json->results[0]->geometry->location->lng;



echo "Latitude :".$lat ;
echo "Longitude :".  $lng ;



// Now build the lookup:
$address_url = 'http://maps.googleapis.com/maps/api/geocode/json?latlng=' . $lat . ',' . $lng . '&sensor=false';
$address_json = json_decode(file_get_contents($address_url));
$address_data = $address_json->results[0]->address_components;


$street = str_replace('Dr', 'Drive', $address_data[1]->long_name);
$town = $address_data[2]->long_name;
$county = $address_data[3]->long_name;



$array = array('street' => $street, 'town' => $town, 'county' => $county);
echo json_encode($array);
?>

I have entered "45 Belsize Avenue, London, NW3 4BN" as $postcode and I could get below output.

$postcode = "45 Belsize Avenue, London, NW3 4BN";


Have Something to clear ? Drop me a comment or drop me a email. !!!
etutionlk@gmail.com

Get Longitude and Latitude from Postal Code

I have a requirement to get Longitude and Latitude from google api. I need to get these details from postal code. So I need to call google api functions to get this details.
$postcode = "your Postal Code";



// Sanitize their postcode:
$search_code = urlencode($postcode);
$url = 'http://maps.googleapis.com/maps/api/geocode/json?address=' . $search_code . '&sensor=false';
$json = json_decode(file_get_contents($url));


$lat = $json->results[0]->geometry->location->lat;
$lng = $json->results[0]->geometry->location->lng;


echo "Latitude :".$lat";
echo "Longitude :".  $lng";


Type your postal code above in the code. See the demo below.
$postcode = "HA27DY";



// Sanitize their postcode:

$search_code = urlencode($postcode);
$url = 'http://maps.googleapis.com/maps/api/geocode/json?address=' . $search_code . '&sensor=false';
$json = json_decode(file_get_contents($url));


$lat = $json->results[0]->geometry->location->lat;
$lng = $json->results[0]->geometry->location->lng;


echo "Latitude :".$lat";
echo "Longitude :".  $lng";

I got Following Data from my code.
Latitude :51.5797504
Longitude :-0.3640929 

How to get SUM of Select Data according to Month and Year

I have following table in mysql database. My task was I need to get the sum of the paid_amount and the month and year.
See below Image

I used following sql command to get sum of the paid amount accourding to month and the year. See below result in the image.


SELECT 
        Sum(paid_amount)       AS paid_amount
        Year(`paid_time`)      AS paid_year,
        Monthname(`paid_time`) AS paid_month 
FROM   
    `customer_payment_table` 
WHERE  `paid` = 1 
GROUP  BY 
    Year(paid_time),
        Month(paid_time)  
Some are without date, That's why I got Null in first result statement. :)

Java Lesson 02 - Algorithms and Peudo Codes

What is an algorithm ?

Algorithm is a step by step procedure which solves the problem.

Characteristics of an Algorithm.

1. Definiteness
All steps are accurate.

2. Input
Algorithm has one or more inputs,or else there cannot be any.

3.Outputs
There are several outputs in one Algorithm.

4.Effectiveness
Is the basis to write a program.


5. Finiteness
It terminates after finite number of steps.

Pseudo-Codes

Pseudo stands for nearly and pseudo-codes means nearly the code.The Pseudo-Codes can be converted to programming codes easily.

SEQUENCE is a linear progression where one task is performed sequentially after another

WHILE is a loop (repetition) with a simple conditional test at its beginning

IF‐THEN‐ELSE is a decision (selection) in which a choice is made between two alternative courses of action.

REPEAT‐UNTIL is a loop with a simple conditional test at the bottom

CASE is a multi‐way branch (decision) based on the value of an expression. CASE is a generalization of IF‐THEN‐ELSE

FOR is a "counting" loop

------------------ See you in next tutorial -----------------

Form Validation using jquery Validation Engine

This simple tutorial demonstrate how to use jquery validation engine to validate your form fields.

I have simple form with two fields.

<input id="first_name" name="first_name" class="" type="text" value="">
<input id="last_name" name="last_name" class="" type="text" value="">  

Note that, These input fileds have no any validation classes. I have to includ several files to add validation.

Include following files.

<link rel="stylesheet" href="../css/validationEngine.jquery.css" type="text/css" />
<script src="../js/jquery-1.8.2.min.js" type="text/javascript">
</script>
<script src="../js/languages/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8">
</script>
<script src="../js/jquery.validationEngine.js" type="text/javascript" charset="utf-8">
</script>
Remember that, Include jquery file first ! Otherwise your validation may not work !

Now I Can add validation Classes to my input fields. See following code snippets. I need these two fields with 100 letters and could not be used some numeric values. So I have added following validation rules.

Disable autocomplete in google chrome

I had to work with html form. When I tried to fill Email address it autofills with yellow coloured boxes.
(See the Image below.)

I need to get avoid from this issue. I have added following code snippet. but it does not work for me.

<input id="email" name="email" value="" autocomplete="off"

So I have to find another solution. I have added autocomplete property to form and added following jquery.


$('form[autocomplete="off"] input, input[autocomplete="off"]').each(function() {
var input = this;

var name = $(input).attr('name');
var id = $(input).attr('id');

$(input).removeAttr('name');
$(input).removeAttr('id');

setTimeout(function() {
$(input).attr('name', name);
$(input).attr('id', id);
}, 1);
});


After that, It worked for me ! Cheers !

Java Lesson 01 - Programming Languages Basic

Why we use programming languages ?

I will take the entrance to give an answer to above question. We are working all the with problems. We have to face many problems. Hardware problems, hardware communication problems, problems regarding on user interaction with system, etc. So wee need some kind of language to deal with this issues with our computer. Computer cannot unserstand human languages. So wee need to give an instruction in Computer understandable language. That's why We need computing languages.

Problem Solving methodologies

There are few types of problem solving methodologies.

1. Hill‐climbing strategy
In this Step We attempt to be closed to the goal. Every Steps are taken to be closed to our goal.
2. Means‐end analysis
In this method, start and end of the goal are identified and Some sub goals are defined. Achieving sub goals is getting closer to the main goal.
3. Divide and conquer
We can devide our main task into solvable sub tasks and solve these sub tasks.
4. Trial  and Error
 Try it and if there is an error, fix it.
5. Brainstorming

How to pass data from controller to view in codeignitor?

In this tutorial,I am going to show you pass data from codeignitor controller to codeignitor view.

Here is My Controller class.

<?php 



if ( ! defined('BASEPATH')) 

    exit('No direct script access allowed');

class test_controller extends CI_Controller {

    public function __construct()

       {

            parent::__construct();

       }



    public function index()

    {

        $data['user_id'] ="user" ;

        $data['display_data'] ="user data" ;

        $this->load->view('test_view',$data);

    }



   

}


Add Mouse Following Text in Flash Actionscript

Add following Actionscript code inside your flash action scripting codes.

Text = "Type Your Text Here";
letters = Text.split("");
letterformat = new TextFormat();
letterformat.font = "Verdana";
letterformat.align = "center";
letterformat.size = "10";
spacing = 8;
speed = 3;

for (var LTR = 0; LTR
mc = _root.createEmptyMovieClip(LTR+"l", LTR);
mc.createTextField(letters[LTR]+"t", LTR, LTR*spacing, 10, 20, 20);
with (mc[letters[LTR]+"t"]) {
text = letters[LTR];
setTextFormat(letterformat);
selectable = false;
}

if (LTR) {
mc.prevClip = _root[(LTR-1)+"l"];
mc.onEnterFrame = function() {
this._x += (this.prevClip._x-this._x+5)/speed;
this._y += (this.prevClip._y-this._y)/speed;
};
} else {
mc.onEnterFrame = function() {
this._x += (_root._xmouse-this._x+10)/speed;
this._y += (_root._ymouse-this._y)/speed;
};
}
}

Change "Type Your Text Here" text in this code.

Q1: What problem you identify with Kamal’s job?

See this post for Whole Question.

Answer for Question No: 1

According to World Health Organization the "Job Stress" is the “The response people may have when presented with work demands and pressures that are not matched to their knowledge and abilities and which challenge their ability to Cope up”.In other Words Job Stress is a response given by persons when he/she faces pressure in the Workplace. There are many Factors which cause Job Stress some of them are:

  • Poor Working Conditions – The environment which the employees work may cause health hazards or discomfort able to work. Eg: No Proper Ventilation, High Heat, Not having adequate lightning 
  • Late hours of Work – Some workers are entitled to do night shifts and some had to work late hours beyond the capacity of them. 
  • Lack of Knowledge – The employees face the difficulty of performing their responsibilities. If he/she does not have the necessary knowledge to work with or a senior person to get the advice. 
  • Strict Rules and Regulations – The rules and regulations of the organizations may be in a negative approach or may not be compatible to the workers. The management have taken their own decisions without any involvement of the employees, So that the employees face the difficulty of fulfilling their responsibilities along with the rules and regulations. Eg: If the management decides to make Saturday working half day, for some employees who come to work from outstation areas will have no time to go to their homes.
  •  Unbearable Workload – The work can be more than a person can perform by himself within a certain period of time. 
  • Lack of Training – When time passes new technologies have conquers the world and for some people it is hard to get used to the new technologies or else new employees are not used to the machinery or technology of the Company they have newly joined. 
  • External Pressure – The pressure from external factors differ from individual to individual. Working house wives will have to do their household works at the same time and it will create a Pressure especially those who have children they have to Perform the responsibilities in the Organization as well as the household.
  •  Difficulty in enhancing Career – When the employees cannot meet their own goals and objectives or to achieve the vision of them. Eg: Lack of opportunity to get the position which they prefer or a promotion which he/she look for a long time. The stress in the Job will cause Behavioral, Physical, Economical Psychological and Social problems among individuals. 

 Behavioral Problems 
  •  Absenteeism – Frequently getting absent to work to avoid a stressful working day. 
  • Lack of Motivation – Not working willingly but due to work which is to be performed working forcibly by themselves. 
  • Not Efficient or Effective – The work done by employees with Job Stress are not efficient and effective on their responsibilities which in turn affect the productivity pf the Company. Sexual Harassment – The Employee especially females can be harassed sexually by another employee. If the person who gets harassed has no way of leaving the job due to her/his economical situation. She/he has to carry out the work stressfully along with the harassment. Also this can form Social Problems of not being able to face the society. 
 Eg: Unskilled Labor – Those who work as sewing girls in Garment Factories. As they lack skills and Qualifications they have the difficulty of finding another Company.

  •  Not Interested – Lack of interest to perform the duties and responsibilities.
  •  Hesitate to work – When he/she is reluctant to perform the duties it will affect the other employees. The others have to perform his/her duties or else the productivity as a team will get slow down. 
Eg: If the person has to finish making the products to be delivered on time. If the person is reluctant to do it the delivery team and invoicing team has to wait until it gets finished or either they had to involve in finishing the products. It will not be good for the image of the Company.

  •  Carelessness – The work done may be with errors which will cause problems to the Company as a whole. Another person had to involve in checking his/her work again which will increase the work load for that person. 

How to prevent from form submission on Enter

I need to prevent from form submission on pressing Enter key. I have added used following code snippets.

$('.form-submit-css').on("submit", function(e) {
 if (e.keyCode == 13) { 
 e.preventDefault(); 
 return false; 
 } 
 }); 

Or you can add following code.

$('myform').submit(function() {
  return false;
});

Or this snippet.

$('form').keyup(function(e) {
  return e.which !== 13 
});

Or this html.

<form onsubmit="return false;">

Should work for you. Have a fun with your coding !

CASE 02: JOB STRESS


Mr. Kamal heard the alarm is ringing in the morning but he did not want to get up. The thought of facing a stressful work day was irritating him "I will call the boss and tell I am sick-he thought lying on the bed, the same time he thought otherwise, last week also I was absent for a couple of days saying sick, and if I stay today also, my job at risk. Just then his wife walked into the room and said “Come on Kamal it’s a nice day! Have your breakfast with children before you leave for work! I hate to see you missing at the table every day.

Kamal (with annoyed) - “What difference does the breakfast make? I hate to go to work! The work is so stressful and boring now!”

Wife - oh come on dear!Things can’t be that bad, see the positive side! The pay is good and you are a quite senior now after 20 years of service in the large company.

Kamal - Yeah! Still the work is hard and boredom. I feel like I am wasting my stage of life. I think of looking for another job.

Wife - well I don’t tell you what to do it’s up to you but don’t forget the children are getting older now and we will have to pay extra fees for the tuition classes and other expenses are also rising up. Why don’t you think of another job next year?

Kamal - (Thinks) she is probably right! We need money and it’s a risk to get off the job right now, I’ll think of it little later (He gets off the bed and gets ready to go to work with little late to work)

Questions.
1.What problem you identify with Kamal’s job?
2.How it (1 above) affects Kamal’s Job Satisfaction and his decision?
3.What is the impact of Kamal’s thinking and behaviour on his family and children?
4.What is the impact of Kamal’s thinking and behaviour on the productivity of the company he serve?
5. How will the company react on Kamal’s behaviour?
6. If you are the HRM of this company how can you prevent such scenarios?

Answers are in next posts !

Answer For Q1 | Answer For Q2 | Answer For Q3 | Answer For Q4 | Answer For Q5 | Answer For Q6

create/delete groups in CentOS

You can create/ delete your own user groups in CentOS. To create a group, Use following command.

groupadd groupname

Example
groupadd tutorial_users

To add users to your newly created group, use following command. but you can add existing users to group using following command.

useradd -G group_name user_name

Example
useradd -G tutorial_users etutionlk

To add existing users to a group, use following command.

usermod -G group_name user_name

Example
usermod -G tutorial_users etutionlk

Use following command to delete group.

groupdel group_name

Example
groupdel tutorial_users

That's All !

create/delete users in CentOS

This tutorial demostrates how to create/delete users in Centos.
Use following command to create user in CentOS. before creating an users, you should be logged into the CentOS using your root account. Otherwise you can not create user accounts.

useradd username

Example :
useradd etutionlk

Use following linux command to delete existing user in CentOS.

userdel username

Example
userdel etutionlk

Install dhcp server in centos 6

DHCP stands for Dynamic Host Control Protocol (DHCP). It used to dynamically allow ip adderess to computers.
Before configure  dhcp server, you should install dhcp packages. Use following command to install dhcp package.

yum install dhcp


go to /etc/sysconfig/ directory and open dhcpd file. Add interface.

Copy sample dhcp.conf to /etc/dhcp/ directory. User Following command.

crontab in Linux

crontab is used to run scheduled tasks like get backup of your project frequently, clear temp file frequently,etc... If you have some scheduled tasks to be executed automatically, crontab is the best place to fulfil your requirement.

Use Following command to see scheduled crontab list.
crontab -l

Use following command to add/delete crontab processes
crontab -e 

use Following Command to stop/start/status/restart crontab prosesses.
/etc/init.d/crontab start
/etc/init.d/crontab stop
/etc/init.d/crontab status
/etc/init.d/crontab restart


min         hour         day_of_month      month          day_of_week        Process
(0-59)      (0-24)             (1-31)             (1-12)                 (0-6)              process
                                                             (jan-dec)

Examples:
To run cd /home/etutionlk command in every minute. Add following crontab statement.
*/1 * * * * cd /home/etutionlk
Run test.sh file in every hour
* */1 * * * sh test.sh
Run xmas_greeting.sh file in 25th of December in every year at 8.00 am
0 8 25 12 * sh xmas_greeting.sh
Have a Nice Experience with crontab !


How To Disable Browser Cache in Codeignitor

In my Project, I had a big issue about cache. I want to remove browser cache because some web pages takes browser cache to load. Therefore I wrote a library script for codeignitor to disable browser cache.

Create cache_lib.php in application/libraries and paste below code in it.

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class cache_lib extends CI_Output {

    function nocache()
    {
        $this->set_header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT');
        $this->set_header('Cache-Control: no-cache, no-store, must-revalidate, max-age=0');
        $this->set_header('Cache-Control: post-check=0, pre-check=0', FALSE);
        $this->set_header('Pragma: no-cache');
    }

}
Now You Can Import nocache method using following line of code.

$this->output->nocache();

Happy Coding !

Error Parsing XML in Facebook Page Plugin

I got an error message during the  template XML Saving Process. See the Below Error Message.
My Error Was Error Parsing XML !

I tried to add facebook page widget to my blogspot blog. So I had to add following code snippet.

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
I copied the code to blogger template and Saved it. Error Occured.... !

Change the Following Line to avoid the XML Parsing Error.
 js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3";
Replace the above line with the following Line.
 js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&amp;version=v2.3";
Now you can Save the template without any error. Save the template and add html/javascript widget.
Copy the following code inside the Widget.

<div class="fb-page" data-href="https://www.facebook.com/etutionlk" data-hide-cover="false" data-show-facepile="true" data-show-posts="false">
<div class="fb-xfbml-parse-ignore">
<blockquote cite="https://www.facebook.com/etutionlk">
<a href="https://www.facebook.com/etutionlk">Etution</a>
</blockquote>
</div>
</div>


Save it. !