PS Exam

  • Full Screen
  • Wide Screen
  • Narrow Screen
  • Increase font size
  • Default font size
  • Decrease font size

Class Notes and Others

Ajax - What is Ajax [Class Notes]

E-mail Print PDF


What Is Ajax?

  • Ajax stands for Asynchronous JavaScript And XML
  • Ajax is not itself a technology
  • Ajax is a way of mixing well-known programming techniques in an uncommon way to develop web applications with appealing user interfaces
  • Ajax works as an extra layer between the user’s browser and the web server to fill up the lapses of traditional web application development

 Why Ajax?

  • Ajax Solves the problem of filing up a form, click a submit button or hyperlink and wait for the page to reload to show the result
  • Ajax Avoids reloading of elements that are identical to those of the previous page

 Why Ajax is Asynchronous?

  • In Ajax, server requests are not necessarily synchronized with user actions. Ajax application may already have requested the server, and received, the data required by the user—perhaps before the user even knew she wanted it. This is the meaning of the asynchronous part of the Ajax acronym
  • The parts of an Ajax application that happen “under the hood” of the user’s browser are written in JavaScript
  • Ajax uses XML for coding and transferring formatted information between server and client.

 Traditional Interaction Vs Ajax Client Server Interactions

The following hindrances in traditional interaction clarifies its differences with Ajax client server interactions
  • Data will not be sent to the server until the form is finally submitted
  • You may complete the data entry fields of a form editing and re-editing your entries as much as you want
  • After a form is submitted, you must wait while the browser screen refreshes to display the new or revised page that has been delivered by the server
  • Don’t click the Submit button a second time
  • Don’t click the Back button after submitting a form
  • Unnecessary download of data wastes bandwidth and further exacerbates the delay in loading each new page
Ajax builds an extra layer of processing between the web page and the server. This layer, often referred to as an Ajax Engine or Ajax Framework, intercepts requests from the user and in the background handles server communications quietly, unobtrusively, and asynchronously. By this we mean that server requests and responses no longer need to coincide with particular user actions but may happen at any time convenient to the user and to the correct operation of the application. The browser does not freeze and await the completion by the server of the last request but instead lets the user carry on scrolling, clicking, and typing in the current page.

The updating of page elements to reflect the revised information received from the server is also looked after by Ajax, happening dynamically while the page continues to be used.


I want the name of my office automatically scrolled on the screen whenever I am busy with something else. How to set it?

E-mail Print PDF

I want the name of my office automatically scrolled on the screen whenever I am busy with something else. How to set it?

Microsoft Windows provide screen saver - a small program that runs to show something engaging the screen so that the viewer won’t see the work being done when user is busy with something else. You can specify the time duration when screen saver should start. You can set it to ask for password to resume from screen saver.
There are some screen saver provided when you install Microsoft Windows and lot more are available to download from Internet – some free and some paying. 3D flower box, 3D Flying Objects, 3D pipes, 3D text, Beziers, Marquee, My Picture Slide Show, Mystify, Starfield, Windows XP are the default screen savers that come when you install Microsoft Windows.
You can apply 3D Text or Marquee to scroll the name of your office on the screen. Marquee will linearly scroll the text and 3D Text will display it in 3D format. To apply 3D Text or Marquee, precede the steps below:

Data Structure and Algorithm - Analysis,Design And Algorithm

E-mail Print PDF
A common man’s belief is that a computer can do anything and everything that he imagines. It is very difficult to make people realize that it is not really the computer but the man behind computer who does everything.

In the modern internet world man feels that just by entering what he wants to search into the computers he can get information as desired by him. He believes that, this is done by computer. A common man seldom understands that a man made procedure called search has done the entire job and the only support provided by the computer is the executional speed and organized storage of information.

In the above instance, a designer of the information system should know what one frequently searches for. He should make a structured organization of all those details to store in memory of the computer. Based on the requirement, the right information is brought out. This is accomplished through a set of instructions created by the designer of the information system to search the right information matching the requirement of the user. This set of instructions is termed as program. It should be evident by now that it is not the computer, which generates automatically the program but it is the designer of the information system who has created this.

arrow to indicate Thus, the program is the one, which through the medium of the computer executes to perform all the activities as desired by a user. This implies that programming a computer is more important than the computer itself while solving a problem using a computer and this part of programming has got to be done by the man behind the computer. Even at this stage, one should not quickly jump to a conclusion that coding is programming. Coding is perhaps the last stage in the process of programming. Programming involves various activities form the stage of conceiving the problem upto the stage of creating a model to solve the problem. The formal representation of this model as a sequence of instructions is called an algorithm and coded algorithm in a specific computer language is called a program.

arrow to indicate One can now experience that the focus is shifted from computer to computer programming and then to creating an algorithm. This is algorithm design, heart of problem solving.

Characteristics of Algorithm

Let us try to present the scenario of a man brushing his own teeth(natural denture) as an algorithm as follows. Step 1. Take the brush Step 2. Apply the paste Step 3. Start brushing Step 4. Rinse Step 5. Wash Step 6. Stop If one goes through these 6 steps without being aware of the statement of the problem, he could possibly feel that this is the algorithm for cleaning a toilet. This is because of several ambiguities while comprehending every step. The step 1 may imply tooth brush, paint brush, toilet brush etc. Such an ambiguity doesn’t an instruction an algorithmic step. Thus every step should be made unambiguous. An unambiguous step is called definite instruction. Even if the step 2 is rewritten as apply the tooth paste, to eliminate ambiguities yet the conflicts such as, where to apply the tooth paste and where is the source of the tooth paste, need to be resolved. Hence, the act of applying the toothpaste is not mentioned. Although unambiguous, such unrealizable steps can’t be included as algorithmic instruction as they are not effective. The definiteness and effectiveness of an instruction implies the successful termination of that instruction. However the above two may not be sufficient to guarantee the termination of the algorithm. Therefore, while designing an algorithm care should be taken to provide a proper termination for algorithm. Thus, every algorithm should have the following five characteristic feature

      • Input
      • Output
      • Definiteness
      • Effectiveness
      • Termination
Therefore, an algorithm can be defined as a sequence of definite and effective instructions, which terminates with the production of correct output from the given input. In other words, viewed little more formally, an algorithm is a step by step formalization of a mapping function to map input set onto an output set. The problem of writing down the correct algorithm for the above problem of brushing the teeth is left to the reader. For the purpose of clarity in understanding, let us consider the following examples. Example 1: Problem : finding the largest value among n>=1 numbers. Input : the value of n and n numbers Output : the largest value Steps :
      • Let the value of the first be the largest value denoted by BIG
      • Let R denote the number of remaining numbers. R=n-1
      • If R != 0 then it is implied that the list is still not exhausted. Therefore look the next number called NEW.
      • Now R becomes R-1
      • If NEW is greater than BIG then replace BIG by the value of NEW
      • Repeat steps 3 to 5 until R becomes zero.
      • Print BIG
      • Stop
End of algorithm Example 2: quadratic equation Example 3: listing all prime numbers between two limits n1 and n2.   1.2.1 Algorithmic Notations In this section we present the pseudocode that we use through out the book to describe algorithms. The pseudo code used resembles PASCAL and C language control structures. Hence, it is expected that the reader be aware of PASCAL/C. Even otherwise atleast now it is required that the reader should know preferably C to practically test the algorithm in this course work. However, for the sake of completion we present the commonly employed control constructs present in the algorithms.
    • A conditional statement has the following form
    If < condition> then Block 1 Else Block 2 If end. This pseudocode executes block1 if the condition is true otherwise block2 is executed.
    • The two types of loop structures are counter based and conditional based and they are as follows
      • For variable = value1 to value2 do
Block For end Here the block is executed for all the values of the variable from value 1 to value 2.
      • There are two types of conditional looping, while type and repeat type.
While (condition) do Block While end. Here block gets executed as long as the condition is true.
      • Repeat
Block Until<condition> Here block is executed as long as condition is false. It may be observed that the block is executed atleast once in repeat type. Exercise 1; Devise the algorithm for the following and verify whether they satisfy all the features.
    • An algorithm that inputs three numbers and outputs them in ascending order.
    • To test whether the three numbers represent the sides of a right angle triangle.
    • To test whether a given point p(x,y) lies on x-axis or y-axis or in I/II/III/IV quadrant.
    • To compute the area of a circle of a given circumference
    • To locate a specific word in a dictionary.


    Continue on original source

Microsoft Windows - I don’t know what runs on my computer whenever I go outside for sometime. My screen is restored only when I move the mouse. What comes and covers my screen? How to get rid of it?

E-mail Print PDF
This is screen saver that runs automatically when you leave your computer for some specified time duration. Screen savers are small programs that display some nice entertaining to cover your works when you leave your computer idle. You can move mouse or press any key to end the screen saver and resume your work.
Microsoft Windows provides option to enable or disable the screen saver for your computer and even the time duration after what the screen saver should start.

Follow the procedure below to disable screen saver:

1. Open Display Properties dialog box. (Control Panel >> Display)

2. Go to Screen Saver tab

3. Open Screen saver drop down list and choose None from there

4. Click Apply.

How to Disable Screen Saver

Back to the other windows tasks and tips

Microsoft Windows - Throw all wallpapers and patterns. Just apply a plain soothing color for my desktop

E-mail Print PDF
If you feel wallpaper images are disturbing and wish just to apply some nice color on your desktop background follow the procedure below:

1. Open Display Properties dialog box.

2. Go to Desktop tab and Choose (None) from the Background category list.

3. Go to Appearance Tab and Click Advanced

4. Choose Desktop from the Item drop down list on ‘Advanced Appearance’ dialog box

5. Open the Color 1 list box and choose your favorite color from there. If you wish some other color than displayed there, you can click on other and choose any of your favorite color.

Page 2 of 9



Wish to get contents in your Email?

Enter your email address:

Who's Online

We have 188 guests online

Sharing Enriches!

You are here: Class Notes