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

Tuesday, May 31, 2016

List of college in Daund for 11th Science

List of College in Daund for 11th Science:

1.Sheth Jotiprasad Vidyalaya & Jr College

Address:-Ambedkar chowk ,
Daund,
Dist:Pune,
Maharashtra .

walking distance from railway station

2. St. Sebastian High School & Jr College

Address:- Janta Colony ,
Daund,
Dist:Pune,
Maharashtra .

walking distance from railway station

3. Mary Memorial School & Jr College

Adress:-Patas road ,near vijay dhaba, Daund

4. Gurella college

Adress :-Daund- Sidhatek road,Daund

Above colleges are of Maharashtra State Board  of Higher Education

Tuesday, May 24, 2016

Graphics using C

To write program for graphics using c you must have following:

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<graphics. lib>
/*graphics header file necessary in graphics c program*/
main()
{
int gd = DETECT, gm;
/*initialization of graphics drivers*/
--------------------------
initgraph();
/*change the programs into graphics mode */

//other graphics functions

closegraph();
/*close the graphics*/
}

Following are some important terminology of graphics
1)Header File:
To perform program using graphs we have to first add the header file as
#include<graphics.h>
#include<graphics. lib>
It includes all graphics function definition.

2) Opening the graphics mode
Normally when any C program is work with any stream it is in by default text mode. Too convert text mode into graphics mode we can initializes the graphics program by using initgraph().
The meaning of initgraph is initialization of graph.
These function take 3 arguments which are as follows
i. graphics driver
ii. graphics mode
iii. path of BGI
Syntax:
initgraph(&gd,&gm,"C:\\TC\BGI");
where gd is predefine macro which is initialized by DETECT and gm is graphics mode and remaining is the path of BGI which is place in double quotation mark.

3) closegraph ()
The graphics mode can be exited by using closegraph() function.

Graphics program for draw a line
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<graphics. lib>
main()
{
int gd = DETECT, gm,x,y;
initgraph(&gd,&gm,"C:\\TC\BGI");
line(100,200,300,200);
getch();
closegraph();
}

Graphics program to draw a circle
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<graphics. lib>
main()
{
int gd = DETECT, gm,;
clrscr();
initgraph(&gd,&gm,"C:\\TC\BGI");
circle(200,100,100);
getch();
closegraph();
}

Graphics program to draw a ellipse
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<graphics. lib>
main()
{
int gd = DETECT, gm,;
clrscr();
initgraph(&gd,&gm,"C:\\TC\BGI");
ellipse(200,100,0,360,200,100);
getch();
closegraph();
}

Graphics program to draw an arc
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<graphics. lib>
main()
{
int gd = DETECT, gm,;
clrscr();
initgraph(&gd,&gm,"C:\\TC\BGI");
arc(200,100,0,90,100);
getch();
closegraph();
}

Graphics program to draw a rectangle
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<graphics. lib>
main()
{
int gd = DETECT, gm,;
clrscr();
initgraph(&gd,&gm,"C:\\TC\BGI");
rectangle(100,100,200,200);
getch();
closegraph();
}

Graphics program to draw a 7 sided polygon
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<graphics. lib>
main()
{
int gd = DETECT, gm,;
//total six coordinates
int points [] = {200,100,300,100,400,200,300,300,200,300,100,200,200,100};
clrscr();
initgraph(&gd,&gm,"C:\\TC\BGI");
drawpoly(7,points);
//here 7 denotes total sides
getch();
closegraph();
}

Write C program to copy one file in to another using command line arguments

/* program to copy one file in to another using command line arguments */
#include<stdio.h>
void main(argc, argv)
int argc;
char *argv[] ;
{
FILE *A,  *B;
int c;
if(argc==1)
   {
          printf("\n You forgot to enter command line arguments ") ;
exit();
    }
if((A=fopen(argv[1],"r"))==(FILE*)NULL)
printf(" \n Couldn't open %s for reading \n", argv[1]);
else if((B=fopen(argv[2],"w"))==(FILE*)NULL)
printf(" \n Couldn't open %s for writing \n", argv[2]);
else
    {
        while((c=getc(A))! =EOF)
        putc(c, B);
        printf("\n File has been copied \n") ;
  }
}

OUTPUT :
#gcc copyfile.c
#. /a. out
You forgot to enter the command line arguments
#./a.out co1.c out.c
Couldn't open co1.c for reading
#. /a. out comm1.c out.c
File has been copied

Theorems in geometry

Theorem :- Basic Proportionality Theorem (BPT
If a line parallel to one side of a triangle interests the other two sides in two distinct points,  then the line divides the other two sides in proportion.

Theorem :- Converse of Basic Proportionality Theorem
If a line divides two sides of a triangle in the same ratio, then the line is parallel to the third side.

Theorem  of Pythagoras :-
In a right angled triangle ,  the  square  of the hypotenuse is equal to the sum of the squares of the other two sides.

Converse of Pythagoras Theorem :-
In a triangle ,  if the square of one side  is equal to the sum of the squares of the remaining two sides , then the angle opposite to the first side is a right angle and the triangle is a right angled triangle.

Theorem of 30° 60° 90°   Triangle
  If the angles of a triangle are 30°, 60° and 90°, then the side opposite to 30° is half of the hypotenuse and the side opposite to 60° is
√3/2 times the hypotenuse

Converse of 30° 60° 90° triangle
In a right angled triangle,  if the length of one side is √3/2 times the hypotenuse, then the measure of an Angle opposite to that side is 60°.

Theorem of 45° -  45° -  90° triangle
If the angles of a triangle are 45°, 45° and 90°, then each of the perpendicular sides is 1/√2 times  the  hypotenuse .

              Theorem used in Circle

Theorem : A tangent at any point of a circle is perpendicular to the radius through the point of contact.
Converse :  The line perpendicular to a radius at its outer end is a tangent to the circle.

Theorem : The lengths of the two tangent - segments from an external point to a circle are equal.

Theorem : If two circles are touching  circles, then the common point lies on the line joining their centres.

Inspired Angle Theorem :
Theorem : The measure of an angle subtended by an arc at a point on a circle is half of the measure of the angle subtended by the  arc at the centre.

Theorem : The  opposite  angles of a cyclic  quadrilateral are supplementary.

Converse : (test for a quadrilateral to be cyclic )
    If a pair of opposite  angles of a quadrilateral are supplementary, then the quadrilateral is cyclic.

Theorem : If an Angle with its vertex on the circle whose one side touches the circle and the other interests the circle in two points, then the measure of the angle is half the measure of the interested arc.

Theorem : If a secant is drawn through the point of contact of a tangent to a circle, then the angles which tangent make with the chord contained in the secant are equal respectively to the angles subtended by the  chord in the corresponding alternate segments.

Converse : If a line is drawn interesting  a secant of a circle at a common point of the secant and the circle so that the angle formed by it with the chord contained in the  secant is equal to the angle subtended by the chord in the alternate segment, then the line is a tangent to the circle.

Monday, May 9, 2016

Cell phone cloning

What is cell phone cloning ?

Introduction and definition :-
Cell phone cloning is copying the identity of one mobile telephone to another  telephone .Usually this is done for the purpose of making fraudulent telephone calls .The bill for the calls go to the legitimate subscriber .This made cloning very popular in areas with large immigrant populations , where the cost to "call home" was very steep . The cloner is also able to make effectively anonymous calls ,which attracts another group of interested users.

History
Cell phone cloning started with Motorola "bag" phones and reached its peak in the mid 90's with a commonly available modification for the Motorola "brick" phones , sch as the Classic, the Ultra Classic , and the Model 8000.

Significance
Cloning involved modifying or replacing the EPROM in the phone with a new chip which would allow you to configure an ESN (Electronic Serial Number) via software. You would also have to change the MIN (Mobile Identification Number).

Benefits
When you had successfully changed the ESN/MIN pair , your phone was an effective clone of the other phone.

Theories/ Speculation
Cloning required access to ESN and MIN pairs. ESN/MSN pairs were discovered in several ways:
Sniffing the cellular network
Thrashing cellular companies or cellular resellers
Hacking cellular companies or cellular resellers
Phone are more difficult to find and newer phones have not bee successfully reverse - engineered.

Cloning has been successfully demonstrated under GSM , but the process is not easy and it currently remain in the realm of serious hobbyists and researchers.

Sunday, May 8, 2016

Transport Layer Protocols

Need of Transport Layer
a. The Internet layer provides unreliable , connectionless service - "best effort" network.
b. The underlying layer (internal layer ) provides the connectionless protocol IP .
c. Datagrams may be lost or reordered .
d. Datagrams can be duplicated or delivered after long delays .
Thus , there is a need for a layer , which takes care of end - to - end delivery.

Features of transport layer
i. True end to end layer .
ii. Takes care of process to process delivery.
iii. Acts as a liaison between the application layer and the underlying internetwork details .
iv. Shields the applications  from  the complexities of the internetwork.
v. Provides a "logical communication " between application processes running on different hosts .

For this purpose ,it performs the following duties:
i. Packetizing : Divides the application data into packets to be sent over the internetwork .
ii. Connection Control : Controls the "logical " connection between applications processes on source and destination hosts .
iii. Addressing: The packets have to be given to the correct application in the destination machine . For this purpose ,the transport layer uses port numbers to identify the application .

Types of Transport Protocols
The end to end applications require transport services of different types.
a. Some applications like file transfer ,remote login,etc. require reliable ,full duplex , data transmission .
b. Applications using client -server communication ,internet  telephony etc. do not need reliable communication but the communication has to be done at high speed.
Hence there are two protocols in the transport layer :
i. Connectionless unreliable service - UDP
ii. Reliable byte -stream service - TCP

i. UDP
User Datagram Protocol
UDP is a connectionless
unreliable protocol.
- No connection is established  between the sender and receiver beforehand.
- "Best effort" i.e. UDP segments may be lost or delivered out of order .
It does not provide flow and error control.
The sender and receiver applications are identified by ports .
It does multiplexing at the source and demultiplexing at the receiver to deliver data segments to the correct application.

Why is UDP used ?
In spite of the fact that is connectionless and unreliable , UDP is used because
i.    It is a very simple protocol.
ii.   Requires minimum overhead.
iii.  Communication is much faster.
iv.   Some applications themselves do flow and error control. For them, UDP is ideal.

UDP Datagram
The various fields of the datagram are as follows:
Source Port Number (16 bits): Port number used by process running on source host.
Destination Port Number (16 bits ) : Port number used by process running  on destination host.
Length (16 bits ) : Total length of datagram.
Checksum (16 bits ): Optional field . Used to detect errors.

UDP Applications:
i.  It is used for one off data transfer applications.
ii.  If a process requires request response communication like DNS ,UDP is used.
iii.  Some processes have internal error and  flow control mechanisms. They can use UDP, which will be faster. Example : Trivial File Transfer Protocol (TFTP).
iv.  Used in multimedia applications where a stream of multimedia data has to be sent from the source to the receiver.
v.   TCP does not support multi casting or broadcasting . Hence ,applications requiring multi casting or broadcasting use UDP.
vi.  Used in router updating protocols for updating router tables
vii. It can also be used for reliable data transfer, if reliability is added at the application layer.
viii.  Used in Network  Management Protocols like SNMP for communication between manager and agent processes .

Saturday, May 7, 2016

Hash Table

If we have a table organization and a search technique which retrieve the key in a single access ,it would be very efficient. To do so, the position of the key in the table should not depend upon the other keys but the location should be calculated on the basis of the key itself .Such an organization and search technique is called hashing .

In hashing the address or location of an identifier X is obtained by using some function f(X) which gives address of X in a table.

HASHING TERMINOLOGY
Hash function :- A function that transforms a key X into a table index is called a hash function.

Hash address:- The address of X computed by the hash function is called the hash address or home address of X.

Hash Table :- The memory available to maintain the symbol table is sequential . This is referred to as hash table .

Bucket :- Each hash table is partitioned into b buckets ht[0]......ht[b-1].
Each bucket is capable of holding 's' records . Thus , a bucket consists of 's' slots. When s=1 , each bucket can hold 1 record.
The function f(X) maps and identifier X into one of the 'b' buckets i.e. from 0 to b-1.

Synonyms :- Usually , the total number of possible values for identifier X is much larger  than the hash table size. Therefore the hash function f(X) must map several identifiers into the same bucket .
Two identifiers I1 and I2 are synonyms  if   f(I1) = f(I2)

Collision :- When two non identical identifiers are mapped into the same bucket , a collision is said to occur , i.e. f(I1)= f(I2). Hence all synonyms occupy the same bucket.

Overflow :- An overflow is said to occur when an identifier gets mapped onto a full bucket.
When s=1 ,i.e. ,a bucket contains only one record ,collision and overflow occur simultaneously . Such a situation is called a Hash clash.

Load factor :- If n is the total number of identifiers in the table and t is the table size , the load factor is : lf = n/t
It represents the fraction of the table that is occupied .

HASHING FUNCTION
A hashing function f transforms an identifier X  into a bucket address in the hash table .The desirable properties of such a function are as follows.
i.  It should be easily computable .
ii. It should minimize the number of collisions .
iii. The hash function should compute the address,which depends on all or most of the characters in the identifier .
iv.  It should yield uniform bucket addresses for random inputs . Such a function is called a uniform hash function.
Several uniform hash functions are in use some of them are
1 Mid Square
2 Division
3 Folding
4 Digit Analysis

Templates in C++

C++ supports a mechanism known as template to implement the concept of generic programming .

Templates allows us to generate a family of classes or a family of functions to handle different types.

Template classes and functions eliminate code duplication for different types and thus make the program development easier and more manageable.

We can use multiple parameters in both the class templates and function templates.

A specific class created from a class template is called a template class and the process of creating a template class is known as instantiation. Similarly, a specific function created from a function template is called a template function.

Like other functions, template functions can be overloaded.

Member functions of a class template must be defined as function templates using the parameters of the class template.

We may also use non - type parameters such basic or derived data types as arguments templates.


Thursday, May 5, 2016

Congestion in networking


What is congestion?
Congestion is traffic.
Interference of two or more packets .
Reasons:-  Sending packets the same time.

Definition:  Congestion is a situation in which number of packets in network is greater than capacity of network or channel.

Total load > Capacity of channel  ,
is the main reason of congestion

Effect of congestion :-
Two main factors are affected by congestion
1) Delay versus load.
2) Throughput versus load.

When load is less than network capacity delay is permission and vice versa .
Delay depends on propagation delay and transmission delay .
propagation time , transmission time, buffer time
Congestion is directly  proportional to Delay
and
Congestion is directly proportional to Load

Throughput:-
Number of packets successfully delivered is called throughput .
Throughput is inversely proportional to congestion

When less congestion all packets will be successfully delivered means high throughput.

causes of congestion :
If number of packets are same .
If buffer capacity is less .
Insufficient memory buffer .
Slow processor .
Low bandwidth (capacity ) line if channel.
Failed router or processor .
If there is excess traffic to some specific host .

Congestion control:
It refers to technique and mechanism that can either defend congestion or remove congestion .

Two main types of congestion control :
1 ) Open loop ( prevention )
2 ) Closed loop ( removal ) the collision

1) Open loop :-
1. It is either handled by source or destination .
2. Retransmission property.
3. Use of sliding window protocol .example Selectivity.
4. Use of piggy bank acknowledgement .
5. Decision of discarding policy.

2. Closed loop congestion :-
Removal of congestion
1 by using CSMA policy
2 monitoring the system for congestion .
3 dynamically increase buffer capacity
4 if congestion detect at any point inform to all routers within that path
5 dynamically decides the router or path.

 

Tuesday, May 3, 2016

Microcontroller

A microcontroller is  a complete microprocessor system ,containing of microprocessor ,limited amount of ROM RAM and parallel I/O ports ,built on a single integrated circuit .
Microcontroller is in fact a microcomputer ,but it is called so because it is used to perform control functions .
Expanded features of 8052 over 8051 microcontroller are as follows:
a) ROM  :- Microcontroller 8052 has 8 KB bytes onboard ROM or EPROM whereas 8051 has 4 KB  bytes  of ROM .
b)  RAM  :-    Microcontroller 8052 has 256 bytes of onboard RAM whereas 8051 has 128 bytes of RAM.
c)   Time event counter :- 8052 has an extra 16 bit time event counter whereas 8051 has a dual 16 bit time event counter.

अच्छे विचार करे विचार

  पहचान की नुमाईश, जरा कम करें... जहाँ भी "मैं" लिखा है, उसे "हम" करें... हमारी "इच्छाओं" से ज़्यादा "सुन...