My Youtube Channel

Please Subscribe

Flag of Nepal

Built in OpenGL

Word Cloud in Python

With masked image

Sunday, July 30, 2017

POEM

Parents

Mother, Mother
You are dearer than other                                             
                                                                                        
Father, Father                                                                
You are superior to other
Though you don’t become famous
You both can die for us                          

For us you are incarnation of god and first school                    
It is you who teach us in every moment to be graceful         

We the children learn to walk catching your finger
It is you who always save us from danger

There is heaven and world at your feet
No other can take your seat

We the children want only blessings from you
You are everything for us from all point of view.

Saturday, July 29, 2017

MINI PROJECT REPORT OF DSA













Click here to download.

Friday, July 14, 2017

Numerical methods

C++ program for curve fitting of linear and exponential equation

For linear:

#include<iostream>
using namespace std;
class datacalc
{
private:
    float sumxsq,sumxy,sumx,sumy;
    float valuex[50],valuey[50];
    float a,b;
    int i,n;
public:
    void getdata()
    {
        cout<<"enter the no. of data to input:";
        cin>>n;
        cout<<"enter the value for x and y:"<<endl;
        for(i=0;i<n;i++)
        {
            cin>>valuex[i]>>valuey[i];

        }

    }
    void calculate()
    {
         sumxsq=0,sumxy=0,sumx=0,sumy=0;

        for(i=0;i<n;i++)
        {
            sumx=sumx+valuex[i];
            sumy=sumy+valuey[i];
            sumxy=sumxy+valuex[i]*valuey[i];
            sumxsq=sumxsq+valuex[i]*valuex[i];
            a=(sumy*sumxsq-sumx*sumxy)/(n*sumxsq-sumx*sumx);
            b=(n*sumxy-sumx*sumy)/(n*sumxsq-sumx*sumx);
        }
    }
        void display()
        {
            cout<<"the value of a and b are:"<<a<<" , "<<b<<endl;
            cout<<"the required equation is:"<<endl<<"y="<<a<<"+"<<b<<"x";
        }


};
int main()
{
    datacalc d1;
    d1.getdata();
    d1.calculate();
    d1.display();
    return 0;
}


For exponential:

#include<iostream>
#include<cmath>
using namespace std;
class datacalc
{
private:
    float sumxsq,sumxy,sumx,sumy;
    float valuex[50],valuey[50];
    float a,b,A;
    int i,n;
public:
    void getdata()
    {
        cout<<"enter the no. of data to input:";
        cin>>n;
        cout<<"enter the value for x and y:"<<endl;
        for(i=0;i<n;i++)
        {
            cin>>valuex[i]>>valuey[i];

        }

    }
    void calculate()
    {
         sumxsq=0,sumxy=0,sumx=0,sumy=0;

        for(i=0;i<n;i++)
        {
            sumx=sumx+valuex[i];
            sumy=sumy+log(valuey[i]);
            sumxy=sumxy+valuex[i]*log(valuey[i]);
            sumxsq=sumxsq+valuex[i]*valuex[i];
            A=(sumy*sumxsq-sumx*sumxy)/(n*sumxsq-sumx*sumx);
            b=(n*sumxy-sumx*sumy)/(n*sumxsq-sumx*sumx);
            a=exp(A);
        }
    }
        void display()
        {
            cout<<"the value of a and b are:"<<a<<" , "<<b<<endl;
            cout<<"the required equation is:"<<endl<<"y="<<a<<"exp("<<b<<"x)";
        }


};
int main()
{
    datacalc d1;
    d1.getdata();
    d1.calculate();
    d1.display();
    return 0;
}

Data structure and algorithm

Program to convert an infix to postfix in c++

 #include<iostream>
#include<ctype.h>
#define size 50
using namespace std;
char s[size];
int top=-1;
push(char elem)
{
    s[++top]=elem;
}
char pop()
{
    return (s[top--]);
}
int pr(char elem)
{
    switch(elem)
    {
        case '=':return 0;
        case '(':return 1;
        case '-':
        case '+':return 2;
        case '*':
        case '/':return 3;
    }
}
int main()
{
    char infix[50],postfix[50],ch,elem;
    int i=0,k=0;
    cout<<"read the infix expression:";
    cin>>infix;
    push('=');
    while((ch=infix[i++])!='\0')
    {
        if(ch=='(') push(ch);
        else
            if(isalpha(ch)) postfix[k++]=ch;
        else
            if(ch==')')
        {
            while(s[top]!='(')
            postfix[k++]=pop();
            elem=pop();
        }
        else
        {
            while(pr(s[top])>=pr(ch))
                postfix[k++]=pop();
            push(ch);
        }
    }
        while(s[top]!='=')
            postfix[k++]=pop();
        postfix[k]='\0';
        cout<<endl<<"postfix expression:"<<postfix;
return 0;
}

Data structure and algorithm

Program for circular queue in c++

#include<iostream>
using namespace std;
const int size=5;
class cqueue
{
private:
    int cq[size];
    int front,rear,data;
public:
    cqueue()
    {
        front=-1;
        rear=-1;
    }
    void insert(int n)
    {
        if(front==((rear+1)%size))
        {
            cout<<"queue is full."<<endl;

        }
        else if(rear==-1&&front==-1)
        {
            rear=0;
            front=0;
            cq[rear]=n;
            cout<<"inserted data is:"<<cq[rear]<<endl;
        }
        else
        {
            rear=(rear+1)%size;
            cq[rear]=n;
            cout<<"inserted data is:"<<cq[rear]<<endl;
        }
    }
    void deldata()
    {
        if(front==(rear+1))
        {

            cout<<"queue is empty."<<endl;
        }
        else
        {
            data=cq[front];
            cq[front]=NULL;
            cout<<"deleted data:"<<data<<endl;
            front=(front+1)%size;
            //front=front+1;

        }
    }
    void view()
    {
        cout<<"f="<<front<<endl;
        cout<<"r="<<rear<<endl;
    }
};
int main()
{
    cqueue c1;
    c1.insert(10);
    c1.insert(20);
    c1.insert(30);
    c1.insert(40);
    c1.insert(50);
    c1.insert(60);
    c1.deldata();
    c1.deldata();
    c1.deldata();
    c1.deldata();
  c1.view();
    c1.insert(60);
    c1.insert(70);
    c1.insert(80);
    c1.insert(90);
    c1.insert(80);
    c1.insert(90);
    c1.view();
    return 0;
}

Data structure and algorithm

Program for linear queue in c++

#include<iostream>
using namespace std;
const int size =5;
class queue
{
private:
    int front,rear,n;
    int q[size];
public:
       queue()
    {
        front=0;
        rear=0;
    }
    void insert()
    {
        if(rear==size)
        {
            cout<<"queue is full."<<endl;
        }
        else
        {
            cout<<"enter the data in queue:";
            cin>>n;
            q[rear]=n;
            rear++;
            insert();
        }
    }
    void rem()
    {
        if(rear==front)
        {
            cout<<"queue is empty."<<endl;

        }
        else
        {
            cout<<"the deleted data is:"<<q[front]<<endl;
            q[front]==NULL
            front++;
            rem();
        }
    }
};
int main()
{
    queue q1;
    q1.insert();
    q1.rem();
    return 0;
}



Data structure and algorithm

Program for stack in c++

#include<iostream>
using namespace std;
const int size=5;
class stack
{
private:
    int top,q[size],data;
public:
    stack()
    {
        top=-1;
    }
    void push()
    {
        if(top==size-1)
        {
            cout<<"stack overflow"<<endl;
        }
        else
        {
        cout<<"enter the data into the stack:";
        cin>>q[++top];
        push();
        }
    }
    void pop()
    {
        if(top==-1)
        {
            cout<<"stack underflow"<<endl;
        }
        else{
        data=q[top];
        q[top]==NULL;
        cout<<"the deleted data is:"<<data<<endl;
        top--;
        pop();
        }
    }
    void display()
    {
        cout<<"data in the stack:"<<endl;
        for(int i=0;i=4;i++)
        {
            cout<<q[i]<<endl;
        }
    }
};
int main()
{
    stack s1;
    s1.push();
    s1.display();
    s1.pop();
    return 0;
}


8086 Programming

How to display a string terminated by $?

TITLE DISPLAY A STRING
.MODEL SMALL
.STACK 32
.DATA
STR1 DB ".....THE KING OF JUNGLE......$"
.CODE
MAIN PROC FAR
MOV AX, @DATA
MOV DS,AX

MOV AH,09
MOV DX, OFFSET STR1
INT 21H

MOV AX,4C00H
INT 21H
MAIN ENDP
END MAIN

8086 programming

How to display a string using character reading function?

TITLE DISPLAY STRING USING CHARACTER READING FUNCTION
.MODEL SMALL
.STACK 32
.DATA
STR1 DB "....THE KING OF JUNGLE...."
LEN DW $-STR1
.CODE
MAIN PROC FAR
MOV AX,@DATA
MOV DS,AX

MOV CX,LEN
MOV AH,02
MOV BX,OFFSET STR1
L1: MOV DL,[BX]
INC BX
INT 21H
LOOP L1

MOV AX,4C00H
INT 21H
MAIN ENDP
END MAIN

8086 Programming

How to add numbers stored in consecutive memory?

TITLE ADD THE DATA OF TABLE
.MODEL SMALL
.STACK 32
.DATA

TABLE DW 1234H,4563H,7944H,1234H
SUM DW ?
.CODE
MAIN PROC FAR
MOV AX,@DATA
MOV DS,AX

MOV CX,04H
MOV SI,OFFSET TABLE
MOV AX,0000H
L1:ADD AX,[SI]
INC SI
INC SI
DEC CX
JNZ L1


MOV AX,4C00H
INT 21H
MAIN ENDP
END MAIN

8086 Programming

How to get string and display the string in a new line?

TITLE READ AND WRITE STRING
.MODEL SMALL
.STACK 32
.DATA
MAXCHR DB 20H
ACTCHR DB ?
STR1 DB 20 DUP('$')
.CODE
MAIN PROC FAR
MOV AX,@DATA
MOV DS,AX

MOV AH,0AH
MOV DX,OFFSET MAXCHR
INT 21H

MOV AH,02H
MOV DL,0DH
INT 21H
MOV DL,0AH
INT 21H

MOV CL,ACTCHR
MOV CH,00H
MOV BX,OFFSET STR1
L1: MOV DL,[BX]
INC BX
INT 21H
LOOP L1

MOV AX,4C00H
INT 21H
END MAIN

8086 Programming

How to get sentence as input and display each word in new line?

TITLE MULTILINE
.MODEL SMALL
.STACK 32
.DATA
MAXCHR DB 50H
ACTCHR DB ?
STR1 DB 50 DUP(?)
.CODE
MAIN PROC FAR
MOV AX,@DATA
MOV DS,AX

MOV AH,0AH
MOV DX,OFFSET MAXCHR
INT 21H

MOV AH,02H
MOV DL,0DH
INT 21H
MOV DL,0AH
INT 21H

MOV CL,ACTCHR
MOV CH,00H
MOV BX,OFFSET STR1
 
L1:CMP BYTE PTR [BX],20H
JNZ L2
MOV DL,0DH
INT 21H
MOV DL,0AH
INT 21H
INC BX
L2:MOV DL,[BX]
INT 21H
INC BX
LOOP L1

MOV AX,4C00H
INT 21H
MAIN ENDP

END MAIN

8086 Programming

How to add two numbers?

TITLE ADD
.MODEL SMALL
.STACK 32
.DATA
VAL1 DW 1234H
VAL2 DW 4321H
SUM DW ?
.CODE
MAIN PROC FAR
MOV AX,@DATA
MOV DS,AX

MOV AX,VAL1
ADD AX,VAL2
MOV SUM,AX

MOV AX,4C00H
INT 21H
MAIN ENDP
END MAIN

POEM

MYSTERIOUS FOREST




THERE IS A FOREST 
WHERE NOTHING IS IN REST

WHEN WE TOUCH LEAF
ANIMALS BECOME DEAF

IN SPITE OF DOG, LIONS BARK
IN DAY IT IS ALWAYS DARK

THE WATERS ARE OF COLOR RED
BY RABBIT, TIGERS ARE AFRAID

NO SOUND COMES OUT THOUGH THEY HAVE MOUTH

NO ONE KNOWS WHAT IS THE MYSTERY ABOUT?

POEM

MY MOTHERLAND


Warriors saved its sovereignty      
by the use of knife
this is my motherland,
Lovable than my life
In tradition, cast, culture, language
there is diversity
Despite of these differences
there is strong unity
Here people shows such love
that it can even uproot hostility
Throughout the world
It has spread its identity
My motherland is full of
Lowland, valley and Doon
For us these are
a great boon
My motherland is
Superior to heaven
Of  different cast sub cast
Its a common garden
Before her, she has let
no enemy to stand
Thus, I proud to be son
Of my motherland.                             

Friday, March 10, 2017

POEM

FESTIVALS AND TRADITIONS

Holi is a festival of Hinduism
Any people can participate of Buddhism
No Islam or Christianity will be separated
Because the equality is highly exaggerated

Every country has physical and cultural diversity 
So we are challenged to maintain unity
Every castes have customs and traditions
But we should maintain unity in every variations

Buddha taught us non-violence
So we should always pray him with great silence
Parents are our god
So with them we should not do any kind of fraud

Every festivals should be celebrated with great devotion
Because they are important occasions
Festivals are observed for life long and beauty
But not to kill the god gifted humanity

Hindu, Muslim, Buddhism, Christian
Above all, we are human
Don't judge people on the basis of their caste
Because it's only good deed that counts and lasts

---Vijay Yadav


Poem

I saw a bird...




















It was the time of evening
when I saw a bird singing 

She was sitting on a lawn 
having got her wonderful eyes glown

Her head seemed to be brown
because of a beautiful and shiny crown 

Near to me there was a spring
where she was continuously seeing

I wondered for sometime what was there 
but soon I realised her friend was being stared

Suddenly, she started to sing in a sweet voice
then I thought she must be the nature's special choice

After sometime she flew to her way
giving me the freshness of whole day

I waited for her many seasons
and finally a bird came who seemed just like the previous pigeon
                                                              

Thursday, March 9, 2017




Thursday, February 9, 2017

MY BLOG QR CODE...


FEW USEFUL SOURCE CODES RELATED TO DATABASE MANAGEMENT SYSTEM IN VISUAL C++ ...

To download the source code, click here.
or
Scan the given QR code :

LIBRARY MANAGEMENT SYSTEM MADE IN VISUAL C++ ...





To download the file (with source code ), click here.
or
Scan the given QR code:

Wednesday, December 28, 2016

Android game...











           
  Click here to download.

Some programs made in visual basic with source code...

VISUAL BASIC EXAMPLES
 Click here to download.

Tuesday, December 27, 2016

Audio amplifier using IC made in PCB Wizard...






 
 click here to download.

Monday, December 26, 2016

Proposal for mini project in C++










click here to download.

Sunday, December 25, 2016

History of Egypt.

History of Egypt



Thirty of these amazing buildings can be seen in different places of Egypt. 
    Five thousands years ago the lands along river Nile was ruled by powerful kings, 
   called Pharaohs. These ancient Egyptians believed in a life after death. 
   So when pharaoh died  he was buried, and many treasures were buried with 
   him to take to the next world. To honour him, great pyramids were built. His body
   and the treasures were put in the very middle of the pyramids. In these tombs, pictures
   of everyday life were painted on the walls. These are called hieroglyphics. The biggest
   pyramid is called the Great pyramid. It is 144  metres high, and its base has sides 
   230 metres along. Two millions blocks needed. Each blocks weighed 2000 kg. They
   were cut out of the ground with wooden, copper or stone tools. They were pulled by 
   great gangs of men, and they were put into boats. They carried to the site of the 
   pyramid. They were then shaped so that they all fitted exactly.
              
         The Egyptians had special way of wrapping dead bodies, with special chemicals.
         This made the bodies last for thousands of years. These bodies are called `mummies`.
         The mummy of Pharaoh was put in a wooden coffin, and then covered with a wonderful
         gold mask. In November 1922 the entrance to a Pharaoh’s tomb was uncovered. No 
         one had been in it for over three thousand years. It was full of treasures. It
          was the tomb of Tut- ankh- amen. The  pharaoh died while he was still    only a boy. His 
          body was covered with a wonderful gold mask. So we even know what Tutankhamen
          looked like.                                       
          For a long time modern people tried to read the hieroglyphics. Then in 1799 a big flat
          stone tablet was found at a place called Rosetta. On it was written the same things 
          in Greek and in hieroglyphics. Greek is easily read. So the two were compared, and 
          the meanings of lots of hieroglyphics were found.    
                                                                                        

A short history of George Washington.

George Washington
It was a cold winter morning on February 22, 1732. This 

was more than 200 years ago.Inside a Virginia farmhouse where it was Warm and cozy, a special baby boy was born. The baby’s name was George Washington. As little George grew up, he loved the farm and all of the animals. He loved his horse best of all. George had two  brothers who lived away. He lived with a younger sister and three younger brothers. They followed George’s every move. ‘‘Let’s play follow the leader,’’ said Betty. ‘‘George is the Leader,’’ said John. Samuel and charles agreed. George went to a small country school. He worked very hard. He was one of the smartest students. George was also the most honest boy in school. He grew up very fast. He was bigger and taller than all of the other boys. Everyone looked up to George. Sometimes George would choose games  for his                               classmates to play. ‘‘George is a natural-born leader,’’ his schoolmaster would 
say. In a school George liked to read and to write. He liked numbers. But he liked 
to make maps and measure land best of all. This is called surveying. George practiced
 by measuring the vegetables gardens on his farm. Many farmers wanted George to
 survey their land. It would help them to know how much seed to buy when it was
 time to plant their crops. George was only a boy of sixteen. But the farmers trusted 
him. They knew George was very smart and honest. ‘‘He will do a perfect job,’’ one 
farmer said to another. George’s big brother, Lawrence, took him on a surveying
 trip in the Virginia wilderness. They stayed many cold and rainy days and nights. 
There were many wild animals. George learned how to take care Of himself in
 the woods. Living in the wilderness helped George to become an even greater
 leader. When he was only twenty years old he became a major in the Virginia army.  
In 1754 a war broke out. French settlers and Native  Americans in the Ohio valley
 would not let the English settlers have farms there. George Washington was called
 to help the English settlers. He was now Colonel Washington. He led the English 
soldiers and they won the war. Everyone looked up to Colonel Washington. One
 day, met a lovely lady named Martha Custis. She was a widow with two children. 
They fell in love and married in 1759. George and Martha Washington moved
 into a beautiful mansion in Mount Vernon, Virginia. They had many parties, laughter,
 and fun in their home. But Colonel Washington was soon called to war again. 
It was 1775. America was a small country with only thirteen colonies then.
During this time England ruled America. The rulers in England were mistreating 
America. They wanted America to pay unfair taxes. A war broke out. The
 Americans chose George Washington as their leader. The war lasted eight years. 
The Colonel was now General George Washington. Through his leadership, 
the American colonies won the war. America was no longer ruled by England. 
The colonies became the United States of America. Americans were very 
happy. But the new little country needed a leader. Everyone in the land wanted 
one and only one for this job-General George Washington. So they made him the
 first President of the United States of America on April 30, 1789. On the day of his
 inauguration, President George Washington rode on a beautiful white horse on
 his way to the ceremony.  ‘‘Hooray’’ people cheered when President Washington
 stood before them to give to give his speech. Some people cried with joy. President
Washington was a great president. He traveled all over America to see what 
the country needed. He passed good laws to help America. George Washington 
was president for eight years. Afterwards, he went back to his home in Mount
 Vernon. He enjoyed good times and laughter again with Martha, his family and
 friends.
Americans will never forget the first president of
their land.


                                                                               

PYRAMIDICAL QUIZ--A MINI GAME









click here to download.
For source code...
click here