google.com, pub-4617457846989927, DIRECT, f08c47fec0942fa0 Learn to enjoy every minute of your life.Only I can change my life.: July 2013

Saturday, July 20, 2013

Visual Basic Examples


Program 1:- To create Visual Basic application to find the area of rectangle.


Code:-
 Private Sub Command1_Click() Text3.Text = Text1.Text * Text2.Text End Sub

Private Sub Command2_Click()

Text1.Text = " " Text2.Text = " " Text3.Text = " " End Sub


/*************************Output**************************/





Program 2:- To create Visual Basic application to average of 3 numbers.
Design Window:-

Code:-

Private Sub Command1_Click()

Text4.Text = Str((Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text)) / 3)

End Sub

Private Sub Command2_Click()

Text1.Text = " "

Text2.Text = " "

Text3.Text = " "

Text4.Text = " "

End Sub

Private Sub Command3_Click()

Unload Me

End Sub


/*************************Output**************************/



Program 3: To create Visual Basic application to illustrate Date-Time functions.

Code:-

Private Sub Command1_Click ()

Text1.Text = Date

Text2.Text = Time ()

Text3.Text = Year (Date)

Text4.Text = Month (Date)

End Sub

/*************************Output**************************/



Program 4:-To create Visual Basic application program to find maximum number among two numbers.

Code:-

Private Sub Command1_Click ()

Dim a As Integer

Dim b As Integer

a = Val(Text1.Text)

b = Val(Text2.Text)

If (a > b) Then

        Label3.Caption = "a is maximum number"

Else

        Label3.Caption = "b is maximum number"

End If

End Sub


/*************************Output**************************/

Program 5:-To create Visual Basic application program to perform arithmetic operations with the use of Option button.

Code:

Private Sub Option1_Click ()

Text3.Text = Val (Text1.Text) + Val (Text2.Text)

End Sub

Private Sub Option2_Click ()

Text3.Text = Val (Text1.Text) - Val (Text2.Text)

End Sub

Private Sub Option3_Click ()

Text3.Text = Val (Text1.Text) * Val (Text2.Text)

End Sub

Private Sub Option4_Click ()

Text3.Text = Val (Text1.Text) / Val (Text2.Text)

End Sub


/*************************Output**************************/



Saturday, July 13, 2013

Qiuz Try It

Quiz :-

1. What does HTML stand for?
Hyper Text Markup Language
Home Tool Markup Language
Hyperlinks and Text Markup Language


2. Who is making the Web standards?
Google
The World Wide Web Consortium
Microsoft


3.Choose the correct HTML tag for the smallest heading:-
<h6>
<heading>
<h1>


4. What is the correct HTML tag for drawing horizontal line?
<lb>
<br>
<hr>


5.Inside which HTML element do we put the JavaScript?
<script>
<js>
<javascript>


6What is the correct JavaScript syntax to write "Hello World"?
response.write("Hello World");
document.write("Hello World");
echo "Hello World";


7.Where is the correct place to insert a JavaScript?
Both the <head> section and the <body> section are correct
The <head> section
The <body> section


8.C++ is which language?
Object - Oriented Programming Language
Procedure Oriented Programming Language
Both the above


9.The Size of char is _____ bits.
1
4
8


10._____ is unary operator.
+
++
-


11.int is ______ data type
derived
built-in
user-defined



Wednesday, July 10, 2013

Javascript Examples

Example1.html :-

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function Hello()
{
alert("Hello,Welcome and  have a good day.");
}
</SCRIPT>
</HEAD>
<BODY>
<INPUT TYPE="button" NAME="Button" VALUE="Press me" onClick="Hello()">
</BODY>
</HTML>

Output :-




Example2.html :-


<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function Name()
    {
        var answer = prompt("What is your name?", "");
        if (answer)
        alert("God bless You, " + answer);
    }
</SCRIPT>
</HEAD>
<BODY>
<INPUT TYPE="button" NAME="Button" VALUE="Press me" onClick="Name() ">
</BODY>
</HTML>

Output:-




Example3.html:-

<html>
<body>
<p>This example calls a function which performs a calculation, and returns the result:</p>
<script>
function myFunction(a,b)
{
return a*b;
}
document.write(myFunction(7,8));
</script>
</body>
</html>

Output:-
This example calls a function which performs a calculation, and returns the result:
 12



Example4.html:-
<html>
<body>
<script language="JavaScript">
function confirmFunction()
{
var a;
var b=confirm("You have press a button!Do you want to continue?");
if (b==true)
  {
  a="You have pressed OK to continue!";
  }
else
  {
  a="You have pressed Cancel to go back!";
  }
document.write(a);
}
</script>
<p>Example of Confirm box.Click the button below to display a confirm box.</p>
<button onclick="confirmFunction()">Press Me</button>
</body>
</html>

Output:-
Example of Confirm box.Click the button below to display a confirm box.



Exampe5.html :-
<html>
<body>
<p>Click the button to demonstrate the prompt box.</p>
<button onclick="promptFunction()">Press Me</button>
<script>
function promptFunction()
{
var a;
var b=prompt("Please enter your name","");
if (b!=null)
  {
  a="Hello " + b+ "! How are you today?";
  document.write(a);
  }
}
</script>
</body>
</html>

Output :-
Click the button to demonstrate the prompt box.





Example6.html :-
<html>
<body>
<p> Click the button to wait 3 seconds then greets alert "Welcome"</p>
<script language="JavaScript">
function TimeFunction()
{
setTimeout(function(){alert("Welcome to professional-in-computer.blogspot.com")},3000);
}
</script>
<button onClick="TimeFunction()">Press me</button>
</body>
</html>

Output:-
Click the button to wait 3 seconds then greets alert "Welcome"



Tuesday, July 9, 2013

Networking

Computer Network-
 It is an interconnected collection of autonomous computers or system of computers capable of sharing resources and controlling services.
 Interconnecting a set of computers with each other using transmission media is called a network.
The rules governing computer communication are called protocols.
Networking allows us to do the following;:-
1)Exchanging information
2)Sharing hardware resouces
3)Preserving information
4)Protecting information

Network installations is major factor in networking, they are of three types:-
1)Centralized installation
2)Distibuted installation
3)Collaborative installation

Types of networks:-
1)LAN -Local Area Network
2)MAN-Metropolitan Area Network
3)WAN- Wide Area Network

Network Topologies:-
1)Star topology
2)Bus topology
3)Ring topology
4)Mesh topology

Network Configurations:-
1)Network configuration means the method of operating a network by deciding the node authorities.
There are two basic configurations:-
1)Client-Server configuration
2)Peer to Peer configuration

WWW:-
It is World Wide Web one of the internet application.In the internet ,different types of  computers are connected to each other.These computers may have different operating systems.
When the data is to be transformed from one computer to other computer, and the operating system of both the computers are different, then both operating system should understand the data format, which is to be transferred.The www provides an interactive document and the software to access the data on any computer.The document has pages,which can combine text, picture, form, sound, animation and hyperlinks.

ASP.NET

ASP.NET : -    
ASP -
The full form of it is :A for Active ,S for Server ,P for Pages.
Active Server Pages (ASP), also known as Classic ASP, was introduced in 1998 as Microsoft's first server side scripting engine.
ASP is a technology that enables scripts in web pages to be executed by an Internet server.
ASP pages have the file extension .asp, and are normally written in VBScript.

ASP.NET - ASP.NET pages are compiled.
ASP.NET has better language support, a large set of user controls, XML-based components, and integrated user authentication.
ASP.NET pages have the extension .aspx, and are normally written in VB (Visual Basic) or C# (C sharp).
User controls in ASP.NET can be written in different languages, including C++ and Java.
When a browser requests an ASP.NET file, the ASP.NET engine reads the file, compiles and executes the scripts in the file, and returns the result to the browser as plain HTML.

Why .NET ? OR Advantages of .NET -
1)It is complete technology .Console based ,web based ,client based ,window based applications are in it.
2)It is Language Independent . No need to learn other language.In above 50 + language it can be used.
3) It is Platform Independent .Partially platform independent with editor text which support .NET the Microsoft operating system runs .NET on all of its version .In Linux with MonoExe we can run in it also .Support on windows 7,XP,etc.
4) Automatic Memory Management .By GArbage collector it automatically makes memory management by its algorithm (Disposes,Recall,Algo's)
5)Security
6)It support Interoperability. If project written in VS-6 it can access easi;ly in VS-8.

Note:-
In Notepad .cs can run visual Studio is rich provides help in Dot providing.

.NET Framework:-
Two main components of .NET framework are
1)Frameclass Libraries/Base class libraries
2)Common Language Run-time (Heart  of .NET framework)-Here all .NET application are executed .   

ADO.NET -Active X Data Object .NET make the code simple.
It is divided into two parts -
1)Connected architecture -It has (example:Desktop required all time connection)
a) Connection object
b) Command object(place where we write query)
c) Data Reader(forward only,read only)
d) Data Adapter
2)Disconnected architecture - It has(example: Laptop requires charging)
a)Data Sets-(Insert /update/delete)
     i)Data table
     ii) Data Row
     iii) Data Column
b)Data Relation


Methods of Command objects:-
1)Sql Data Reader dr =cmd.ExecuteReader();
return type is Sql data Reader dr
When there is single query for multiple results use this blindly for select.query.
2)int i =cmd.Execute non.Query();
use this method when there is data Data manipulate query for insert ,update,delete.
3)object obj = cmd.ExecuteScalar();
use this method for query returning single value .
These are used only in Connected architecture and not in disconnected.

Interface-
1)variables ,constructors are not declared .
2)only methods are declared.
3)they are public access by default so no need to write access.
4)There is contract in class and interface 3methods of interface are 100% compulsory.

Collections:-
In Collection we have
1)Sequential collection .
2)Dictionary collection.
3)Specialized collection.
4)Generic collection.

Thursday, July 4, 2013

Hardware-Microprocessor

IC - Integrated circuits ,we are totally surrounded by IC in today life hey are made by semiconductors which are like silicon ,germanium ,etc. have valency 4.
Microprocessor are made up of  different IC .Nowadays,in our day to day life we are surrounded by different microprocessors ,many people think that they are only in computers but this not true they are in most of the electronic instruments like mobiles,smart phones,refrigerator,Air-conditioner,microwave,and many more appliances,also in calculators.Microprocessors are also used in other advanced electronic systems, such as computer printers, automobiles,home security systems, radio ,automotive and jet airliners.
Actually the evolution of Microprocessor was ,it was the Japanese who told in 1960 to INTEL to make microprocessor for doing calculation .Then the work on it started and finally in 1971 they developed a 4 bit Microprocessor 4004 which not so powerful but did only the work of calculator.µΡ symbol is used for microprocessor.This was the first generation of microprocessor.In this generation INTEL intorduced the first general purpose 8 bit µΡ with the development of LSI(Large Scale Integration)technology.
Bits :Bit is the smallest unit of binary size which uses only two symbols zero and one.
Byte:It is symbol used to represent eight bits.
B7B6B5B4B3B2B1B0
Word :A symbol used to represent 16 bits.
15141312111098
76543210


Second Generation:- The successor to the 8080 and 6800 were introduced the Z80,8085 from INTEL,6809 from MOTOROLA,etc.In 1976 8085µΡ of intel  was introduced.This µΡs were 8-bit microprocessors.
This µΡs had complete µC (microcomputer) system with CPU(Central Processing Unit),ROM (Read Only Memory),RAM(Random Access Memory),CLOCK,I/O ports(Input Output),all in single package.
Examples INTEL 8048,8028,MOTOROLA MC 6801,Z80(Zilog) in 1974.
There were 12 bit µΡs also developed as a enhancement in 8 bit µΡs example-In 1977,IM6100(Intersil)and T8190(Toshiba).

Third Generation:- In this generation 16-bit microprocessors were introduced with high performance.Example Intel 8086 microprocessor.

Fourth Generation:- In this first 32 -bit µΡs were introduced which can address physical memory of 4GB.Example:- Intel 80386

Fifth Generation:- In this 64 -bit µΡs were introduced. Example:- Intel Pentium,I,II,III and so on.

Generic Block Diagram of Microprocessors:-

A microprocessor includes mainly of blocks and  buses to connect them.They are as follows:
  1. Arithmetic Logic Unit (A.L.U.)
  2. Registers
  3. Instruction Decoder
  4. Timing and control
  5. Interrupt Control
  6. Buses 
1. A.L.U.:- The main function of it is to to do the arithmetic calculations and logical operations  .
They have Flag Registers in it which is used to perform result and to send it.
2.Registers:-There are many several registers in it they are as follow:-
   I) Accumulator registers:-It is an 8-bit unit.This are the main registers which store the result of the arithmetic operations.
   II) General Purpose Registers:-
      They are as follow :
  1. Register B-It is 8-bit.
  2. Register C-It is 8-bit.
  3. Register D-It is 8-bit.
  4. Register E-It is 8-bit.
  5. Register H - It is 8-bit.
  6. Register L-It is 8-bit.
  7. Temporary Register-It is 8-bit.
They are always used in pairs making 16- bit .The pairs are as follows:
Register B-C pair ,Register D-E pair,Register H-L pair.
III)Status Register:-It is set of flip-flops called Flags.Microprocessor has two flags carry and zero flag.
IV)Program Counter:-It is 16-bit used to store the address of next memory location.
V)Stack Pointer:- It is 16-bit used to store address of a memory called stack.
VI)Instruction Register :-It is8-bit the first byte of instruction is loaded in this register.

3.Instruction Decoder: As its name suggest it take instruction from Instruction register and decodes it by driving control section.

4.Timing and Control Section :-It generates signals to control respective devices as by instruction decoder.

5.Interrupt Control:-It is process which executes certain steps when interrupt occurs,and decides the priority for the interrupt occur.

6.Buses :There are three types of buses in microprocessor:-
A) Address bus:- It is 16-bit bus with unidirectional.
B)Data bus:- It is 8- bit with bidirectional.
C)Control bus:- Carries signal to execute operation.




Instruction Format-
  1. An instruction is a combination of bit pattern.
  2. They can be viewed as a collection of two parts.One part ,which gives the task to be performed,is rightly called OPCODE(OPERATION CODE) and the other part gives the data to be operated on called as OPERAND.The operand can be specified in many ways.
  3. Instruction for 8085 are of three formats:-
             i)One byte instructions
             ii)Two byte instructions
             iii)Three byte instructions 

Block Diagram of 8085 microprocessor :-



Pin Diagram of 8085:-


Signals involved in transferring data and executing instructions in microprocessor.

·        Classification of Signals

 8085 is a general purpose microprocessor having 40 pins and works on single power supply. To study the pin diagram we group the signals into 5 categories:

1.Power Supply
2.Clock Signals
3.Interrupt Signals
4.Address and Data bus
5.Control and Status signals
6.Serial I/O Port
7.DMA Request Signals  


The various signals in a microprocessor can be classified as
Power supply and Frequency signals: Signals which aids in supplying power and generating frequency are associated with this type. Pins like Vcc and ground are classified under this type.
Address signals: Signals associated with the lower order address bus and time multiplexed higher order address bus comes under this type of signals.
Data Signals: Signals associated with data bus comes under this type.
Control and Status Signals: Signals which are associated with timing and control unit such HOLD, RW’, WR’ etc. comes under this type of signals.
Interrupt Signals: We know that signals like TRAP, RST 5.5 etc. are interrupt signals. Such signals come under this category.
Serial I/O signals: These signals are used for giving serial input and output data. Signals like SID, SOD come under this category.
Acknowledgement Signals: Signals like INTA’, HLDA acts as acknowledgement signal for 8085 microprocessor.









Address Bus:
The pins A8-A15 denote the address bus. They are used for the most significant bit of memory address.
Address/Data Bus:
AD0-AD7 constitutes the Address/Data bus. They are time multiplexed. These pins are used for least significant bits of address bus in the first machine clock cycle and used as data bus for second and third clock cycle.
But what is a clock cycle? What is first clock cycle and second, third so on...
A clock cycle is nothing but the time taken between two adjacent pulses of the oscillator. In simple words clock cycle refers to the transition between o volts to 5 volts and back to 0 volts. So the first clock cycle means the first transition of pulse from 0volts to 5 volts and then back to 0 volts.
ALE: Address Latch Enable:
In the previous article we saw how ALE helps in demultiplexing the lower order address and data bus. This signal goes high during the first clock cycle and enables the lower order address bits. The lower order address bus is added to memory or any external latch.ALE is on pin number 30.
IO/M’:
Consider we have an address to be processed. But how do the processors know whether the address is for memory or I/O functions? For this purpose a status signal called IO/M’ is used. This distinguishes whether the address is for memory or IO. When this pin goes high, the address is for an I/O device. While the pin goes low, the address is assigned for the memory.IO/M’ is on pin number 34.
S0-S1:
S0 and S1 are status signals which provides different status and functions depending on their status.S0 is on pin number29 and S1 on 33.
RD’:
This is an active low signal. That is, an operation is performed when the signal goes low. This signal is used to control READ operation of the microprocessor. When this pin goes low the microprocessor reads the data from memory or I/O device.RD’ is on pin number32
WR’:
WR’ is also an active low signal which controls the write operations of the microprocessor. When this pin goes low, the data is written to the memory or I/O device.WR’ is on pin number31
READY:
READY is used by the microprocessor to check whether a peripheral is ready to accept or transfer data. A peripheral may be a LCD display or analog to digital converter or any other. These peripherals are connected to microprocessor using the READY pin. If READY is high then the periphery is ready for data transfer. If not the microprocessor waits until READY goes high.
HOLD:
This indicates if any other device is requesting the use of address and data bus. Consider two peripheral devices. One is the LCD and the other Analog to Digital converter. Suppose if analog to digital converter is using the address and data bus and if LCD requests the use of address and data bus by giving HOLD signal, then the microprocessor transfers the control to the LCD as soon as the current cycle is over. After the LCD process is over, the control is transferred back to analog and digital converter.HOLD is on pin number 39.
HLDA:
HLDA is the acknowledgment signal for HOLD. It indicates whether the HOLD signal is received or not. After the execution of HOLD request, HLDA goes low.HLDA is on pin number 38.
INTR:
INTR is an interrupt request signal. It has the lowest priority among the interrupts. INTR can be enabled or disabled by using software. Whenever INTR goes high the microprocessor completes the current instruction which is being executed and then acknowledges the INTR signal and processes it.
INTA’:
Whenever the microprocessor receives interrupt signal. It has to be acknowledged. This acknowledgement is done by INTA’. So whenever the interrupt is received INTA’ goes high.INTAis on pin number 11.
RST 5.5, 6.5, 7.5:
These are nothing but the restart interrupts. They insert an internal restart function automatically.
All the above mentioned interrupts are maskable interrupts. That is, they can be enabled or disabled using programs.
TRAP:
Among the interrupts of 8085 microprocessor, TRAP is the only non-maskable interrupt. It cannot be enabled or disabled using a program. It has the highest priority among the interrupts.
PRIORITY ORDER (From highest to lowest)
TRAP     is on pin number 6
RST 7.5 is on pin number 7
RST 6.5 is on pin number 8
RST 5.5 is on pin number 9
INTR      is on pin number 10
RESET IN’:
This pin resets the program counter to 0 and resets interrupt enable and HLDA flip-flops. The CPU is held in reset condition until this pin is high. However the flags and registers won’t get affected except for instruction register.RESET IN’ is on pin number 36.
RESET OUT:
This pin indicates that the CPU has been reset by RESET IN’.RESET OUT is on is on pin number3.
X1 X2:
These are the terminals which are connected to external oscillator to produce the necessary and suitable clock operation.X1 is on pin number 1 and X2 on 2.
CLK:
Sometimes it is necessary for generating clock outputs from microprocessors so that they can be used for other peripherals or other digital IC’s. This is provided by CLK pin. Its frequency is always same as the frequency at which the microprocessor operates.
SID:
This pin provides serial input data. The serial data on this pin is loaded into the seventh bit of the accumulator when RIM instruction is executed.
RIM stands for READ INTERRUPT MASK, which checks whether the interrupt is masked or not.
SOD:
This pin provides the serial output data. The serial data on this pin delivers its output to the seventh bit of the accumulator when SIM instruction is executed.
Vcc and Vss:
Vcc is +5v pin and Vss is ground pin.Vcc is on pin number 40 and Vss on 20.
Thus the pin diagram and signals of 8085 microprocessor are explained in detail.



Monday, July 1, 2013

Tables in HTML

The table tag defines a table.Inside the table tag ,of opening <table> tag and closing </table> tag we use <tr></tr> tag to define rows in a table ,use the <th></th> tag to define row or column headings, and use the <td></td> tag to define table cells.
The table tag can also contain a <caption </caption> tag,which specifies the caption for the table ,you can specify the width of border surrounding the table and default background color of the table.
Example:-
Marks of Students
Roll No. Name Marks
Paper IPaper II
101ABC7585
102XYZ7787
Html code to draw the above table is as:-
<html>
<head><title>Table tags</title></head>
<body>
<table border="1" cellpadding="10" cellspacing="5" align="center" bordercolor="maroon" bgcolor="silver">
<caption><span style="color: red; font-size: large;">Marks of Students</span></caption>
<tr>
<th bgcolor="skyblue" rowspan="2"><font color=#804000" SIZE="5">Roll No.</font></th>
<th bgcolor="skyblue" rowspan="2"><font color=#804000" SIZE="5">Name</font></th>
<th align="center" bgcolor="skyblue" colspan="2"><font color=#804000" SIZE="5">Marks</font></th>
</tr>
<tr>
<td bgcolor="lightblue"><font color=#FF8000" SIZE="5">Paper I</font></td>
<td bgcolor="lightblue"><font color=#FF8000" SIZE="5">Paper II</font></td>
</tr>
<tr>
<td bgcolor="#C9F3FA"><font color=#804000" SIZE="5">101</font></td>
<td bgcolor="#C9F3FA"><font color=#804000" SIZE="5">ABC</font></td>
<td bgcolor="#C9F3FA"><font color=#804000" SIZE="5">75</font></td>
<td bgcolor="#C9F3FA"><font color=#804000" SIZE="5">85</font></td>
</tr>
 <tr>
<td bgcolor="#C9F3FA"><font color=#804000" SIZE="5">102</font></td>
<td bgcolor="#C9F3FA"><font color=#804000" SIZE="5">XYZ</font></td>
<td bgcolor="#C9F3FA"><font color=#804000" SIZE="5">77</font></td>
<td bgcolor="#C9F3FA"><font color=#804000" SIZE="5">87</font></td>
</tr>
</table>
</body>
</html>

Example 2:- 




<html>
<body>
<style>
  .circle{
     width: 20px;
     height: 20px;
     border-radius: 50%;
      background-color: blue
   
  }
</style>
<TABLE width="50" height="50">
<TR >
<TD BGCOLOR="#FF8000" width="40px"  height="20px"></TD>
</TR>
<TR>
<TD BGCOLOR="#FFFFFF" align="center" width="40px"  height="20px"><div class="circle">
</div>
</TD>
</TR>
<TR>
<TD BGCOLOR="#088A08" width="40px"  height="20px"></TD>
</TR>
</TABLE>
</body>
</html> 


Example 3-
Vijay Marwaha
<HTML>
<BODY>
<TABLE BORDER="9" CELLPADDING="20" CELLSPACING="20" BGCOLOR="#8000FF">
<CAPTION ALIGN="BOTTOM">Vijay Marwaha</CAPTION> <TR>
<TD>
<TABLE BORDER="9" CELLPADDING="20" CELLSPACING="20" BGCOLOR=##00FFFF>
<TR>
<TD><img src="image1.gif" width="728" height="90" border="0" ALT="professional-in-computer"></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>

शिव भोलेनाथ स्तुति

 जय शिवशंकर, जय गंगाधर, करुणा-कर करतार हरे,   जय कैलाशी, जय अविनाशी, सुखराशि, सुख-सार हरे जय शशि-शेखर, जय डमरू-धर जय-जय प्रेमागार हरे,   जय ...