My Youtube Channel

Please Subscribe

Flag of Nepal

Built in OpenGL

Word Cloud in Python

With masked image

Friday, December 7, 2018

Design Home page of facebook using HTML and CSS.



HTML code:


<!DOCTYPE html>
<html>
<head>
<title>facebook</title>
<link rel="stylesheet" type="text/css" href="css/facebook.css">
</head>
<body>
<div class="topbar">

<div class="facebookfont">
<p>facebook</p>
</div>

<div class="email">
<form action="" method="get">
<label for="emailid">Email or Phone</label><br>
<input id="emailid" type="text" name="emailid">
</form>
</div>

<div class="password">
<form action="" method="get">
<label for="password">Password</label><br>
<input id="password" type="password" name="password"><br>
<label id="account">Forgot account?</label>

</form>
</div>

<div class="login">
<input type="submit" name="login" value="Log In">
</div>

</div>

<div class="wholelowersection">
<div class="firstcolumn">
<div class="firstcolumntitle">
<p>Connect with friends and the<br> world around you on Facebook.</p>
</div>
<div class="firstcolumnsubtitle1">
<div class="subtitle11">
<p>See photos and updates</p>
</div>
<div class="subtitle12">
<p>from friends in News Feed.</p>
</div>
</div>

<div class="firstcolumnsubtitle2">
<div class="subtitle11">
<p>Share what's new </p>
</div>
<div class="subtitle12">
<p>in your life on your Timeline.</p>
</div>
</div>

<div class="firstcolumnsubtitle3">
<div class="subtitle11">
<p>Find more </p>
</div>
<div class="subtitle12">
<p>of what you're looking for with Facebook Search.</p>
</div>
</div>

</div>

<div class="secondsection">
<form  action="" method="post">
<br><label id="signup">Sign Up</label><br>
<label id="free">It's free and always will be. </label><br>
<div class="flname">
<input class="name" type="text" name="fname" placeholder="First name">
<input class="name" type="text" name="lname" placeholder="Last name">
</div>

<input class="mp" type="text" name="mobileno" placeholder="Mobile number or email">
<input class="mp" type="password" name="password" placeholder="New Password"><br><br>

<div class="birthdayblock">
<div class="birthdayblock1">
<label id="lblbirthday">Birthday</label><br>
<select class="birthdayselect">
<option  id="month">Month</option>
<option id="Jan">Jan</option>
<option id="Feb">Feb</option>
<option id="Dec" selected="selected">Dec</option>
</select>

<select class="birthdayselect">
<option id="Day">Day</option>
<option id="one" >1</option>
<option id="two" selected="selected">2</option>
<option id="three">3</option>
</select>

<select class="birthdayselect">
<option id="year">Year</option>
<option selected="selected">1993</option>
<option>1996</option>
<option>1997</option>
</select>
</div>
<div class="birthdayblock2">

<label>Why do I need to provide my<br>birthday? </label>
</div>
</div>
<div class="gender">
<div>
  <input type="radio" id="female" name="gender" value="Female">
  <label for="female">Female</label>
    </div>
    <div>
  <input type="radio" id="male" name="gender" value="Male">
  <label for="male">Male</label>
</div>
</div>
<div class="agreementblock">
<p>
By clicking Sign Up, you agree to our <span >Terms, Data Policy</span> and<br> <span>Cookies Policy</span>. You may receive SMS Notifications from us and<br> can opt out any time.
</p>
</div>
<div class="signupbutton">
<input type="submit" name="signup" value="Sign Up">
</div>
</form>
</div>
</div>
</body>

</html>


CSS code

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
}


.topbar{
width:100%;
height: 90px;
color:white;
display: inline-grid;
background-color: #3b5998;
}

.facebookfont{
padding-left: 200px;
font-family: Segoe UI;
font-size: 42px;
font-weight: bold;
padding-top: 24px;
}

.topbar{
display: grid;
grid-template-columns: 55% 13% 13% 19%;
grid-gap: 10px;

}

.topbar >div{
background-color: #3b5998;

}

.topbar >div:nth-child(odd){
background-color: #3b5998;
}

.email{
padding-top: 15px;
}

.email input[type="text"]{
margin-top: 5px;
}

.password{
padding-top: 15px;

}

.password input[type="password"]{
margin-top: 5px;
margin-bottom: 5px;
}

#account{
color: #8b9dc3;
}

.login input[type="submit"]{
margin-top: 38px;
height: 20px;
background-color: #8b9dc3;
color:white;
border: none;
}

.wholelowersection{
height: 600px;
display: grid;
grid-template-columns: 55% 45%;

}

.wholelowersection >div{
background-color: #dfe3ee;

}

.wholelowersection >div:nth-child(even){
background-color: #dfe3ee;
}

#signup{
font-family: Segoe UI;
font-size: 38px;
font-weight: bold;
}

#free{
font-family: Segoe UI;
font-size: 20px;

}

.secondsection input[type="text"]{
height: 36px;

}

.name{
font-size: 20px;
width: 200px;
margin-top: 25px;
text-indent: 10px;
border: 1px solid #ccc;
border-radius: 6px;
}

.flname{
display: grid;
grid-template-columns: 37% 60%;
}

.mp{
height: 36px;
font-size: 20px;
width: 425px;
margin-top: 12px;
text-indent: 10px;
border: 1px solid #ccc;
border-radius: 6px;
}

.secondsection input[type="password"]{
margin-bottom: 10px;
}

#lblbirthday{
font-size: 20px;
}

.birthdayselect{
height: 30px;
width:70px;
margin-top: 5px;
}

.birthdayblock{
display: grid;
grid-template-columns: 38% 50%;

}

.birthdayblock1{
}

.birthdayblock2 label{

font-size: 12px;
color:#3b5998;
display: inline-block;
margin-top: 30px;
}

.gender{
display: grid;
grid-template-columns: 15% 70%;
margin-top: 15px;
}

.gender label{
font-size: 20px;
}

.agreementblock{
display: inline-block;
margin-top: 15px;
font-size: 12px;
color: #696969;
}

.signupbutton input[type="submit"]{

background-color: #228B22;
color: white;
margin-top: 20px;
height: 40px;
width: 200px;
border: none;
border-radius: 5px;
font-size: 19px;
}

.firstcolumntitle{
display: inline-block;
margin-top: 60px;
margin-left: 150px;
font-family: Segoe UI;
font-size: 28px;
font-weight: bold;
}

.firstcolumnsubtitle1{
display: grid;
grid-template-columns: 35% 65%;
margin-left: 150px;
margin-top: 60px;
}

.subtitle11{
font-weight: bold;
font-size: 20px;

}

.subtitle12{
font-size: 20px;
color: #696969;
}

.firstcolumnsubtitle2{
display: grid;
grid-template-columns: 27% 73%;
margin-left: 150px;
margin-top: 60px;
}

.firstcolumnsubtitle3{
display: grid;
grid-template-columns: 17% 83%;
margin-left: 150px;
margin-top: 60px;
}

.agreementblock span{

color:#3b5998;
}



Draw the pattern.









Program code (in c++)

#include<iostream>
using namespace std;

int main()
{
    int a[10]={0,1,2,3,4,5,6,7,8,9};
    for(int i=1;i<=5;i++)
    {
        for(int p=1;p<=5-i;p++)
        {
            cout<<" ";
        }

        int n=1;
        int k=i;

        do{
            if(n<=i)
            {

                cout<<a[k];
                k++;

            }
            else{
                k--;

                cout<<a[k-1];
            }




            n++;
        }while(n<=(2*i-1));
        cout<<"\n";
    }

    return 0;


}



Find smallest positive integer in an array.

Write a function:
function solution(A);
that, given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A.
For example, given A = [1, 3, 6, 4, 1, 2], the function should return 5.
Given A = [1, 2, 3], the function should return 4.
Given A = [−1, −3], the function should return 1.

Program code (in c++):
#include<iostream>
using namespace std;

int find_integer(int na,int a[])
{

    int b[100],nb=0;
    //Arranging array in ascending order
        for(int i=0; i<na; i++)
        {
            for(int j=i+1; j<na; j++)
            {

                if(a[j] < a[i])
                {
                    int temp;
                    temp = a[i];
                    a[i] = a[j];
                    a[j] = temp;
                }
            }
        }
    //Removing elements from an array which is either negative integer or zero
        for(int i=0;i<na;i++)
        {

            if(a[i]<=0)
            {
                continue;
            }
            else{
                b[i]=a[i];
                nb=nb+1;
            }
            //cout<<b[i]<<endl;

         }

       //Removing duplicate/repeated integers from array
        int temp[100];
         int j = 0;
        for (int i=0; i<nb-1; i++)
        {
            if (b[i] != b[i+1])
                temp[j++] = b[i];

        }

        temp[j++] = b[nb-1];

        // Modifying original array

        for (int i=0; i<j; i++)
        {
            b[i] = temp[i];

        }
    //Finding the smallest integer not available in given array 'b'
        if(nb==0)
        {
            int num=1;
            return num;
        }
        else{

        int finalnum=0;
        int k=0;
        int checknum=1;
        int trace=0;
        for(int i=0;i<nb;i++)
        {
             for(k=trace;k<nb;k++)
               {

                    trace=k+1;
                    if(checknum==b[k])
                    {
                       finalnum=0;
                       break;
                    }
                    else{
                        finalnum=checknum;
                        goto l1;

                    }


                }

                    checknum++;

        }

      l1:  if(finalnum==0)
        {
           return checknum;
        }
        else
        {

            return finalnum;

        }
    }


}



int main()
{
    int na,a[100],b[100],nb=0;
    int get_result;
        cout<<"Enter the size of array: ";
        cin>>na;

        for(int i=0;i<na;i++)
        {
             cout<<"Enter the elements of array:  ";
             cin>>a[i];
        }

        get_result=find_integer(na,a);
        cout<<endl<<"The required smallest integer is : "<<get_result;

    return 0;
}

Output


Saturday, June 23, 2018

Internal Assessment Database in Visual c#



























click here to download.

Saturday, May 12, 2018

How to restore/import dump file in MySQL workbench ?

The following steps can be applied to import dump file :

1. Open MySQL workbench and connect to database using your password. You can see the window as given below:


2. You will be provided two ways to import the dump files.
First, you can import the dump files by selecting the option "import from dump project folder". Here you can select the folder where all your dump files are stored. It will automatically import the files in database from which it was created if the database with the same name exists. So, it is better to create database with the same name and then start the importing process.
Second, you can select the option "import from self-contained file" which will allow you to add dump files one by one. In this option before starting import process, choose the default target schema as your database in which you want to import the dump files, from the drop down list.
 Then click on "start import" button. This will import your single dump files in the selected database. Similarly, you can repeat the process to import other files as well.


3. You are done with it. If you don't see the imported table in your selected schema then close and re-open the MySQL workbench.

How to backup data in MySQL workbench ?

The following steps can be applied to backup data in MySQL using workbench :

1. Open workbench and connect to your database using your username and password.
2. Click on "Data Export" option under "Management" at the left side of the screen.


3. You will find a list of schema from where you can select which of the schema's table do you want to backup. If you want to backup all the tables of particular table then simply click on that schema but if you want to backup only few tables of a particular schema then double click on that schema and you can see the list of tables present in the selected schema on the right side of the screen where you can unselect the table you don't want to backup.


4. Select the folder where you want the backup file to be created.


5. Finally, click on the button "start export" and wait for the operations to complete.


6. You are done. Check your specified folder to get the backup file. You can again import/restore the data whenever needed.
The above process will backup each tables separately. If you desire to backup all the tables in a single file then after step 3 in above process, click on "Export to self-contained file" radio button and also tick the option "create dump in a single transaction" and select the folder where you want to save the file. Then click on export button.


Tuesday, May 1, 2018

How to watch IPL 2018 for free ?

There are many ways you can go through to watch IPL 2018 for free. I will be discussing few methods here.
First of all if you are in India you can watch IPL through Jio TV app or airtel TV app which you can download from playstore. 
There are few other methods which might not be official to watch IPL on internet from broadcaster.
1. You can download an app named "Live NetTV" by clicking here and you can run on your android mobile. You can get tons of channel here. When installed on your android phone, click on "sports" option and scroll down to find "sky sports cricket" channel in international category. You can stream from there. You will get various links over there. You can choose whichever works for you. 
You can also stream it on "willow cricket" channel available in the same category.

How to run in PC?
If you desire to run this app in PC,  download bluestacks or any other android emulator and then you can install this app over there.

2. You can also use alternative android app like "Mobdro" to watch IPL live on moblie. Here also you can find various channels for live streaming of IPL may be you can find star sports 1 as well here along with the channels mentioned above.

3. If you don't want to use apps or watch on mobile, here are few links which can help you for live streaming on your PC.

4. You can also watch IPL live on "Hotstar" but the problem is you will get it free for only ten minutes. After that you will have to subscribe to any one of their plan to watch it. You can actually watch free on hotstar as well but it a is tedious job you will do i.e. you will have to clear the cookies of your browser in every 10 minutes.

Except above all you can watch the highlights of every match, press conference, presentations, amazing moments of the matches of IPL anytime on its official website "iplt20.com".
Also you can watch some matches on DD sports but an hour delay, probably only one match in a week.



Saturday, April 28, 2018

Are you not able to see available networks for wifi in windows 10 ? Here is the solution.

Sometimes while working in our laptop, suddenly we are not able to see the available networks for connection though the network is easily available on other devices. It is frequently seen problem in windows 10. This problem may arise while upgrading our operating system from may be windows 7/8/8.1 to windows 10 or may be the wireless driver is corrupted due to some reasons while working in our PC. So, here is one of many possible solutions that might help you.
Follow the given steps:-

Step 1:
Open device manager. You can do the in the given way:
Open run by using shortcut key "Windows+R" or from entering "run" in search box.
Then write "devmgmt.msc" and press ok.


Step 2:
Expand the option "Network adapters" . Right click on "Inter(R) Dual Band Wireless" option and choose "update driver". A window will be displayed with two options. If you have the driver in your PC then select second option and locate the driver to install it otherwise go for first option which will automatically locate and install the driver from PC if available otherwise from online source if your PC is connected to internet through some kind of MODEM.


When your driver is installed or updated, you will be available to see the available networks for wifi.
If the problem persists then uninstall the current driver installed in your PC and reinstall the latest driver by downloading from the online sources.