Thursday, 31 October 2013

Tools for Develop C Programs!

As programmer we need different tools to develop a program. These tools are needed for the life cycle of programs
Editors
First of all we need a tool for writing the code of a program. For this purpose we used Editors in which we write our code. We can use word processor too for this, but word processors have many other features like bold the text, italic, coloring the text etc. For programming purposes we don’t need these things we only need simple text. Text editors are such editors which save only the text which we type. So for programming we will be using a text editor. You can write programs in Tubo c++ IDE and DEV C++ Program.

Tuesday, 29 October 2013

Software Categories !

Software Categories
Software is categorized into two main categories:
  1. System Software
  2. Application Software

1. System Software
The system software controls the computer. It communicates with computer’s hardware (key board, mouse, modem, sound card etc) and controls different aspects of operations.

Sub categories of system software are:

  • Operating System
  • Device Drivers
  • Utility Programs

* Operating System
An operating system (sometimes abbreviated as "OS") is the program that manages all the other programs in a computer. The operating system is the foundation on which applications, such as word processing and spreadsheet programs, are built. (Microsoft)”.
* Device Driver
The device driver software is used to communicate between the devices and the computer. We have monitor, keyboard and mouse attached to almost all PC’s; if we look at the properties of these devices we will see that the operating system has installed special software to control these devices. This piece of software is called device driver software. When we attach a new device with the computer, we need software to communicate with this device. These kinds of software are known as device drivers e.g.
CD ROM driver, Sound Card driver and Modem driver.
* Utility Software
Utility software is a program that performs a very specific task, usually related to managing system resources. You would have noticed a utility of Disk Compression. Whenever you write a file and save it to the disk, Compression Utility compresses the file (reduce the file size) and write it to the disk and when you request this file from the disk, the compression utility uncompressed the file and shows its contents.

2. Application software
A program or group of programs designed for end users. For example a program for Accounting, Payroll, Inventory Control System, and guided system for planes. GPS (global positioning system), another application software, is being used in vehicles, which through satellite determines the geographical position of the vehicle.

Why Programming is Important!

Why Programming is important?
The question most of the people ask is why should we learn to program when there are so many application software and code generators available to do the task for us. 
The answer is as give by the Matthias Felleisen in the book ‘How to design programs’
The answer consists of two parts. 
  • First, it is indeed true that traditional forms of Computer programming are useful for just a few people. But, programming as we the authors understand it is useful for everyone: the administrative secretary who uses spreadsheets as well as the high-tech programmer. In other words, we have a broader notion of programming in mind than the traditional one. We explain our notion in a moment.
  • Second, we teach our idea of Computer programming with a technology that is based on the principle of minimal intrusion. Hence, our notion of programming teaches problem analysis and problem-solving skills without imposing the overhead of traditional programming notations and tools.”
Hence learning to program is important because it develops analytical and problem solving abilities. It is a creative activity and provides us a mean to express abstract ideas. Thus programming is fun and is much more than a vocational skill. By designing programs, we learn many skills that are important for all professions. These skills can be summarized as:
  • Critical reading
  • Analytical thinking
  • Creative synthesis

Monday, 28 October 2013

Remaining Part Of Lecture 3: How to Write C Program.

# include <iostream.h>
main()
{
cout << "Welcome to Virtual University of Pakistan";
}
We will look at this code line by line and try to understand them.
 >>> # include <iostream.h>
#include: This is a pre-processor directive. It is not part of our program; it is an instruction to the compiler. It tells the C compiler to include the contents of a file. You have to write this line. The sign # is known as HASH and also called SHARP.
>>> <iostream.h>
This is the name of the library definition file for all Input Output Streams.
main()
The main is actually the one which is run when your program is used. A C program is made up of a large number of functions. Each of these is given a name by the programmer and they refer to each other as the program runs. C regards the name "main" as a special case and will run this function first. If you forget to
have a main function, or mistype the name, the compiler will give you an error. Notice that there are parentheses (“( )”, normal brackets) with main. Here the parentheses
contain nothing. There may be something written inside the parentheses. It will be discussed in next lectures.
{ } Next, there is a curly bracket also called braces("{ }").
cout << “ Welcome to Virtual University of Pakistan”;
cout:
This is known as out put stream in C and C++. Hence we use cout for output.
<<
The sign << indicates the direction of data. Here it is towards cout and the function of
cout is to show data on the screen.

Sunday, 27 October 2013

First C Language Program ! Lecture 3

* First C program
The best way to learn C is to start coding right away. So here is our very first program in C.
                     # include <iostream.h>
                     main( )
                      {
                                cout << "Welcome to Virtual University of Pakistan";
                      }
 Lecture is Still Continue... wait for next segment for detail explanation!

Thursday, 24 October 2013

Prgramming with "C Language" - Lecture 2

History of C language:
The C language was developed in late 60’s and early 70’s, in Bell Laboratories. In those days BCPL and B languages were developed there. The BCPL language was developed in 1967 by Martin Richards as a language for writing operating systems software and compilers. In 1970 Ken Thompson used B language to create early versions of the UNIX operating system at Bell Laboratories.
Reading Material:
Deitel & Deitel – C++ How to Program
Tools to Write C Programs:
You can use Dev C++ Compiler to Write C Language Programs! 

Wednesday, 23 October 2013

Introduction To Programming By Using "C Language" Lecture 1

Definition: "A program is a precise sequence of steps to solve a particular problem.” It means that when we say that we have a program, it actually mean that we know about a complete set activities to be performed in a particular order. The purpose of these activities is to solve a given problem.
Alan Perlis, a professor at Yale University, says: "It goes against the grain of modern education to teach children to program. What fun is there in making plans, acquiring discipline in organizing thoughts, devoting attention to detail and learning to be self-critical? "
Points to remember
The major points to keep in mind are:
o Don’t assume on the part of the users
o User Interface should be friendly
o Don’t forget to comment the code
o PAY ATTENTION TO DETAIL
o Program, program and program, not just writing code, but the whole process of design and development.

Monday, 21 October 2013

Enabling JavaScript in Browsers!

JavaScript in Internet Explorer:

Here are simple steps to turn on or turn off JavaScript in your Internet Explorer:
  1. Follow Tools-> Internet Options from the menu
  2. Select Security tab from the dialog box
  3. Click the Custom Level button
  4. Scroll down till you find Scripting option
  5. Select Enable radio button under Active scripting
  6. Finally click OK and come out
To disable JavaScript support in your Internet Explorer, you need to select Disable radio button under Active scripting.

JavaScript in Firefox:

Here are simple steps to turn on or turn off JavaScript in your Firefox:
  1. Follow Tools-> Options
    from the menu
  2. Select Content option from the dialog box
  3. Select Enable JavaScript checkbox
  4. Finally click OK and come out
To disable JavaScript support in your Firefox, you should not select Enable JavaScript checkbox.

Sunday, 20 October 2013

Computer Security!


AUTHENTICATION

Authentication is the action of identifying your digital identity. Get educated on passwords, encryption keys, facial recognition and fingerprint scanners.

Friday, 18 October 2013

Download YouTube Video in Any Format!

How to convert and download a YouTube video: 
1. Paste your YouTube URL at 'Media URL' and press Continue. 
2. Select the format and the options for the conversion. The default options are for most videos a good setting. 
3. Press the 'Start' button at the bottom to start the conversion. 
4. This may take several minutes. After the conversion is finished you can download the converted file. 

Tuesday, 15 October 2013

Javascript Tutorial


Javascript is a scripting language produced by Netscape for use within HTML Web pages.
JavaScript is loosely based on Java and it is built into all the major modern browsers.
This tutorial gives a complete understanding onJavaScript.

What is JavaScript ?

JavaScript started life as LiveScript, but Netscape changed the name, possibly because of the excitement being generated by Java.to JavaScript. JavaScript made its first appearance in Netscape 2.0 in 1995 with a name LiveScript.
JavaScript is a lightweight, interpreted programming language with object-oriented capabilities that allows you to build interactivity into otherwise static HTML pages.
The general-purpose core of the language has been embedded in Netscape, Internet Explorer, and other web browsers

JavaScript is:
  • JavaScript is a lightweight, interpreted programming language
  • Designed for creating network-centric applications
  • Complementary to and integrated with Java
  • Complementary to and integrated with HTML
  • Open and cross-platform

Click Here to Learn Complete Tutorial


Monday, 14 October 2013

Digital Image Processing!


Digital image processing deals with manipulation of digital images through a digital computer. It is a subfield of signals and systems but focus particularly on images. DIP focuses on developing a computer system that is able to perform processing on an image. The input of that system is a digital image and the system process that image using efficient algorithms, and gives an image as an output. The most common example is Adobe Photoshop. It is one of the widely used application for processing digital images.

How it works.


In the above figure , an image has been captured by a camera and has been sent to a digital system to remove all the other details , and just focus on the water drop by zooming it in such a way that the quality of the image remains the same.

Sunday, 13 October 2013

HTML for Web Page Creation


HTML "Head and Title Tags"

<html>
<head>
<title>Poem to make you feel good</title>
</head>
Roses are red,
The Web is sure growing.
You can use HTML,
To keep your page flowing.
</html>



Computer Network Toplogies

A Network Topology is the way computer systems or network equipment connected to each other. Topologies may define both physical and logical aspect of the network. Both logical and physical topologies could be same or different in a same network.
Point-to-point
Point-to-point networks contains exactly two hosts (computer or switches or routers or servers) connected back to back using a single piece of cable. Often, the receiving end of one host is connected to sending end of the other end and vice-versa.

Bus Topology

In contrast to point-to-point, in bus topology all device share single communication line or cable. All devices are connected to this shared line. Bus topology may have problem while more than one hosts sending data at the same time. Therefore, the bus topology either uses CSMA/CD technology or recognizes one host has Bus Master to solve the issue. It is one of the simple forms of networking where a failure of a device does not affect the others. But failure of the shared communication line make all other devices fail.
Both ends of the shared channel have line terminator. The data is sent in only one direction and as soon as it reaches the extreme end, the terminator removes the data from the line.
Star Topology
All hosts in star topology are connected to a central device, known as Hub device, using a point-to-point connection. That is, there exists a point to point connection between hosts and Hub. The hub device can be Layer-1 device (Hub / repeater) or Layer-2 device (Switch / Bridge) or Layer-3 device (Router / Gateway).
As in bus topology, hub acts as single point of failure. If hub fails, connectivity of all hosts to all other hosts fails. Every communication happens between hosts, goes through Hub only. Star topology is not expensive as to connect one more host, only one cable is required and configuration is simple.

Ring Topology

In ring topology, each host machine connects to exactly two other machines, creating a circular network structure. When one host tries to communicate or send message to a host which is not adjacent to it, the data travels through all intermediate hosts. To connect one more host in the existing structure administrator may need only one more extra cable.
Failure of any host results in failure of the whole ring. Thus every connection in the ring is point of failure. There exists methods which employs one more backup ring.

Mesh Topology

In this type of topology, a host is connected to one or two or more than two hosts. This topology may have hosts having point-to-point connection to every other hosts or may also have hosts which are having point to point connection to few hosts only.
Hosts in Mesh topology also work as relay for other hosts which do not have direct point-to-point links. Mesh technology comes into two flavors:
  • Full Mesh: All hosts have a point-to-point connection to every other host in the network. Thus for every new host n(n-1)/2 cables (connection) are required. It provides the most reliable network structure among all network topologies.
  • Partially Mesh: Not all hosts have point-to-point connection to every other host. Hosts connect to each other in some arbitrarily fashion. This topology exists where we need to provide reliability to some host whereas others are not as such necessary.

Tree Topology

Also known as Hierarchical Topology is the most common form of network topology in use present day. This topology imitates as extended Star Topology and inherits properties of Bus topology.
This topology divides the network in to multiple levels/layers of network. Mainly in LANs, a network is bifurcated into three types of network devices. The lowest most is access-layer where user’s computer are attached. The middle layer is known as distribution layer, which works as mediator between upper layer and lower layer. The highest most layer is known as Core layer, and is central point of the network, i.e. root of the tree from which all nodes fork.

Saturday, 12 October 2013

Network LAN Technologies

Ethernet

Ethernet is a Local Area Network implemenation technology which is widely deployed. This technology was invented by Bob Metcalfe and D.R. Boggs in early 70s. It was standardized in IEEE 802.3 in 1980. Ethernet is network technology which shares media. Network which uses shared media has high probability of data collision. Ethernet uses CSMA/CD technology to detect collisions. CSMA/CD stands for Carrier Sense Multi Access/Collision Detection. When a collision happens in Ethernet, all its host rolls back and waits for some random amount of time and then re-transmit data.
Ethernet connector, i.e. Network Interface cards are equipped with 48-bits MAC address. This help other Ethernet devices to identify and communicate with remote devices in Ethernet.
Traditional Ethernet uses 10BASE-T specifications. 10 is for 10mpbs speed, BASE stands for using baseband and T stands for Thick net or Thick Ethernet. 10BASE-T Ethernet provides transmission speed up to 10mbps and uses Coaxial cable or Cat-5 Twisted Pair cable with RJ-5 connector. Ethernet follows Star Topology with segment length up to 100 meters. All devices are connected to a Hub/Switch in a Star Fashion.

Fast-Ethernet

To encompass need of fast emerging software and hardware technologies, Ethernet extends itself as Fast-Ethernet. It can run on UTP, Optical Fiber and can be wireless too. It can provide speed up to 100 mbps. This standard is named as 100BASE-T in IEEE 803.2 using Cat-5 Twisted pair cable. It uses CSMA/CD technique for wired media sharing among Ethernet hosts and CSMA/CA (Collision Avoidance) technique for wireless Ethernet LAN.
Fast Ethernet on fiber is defined under 100BASE-FX standard which provides speed up to 100mbps on fiber. Ethernet over Fiber can be extended up to 100 meters in half-duplex mode and can reach maximum of 2000 meters in full-duplex over multimode fibers.

Giga-Ethernet

After being introduced in 1995, Fast-Ethernet could enjoy its high speed status only for 3 years till Giga-Ethernet introduced. Giga-Ethernet provides speed up to 1000 mbits/seconds. IEEE802.3ab standardize Giga-Ethernet over UTP using Cat-5, Cat-5e and Cat-6 cables. IEEE802.3ah defines Giga-Ethernet over Fiber.
In above pictures, different VLANs are depicted in different color codes. Hosts in one VLAN, even if connected on the same Switch cannot see or speak to other hosts in different VLANs. VLAN is Layer-2 technology which works closely on Ethernet. To route packets between two different VLANs a Layer-3 device (such as Router) is required.

Computer Network Types


Generally, networks are distinguished based on their geographical span. A network can be as small as distance between your mobile phone and its Bluetooth headphone and as large as the Internet itself, covering the whole geographical world, i.e. the Earth.

Personal Area Network

A Personal Area Network or simply PAN, is smallest network which is very personal to a user. This may include Bluetooth enabled devices or infra-red enabled devices. PAN has connectivity range up to 10 meters. PAN may include wireless computer keyboard and mouse, Bluetooth enabled headphones, wireless printers and TV remotes for example.
Image | Personal Area Network | Bluetooth
Piconet is an example Bluetooth enabled Personal Area Network which may contain up to 8 devices connected together in a master-slave fashion.

Local Area Network

A computer network spanned inside a building and operated under single administrative system is generally termed as Local Area Network. Usually, Local Area Network covers an organization’s offices, schools, college/universities etc. Number of systems may vary from as least as two to as much as 16 million
LAN provides a useful way of sharing resources between end users. Resources like Printers, File Servers, Scanners and internet is easy sharable among computers.
Image: Local Area Network
Local Area Networks are composed of inexpensive networking and routing equipment. It may contains local servers serving file storage and other locally shared applications. It mostly operates on private IP addresses and generally do not involve heavy routing. LAN works under its own local domain and controlled centrally.
LAN uses either Ethernet or Token-ring technology. Ethernet is most widely employed LAN technology and uses Star topology while Token-ring is rarely seen.
LAN can be wired or wireless or in both forms at once.

Metropolitan Area Network

MAN, generally expands throughout a city such as cable TV network. It can be in form of Ethernet, Token-ring, ATM or FDDI.
Metro Ethernet is a service which is provided by ISPs. This service enables its users to expand their Local Area Networks. For example, MAN can help an organization to connect all of its offices in a City.
Image: Metropolitan Area Network

Wide Area Network

As name suggests, this network covers a wide area which may span across provinces and even a whole country. Generally, telecommunication networks are Wide Area Network. These networks provides connectivity to MANs and LANs. Equipped with very high speed backbone, WAN uses very expensive network equipment.
Image: Wide Area Network

Internetwork

A network of networks is called internetwork, or simply Internet. It is the largest network in existence on this planet. Internet hugely connects all WANs and it can have connection to LANs and Home networks. Internet uses TCP/IP protocol suite and uses IP as its addressing protocol. Present day, Internet is widely implemented using IPv4. Because of shortage of address spaces, it is gradually migrating from IPv4 to IPv6.
Internet enables its users to share and access enormous amount of information worldwide. It uses www, ftp, email services, audio and video streaming etc. At huge level, internet works on Client-Server model.
Internet uses very high speed backbone of fiber optics. To inter-connect various continents, fibers are laid under sea known to us as submarine communication cable.
Internet is widely deployed on World Wide Web services using HTML linked pages and is accessible by some client software known as Web Browsers. When a user requests a page using some web browser located on some Web Server anywhere in the world, the Web Server responds with the proper HTML page. The communication delay is very low.
Internet is serving many proposes and is involved in many aspects of life. Some of them are:
  • Web sites
  • E-mail
  • Instant Messaging
  • Blogging
  • Social Media
  • Marketing
  • Networking
  • Resource Sharing
  • Audio and Video Streaming

Data Communication and Computer Network


Data communications refers to the transmission of this digital data between two or more computers and a computer network or data network is a telecommunications network that allows computers to exchange data. The physical connection between networked computing devices is established using either cable media or wireless media. The best-known computer network is the Internet.
This tutorial will teach you basics of Data Communication and Computer Network (DCN) and will also take you through various advance concepts related to Data Communication and Computer Network.

Introduction

A system of interconnected computers and computerized peripherals (such as printers) is called network. This interconnection among computers facilitates information sharing among them. Computers may connect to each other by wired media or wireless media.

Categories

Computer Networks are classified into many categories based on their respective attributes. These includes:
  • Geographical span
  • Inter-connectivity
  • Administration
  • Architecture

Geographical Span

Geographically a network can be seen in one of the following categories:
  • It may be spanned across your table, among Bluetooth enabled devices. Ranging not more than few meters.
  • It may be spanned across a whole building, including intermediate devices to connect all floors.
  • It may be spanned across a whole city.
  • It may be spanned across multiple cities or provinces.
  • It may be one network covering whole world.

Inter-connectivity

Components of a network can be connected to each other differently in some fashion. By connectedness we mean either logically or physically or both ways.
  • Every single device can be connected to every other device on network, making the network mesh.
  • All devices can be connected to a single medium but geographically disconnected, created bus like structure.
  • Each device is connected to its left and right peers only, creating linear structure.
  • All devices connected together with a single device, creating star like structure.
  • All devices connected arbitrarily using all previous ways to connect each other, resulting in a hybrid structure.

Administration

From an administrator’s point of view, a network can be private network which belongs a single autonomous system and cannot accessed outside its physical or logical domain. Or a network can be a public network, which can be accessed by all.

Network Architecture

  • There can be one or more systems acting as Server. Other being Client, request the Server to serve requests. Servers take and process request on behalf of Clients.
  • Two systems can be connected Point-to-Point, or in other words back-to-back fashion. They both reside on same level and called peers.
  • There can be hybrid network which involves network architecture of both the above types.

Network Applications

Computer systems and peripherals are connected to form a network provides bunch of advantages:
  • Resource sharing such as printers and storage devices.
  • Exchange of Information by means of eMails and FTP.
  • Information sharing by using Web or Internet.
  • Interaction with other users using dynamic web pages.
  • IP phones
  • Video Conferences
  • Parallel computing
  • Instant Messaging

Thursday, 10 October 2013

C Programming Tutorial. Lecture 1: C Language Overview


C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC PDP-11 computer in 1972.
In 1978, Brian Kernighan and Dennis Ritchie produced the first publicly available description of C, now known as the K&R standard.
The UNIX operating system, the C compiler, and essentially all UNIX applications programs have been written in C. The C has now become a widely used professional language for various reasons.
  • Easy to learn
  • Structured language
  • It produces efficient programs.
  • It can handle low-level activities.
  • It can be compiled on a variety of computer platforms.

Tuesday, 8 October 2013

Basic HTML Elements!

HTML documents are defined by HTML elements.
An HTML element is everything from the start tag to the end tag:
Start Tag: <HTML>
End Tag: </HTML>
HTML Example:

Write the following code in Notepad: 
<html>
<body>
<p>This is my first paragraph.</p>
</body>
</html>

The <html> element:
The <html> element defines the whole HTML document.
The element has a start tag <html> and an end tag </html>.
The <body> element:
The <body> element defines the body of the HTML document.
The element has a start tag <body> and an end tag </body>.
The <p> element:
The <p> element defines a paragraph in the HTML document.
The element has a start tag <p> and an end tag </p>.

Monday, 7 October 2013

Writing HTML Using Notepad or TextEdit!

HTML can be edited by using a professional HTML editor like:

  • Adobe Dreamweaver
  • Microsoft Expression Web
  • CoffeeCup HTML Editor
However, for learning HTML we recommend a text editor like Notepad (PC) or TextEdit (Mac). We believe using a simple text editor is a good way to learn HTML.
Follow the 4 steps below to create your first web page with Notepad.

Step 1: Start Notepad

To start Notepad go to:
Start
    All Programs
        Accessories
            Notepad

Step 2: Edit Your HTML with Notepad

Type your HTML code into your Notepad:

Step 3: Save Your HTML

Select Save as.. in Notepad's file menu.
When you save an HTML file, you can use either the .htm or the .html file extension. There is no difference, it is entirely up to you.
Save the file in a folder that is easy to remember, like w3schools.

Step 4: Run the HTML in Your Browser

Start your web browser and open your html file from the FileOpen menu, or just browse the folder and double-click your HTML file.

1- HTML Introduction (Hyper Text Markup Language)

Write the following code in "Notepad" &save it extension .html (myFirstpage.html)

<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
  • The DOCTYPE declaration defines the document type
  • The text between <html> and </html> describes the web page
  • The text between <body> and </body> is the visible page content
  • The text between <h1> and </h1> is displayed as a heading
  • The text between <p> and </p> is displayed as a paragraph

Sunday, 6 October 2013

2- Updated Trick for Enabling "Folder Options" In Windows XP

Many times Windows users face a common problem. The “Folder Options” in “Tools” menu is not visible. Even It can’t be accessed from Control Panel. Also “Registry Editor” is disabled.
Follow the simple steps mentioned in this tutorial and your problem will be solved:
  1. If Folder Options is disabled but Registry Editor is still working in your system, then you can enable Folder Options by editing Windows Registry.
  2. Type regedit in RUN dialog box and press Enter.
  3. it’ll open Registry Editor, now go to following keys:

HKEY_CURRENT_USER\Software\Microsoft\Windows\Current Version\Policies\ExplorerHKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current version\Policies\Explorer
In right-side pane, check whether a DWORD value named NoFolderOptions exists or not? If it exists, delete it.

3- Difference between 32 bit & 64 bit operating systems!



  1. The terms 32-bit and 64-bit refer to the way a computer's processor (also called a CPU), handles information. The 64-bit version of Windows handles large amounts of random access memory (RAM) more effectively than a 32-bit system.
  2. The 64-bit version of Windows 7 handles large amounts of random access memory (RAM) more effectively than a 32-bit system. It is faster and also allows you to run several programs at one time.
Benefits of going to Windows 7 64-bit: 
  1. With 32-bit Windows, you can use a maximum of 4GB RAM
  2. 64-bit Windows 7 runs very fast with 4GB and you can upgrade your RAM to 8 or 16 GB later, making your system future-proof.