Project Quality Management #PMP – Project Management

Project Quality Management

Quality management has three aspects:
1. Quality planning – plan
2. Quality Executing – quality assurance – execute
3. Quality controlling – monitor and control

Quality planning – plan
Identify quality specifications and requirements for the project. Plan hos the quality specifications will be met.

Output:
Quality management plan
Quality metrics
Quality checklists
Process improvement plans
Quality baseline

Tools:
Cost benefit analysis
Benchmarking
Cost of quality

Quality assurance
Remember it is not quality control, it is just executing the development in such a way so that the quality requirements are met

Output:
Requested changes
Requested corrective actions
Modifications to Project management plan

Input
Quality management plan
Quality metrics
Quality control measurements

Quality Control
Quality Control checks if the quality requirements are met or not. It is done throughout the process/development/production life cycle.Quality Control uses statistical sampling

Tools for Quality Control:
Cause and effect diagram: Shows how different factors relate together and affect the quality

Control Charts: Uses statistical sampling and known as statistical process control.
Example: take quality mesurements of different samples. Find the avergae quality. Draw a line with the average quality. Plot all the samples’s quality. Draw the line for upper quality limit. Draw the line for lower quality limit. If all/most points are in between the process may be in control. If seven consecutive samples fall on one side of the avergae line the samples must be inspected.

Flowcharting:Shows how different components relate and determine where quality problems may occur. Example: Cause and effect diagram

Histogram:

Pareto chart: Histogram-shows defects ranked from greatest to least.

Pareto law: 80% problems come from 20% problems. Pareto chart is used to find the root causes of the problems.

Run Chart: Displays quality over time. Example: Time/month on X axis, defects per thousand on y axis.

Scatter Diagram: Plot all data and try to find the trendsStatistical Sampling: Take a sample randomly and measure quality

Inspection:

Defect repair review

Some TermsTotal Quality Management: Everyone in the company is responsible for the quality and can influence the quality of the outcome

ISO 9000: Ensures that companies document what they do and do what they document

Statistical Independence: Two samples are not dependent on each other

Mutually Exclusive: One choice excludes the other

Standard Deviation: Calculate the mean. Then find difference between each data point and the mean. Square each of the differences.std dev = SQRT((sum of the squired differences)/(count data points – 1)). The higher your standard deviation the more diverse the data points.

Six Sigma: six sigma standard deviations (99.99966% of the data points) meet customer’s quality limits.

Prevention vs inspection:

Attribute sampling: conforms quality or not. binary

variable sampling: How well something conforms to quality

Special causes: Unusual and preventable

Common Causes:normal

Tolerance:quality limis for product acceptanceControl Limits: Three standard deviation above and below the mean.

From: http://sitestree.com/?p=4773
Categories:PMP – Project Management
Tags:
Post Data:2012-02-22 22:14:48

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Project Time Management: Part-1 #PMP – Project Management

[note: My articles are just a note/reminder to me. I keep them here so that I can refresh my memory whenever required. The artcles may be weak as a writing component. Thanks.]

Project Time Management
Project time management process

1. Define Activities Required
2. Sequence Activities
3. Estimate Resources for the Activities
4. Calculate Duration of the Activities
5. Develop Schedule
6. Control Schedule

Process:
Define Activities Required: List all the activities, functionalities, modules, components you want to develop. When the project scope is defined, use it to decompose the work into activity list. Work breakdown structure will be useful at this stage. List what modules, components the project will handle. List all the functionalities/activities that are required for each of the modules/components. For each activity, define properties, assumptions, quality requirements, and output requirements.

Input: Project scope statement, Work breakdown structure
Output: Project activities [activity list], Activity attributes, milestone list, requested changes

Tools:

Decomposition:Decompose work into smaller activities. Project team or the functional manager may be of good use here.
Templates: The Company may have them, other project may have them, and some standards like IEEE may define some templates
Rolling Wave Planning: Many later aspects of the project may not be understood at the beginning. Hence, initially decompose as much as possible and later with the progress, improve the decomposition
Expert Judgment: Take help of other experts in the field. Project team or the functional manager may be of good use here.

Sequence Activities: Find the order/sequence of the activities. Some activities may be dependent on the completion of another activity. Some modules may be dependent on the completion of another module. Sometimes, it may be the case; some activities/modules are not strictly dependent on another activity but may be preferable to start after another activity/module [Best Practice]. Note: module refers to a complete unit/component where each module may have many activities. In this step, you need to find the sequence and then create a project network diagram.

Input: Mostly from the first step.
Project scope statement,
Activity list,
Activity Attributes
Milestone List
Approved change requests

Tools:

Precedence Diagram Method (PDM): Activities are represented by the nodes where arrows represent the dependencies that exist between the activities.
Arrow Diagramming Method (ADM): Activities are represented using arrows where nodes represent the connection points. We can create dummy activities with dotted arrows [not possible in pdm].
Graphical Evaluative Review Technique (GERT): Like the PDM diagrams. Additionally, you can show dependencies among activities. Also, you can represent repeated processes.
Network Templates: Sub networks of another project in the organization may be useful.
Dependency Determination: like mandatory dependencies [you can not break the dependency], discretionary dependencies [best practices, the dependency is not strict], and external dependencies [out of the scope of the project].
Apply leads and lags:

Output: Project schedule network diagram.

3rd: Then you need to identify the resource requirements of each activity.

4th: Estimate duration for each activity. It may be experience based, practical examples based, another completed project based, mathematical analysis based.

5th: Develop the schedule; Project sequencing and time estimating will directly affect this. Several projects may require the same resource. Hence, the schedule should check when the resource is available and schedule accordingly.

6th: Monitor how the schedule is performing.

From: http://sitestree.com/?p=4770
Categories:PMP – Project Management
Tags:
Post Data:2011-03-28 13:30:45

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Project Human Resource Management #PMP – Project Management

Some topics on Project Human Resource Management that Project Managers Should Understand understand.

Maslow’s Hierarchy of Needs:Basic theory of motivation. Five levels of motivation:

Lower needs
1. Physiological – food, clothing, shelter
2. Security – freedom from fear, job protection, safety
3. Acceptance – being a part of the team

Higher Needs
4. Esteem – feeling of importance
5.Self actualization – Live and work with full potential

McGregor’s Theory X and Theory YApplies to management approach
X: People are selfish, unmotivated, dislike work, must be forced to work, constant supervision required

Y: People are naturally motivated to work, team members need very little external supervision required.

Assembly line organizations may benefit from X type of managers.

Contingency Theory:
Managers may be task oriented or relationship oriented. In stressful situations task-oriented managers become more successful. While in calm situations relationship-oriented managers perform better.

Herzberg’s Motivation-Hygiene TheorySome factors are not directly motivating but their absence will make some people unsatisfied.

Hygiene Factors:
Supervision
Work Condition
Relationship with co-workers
Paycheck
Company Policy

Motivational Factors:
Achievement
Recognition
Work
Responsibility
Growth

Expectancy Theory:Anticipation of a reward or good outcome is a motivation. But the motivation only works if the target is achievable/practical. If a person is told if he can sale 100,000 in 4 weeks, he will get 10000$ as bonus. The person will feel motivated only if he can think it is possible but if he feels it is impossible, no motivation will be there.

Achievement Theory:People need achievement, power, and affiliation.

achievement: Desire to accomplish something
Power: Desire to influence the behavior of others
Affiliation: Desire to belong to a group

Forms of Power
The project manager may enjoy the following forms of power

Reward: reward a team member
Expert: When the manager is an expert, people will listen to him[best form of power]
Legitimate: Power due to the position.
Referent: Example: A manager very close to the CEO may feel/enjoy higher power than he really has.
Punishment: worst type
Best Form: Reward and Expert

Conflict Resolution:
Methods of Conflict Resolution
Problem-solving: Solve the problem (root cause of the problem)
Compromise
Forcing: never good in the long run
Smoothing:not recommended. Does not solve the issue
Withdrawl: ignore the issue. not a resolution

Constructive Team Roles
Initiators
Information seekers
Information givers: not confidential information
Encouragers:
Clarifiers:
Harmonizers:
Summarizers:
Gate Keepers:

From: http://sitestree.com/?p=4769
Categories:PMP – Project Management
Tags:
Post Data:2007-12-11 09:18:59

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Project Schedule Development: Part of Project Time Management #PMP – Project Management

Project Schedule Development

In this phase, project duration, project finish date, schedules of the activities are determined.

Input:

Activity List
Activity Attributes
Project Schedule Network Diagrams
Activity Duration
Activity Resource Requirements
Resource Calendars

Tools:

Critical Path Model (CPM)

CPM is extensively used to determine the project duration. CPM method also helps to identify how much individual activities can slip without affecting the total duration of the project.

Crashing and Fast tracking

Crashing tries to add more resources into the project to ensure that the project will be finished on time or early. [Note: Fred’s theory: Adding resources to an already delayed project will/may increase the delay]

Fast tracking tries to run multiple activities in parallel to ensure that the project will be finished on time or early.

Resource Leveling:

Apply the resource availability [and quantity] to the project duration. It may increase the project duration when sufficient resource [in quantity or at the right time] is not available.

Critical Chain Method:

It is almost similar to the Critical Path Method. Critical path method uses a concept called float. CPM first calculates the total duration and then calculates float [how much it can slip] for each activity. CPM ensures that no activity exceeds its float. In Critical Chain Method latest possible start and latest possible finish dates are determined for each activity. Afterwards, buffers are added between activities. The goal is never try to exceed the buffer.

Company Calendar

Company Calendars may be used to check the company holidays, or events that may affect the project duration/schedule.

Adjusting leads and lags.

Using CPM Model [steps]

1. CPM uses the arrow diagram method [activities and duration on arrows, nodes as connectors] to represent project activities and duration.
2. After building the diagram find the critical path [the path that takes the longest time from start to finish considering all alternatives].
3. Calculate float: how much an activity can slip without affecting the critical path.
4. Calculate Early start: The earliest date an activity can start considering the dependencies.
5. Calculate Early finish: Early start date + duration – 1
6. Calculate Late Start: What is the last date an activity can start considering the dependencies
7. Calculate Late Finish: Late start date + duration – 1
8. Calculate Free Float: Amount of time an activity can be delayed without affecting the dependent activities’ early start date
9. Calculate Negative Float: Occurs when an activity’s start date occurs before a preceding activity’s finish date

When you have calculated all the values, the values will help greatly in the schedule control.

From: http://sitestree.com/?p=4767
Categories:PMP – Project Management
Tags:
Post Data:2008-05-12 07:43:30

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Professional Responsibilities for Project Managers: A Quick Review #PMP – Project Management

Professional Responsibilities for Project Managers
Simply: Handle any issue directly, ethically, and legally. Be open and upfront. Solve issues quickly, openly,fairly.Be direct to solve an issue rather than ignoring it.

Professional Responsibility deals with:
1. Responsibilities to the profession
2. Responsibilities to the customers and the public

Responsibilities to the profession:
1. Compliance with all organizational rules
2. Advancement of the profession

Responsibilities to the customers and the public:
1. Responsibility to provide accurate and truthful information/representation to the public
2. Maintain and satisfy the responsibilities of professional services
3. Maintain and respect the confidentiality and sensitivity of information
4. Conflict of interest should not affect customers badly
5. Do not take bribes

Professional Responsibility can be categorized in five areas such as:
Integrity and professionalism
Contribute to knowledgebase
Improve individual competence
Balance stakeholders interest
Interact with Team and stakeholders

Integrity and professionalism
shortly:Always do the right thing.
Laws:Comply with all rules. Comply with the rules of the city/state/country where the project is taking place. If the project deals with any other country – it may be needed to comply with the rules of that country[before that knowing the legal rules of the other country is important].
Policies:Comply with organizational policies
Integrity:Stick with high moral principles
Professionalism:
–Processes: Maintain and execute the processes required for the project. PMI suggests 44 processes. Following these processes reduces risk and improves time, cost,efficiency. Carry out the processes required accordingly even the customers want a shortcut way.
–Respect:
show respect to othersPMI strongly advocates multiculturalism and encourages to be respectful to other culturesMaintaining confidentiality of client information is also important.

Contribute to knowledgebase
–Share the experince with PMI and with other professionals in the field
–PMI encourages to teach, publish, write, disseminate the PMI aspect of Project Management

Improve individual competence
–PMI encourages all professionals(PMPs) in this field to improve them and to gain more knowledge continuously.
–Know your professional weaknesses and try to improve them

Balance Stakeholder Interests
Interests of stakeholders may collide.
Be fair, open, direct, ethical in solving the conflicts
-Resolve the conflict in favor of the customer interest[benefit]

Interact with Team and stakeholders
–Communication should be open
–Cultural differences should be respected
–Laziness and negligence should not be tolerated

Social-Economic-Environmental-Sustainability
-If a project makes the society suffer, creates an environmental problem, the project manager should disclose theinformation and should try to avoid such situations. If needed the project manager should resign the project.

From: http://sitestree.com/?p=4766
Categories:PMP – Project Management
Tags:
Post Data:2010-12-11 06:19:48

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Some Topics on Project Communication Management #PMP – Project Management

Some Topics on Project Communication Management


For bigger projects communication also needs to be preplanned and executed effectively. Though based on circumstances the plan may be reviewed and changed.

Overview

  • Project communication can be very tricky and political
  • Deals with Compiling, Sending, Storing, distributing and managing project record
  • Handles four areas:What to communicate, to whom, how often, when

Mushroom Project Management

Managing projects by keeping everybody in the dark and checking progress periodically rather than distributing accurate project information timely and to the right audience.

Communication Management Sub Topics

Planning (Communications Planning)
Executing (Information Distribution)
Monitoring and Controlling (Performance reporting and manage stakeholders)

Definign these lines of communication and informing the plan to the stakeholders (and executing accordingly) may reduce conflict and encourage team spirit.

Role of Project Manager

Mostly communication. Communication more than decision making. 90% time in communication where 50% with the project team.

Communication Management Sub Topics

Planning (Communications Planning)

-output: Communication management plan
-How often
-Media/format-email, web, meeting
-what information
-to whom

Several things contribute in Communications Planning such as Enterprise Environmental Factors, Organizational Process Assets, Project Management Plan, Project Scope Statement.

Tools:

Communication Channels: Determine the path of communications. N people can communicate in n(n-1)/2 ways. A subset may be selected. Sometimes, determination of official channel of communication is important. Technology like netmeeting, video-conferencing may also be used in communicating.

Communication management plan:

-who should be informed
-what
-who will send
-Method of sending
-Update how often
-Define terms

Executing (Information Distribution)

Communications Model

–Active Listening
–Effective Listening
–Feedback
–Non Verbal
–Paralingual

Methods Of communication

Informal Written
Formal Written
Informal Verbal
Formal Verbal

Monitoring and Controlling (Performance reporting and manage stakeholders)

….

Note: Here project management is described according to the PMI and PMBOK(Project Management Body of Knowledge)

From: http://sitestree.com/?p=4765
Categories:PMP – Project Management
Tags:
Post Data:2010-07-15 22:53:01

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Initiate a Project #PMP – Project Management

Initiating Projects

How a project starts?

Projects are done for one of the following three reasons
Business Requirements: Example: The government requires airline companies to implement safety-management systems. A company needs to find out the success of their ecommerce web-site.

Opportunities:To take advantage of an opportunity like technology breakthrough. Example: many projects may be planned targeting iPhone.

Problem: To reduce/eliminate a problem. Airport x faces 2/3 accidents every year, the airport authority may wish to perform a project to identify causes and develop solutions.

How a project is selected?
Project Selection:
A particular project may have different alternative solutions. A company may have multiple project plans and they need to select one of them.
But How?

1. Scoring Model: Identify some matrix to find which project strategy is better or which project will be more profitable. Assign values for these parameters and select which one provides greater value.

2. Benefit contribution: Use cost benefit analysis, short term and long term cost benefit analysis.

3. Economic models:

Benefit Cost Ratio
Cash Flow
Internal Return Rate
Present Value and Net Present Value
Opportunity Cost
Discounted Cash Flow
Return on Investment

Will a project succeed?

There are many mathematical models to justify/predict the success of a project.

Do we need to consider project stakeholders?

Yes. Because the project may benefit some people and may cause dis-advantages to some people. Project managers need to manage and convince both of the groups.

How a project is formalized?

A project charter is developed to present the business needs and the outcome. It is just a document that is reviewed before (or for)project authorization.

Input to Developing the project Charter

Contract
Statement of Work
Enterprise environmental factors
Organizational process assets

Tools for Developing the project Charter

Project Selection Methods
Project Management Methodology
Project management information systems
Expert Judgement

Output of Developing the project Charter

Project Justification
Project description
Project requirements
Assumptions
High level schedule and milestones
Budget
Proposed project manager

Preliminary Project Scope Statement

After a project charter is authorized. A Preliminary Project Scope Statement may need to be developed. It may be discussed with the project stakeholders to facilitate project success.

Input to Developing Project Scope Statement

Similar to the inputs to Developing the project Charter
Tools and Techniques

Project Management Methodology
Project Management Information System

Preliminary Project Scope Statement lists:

Objectives
The product
Requirements of the product
Project boundaries
Initial work breakdown structure
Schedule
Team
Risks
Cost estimate From: http://sitestree.com/?p=4764
Categories:PMP – Project Management
Tags:
Post Data:2011-06-24 22:48:04

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Review: Overview of Project Management #PMP – Project Management

Overview of Project Management [Source Internet]


What is a project?
A project is an activity that using plans and processes creates a product, a service, or a result. A product is a physical product like a TV, a service is like the Internet, a website; result [analytical model, proof of something] is the knowledge based outcome of a research project. Project is a continuous process that takes an idea/concept, targets an outcome, plans how to get the outcome, uses several processes/activities to gain the outcome. Applies monitoring and controlling to get the desired outcome timely.

Difference between projects and operations?


Operation is not a project, operations are done to keep something/an organization going. For a University, taking classes, conducting researches are operations. For a food shop, selling foods is an operation. But the process to create a University or a food shop is a project. Software development process is mostly project oriented.

Project Phases


A project has some definite phases such as:
Initiating
Planning
executing
Monitoring
closing

Initiate: Start a project
Plan: Plan how to achieve the goal. Plan regarding execution and monitoring.
Execute: Execute the plans to achieve the goal.
Monitor: Monitor the progress of the project. Modify plans and also modify execution.
Close: Close with project when goal is achieved

Project Knowledge Area


Each project needs to use some knowledge and skills to attain it’s goals. Projects use processes to get the result. Each process may address one aspect of the project. Each process requires raw input, tool and techniques and produces some output. Each of the processes may require knowledge in one area. Common project knowledge areas are:

1. Project scope management
2. Project time management
3. Project cost management
4. Project human resource management
5. Project procurement management
6. Project risk management
7. Project quality management
8. Project integration management
9. Project communication management

How Projects are affected by the style of the organization


1. Functional Organization:


Each functional department is a separate entity. Projects are done usually within a functional unit independent of other units. If the help of other units is required, it is done through the hierarchy of the functional managers. Usually an unit has a manager. Based on the size, each unit may have multiple managers with hierarchy.Such organization may not carry out many projects, project managers may not be so important, project managers may be just part-time with little/no authority.

2. Projected Organization:


Organized around projects. They mostly do projects. Most resources are invested for projects. Here, project managers have the supreme authority and usually are full time.

3. Matrix Organization:


Just a mix of the functional and projected organizations. The matrix may be strong in projected area and weak in functional area or vice versa.

Terms you need to know in Project Management


Project
Organization
Project stakeholder
Process
Knowledge Area
Performing organization
Project management
Program
Program Management
Program Management Office

Project Knowledge Area-Sub Areas


1. Project scope management

Scope Plan
Scope definition
Work breakdown structure
Scope control
Scope verification

2. Project time management

Activity definition
Activity sequencing
Activity resource estimating
Activity duration
Schedule development
Schedule control

3. Project cost management
Cost estimate
Cost budgeting
Cost control

4. Project human resource management

Planning human resources
Acquiring the project team
Developing the project team
Managing the project team

5. Project procurement management

Manage acquiring products

6. Project risk management

Plan the risk management
Identify the risks
Perform risk analysis
Develop a risk resource plan
Monitor and control risks

7. Project quality management

Quality planning
Quality assurance
Quality control

8. Project integration management

Developing the project management plan
Directing and managing project execution
Monitoring and controlling the project work
closing the project

9. Project communication management

Plan communication
Distribute needed information to the stakeholders
Report project performance and status
Communicate to resolve issues among the stakeholders From: http://sitestree.com/?p=4763
Categories:PMP – Project Management
Tags:
Post Data:2012-06-10 13:01:57

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Ajax: Basic Operations Code #Programming Code Examples #Ajax #Ajax


Get a handle to XMLHttpRequest object

 function getAjaxObject(){

    var ajaxObject = false;

    if (window.XMLHttpRequest){

         ajaxObject = new XMLHttpRequest();

    }else if (window.ActiveXObject) {
      try{
        ajaxObject = new ActiveXObject("Msxml2.XMLHTTP");

      }catch(e){
         try{
          ajaxObject = new ActiveXObject("Microsoft.XMLHTTP");

         }catch(e){
           ajaxObject = false;

         }

      }
    }
    return ajaxObject; 

  }



use of onreadystatechange

if (ajaxObject){
//takeAction - reference to a function
   ajaxObject.onreadystatechange = takeAction; 
}



Sample code:

 var ajaxObject = getAjaxObject();

 if (ajaxObject ){
    ajaxObject.onreadystatechange = takeAction; 

    ajaxObject.open("POST","file.jsp", true);

    ajaxObject.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

    ajaxObject.send("id=500&name=keith&age=18");

 }



function takeAction(ajaxObject){
  if (ajaxObject.readyState == 4) {

     //do something with the response
  }
 }


function takeAction(ajaxObject){

  if (ajaxObject.readyState == 4) {

     if (ajaxObject.status == 200 || ajaxObject.status == 304){ //response was sent succesfully 

          //do something with the response
     }
  }
 }



function takeAction(ajaxObject){
  if (ajaxObject.readyState == 4) {

     if (ajaxObject.status == 200 || 
ajaxObject.status == 304){ 
//response was sent succesfully 

          //do something with the response
          alert(ajaxObject.responseText);

     }
  }
 }






function getAjaxObject(){
    var ajaxObject = false;
    if (window.XMLHttpRequest){

         ajaxObject = new XMLHttpRequest();
    }else if (window.ActiveXObject) {

      try{
        ajaxObject = new ActiveXObject("Msxml2.XMLHTTP");

      }catch(e){
         try{
          ajaxObject = new ActiveXObject("Microsoft.XMLHTTP");

         }catch(e){
           ajaxObject = false;
         }

      }
    }
    return ajaxObject; 
  }

  function entryPoint(){

    var ajaxObject = getAjaxObject();

     if (ajaxObject ){
    ajaxObject.onreadystatechange = function(){

      takeAction(ajaxObject); 
    };
    ajaxObject.open("POST","file.jsp", true);

    ajaxObject.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

    ajaxObject.send("id=500&name=keith&age=18");

 }
 }
 function takeAction(ajaxObject){
  if (ajaxObject.readyState == 4) {

     if (ajaxObject.status == 200 || ajaxObject.status == 304){
 //response was sent succesfully 

          //do something with the response
          alert(ajaxObject.responseText);

          var testDiv = document.getElementById("test");

          testDiv.innerText = ajaxObject.responseText; 

     }
  }
 }



Processing Response Data:

var data = ajaxObject.responseXML;

data.getElementsByTagName("name")

data.getElementsByTagName("name")[0]

data.getElementsByTagName("name")[0].firstChild

data.getElementsByTagName("name")[0].firstChild.nodeValue


JSON Example:

{"person":{ "name":"Keith Tang", "school":"uofm" } } 

var data = eval('('+ ajaxObject.responseText +')');
var name = data.person.name;
var school = data.person.school; 



if (ajaxObject.status == 200 || ajaxObject.status == 304){ 
//response was sent succesfully 
          //do something with the response

          alert(ajaxObject.responseText);
          var testDiv = document.getElementById("test");

          testDiv.innerHTML = ajaxObject.responseText; 

     }




Note: Brought from our old site: http://www.salearningschool.com/example_codes/ on Jan 2nd, 2017 From: http://sitestree.com/?p=10178
Categories:Programming Code Examples, Ajax, Ajax
Tags:AjaxAjax
Post Data:2017-01-02 16:04:23

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Use bitset with enum together #Programming Code Examples #C++ #Bitset


 
 

/* The following code example is taken from the book

 * "The C++ Standard Library - A Tutorial and Reference"
 * by Nicolai M. Josuttis, Addison-Wesley, 1999

 *
 * (C) Copyright Nicolai M. Josuttis 1999.
 * Permission to copy, use, modify, sell and distribute this software

 * is granted provided this copyright notice appears in all copies.
 * This software is provided "as is" without express or implied

 * warranty, and with no claim as to its suitability for any purpose.
 */
#include <bitset>

#include <iostream>
using namespace std;

int main()
{
    /* enumeration type for the bits

     * - each bit represents a color
     */
    enum Color red, yellow, green, blue, white, black, //...,

                 numColors };

    // create bitset for all bits/colors
    bitset<numColors> usedColors;

    // set bits for two colors
    usedColors.set(red);
    usedColors.set(blue);


    // print some bitset data
    cout << "bitfield of used colors:   " << usedColors
         << endl;
    cout << "number   of used colors:   " << usedColors.count()

         << endl;
    cout << "bitfield of unused colors: " << ~usedColors
         << endl;

    // if any color is used

    if (usedColors.any()) {
        // loop over all colors
        for (int c = 0; c < numColors; ++c) {

            // if the actual color is used
            if (usedColors[(Color)c]) {

                //...
            }
        }
    }
}

/* 
bitfield of used colors:   001001

number   of used colors:   2
bitfield of unused colors: 110110

 */        
  

Note: Brought from our old site: http://www.salearningschool.com/example_codes/ on Jan 2nd, 2017 From: http://sitestree.com/?p=10185
Categories:Programming Code Examples, C++, Bitset
Tags:C++Bitset
Post Data:2017-01-02 16:04:23

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada