How to crack Wi-Fi password? Example.

If want to use. Comment please.

netsh wlan show profile name=YourWiFiName key=clear
Share:

Stylish Tooltip in Bootstrap

Example 

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
    <div class="container">
        <br /><br /><br /><br />
        <a href="#" title="Software Developer" data-toggle="tooltip" data-placement="right">Kulshresth Nagar</a><br /><br />
        <a href="#" title="Software Developer" data-toggle="tooltip" data-placement="left" style="margin-left: 40px">Kulshresth Nagar</a><br /><br />
        <a href="#" title="Software Developer" data-toggle="tooltip" data-placement="top">Kulshresth Nagar</a><br /><br />
        <a href="#" title="Software Developer" data-toggle="tooltip" data-placement="bottom">Kulshresth Nagar</a>
    </div>
    <script>
        $(document).ready(function () {
            $('[data-toggle="tooltip"]').tooltip();
        });
    </script>
</body>
</html>
Share:

Bootstrap Modal Popup. Example.

Example 

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
    <div class="container">
        <h1 class="text-center text-white bg-dark" >Kulshresth</h1>
        <button class="btn btn-success" data-target="#mymodal" data-toggle="modal">Sign Up</button>
        <div class="modal" id="mymodal">
            <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content">
                    <div class="modal-header">
                        <h3 class="text-center text-primary">Sign Up</h3>
                        <button type="button" class="close" data-dismiss="modal">  &times;  </button>
                    </div>
                    <div class="modal-body">
                        <form>
                            <div class="form-group">
                                <label><i class="fa fa-user fa-2x"></i> Username : </label>
                                <input type="text" name="username" class="form-control" />
                            </div>
                            <div class="form-group">
                                <label><i class="fa fa-lock fa-2x"></i> Password : </label>
                                <input type="password" name="password" class="form-control" />
                            </div>
                            <div class="form-group">
                                <label><i class="fa fa-envelope fa-2x"></i> Email : </label>
                                <input type="text" name="email" class="form-control" />
                            </div>


                        </form>
                    </div>
                    <div class="modal-footer justify-content-center">
                        <button class="btn btn-danger " data-dismiss="modal">Submit</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
Share:

What is Selector in JavaScript? Example.

Selectors are used to "find" (select) HTML elements based on their tag name, id, classes, types, attributes, values of attributes and much more. 

A list of all selectors can be found in our CSS Selector Reference.

Example 

Type Selector:-

p{
  color : red;
}

Class Selector:-

.head{
   color:green;
}

Id Selector:-

#Box{
   color: yellow;
}

Universal Selector:-

*{
   margin:0;
   padding:0;
}
Share:

When use Interface and Abstract class? Example.

An abstract class allows you to create functionality that subclasses can implement or override. 


An interface only allows you to define functionality, not implement it. And whereas a class can extend only one abstract class, it can take advantage of multiple interfaces.










Share:

Difference between == and .Equals method in C#. Example.

The Equals() method compares only content.

Example

using System;
namespace ComparisionExample {
   class Program { 
      static void Main(string[] args) { 
         string str = "hello"; 
         string str2 = str; 
         Console.WriteLine("Using Equality operator: {0}", str == str2);
         Console.WriteLine("Using equals() method: {0}", str.Equals(str2));
         Console.ReadKey();
      }  
   }
}

Output

Using Equality operator: True
Using equals() method: True

The Equality operator is used to compare the reference identity.

Example

using System;
namespace Demo {
   class Program { 
      static void Main(string[] args) { 
         object str = "hello";
         char[] values = {'h','e','l','l','o'};
         object str2 = new string(values);         
         Console.WriteLine("Using Equality operator: {0}", str == str2);
         Console.WriteLine("Using equals() method: {0}", str.Equals(str2));
         Console.ReadKey();
      }  
   }
}

Output

Using Equality operator: False
Using equals() method: True
Share:

What is Generics in C#? Example.

Question 1. What Is Generics?
Answer :
Generics are the most powerful features introduced in C# 2.0. It is a type-safe data structure that allows us to write codes that works for any data types.
Question 2. What Is A Generic Class?
Answer :
A generic class is a special kind of class that can handle any types of data. We specify the data types during the object creations of that class. It is declared with the bracket <>. For example consider the following Comparer class, which has a method that compare two value and returns as Boolean output.
public class Comparer
{
    public bool Compare(Unknown t1, Unknown t2)
  {  
         if (t1.Equals(t2))
      {
            return true;
        }
        else
        {
            return false;
        }
    }
}
Comparer oComparerInt = new Comparer();
Console.WriteLine(oComparerInt.Compare(10, 10));
Comparer oComparerStr = new Comparer();
Console.WriteLine(oComparerStr.Compare("jdhsjhds", "10"));
Question 3. Why We Should Use Generics?
Answer :
Generic provides lot of advantages during programming. We should use generics for the following reasons:
It allows creating class, methods which are type-safe
It is faster. Because it reduce boxing/un-boxing
It increase the code performance
It helps to maximize code reuse, and type safety
Share:

What is Serialization in C#? Example.

Answer :
When we want to transport an object through network then we need to convert the object into a stream of bytes. Serialization is a process to convert a complex objects into stream of bytes for storage (database, file, cache, etc) or transfer. Its main purpose is to save the state of an object.
De-serialization is the reverse process of creating an object from a stream of bytes to their original form.
Question 2. What Are The Types Of Serialization?
Answer :
The types of Serializations are given bellow:
1  Binary Serialization
            In this process all the public, private, read only members are serialized and convert into stream of bytes. This is used when we want a complete conversion of our objects.
2  SOAP Serialization
           In this process only public members are converted into SOAP format. This is used in web services.
3  XML Serialization
            In this process only public members are converted into XML. This is a custom serialization. Required namespaces: System.Xml, System.Xml.Serialization.
Question 3. Why Serialization And Deserialization?
Answer :
For example consider, we have a very complex object and we need XML format to show it on HTML page. Then we can create a XML file in the disk, writes all the necessary data on the XML file, and use it for the HTML page. But this is not good approach for large number of users. Extra space is required; anyone can see the XML file which creates security issue. We can overcome it by using XML serialization.
Question 4. When To Use Serialization?
Answer :
Serialization is used in the following purposes:
To pass an object from on application to another
In SOAP based web services
To transfer data through cross platforms, cross devices
Share:

HTTP Error Code's

200 OK — This is most commonly used HTTP code to show that the operation performed is successful.
201 CREATED — This can be used when you use the POST method to create a new resource.
202 ACCEPTED — This can be used to acknowledge the request sent to the server.
400 BAD REQUEST — This can be used when client-side input validation fails.
401 UNAUTHORIZED / 403 FORBIDDEN— This can be used if the user or the system is not authorized to perform a certain operation.
404 NOT FOUND— This can be used if you are looking for a certain resource and it is not available in the system.
500 INTERNAL SERVER ERROR — This should never be thrown explicitly but might occur if the system fails.
502 BAD GATEWAY — This can be used if the server received an invalid response from the upstream server.
Share:

What is the difference between Rest and Soap in C#? Example.

SOAP
SOAP is a protocol.
SOAP stands for Simple Object Access Protocol.
SOAP can't use REST because it is a protocol.
SOAP uses services interfaces to expose the business logic.
SOAP defines standards to be strictly followed.
SOAP requires more bandwidth and resource than REST.
SOAP defines its own security.
SOAP permits XML data format only.
SOAP is less preferred than REST.
REST
REST is an architectural style.
REST stands for Representational State Transfer.
REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP.
REST uses URI to expose business logic.
REST does not define too much standards like SOAP.
REST requires less bandwidth and resource than SOAP.
RESTful web services inherits security measures from the underlying transport.
REST permits different data format such as Plain text, HTML, XML, JSON etc.
REST more preferred than SOAP.
Share:

What is the difference between Dictionary And Hashtable in C#? Example.

Dictionary
Dictionary is generic type Dictionary<TKey,TValue>
Dictionary class is a strong type < TKey,TValue > Hence, you must specify the data types for key and value.
There is no need of boxing/unboxing.
When you try to access non existing key dictionary, it gives runtime error.
Dictionary maintains an order of the stored values.
There is no need of boxing/unboxing, so it is faster than Hashtable.
Hashtable
Hashtable is non-generic type.
Hashtable is a weakly typed data structure, so you can add keys and values of any object type.
Values need to have boxing/unboxing.
When you try to access non existing key Hashtable, it gives null values.
Hashtable never maintains an order of the stored values.
Hashtable needs boxing/unboxing, so it is slower than Dictionary.

Share:

Friday, 12 July 2019

Thursday, 11 July 2019

Stylish Tooltip in Bootstrap

Example 

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
    <div class="container">
        <br /><br /><br /><br />
        <a href="#" title="Software Developer" data-toggle="tooltip" data-placement="right">Kulshresth Nagar</a><br /><br />
        <a href="#" title="Software Developer" data-toggle="tooltip" data-placement="left" style="margin-left: 40px">Kulshresth Nagar</a><br /><br />
        <a href="#" title="Software Developer" data-toggle="tooltip" data-placement="top">Kulshresth Nagar</a><br /><br />
        <a href="#" title="Software Developer" data-toggle="tooltip" data-placement="bottom">Kulshresth Nagar</a>
    </div>
    <script>
        $(document).ready(function () {
            $('[data-toggle="tooltip"]').tooltip();
        });
    </script>
</body>
</html>

Bootstrap Modal Popup. Example.

Example 

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
    <div class="container">
        <h1 class="text-center text-white bg-dark" >Kulshresth</h1>
        <button class="btn btn-success" data-target="#mymodal" data-toggle="modal">Sign Up</button>
        <div class="modal" id="mymodal">
            <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content">
                    <div class="modal-header">
                        <h3 class="text-center text-primary">Sign Up</h3>
                        <button type="button" class="close" data-dismiss="modal">  &times;  </button>
                    </div>
                    <div class="modal-body">
                        <form>
                            <div class="form-group">
                                <label><i class="fa fa-user fa-2x"></i> Username : </label>
                                <input type="text" name="username" class="form-control" />
                            </div>
                            <div class="form-group">
                                <label><i class="fa fa-lock fa-2x"></i> Password : </label>
                                <input type="password" name="password" class="form-control" />
                            </div>
                            <div class="form-group">
                                <label><i class="fa fa-envelope fa-2x"></i> Email : </label>
                                <input type="text" name="email" class="form-control" />
                            </div>


                        </form>
                    </div>
                    <div class="modal-footer justify-content-center">
                        <button class="btn btn-danger " data-dismiss="modal">Submit</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>

Thursday, 4 July 2019

What is Selector in JavaScript? Example.

Selectors are used to "find" (select) HTML elements based on their tag name, id, classes, types, attributes, values of attributes and much more. 

A list of all selectors can be found in our CSS Selector Reference.

Example 

Type Selector:-

p{
  color : red;
}

Class Selector:-

.head{
   color:green;
}

Id Selector:-

#Box{
   color: yellow;
}

Universal Selector:-

*{
   margin:0;
   padding:0;
}

Tuesday, 2 July 2019

When use Interface and Abstract class? Example.

An abstract class allows you to create functionality that subclasses can implement or override. 


An interface only allows you to define functionality, not implement it. And whereas a class can extend only one abstract class, it can take advantage of multiple interfaces.










Difference between == and .Equals method in C#. Example.

The Equals() method compares only content.

Example

using System;
namespace ComparisionExample {
   class Program { 
      static void Main(string[] args) { 
         string str = "hello"; 
         string str2 = str; 
         Console.WriteLine("Using Equality operator: {0}", str == str2);
         Console.WriteLine("Using equals() method: {0}", str.Equals(str2));
         Console.ReadKey();
      }  
   }
}

Output

Using Equality operator: True
Using equals() method: True

The Equality operator is used to compare the reference identity.

Example

using System;
namespace Demo {
   class Program { 
      static void Main(string[] args) { 
         object str = "hello";
         char[] values = {'h','e','l','l','o'};
         object str2 = new string(values);         
         Console.WriteLine("Using Equality operator: {0}", str == str2);
         Console.WriteLine("Using equals() method: {0}", str.Equals(str2));
         Console.ReadKey();
      }  
   }
}

Output

Using Equality operator: False
Using equals() method: True

What is Generics in C#? Example.

Question 1. What Is Generics?
Answer :
Generics are the most powerful features introduced in C# 2.0. It is a type-safe data structure that allows us to write codes that works for any data types.
Question 2. What Is A Generic Class?
Answer :
A generic class is a special kind of class that can handle any types of data. We specify the data types during the object creations of that class. It is declared with the bracket <>. For example consider the following Comparer class, which has a method that compare two value and returns as Boolean output.
public class Comparer
{
    public bool Compare(Unknown t1, Unknown t2)
  {  
         if (t1.Equals(t2))
      {
            return true;
        }
        else
        {
            return false;
        }
    }
}
Comparer oComparerInt = new Comparer();
Console.WriteLine(oComparerInt.Compare(10, 10));
Comparer oComparerStr = new Comparer();
Console.WriteLine(oComparerStr.Compare("jdhsjhds", "10"));
Question 3. Why We Should Use Generics?
Answer :
Generic provides lot of advantages during programming. We should use generics for the following reasons:
It allows creating class, methods which are type-safe
It is faster. Because it reduce boxing/un-boxing
It increase the code performance
It helps to maximize code reuse, and type safety

What is Serialization in C#? Example.

Answer :
When we want to transport an object through network then we need to convert the object into a stream of bytes. Serialization is a process to convert a complex objects into stream of bytes for storage (database, file, cache, etc) or transfer. Its main purpose is to save the state of an object.
De-serialization is the reverse process of creating an object from a stream of bytes to their original form.
Question 2. What Are The Types Of Serialization?
Answer :
The types of Serializations are given bellow:
1  Binary Serialization
            In this process all the public, private, read only members are serialized and convert into stream of bytes. This is used when we want a complete conversion of our objects.
2  SOAP Serialization
           In this process only public members are converted into SOAP format. This is used in web services.
3  XML Serialization
            In this process only public members are converted into XML. This is a custom serialization. Required namespaces: System.Xml, System.Xml.Serialization.
Question 3. Why Serialization And Deserialization?
Answer :
For example consider, we have a very complex object and we need XML format to show it on HTML page. Then we can create a XML file in the disk, writes all the necessary data on the XML file, and use it for the HTML page. But this is not good approach for large number of users. Extra space is required; anyone can see the XML file which creates security issue. We can overcome it by using XML serialization.
Question 4. When To Use Serialization?
Answer :
Serialization is used in the following purposes:
To pass an object from on application to another
In SOAP based web services
To transfer data through cross platforms, cross devices

HTTP Error Code's

200 OK — This is most commonly used HTTP code to show that the operation performed is successful.
201 CREATED — This can be used when you use the POST method to create a new resource.
202 ACCEPTED — This can be used to acknowledge the request sent to the server.
400 BAD REQUEST — This can be used when client-side input validation fails.
401 UNAUTHORIZED / 403 FORBIDDEN— This can be used if the user or the system is not authorized to perform a certain operation.
404 NOT FOUND— This can be used if you are looking for a certain resource and it is not available in the system.
500 INTERNAL SERVER ERROR — This should never be thrown explicitly but might occur if the system fails.
502 BAD GATEWAY — This can be used if the server received an invalid response from the upstream server.

What is the difference between Rest and Soap in C#? Example.

SOAP
SOAP is a protocol.
SOAP stands for Simple Object Access Protocol.
SOAP can't use REST because it is a protocol.
SOAP uses services interfaces to expose the business logic.
SOAP defines standards to be strictly followed.
SOAP requires more bandwidth and resource than REST.
SOAP defines its own security.
SOAP permits XML data format only.
SOAP is less preferred than REST.
REST
REST is an architectural style.
REST stands for Representational State Transfer.
REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP.
REST uses URI to expose business logic.
REST does not define too much standards like SOAP.
REST requires less bandwidth and resource than SOAP.
RESTful web services inherits security measures from the underlying transport.
REST permits different data format such as Plain text, HTML, XML, JSON etc.
REST more preferred than SOAP.

What is the difference between Dictionary And Hashtable in C#? Example.

Dictionary
Dictionary is generic type Dictionary<TKey,TValue>
Dictionary class is a strong type < TKey,TValue > Hence, you must specify the data types for key and value.
There is no need of boxing/unboxing.
When you try to access non existing key dictionary, it gives runtime error.
Dictionary maintains an order of the stored values.
There is no need of boxing/unboxing, so it is faster than Hashtable.
Hashtable
Hashtable is non-generic type.
Hashtable is a weakly typed data structure, so you can add keys and values of any object type.
Values need to have boxing/unboxing.
When you try to access non existing key Hashtable, it gives null values.
Hashtable never maintains an order of the stored values.
Hashtable needs boxing/unboxing, so it is slower than Dictionary.

Popular

Total Pageviews

Archive