ELEMENTS OF QBASIC

Selasa, 11 Mei 2010


INTRODUCTION

Every programming language consists of some basic elements which are required to make a program. The element required to construct a QBASIC program consists of a set of characters, keywords, constants, variables, operators and expressions.

1. CHARACTER SET
A set of characters that are allowed to use in QBASIC is known as the QBASIC Character Set. The QBASIC Character Set consists of alphabets (both small and capital), numbers (0 to 9) and special characters. These special characters have their own meaning and function. The table below shows the special characters used in QBASIC.


QBASIC keywords and variables are formed by using the characters defined in the QBASIC Character Set.

2. KEYWORD
Keywords are those words which have special meanings in QBASIC. Keywords are formed by using characters of QBASIC Characters Set. Keywords are statements, commands, functions (built in functions) and names of operators. The keywords are also called Reserved Words. Some reserved words are CLS, REM, INPUT, LET, PRINT, FOR, DO, SELECT, MID$, ASC, SQR, LEN, LEFT$, TIME$ and INT.

3. CONSTANTS
Constants are the data or the values in a program that cannot be changed during the program execution. The data may be a letter, words, numbers, or special characters. A constant can be stored in a variable when it is required to use in more than one statement or expression. In QBASIC, these data/constants are grouped into two main categories. They are:
a. Sting Constant
b. Numeric Constant

a. String Constant:
Sting Constant is a letter, words, numbers, combination of letters with numbers or special characters enclosed in double quotes. Mathematical operations cannot be performed on String Constants.
“B”, “APPLE”, “SYMBOL NO:10205”, “!!! Welcome to QBASIC World !!!”, etc. are some examples of Sting Constants.

b. Numeric Constant:
Numeric Constant refers to a number. A number with or without decimal point is a numeric constant. Thousand separators are not allowed to use in numeric constant. Numeric data should not be enclosed in double quotes. Mathematical operations and logical operations can be performed on the numeric constants. 101, 105.50, 720, 45603, etc. are some examples of numeric constants.

Numeric Constants may be integer, long integer, single precision or double precision.
  1. Integer: Integer is whole number between -32768 to 32767.
  2. Long Integer: Long Integer is a large range of whole number.
  3. Single Precision: Single Precision is seven digit or less than seven digit positive or negative number that contains decimal point. Single Precision can be in the exponential form using E or with a trailing exclamation point. (!). 564, 78.65, 1.2 E-06 and 12345.678! are some examples of Single Precision Constants.
  4. Double Precision: Double Precision is 17 digit or less than 17 digit positive or negative numbers that contains decimal point. Double Precision can be in the exponential form using D or with trailing hash sing (#). 9999.99D-12, 2345.786# and 3456.78 are some examples of Double Precision Constants.

4. VARIABLE
A program is written to perform certain tasks. A program needs data to produce information. A program can use data only when data are stored in the computer memory (RAM). In a computer memory, there may be many data. So, you need to tell the computer to use only those data which you want to use in a program. This is possible if you assign a name to the place where you have stored a data. In QBASIC, you can perform this task by using a variable. A variable is a place in the computer memory which has a name and stores data temporarily. Simply, you can say, a variable is an entity that stores data needed to be used in a program. Each program defines different number of variables. A value of a variable can be change during the execution of the program.

There are mainly two types of variables. They are:
i. String Variable
ii. Numeric Variable

A string variable stores sting data. Its types declaration sign is dollar ($). A numeric variable stores numeric data. A numeric variable can be Integer, Long Integer, Single Precision or Double Precision variables.
  • An Integer variable can store only an integer number. Its type declaration sign is percentage (%).
  • A Long integer variable can store a large range of whole number. Its type declaration sign is ampersand (&0).
  • A Single Precision variable can store a whole number as well as number with decimal. Its type declaration sign is exclamation sign (!). You can also use it without declaration sign. It is the default numeric variable.
  • A Double Precision variable also stores a whole number as well as number with decimal point. Its type declaration sign is hash (#).

Rules for naming a variable
a. Variable names can have maximum of 40 characters.
b. Variable names can have alphabets, numbers and decimal point.
c. A Variable name must begin with a letter.
d. A Variable name cannot begin with fn or FN alphabets. For example, fnames$, fnumetc.
e. Variable names cannot be reserved words.
f. Variable names may be ended with type declaration characters like $, %, &, !, and #.

Naam$, Address$, Bookname$, GameName$, etc., are examples of Sting Varibales.
Salary!, Age%, Mark, Number1, Number2, FirstNum, RollNumber, etc., are examples of Numeric Variables.

5. OPERATOR
Operators are symbols that indicate the type of operation QBASIC has to perform on the data or on the values of variables.

There are four types of operators in QBASIC. They are Arithmetic Operators, Relational Operators, Logical Operators and Sting Operator.

a. Arithmetic Operators
Arithmetic Operators are used to perform mathematical calculations like addition, subtraction, division, multiplication and exponential. The following table shows arithmetic operators used in QBASIC.

Operation ------------ Operator ---------------- Example ------------------ Result
i. Addition ----------------- + ----------------------- 5+8 -------------------------- 13
ii. Subtraction ----------- - ---------------------- 8-6 --------------------------- 2
iii. Multiplication -------- * ---------------------- 5*4 --------------------------- 20
iv. Division ---------------- / ------------------------ 8/2 -------------------------- 4
v. Integer Division -------- \ ----------------------- 9\2 --------------------------- 4
vi. Exponential ----------- ^ ----------------------- 4^3 ------------------------- 64
vii. Modular Division --- Mod --------------------- 7 mod 3 ------------------------ 1


b. Relational Operators
Relational Operators are use to perform comparisons on two values of same type. A comparison of sting data with numeric data cannot be done. The comparison of sting data is done on the basis of ASCII value. The result of comparison is either true (non zero) or false (zero).
The following table shows the relational operators used in QBASIC.
Operator ------------- Relation ------------------------------- Example
i. = --------------------- Equal to -------------------------------- A = B, A$ = B$
ii. > -------------------- Greater than --------------------------- A > B, “CAT”>”RAT”
iii. < ------------------- Less than ------------------------------- A < B, "cat" < "cat"
iv. > = ---------------- Greater than or equal to ---------------- A > = B, X$ > = Y$

v. < = ----------------- Less than or equal to ------------------- A < = B, X$ < = Y$
vi. < > ---------------- Not equal ------------------------------ A$ < > B$, X <> Y.


c. Logical Operators

Logical Operators combine two or more relational expressions to evaluate a single value as True (Non Zero) or False (Zero). The result of evaluation is used to make decisions about the program flow. The commonly used logical operators in QBASIC are AND, OR and NOT.

i. AND Operator:
AND operator returns ‘True’ when all the results returned from individual relational expressions are ‘True’ otherwise it returns ‘False’.
The AND Truth Table is given shown below.
Condition1 (P) ------------- Condition2 (Q) -------------- Result (P AND Q)
F ------------------------------- T ----------------------------------- F
T ------------------------------- F ----------------------------------- F
F ------------------------------- F ----------------------------------- F
T ------------------------------- T ----------------------------------- T

Note: A ‘T’ indicates a true value and a ‘F’ indicates a false value.

ii. OR Operator:
OR Operator return ‘True’ if any one of the relational expressions returns ‘True’. If all the relational expressions returns ‘False’ then only the combined result returned by OR operator will be ‘False’.

The OR Truth table is as given below.
Condition 1 (A) ------------------ Condition2 (Q) --------------- Result (A or B)
F ------------------------------------------- T ---------------------------------- T
T ------------------------------------------- F ---------------------------------- T
T ------------------------------------------- T ---------------------------------- T
F -------------------------------------------- F ---------------------------------- F

iii. NOT Operator:
NOT Operator operates on one operand and returns ‘True’ if the logical operation returns ‘False’. The NOT truth table is as given below.
Condition1 (A) --------------------------- Result (NOT A)
F ----------------------------------------------- T
T ----------------------------------------------- F

d. String Operator
String Operator joins two or more than two sting data. The plus sign (+) is used as the String operator. The act of combining two stings is called concatenation. The following table shows the use of Sting Operator.
String Data (A$) -------------------- Sting data (B$) ----------------- A$ + B$
“Ram” ---------------------------------- “Thapa” ------------------------ Ram Thapa
“50” ------------------------------------- “45” ----------------------------- 5045


6. EXPRESSIONS
An expression is the combination of operators, constants and variables that is evaluated to get a result. The result of the expression is either string data, numeric data or logical value (true or false) and can be stored in a variable. For example, the following are expressions in QBASIC.
(A + B) > C
A > = B + C
u* t + ½*a*t^2

An arithmetic expression may contain more than one operator. While evaluating such expressions, a hierarchy is followed. The hierarchy in arithmetic operations is listed as given below:
a. Exponentiation (^)
b. Negation (-)
c. Multiplication and division
d. Integer division
e. Modular division
f. Addition and Subtraction

The hierarchy in relational operations are =, >, <, <>, < =, and > = respectively. The hierarchy in logical operations are NOT, AND and OR.

NOTE:
  • When parenthesis is used, it changes the order of hierarchy. The operators inside the parenthesis are evaluated first. So, you can say QBASIC expression follows rule of PEDMAS where P, E, D, M, A and S stand for parenthesis, Exponentiation, Division, Multiplication, Addition, and Subtraction respectively.
  • Algebraic expression cannot be used directly in programming. It must be converted into QBASIC expression.

Algebraic Expression --------------------------------- BASIC Expression
A = L × B ------------------------------------------------- A = L * B
P = 2(L + B) ---------------------------------------------- P = 2*(L + B)
I = (P × T × R)/100 --------------------------------------- I = (P * T * R)/100
V = 4/3 pi R^3 ------------------------------------------- V = 4/3 * PI * R^3


QBASIC-PROGRAMMING LANGUAGE


INTRODUCTION

BASIC (Beginner’s All-purpose Symbolic Instruction Code) is one of the popular high level programming language. BASIC was developed by Professor John G. Kemeny and Thomas Kurtz in 1964. BASIC is very simple and easy to learn. BASIC gives clear ideas to the learners about the user of logical expressions, the way of writing instructions and executions of the instructions. There are many different versions of BASIC. QBASIC is one of the versions of BASIC. Some other versions of BASIC are GWBASIC, Quick BASIC, Turbo BASIC, Visual BASIC, etc.

QBASIC is a high level programming language that allows us to write programs. BASIC uses English like words and mathematical symbols to write programs. The programs written in QBASIC need to be converted into machine codes. QBASIC provides working area to write programs and QBASIC has its own Interpreter. QBASIC converts one statement of a program into machine code at a time. After the execution of the previous statement, it converts another statement of the program into machine code and so on. For this reason, QBASIC is also called an Interpreter.

QBASIC Editor checks syntax errors and capitalizes QBASIC reversed words. QBASIC Editor provides all the facilities that are required for programs. In the QBASIC Editor; you can write, edit, run and debug programs.


FEATURE OF QBASIC
Some features of QBASIC are listed below:
a. QBASIC does not use technical terminology (word) to write statements.
b. QBASIC automatically checks syntax.
c. QBASIC capitalizes the reserved words.
d. QBASIC keeps the same variable name used in a program to identical form.
e. QBASIC allows you to break lengthy programs into modules.
f. QBASIC interprets a statement of a program at a time to CPU.


LOADING QBASIC
QBASIC programming language consists of two files: QBASIC.EXE and QBASIC.HLP. Normally these files are found in a folder named ‘QBASIC’ which is in drive C:.

To start QBASIC, follow these steps.
  1. Click the Start button.
  2. Point to All Programs and then Accessories.
  3. Select Command Prompt. It displays Command Prompt Window.
  4. To move to the root directory, at DOS prompt, type CD\ and press Enter key.
  5. At C:\> prompt, type CD QBASIC and press Enter key.
  6. At C:\ QBASIC> prompt, type qbasic and press Enter key. It will display QBASIC Welcome Screen.
  7. Press Esc key to get QBASIC Editor Screen.


QBASIC EDITOR SCREEN
QBASIC editor is the window where you write programs. The editor provides all the facilities to write programs and editing them.

QBASIC Editor Screen has four parts.
a. Menu Bar.
b. Program Window
c. Immediate Window
d. Status Bar

a. Menu Bar
The Menu Bar consists of list of commands like File, View, Search, Run, Debug, Options and Help. These menus again have some sub commands such as FILE= New, Open, Save, Save As, Print, Exit. EDIT= Cut, Copy, Paste, Clear, New Sub, New Function. VIEW= Subs, Spilt, Output Screen. SEARCH= Find, Repeat Last Find, Change. RUN= Start, Restart, Continue. DEBUG= Step, Procedure Step, Trace On, Toggle Breakpoint, Clear All Breakpoints breakpoints, Set Next Statement. OPTIONS= Display, Help Path, Syntax Checking.

b. Program Window
The upper window which is titled as ‘Untitled’ is the window where you write programs. This window is called Program Window. To see the output of the statements written in this window, you need to press Shift + F5 key.

c. Immediate Window
The lower window which is titled as ‘Immediate’ is known as Immediate Window where you test commands, expressions etc. As soon as you press Enter key, it displays the output on the screen.
Note: F6 function key is used to switch from Program Window to Immediate Window and vice versa.

d. Status Bar
The status bar shows short cut keys and the location of the cursor on the screen.


RUNNING A PROGRAM
After entering a set of instructions in the Program Window, you may want to see the output of the program. To see the output of the program you need to run a program. When you run a program QBASIC converts and directs each statement of a program at a time to the CPU. To run (execute) a program
Press Shift + F5 key or press Alt, R, S.
Note:
F5 key is used for continuing the program from the previous stop statement.

SAVING A PROGRAM
You need to save a program for the future use. Sometimes you need to save incomplete program so that you can complete at next time. To save a program, follow these steps:
  1. Press ALT + F key.
  2. Highlight Save As Option.
  3. Press Enter key. It displays Save Dialog Box.
  4. Enter Filename in the Filename text box.
  5. Press Enter key.

Note:
  • When you supply filename just use not more than eight characters for filename.
  • QBASIC automatically adds an extension as .BAS for the program file.

CLEARING PROGRAM WINDOW
To write a new program you need to remove the previous program from the Program Window. To clear or remove the previous program, follow these steps.
a) Press ALT key.
b) Highlight New option and press Enter key. OR. Press F, N keys.


OPENING AN EXISTING PROGRAM
To open an existing program in the Program Window, follow these steps.
a. Press Alt key.
b. Press F key.
c. Highlight Open command and press Enter key.
d. Select a program file the list of files displayed in the Open Dialog box and press Enter key.

EXITING QBASIC
To exit from the QBASIC, follow these steps.
a. Press ALT key. It will activate menu.
b. Press F or Enter key.
c. Press X or select Exit command under File menu and press Enter key.



MICROSOFT ACCESS (DATABASE MANAGEMENT SYSTEM SOFTWARE)

Minggu, 09 Mei 2010


INTRODUCTION

Information plays vital role in today’s changing technology environment. A person can do correct decision if he/she gets correct information. If planning officers, managers, decision level people, etc. get correct information whenever they desired then they can drive country in the correct developing path. Data are the source of information. Data can be collected from different sources. The data can be stored and managed manually or electronically. The data need to be stored in such a way that they can be easily retrieved and updated whenever needed. To manage data efficiently and effectively a database management system is required. MS-Access is one of the popular database management system software.

DATABASE AND DATABASE MANAGEMENT SYSTEM
A database is a collection of data related to a particular subject or purpose. A database organizes data in easily accessible manner. A user can retrieve information from the database in an effective and efficient manner. The telephone directly, flight schedule, library catalogue, census, railway timetable, encyclopedia, dictionaries, etc. are some examples of database. The telephone directory gives information about names, addresses, and telephone numbers of people. A library catalogue has information regarding all the books available in the library i.e. title, author, publisher, edition, or which shelf it is available on.

A system or mechanism that creates, modifies, organizes and retrieves information is called Database Management System (DBMS). Database management system software like MS-ACCESS, ORACLE, DBASE, FOXPRO, SYBASE, etc. are used for the database management. These database management software help to store, organize and retrieve information much more efficiently.
The basic components of a DBMS are table, field and record.

Advantages of Database Management System
Database Management System is not easy to manage data manually in the case of large database. Manual database needs more paper spaces for storage and more people for managing database. Retrieveing, updating, adding, etc. in a large database takes more time. To overcome the shortcoming of a manual database management system one can use a computer for managing databases.

Some of the major advantages of a computerized DBMS are listed below.
• Database Management System allows us to store and handle a large amount of data easily on computers.
  • The required information can be retrieved efficiently in short period of time.
  • Database Management System reduces data redundancy. Database Management System reduces duplication or repetition of the same data in different tables. Database Management System does not allow us to enter same record twice in a table.
  • Updating a database regularly from a single place is possible.
  • Any numbers of different reports can be generated quickly form one database .
  • Database Management System reduces inconsistency. When data in a table is updated, the related data in other tables also updated automatically.
  • Database Management System provides high data security facility. Unauthorized users cannot access to data.
  • Database Management System provides data sharing facility. The database stored at one place (centralized location) is available to different authorized users.

INTRODUCTION TO MS-ACCESS
MS-Access is the Relational Database Management System Software (RDBMS) used to store and manage computer-based databases on desktop computers. MS-Access allows you to store data in multiple tables and these tables can be linked together. MS-Access allows you retrieve information from a table or the linked tables. MS-Access provides a set of components or objects in order to manage database. These all components of MS-Access are stored in a single file called Database file. The database file of MS-Access has .MDB extension.

Objects of MS-Access
Some of the commonly used objects are Table, Query, Form and Report.
a. Table
The tables are the containers for all the data in a database i.e. all the data are stored in the table. In a table, data are arranged in columns and rows. A database can contain one or more tables.
b. Query
By using query, one can retrieve the desired information for a specific purpose. A query can be based on a table or multiple linked tables. Queries can be used as the source of records for forms and reports.

c. Form
A form is a user friendly interface used to enter, view and edit data of a table. A form can be based on a table, multiple linked tables or a query. Form can display a complete record at a time.

d. Report
A report presents information according to the specifications. Report is used to format information ready for printing. Some examples of reports are Mark Sheet, Salary Sheet, Telephone list and Mailing labels.

PRIMARY KEY
Every table should have at least one field that has a unique value for each record. This unique identifier field is known as the primary key field. The primary key ensures that unique data is entered for a field and the field is not left blank (null). With the help of primary key you know the record belongs to whom. Primary key is the filed that does not allow duplicate records in a table.

A primary key may be chosen out of the existing fields in a table, or a new field can be created specifically for this purpose. Symbol number of students, registration number of students, account number and receipt number are some suitable fields for primary key.

NAMING CONVENTION OF FIELD
a. Field name can be up to 64 characters long.
b. Field name can have letters, numbers, spaces or punctuation marks.
c. Field can’t contain a period (.), square bracket ([]), and exclamation mark (!).
d. Field name can’t begin with space i.e. field should begin with a valid character or number.
e. Field name must be unique in a table.

DATA TYPES IN MS-ACCESS
A characteristic of a field that determines what kind of data it can store is known as Field Data Type. Microsoft Access has following ten different field data types.

1. Text
Text field data type stores alphanumeric characters. Text can hold up to 255 characters. The default size of this field is 50. Numbers stored in this field type can not be used for calculations.

2. Memo
Memo type of field holds a large amount of alphanumeric characters. A Memo field is used when you need to store more than 255 characters. Normally, notes or descriptions are stored in this field.

3. Number
Number type of field holds only numbers or numbers with decimals on which calculations have to be performed. Number does not allow any other characters except number. What type of number, it can store, depends on the option selected from the field size list. The options available are:
  • Byte: Byte stores numbers from 0 to 255 without decimals. Bytes occupies one byte.
  • Integer: Integer stores numbers from -32768 to 32767 without decimals. Integer occupies two bytes.
  • Long Integer: Long Integer stores numbers from -2 billion to +2 billion approximately without decimals. Long Integer is the default number field size. Long Integer occupies 4 bytes.
  • Single Precision: Single Precision stores single precision floating point numbers from -3.402823E38 to 3.402823E38. Single Precision occupies 4 bytes.
  • Double precision: Double precision stores double precision floating point number. Double precision occupies 8 bytes.
4. Date/Time
This field type stores data and time. Date/Time occupies 8 bytes.

5. Currency
Currency field allows storing monetary values such as cost. Currency field can be used in arithmetic calculation. Currency occupies 8 bytes.

6. AutoNumber
AutoNumber generates the serial number automatically. A value of a AutoNumber fields can not be updated. By default AutoNumber starts with one and AutoNumber has increment of one. In old version this field is known as Counter.

7. Yes/NO
Yes/NO field is used for data that can be only one of two possible values, such as Yes/NO, True/False, On/Off. Yes/NO data type is also known as Boolean data type.

8. OLE Object
OLE Object field data type allows you to store pictures, charts, audio and video.

9. Hyperlink
Hyperlink field holds hyperlink addresses of web sites, database objects or other files. Hyperlink stores up to 64,000 characters.

10. Lookup Wizard
The Lookup Wizard creates a field that allows you to choose a value from another table or from a list of values by using a list or combo box. When you select this data type, a wizard helps you to create the list. After you complete the wizard, MS-Access sets the data type based on the values selected in the wizard.


HYPERTEXT MARKUP LANGUAGE (HTML)

Kamis, 06 Mei 2010





INTRODUCTION



When people felt necessity of sharing information, files, programs, hardware and communicating among computers through out the world, they develop network of computers all over the world i.e. Internet. As the usage of the Internet increased, people felt necessity of such a medium that could present information like a book. Hence, people felt a need to develop a language that could easily be used to develop documents for the Internet.



In 1990, Tim Burners Lee developed markup language for developing documents for the Internet. This special language is known as Hyper Text Markup Language (HTML). This is simply a markup language that is used to prepare documents for presenting information in the internet. The document of information in the internet is known as HTML document or webpage. So, HTML is a markup language that is used for developing web pages or HTML documents. HTML is not the programming language like QBASIC, C++ and JAVA. HTML uses mark up symbols or tags (codes) that describe format and layout of text, image, movie, clips etc. in the web page.



You can prepare HTML documents using any text editor like Notepad or TextPad. Nowadays, many webpage authoring software like Microsoft FrontPage, Macromedia Dreamwaver, Macromedia Flash, etc are available for preparing web pages.





SOME IMPORTANT TERMS



a. World Wide Web(WWW)

The WWW is the interlinked collection of information (document and multimedia contents) available on the Internet. WWW is also known as Web. The information on the internet are presented by using text, picture, audios, videos, and animations from anywhere in the world.



b. Website

Since there are many different topics of information on the web, they are stored under a name called Website. A Website contains the information about some particular topics or subjects. A Web site may be government office, organization, university, private company or personal to provide information regarding them. These web sites can have many pages of information, just like a book has many pages of information. These pages are interlinked with each others. So, a Web Site is a collection of interlinked web pages of a government office, organization, university, private company or personal to provide information regarding them. Each web site is identified by Internet address or URL (Uniform Resources Locator).

Some popular web sites are www.msn.com, www.nepalnews.com.np, www.yahoo.com, www.prabesh.com, etc.



c. Web page

A Web site may have many web pages and these web pages are the interlinked pages of the web sites. Each pages of information is known as Web pages. A web page is also known as HTML document. Information in a web page is presented by using different media like text, image, audio, video, animations and hyperlinks.



d. Web Server

All web pages of a web site are stored in a web server that hosts the web sites. A web server is a sever computer that hosts the websites. It provides pages of websites to the request user.



e. Home page

Home page is the starting page of a websites that you see when you load a web site on the web browser. Home page is also called Index Page. A home page of a web site gives an overview of what the website contains. A home page of a web site must be attractive and user friendly. The home page should not be heavy, so that it takes less time to load on the browser.



f. Web Browser

You can see the information of a web site in a computer only when the computer is connected to the internet and the computer has a web browser. A web browser is a program that displays web pages of a web site in the user’s computer. But to see web pages which are on your computer you do not need to connect to the internet. Windows Internet Explorer, Netscape Navigator, Opera, FireFox etc are some popular web browsers.





HTML TAGS (CODES)



The tags are commands in HTML. They tell a browser how to display information in a HTML documents. There are a large number of tags in HTML and each tag performs its specific task. The text character which is enclosed in a left angle bracket (<) and a right angle bracket (>) in HTML TAG.



Most of the tags have pairs: - the beginning tag and the ending tag. The basic structure of the tag is as given below:

For example, the tag for making text bold is:

text

This sentences will be bold.

Here, is the beginning tag and is the ending tag.



Note:

- Ending tag should have forward stash (/) before tag name.



Attribute

Attribute provides additional information about a tag such as font color, font size, alignment, etc. A tag can have more than one attribute. Each attribute has a name and a value. The structure of beginning tag is as given below:



For example, the tag for setting heading size biggest i.e. H1 with Attribute ‘Align’ having value ‘Center’ is given as below:



this is first heading text at center.



Note:

- You can put single or double quotes to define the value of an attribute.

- Single quotes are used when the attribute itself contains quotes.

- You can omit quotes if the value is single letter, number or word.





HTML TAGS

TYPES OF HTML TAGS

There are two types of tags.

a. Container Tag (Paired Tag)

b. Empty Tag (Singular Tag)



a. Container Tags

A Container tag has both starting tag (beginning tag) and closing tag (ending tag). The text and other tags are enclosed in between the starting and closing tags. The opening tag (starting tag) activates the effect and the closing tag turns off the effect.


b. Empty Tags

They are also called Stand-alone tag. These tags have no ending tags.





HTML RULE AND GUIDELINES











BASIC TAGS







BASIC TAGS



























OPERATING SYSTEM SOFTWARE

Minggu, 02 Mei 2010


INTRODUCTION
Operating system is special system software that makes computer hardware, other programs and users able to communicate or link with each other. Operating system makes hardware usable in computer and provides environment to software and users for doing their tasks. Operating system is the basic requirement of a computer. Without Operating system in a computer, we cannot operate the computer. Operating system control and manages the overall operation of a computer. Operating system is the first software that is loaded into the computer memory (RAM) when you switch on a PC and works till you shut down the computer. Operating system is responsible for the smooth and efficient operation of the computer system.

Microsoft Disk Operating system (MS-DOS), Microsoft Windows 95, Microsoft Windows 98, Windows XP, Windows Vista, Apple Macintosh, IBM OS/2, UNIX and LINUX are some examples of operating systems.

WORKING IN WINDOWS ENVIRONMENT
Microsoft Windows XP is one of the popular GUI based operating system software. In GUI based operating system, you don’t need to remember commands and key combinations to perform tasks. The small icons and menus themselves indicate what type of task they perform. When you turn on the power switch of CPU, your computer automatically starts Windows XP.

Important terms related with Windows

a. Desktop
Desktop is the first screen of the Windows that you see on the monitor when Windows XP is loaded. You see many small pictures on the desktop. Some of them are displayed on the desktop permanently. You can keep some other useful items on the Desktop so that they are easily accessible to you. Desktop may look a little different according to the way it is set.

b. Icon
The small pictures on the Desktop are known as icons. The Icon represents a program, file, folder or drive. My computer, My Documents, Recycle Bin, My Network Places, etc. are some important icons that you see on the Desktop.

c. Taskbar
Taskbar is the long horizontal bar that appears at the bottom of the Desktop. The position of the Taskbar can be changed. All the opened drive, program and folder buttons appear on the Taskbar. You can use these buttons to switch between the open programs. The start button on the Taskbar is the entry point in windows. The System Tray displays system time and the icons of the service that might be running in the background.

Arranging the Icons
You can arrange the icons on the desktop to give a better look.
  • Right click over the blank area of the desktop. It displays the list of options.
  • Select ‘Arrange Icons By’ option.
  • Click on ‘Auto Arrange’ option.

Moving the icons
In order to move an icon from one place to another first uncheck the ‘Auto Arrange’ option and follow these steps.
  • Move the mouse pointer and place it over the icon
  • Click and drag it to a new location.
  • Release the mouse button.

Setting Date and Time
On the system tray of the task bar, current system time is displayed. When you place mouse pointer on Date/Time Indicator, it displays system data as Monday, January 07, 2008. If the system data and time are not correct then you can change them as follows:
a. Double click on the date/time indicator. It displays date/time properties dialog box.
b. Set ‘GMT + 05:45 Kathmandu’ in Time Zone.
c. Set correct Time and Date.
d. Click on OK button or Apply button.

Display Setting
You can change Desktop Background (Wallpaper), Screen Saver, Appearance and more from the Display Properties Dialog box.

a. Changing Desktop Background
To set Wallpaper of the Desktop according to your choice, follow these steps.
  • Right click anywhere on the Desktop. It displays list of options.
  • Select ‘Properties’ option. It displays ‘Display Properties’ dialog box.
  • Click on ‘Desktop Tab’.
  • Choose one of the available backgrounds from the list of Background.
  • Click on Apply button or OK button.

b. Changing Screen Saver
When a computer is left on for sometime, you will see some moving pictures or graphics that covers the desktop. If you change the position of mouse or press any key on the keyboard, the Desktop again appears on the screen. These moving pictures or graphics are known as Screen Saver.
To change the Screen Saver, follow these steps.
- Click on screen saver tab.
- Select a screen saver that you want to set from the screen saver drop down list box. If you want to set scrolling text, then select ‘Marquee’ from the screen saver drop down list box and click on setting button to enter the text.
- Set other required setting.
- Click on Apply button.
- Click on OK button.

c. Changing Appearance of the Screen
The Appearance allows you to change color, font and size of viewable items like title bar, working area, icons etc. of the Desktop and Windows.
To change the appearance, follow these steps.
- Click on Appearance Tab.
- Select appearance from the list of appearance scheme.
- Click on Apply button.
- Click on OK button.


Opening a program
- Click on the Start button. A menu appears.
- Point to All programs. A submenu appears.
- Click on the program that you want to open.


FILE
A file is a collection of data stored on a storage device with a unique name. when you finish work on any program, the work which you have done can be stored in a disk with a name. The work which is saved with a name in a disk is known as a file. You can save your drawings which you have drawn in Paint as a bitmap file. Similarly, a file prepared in Notepad is saved as text file. So, there are many different types of files in a computer. All the files stored on the computer have specified file icons, which display the name of the file and the type of program used to open it. For example, a file named ‘ Nepal.bmp’ is displayed with a MS-Paint program icon.

FOLDER
When you keep everything in box, it is very difficult to find the desired things. In a same way, when you store all the files at the same place, it becomes difficult to find a particular file. In order to manage files in a computer i.e. in a storage disk, folders are used. A folder may have one or more files and other folders on it. The folders that are inside other folders are called sun-folders. The related files are kept in a particular folder. When you save files in My Document folder. A folder is also known as a Directory. A folder is represented by Folder Icon.


Working with ‘MY COMPUTER’
My Computer displays the contents of a computer. My Computer displays drives, files and folders. My Computer is used to manage files and folders present in a hard disk or any other storage disk. To open My Computer, follow these steps.
a. Click Start Button.
b. Click My Computer.

You can also open My Computer directly by just double clicking My Computer icon on the Desktop. My Computer may have many drives and each drive is represented by a specific letter.


WINDOWS EXPLORER
Windows Explorer allows you to explore the contents of a computer. It divides the window into two vertical sections. The left section displays list of drives and folders and the right section displays folders and files of the selected folder or drive. It is used to manage files and folders on a computer. To load Windows Explorer, follow these steps.
 Click on Start button.
 Point to all programs, Accessories.
 Click on Windows Explorer. It displays Windows Explorer.
 Click on a drive or a folder on the left section window whose contents you want to manage.

Note:
  • The plus sign (+) indicates that a folder has sub folders. When you click on plus signed folder, it displays all the folders within it and plus sign changes into minus (-) sign.
  • The minus sign (-) indicates that a folder has displayed its contents.

Organizing Files and Folders
You can manage file(s) or folder(s) on the disk by moving, copying deleting or creating. The management of file(s) or folder(s) you can do efficiently by using either My Computer or Windows Explorer.

Opening a File or a Folder
You can open a folder or a file to see its contents. To open the folder or the file, just double click on the folder or the file that you want to open.

Creating a File or a Folder
To create a file or a folder, follow these steps.
  • Open My Computer or Windows Explorer.
  • Open the drive and the folder where a new file or folder is to be created.
  • Click File menu or right-click on the empty place and choose New option. A submenu appears.
  • Click Folder to create a folder or Click any of the file types from the list to create a file of that type.
  • Type the suitable name for the new file or the folder.
  • Press Enter key.

Renaming a File or a Folder
You can change a name of a file or a folder. To change the name of file or folder, follow these steps.
- Right-click the file or folder that you want to rename.
- Click Rename option.
- Type a new name for the file or the folder.
- Press Enter key or click on the empty place.

Moving a File or a Folder
You can move a file or a folder from one location to another. To move a file or a folder, follow these steps.
- Select a file or a folder that you want to move.
- Click Edit menu or right-click on the file or the folder and click Cut option.
- Open drive or folder where you want to move the file or the folder.
- Click Edit menu or right-click on empty place and click Paste option.

Note:
  • To select more than one file or folder, press and hold ctrl key and then click on files or folders, click on the first file or folder, one by one.
  • To select consecutive files or folders, click on the first file or folder, press and hold shift key and click on the last file or folder.

Copying File(s) or Folder(s)
You can copy a file or folder at more than one location. To copy a file or a folder, follow these steps.
  • Select the file(s) or the folder(s) you want to copy.
  • Click on Edit menu or right-click on the file or the folder and then click on copy option.
  • Open the folder or drive where you want to paste copy of the file or the folder.
  • Click on Edit menu or right-click on the empty place and then click on paste option.

Deleting a file or a folder
To delete a file or a folder, follow these steps.
 Select the file or the folder that you want to delete.
 Press Delete key. It displays the Confirm Folder/File Delete dialog box.
 Click yes button.


Recycle Bin
Recycle Bin is a reserved space on a hard disk where deleted files or folders are stored temporarily. When you delete files or folders, they will not be deleted permanently. They are stored in Recycle Bin. But when you delete from Recycle Bin, they are permanently deleted from the computer. Files or Folders on the Recycle Bin can be restored. To restore file(s) or folder(s), follow these steps.
  • Open Recycle Bin.
  • Select the file(s) or folder(s) which you want to restore.
  • Click on file menu and select Restore command
Or
  • Right click on empty area, select Restore command.


COMPUTER PROGRAMMING LANGUAGE


Introduction

A language is a medium through which we communicate with each other. While communicating we use such a language that is understood by both. Sometimes we take the help of interpreter to communicate when we both don’t know languages of each other.

Communicating to a computer is not taking like the person to person. It means giving a set of instructions to a computer and the computer follows the instructions given by us. We cannot give instructions to a computer in human language like Nepali, English, etc. To interact with the computers, we need a computer language. An artificial language used for writing instructions or programs is known as computer language. A computer language is known as programming language. A programming language provides a way of giving instructions to the computer. We don’t use programming language in our everyday conversions. We can use a programming language to instruct a computer when we need.

  • The set of commands that are used to give instruction and
  • The manner in which these commands are put together.

Since a computer understands binary digits, we can use binary number to instruct the computer. The instructions written in the binary number system is known as machine language. Machine language is directly understood by the computer. In the early time, Charles Babbage had used machine language to write instructions for his Differential and Analytical engines. However, writing programs in machine language is very difficult. Therefore, many other artificial languages have been developed for instructing computers. Expect machine language, a computer does not directly understand any other computer languages so the instructions written in other computer languages must be translate into machine language. This translating task is carried out by Translator i.e. Language Processor.

Computer program
A program is set of an instruction which tells the computer what to do. A program directs the computer to perform a particular task and produce the desired result. A person who writes a program for computers is known as a programmer. The process of writing set of instructions in a computer language is called programming.

Types of computer languages
The computer languages are divided into two categories. They are
a. Low-level language
b. High-level Language

a. Low-level language
Low-level language is machine dependent language. The program written for one computer in low level language cannot be used in another computer. This makes it difficult to learn and use, as the programmer must have the in-depth knowledge of different computers to write programs in a low level language.

There are two types of low level languages. They are
i. Machine Level Language (MLL)
ii. Assembly Language (AL)

i. Machine Level Language
Machine level language is the first generating language. Machine level language is the only language that a computer understands directly without any translator program. Machine level language was used in the earliest machines and computers. Machine level language is difficult to write programs in a machine level language. Nowadays nobody writes programs in machine Level Language.

Advantages of machine level language
  • No language processor is required.
  • Programs written in machine level language run very fast.

Disadvantages of machine level language
  • Machine level language is machine oriented language i.e. machine dependent. The program written in one computer cannot be run in another computer.
  • To write program using this language, a programmer has to know the details of computer hardware of the computer.
  • A programmer has to remember a lot of codes to write a program which may cause error in the program.
  • A program becomes lengthy and difficulty of debugging.

ii. Assembly Language
This is second generation language. Assembly language was developed by the programmers to overcome the drawbacks of the machine level language. Assembly language uses letter, words and symbols instead of binary digits. These letter, words and symbol are called mnemonics. Assembly language is little bit easier than machine language. Since Assembly language is also machine dependent language the programmers need to know many mnemonics for each computer. The programs written in this language need to convert into machine language.

Advantages of assembly language
  • The programming in assembly language is easier than machine language.
  • Debugging and modifying programs are easier than machine language.

Disadvantage of assembly language
  • Assembly language is also machine dependent.
  • Programmers have to remember a lot of mnemonics codes for different types of machine.

b. High level language
High level language is a simple languages that uses English and mathematical symbols for its program construction. High level language is considered as Third Generation Language. High level languages are machine independent languages. Hence, programmers do not need to worry about the hardware used in the computer on which they are writing programs. The programs written in a high level language in one computer can be run in any other computer. The programs written in HLL need to translate into machine language. This translation is done by either Compiler or an Interpreter.
BASIC, COBOL, FORTRAN, PASCAL, C, C++, JAVA etc., are some examples of HLLs.

Advantages of high level language
  • High level language is machine independent and program oriented language.
  • High level language is easy to learn and use.
  • Writing the program in a HLL in easy.
  • Debugging is easy in HLL.

INTERNET, E-MAIL AND ITS SERVICES WITH ACCESS

Senin, 26 April 2010


INTRODUCTION

When people felt necessity of sharing information, files, programs, hardware and communicating among the stand-along computers within a room or a building they started connecting their computers together which gave rise to LAN. After setting up LANs, they started connecting many LANs together to receive or send information, files, programs and messages from a computer of a LAN to another computer on the another LAN. As they felt the importance of network, they did not stop here; they started connecting computers of groups of LANs in cities, countries and continents. In this way, a large network of computers are formed which is known as Internet. Internet is the network of networks. Internet is the largest network of computers in the world. The Internet, also known as Net, is a technology which connects millions of computers across the world by means of cables, telephones lines or wireless communication media. The millions of server computers on the Internet provide the information on countless tropics, video clips, program files etc. to the client computers. The computers (clients) connected with the internet can do the following tasks:
a) Internet can easily access the information on different topics.
b) Internet can send and receive message using e-mail facility.
c) Internet can purchase goods like books, digital items and many other products on the internet.
d) Internet can send instant messages.
e) Internet will get the latest news of different TV channels.
f) Internet can watch movies and listen to songs.
g) Internet can play games online with different persons/players sitting in different parts of the world.

TYPES OF INTERNET ACCESS
There are two types of Internet Access.
i. Dedicated Internet Access.
ii. Dial-Up Access.

Dedicated Internet Access allows you to remain connected with the internet 24 hours a day. That manes your computer is always ready to use the internet facilities.

Dial-Up Access allows you to connect with the internet whenever you feel necessity of the internet facilities. That means it is not on line like dedicated internet access. You need modem and telephone line for this type on connection.

You will get internet services from an Internet Service Provider (ISP). Nepal Telecommunication (NTC), World Link (Wlink), Mercantile, Namchhe etc, are some ISP of Nepal.

CONNECTING TO THE INTERNET
You can connect to the internet if you have following things.
• Web Browser on the computer.
• Internet Account.
• Modem, telephone line.
• Cable internet line or Radio modem

Connecting to the Internet using Dial-Up Access
In order to use services of the Internet, you need to log on to the Internet first. To log on to the Internet having dialup account, follow these steps:
a. Click on My Network Place. It displays Network Tasks pane.
b. Click on View network connections. It displays list of available network connections
Or
Click on Start button, point to Connect To and select connection name.
c. Double click the connection. It opens Connection dialog box.
d. Supply User name and Password.
e. Click on Dial button. Once dialing is finished, it verifies user name and password. After the verification is done, you will see the internet icon on the task bar.

This means that you are now logged on to the internet.

Disconnecting Internet
Once you finish your work in the internet you need to disconnect from it. To disconnect from the internet, follow these steps.
- Right click on the internet icon on the task bar.
- Click on Disconnect button.


SERVICES OF INTERNET
The Internet provides the following services to the client computers.
1. WWW
2. E-mail
3. Chat
4. Video Conference
5. Downloading
6. E-commerce

1. World Wide Web (WWW)
Web, is one of the services provided by internet. The WWW is the service that provides information on various topics using text, pictures, audios, videos and animations. The different topics of information on the Web are stored under a name called Web Site. A Web Site contains the information about some particular topics or subjects. And a web site can have many pages of information, just like a book has many pages of information. Each page of information is known as Web page. In a web page, information is presented by using text, audio, video, images, animations and hyperlinks. A web page is also known as HTML document.

All web pages of a web site are stored in a web server that hosts the web sites. Each web site is identified by the internet address or URL (Uniform Resource Locator). www.nepalisongs.com, www.cnet.net, www.fusad.com, www.ntc.net.np, www.tuexam.edu.np etc. To display the web pages of a web site on the client computer we need a web browser like Windows Internet Explorer, Netscape Navigator, Opera or Mozilla firebox.

Once you have connected on Internet, you can browse web sites. To open the internet browser on your computer, follow these steps.
a) Double click the browser name on the Desktop.
b) It opens browser screen. Type web site address on the Address bar.
c) Click on Go button or Press Enter key. It opens home page of the web site on the screen.
d) If you want to find out some information then you have to open web sites like www.yahoo.com, www.mns.com or www.google.com. The web sites are called Search Engines.
e) In the search box, type the worlds what you want to search and press Enter key.


2. Electronic Mail (E-mail)
E-mail is a fast, economical and convenient way of sending and receiving mails through the Internet. To send or receive E-mail you need program like Outlook Express, Microsoft Outlook, or Eudora. When you send E-mails, the E-mails will store on the recipient’s mail box. The E-mail address of local E-mail is like given below.
abc@mos.com.np
If you have internet E-mail account in hotmail, yahoo or gmail then you can open and compose an E-mail directly from the related web site. The E-mail address of internet E-mail is like given below.
abc@yahoo.com

Some advantages of E-mails are listed below.
i. High Speed: Message can be sent at a very fast speed.
ii. Low Cost: Sending or receiving electronic message is cheap.
iii. Reliability: Once the message is sent from the source computer, it will definitely be delivered. If there is any error in sending message, you will immediately be informed about the failure of delivery.
iv. Content: Any form of data like text, pictures, audio or video can be sent through E-mail.

a) Creating an E-mail Account
To use the E-mail service of any website, a user must have an E-mail account on the web site. The following web sites provide e-mail services to users.
- www.hotmail.com
- www.yahoo.com
- www.gmail.com
- www.rediffmail.com

To create an E-mail account, follow these procedures.
i. Load a web site that provides E-mail service. For example, type www.yahoo.com in the address bar of a internet browser and press Enter key. You will see the home page of the web site.
ii. Click on Mail icon. It opens a web page that allows a new user to create his/her mail account.
iii. Click on Sign Up button. It opens a page having Registration form.
iv. Fill up all the necessary detail in the given text boxes.
v. Read ‘Terms of service’ and click on the I Agree Button.

The confirmation page appears which displays your E-mail ID. Now you can send or receive E-mails.

b) Opening an E-mail Account
When you open your E-mail account, you can view mails on the Inbox and compose mails. To open your E-mail account, follow these procedures.
i. Open internet browser.
ii. Type the address of the website in which you have the E-mail account. For example, type www.yahoo.com.
iii. Click on Mail icon. A web page appears which allows you to enter User Name and Password.
iv. Type the correct E-mail ID and password in the text boxes.
v. Click on Sign In button. A web page with your account appears on the screen.
vi. Now do one of the following.
 The received emails are stored in the Inbox, so to see the mails click on Inbox. You see the list of received mails, click any one of the link of the E-mail you want to view.
 To send an e-mail, click on Compose and it opens a page where you can type required messages. Type the E-mail address of the recipient on the To box and click on Send button. The E-mail is delivered to the recipient in a few seconds.

c) Signing Out from an E-mail account
When you finish checking your E-mail accounts, you need to exit from your E-mail account. The process of exiting from the E-mail account is known as logging out or signing out. It prevents any possible misuse of the E-mail account. To sign out of an account, click on Sign Out button.

3. Chat
You can send instant message to your friends or family through the chat. You can chat with those friends which are currently on the line. To use the chatting service, you need to have a chat program or a messenger installed in your computer. The two popular Instant messengers are Yahoo Messenger and MSN Messenger.

4. Video Conference
Video Conference is one of the most advanced services of Internet. Video Conference enables virtual face-to-face communication among people sitting at different locations. Two persons from different places can talk as if they are sitting in front of each other, seeing each other, using video conferencing. Nowadays, video conferencing is used mostly in big companies, TV shows, etc.

5. Downloading
Downloading is the process getting files, programs, information from a remote computer through Internet into a client computer. There are many web sites that provide downloading. You can download images, text, songs, movie clips, games, etc. from the web sites. Downloading files become easy when you use special software called Downloader. Some popular downloaders are Download Accelerator Plus (DAP), Nitro Downloader, Internet Download Manager, etc.

6. E-commerce
Buying and selling goods through Internet is known as Electronic Commerce. There are some special web sites which provide facilities to users for purchasing goods through Internet. Buying goods through Internet is very easy and simple. Some of the popular E-commerce sites are www.muncha.com, www.kinmel.com.np, www.bitarak.com.np, www.ebay.com, www.amazon.com, etc.