Monday, September 26, 2016

SQL SERVER – Improve performance by turning off AUTO_CLOSE Database Option

Set AUTO_CLOSE Database Option to OFF


You can go to Your Database and Right Click on it. Click on Properties on the right, click menu and it will bring up the following screen. Over here you should change the Auto Close value to FALSE.


You probably tried to upload a file that is too large. Please refer to documentation for a workaround for this limit.

1) Navigate to PHP Setting –> PHP.ini Configuration. Search for the line upload_max_filesize = 2M and post_max_size = 8M and change its value to 100M. After changing value click save.



2) Now you have changed value to 100mb and it must also reflect in phpMyAdmin

C# - Types of Polymorphism in C#.Net with Real Time Example

Polymorphism means many forms (ability to take more than one form). In Polymorphism poly means “multiple” and morph means “forms” so polymorphism means many forms.

1)Compile Time Polymorphism
2)Run Time Polymorphism

Compile Time Polymorphism: Compile time polymorphism means we will declare methods with same name but different signatures in the same class.
How to achieve them as shown below:
Example:
public class Overloading
    {
        //diff no of paramteres
        public int Method(int a)
        {
            return a;
        }
        public int Method(int a , int b)
        {
            return a + b;
        }

        // diff types of parameters
        public float Method(float a)
        {
            return a;
        }

        //diff order of parameters
        public void Method(int b, float a)
        {
        }
        public void Method(float a, int b)
        {
        }

    }
Run Time Polymorphism: Run time polymorphism also called as late binding or method overriding or dynamic polymorphism. Run time polymorphism or method overriding means same method names with same signatures in different class.








How to achieve run time polymorphism: In base class if we declare methods with virtual keyword then only we can override those methods in derived class using override keyword.