Banner Ad

Wednesday, April 16, 2014

Daily Interview Question #8 : What are the efficient ways to show million records in a page?

By Francis   Posted at   1:27 PM   No comments

The below answer is my own suggestions that I gave as an answer.

                  In practical there is no need of pull million of records at one call. Instead of that we can show 10 or 100 of records in the web page with pagination. To pull the records from Database, just write a stored procedure it will also contains the pagination logic. That is, if the second page clicked, the stored procedure pull the rows from 101 to 200.

The above method consist 2 advantage:

1) Increased performance (only we pull and show 100 records).

2) Faster retrieval.

Monday, April 14, 2014

JQuery Tips and Tricks #1–Simple Addition using JQuery

By Francis   Posted at   5:51 AM   JQuery Tips No comments
                                In this post we are going to see a simple addition of 2 numbers using JQuery. Copy and paste the below code:

Sunday, April 13, 2014

ASP.Net Forums – FAQ #1 : How to enable Adsense in my site?

By Francis   Posted at   8:14 PM   Enable Adsense 1 comment
                        


This is the most frequently asked question in ASP.Net Forums. As a Adsense user (struggled with google over 6 months I got my adsense approval), I’m going to explain how to enable adsense in your website regardless of technology (either you used ASP.Net or PHP or Java etc) which you are using to built your site.

I just want to tell one thing first there is no short cut to get your adsense approval from google. Go with the below guidelines:

Sunday, March 16, 2014

Daily Interview Question #7: Implicit and Explicit Implementation of Interface

By Francis   Posted at   12:22 AM   OOPS interview Questions No comments

                                                   This is the most common interview question for experienced professionals.

Normally an interface can be implemented in a class in a normal way which is a implicit implementation. Sometime, we may have same method name in different interfaces. If this is the case, we need to do explicit implementation of the interface method. The main use of explicit implementation is to avoid the ambiguities between the class or method name. In order,  to do that the interface name put before that interface’s method.

 

Below example, shows the implicit and explicit implementation:

 

namespace ConsoleApplicationC
{
    // 2 interfaces with same method name
    interface IintegerAdd
    {
        void Add();
    }
    interface IfloatAdd
    {
        void Add();
        void Multiply();
    }


    // We implement Both interfaces
    class ArithmeticOperation : IintegerAdd, IfloatAdd
    {
        // Implicit  Implementation : There is no name collision so we can implement implicitly
        // NOTE : public modifier MUST here
        public void Multiply()
        {
            float a = 1.5f, b = 2.5f;
            Console.WriteLine("Float Multiplication is:" + a * b);
        }


        // Explicit Implementation :  Explicitly tell the compiler that we implement the interface IintegerAdd
        void IintegerAdd.Add()
        {
            int a = 10, b = 20;
            Console.WriteLine("Integer Addition Is:" + (a + b));
        }


        // Explicit Implementation :  Explicitly tell the compiler that we implement the interface IfloatAdd
        void IfloatAdd.Add()
        {
            float a = 1.5f, b = 2.5f;
            Console.WriteLine("Float Addition Is:" + (a + b));
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            ArithmeticOperation objA = new ArithmeticOperation();
            IintegerAdd iobj = (IintegerAdd)objA;
            iobj.Add();
            IfloatAdd fobj = (IfloatAdd)objA;
            fobj.Add();
            Console.ReadKey();
        }
    }
}


Output :


 


Integer Addition Is:30
Float Addition Is:4

Tuesday, March 11, 2014

Visual Studio Tips & Tricks - 8: Breakpoint will not currently be hit. No symbols have been loaded for this project.

By Francis   Posted at   5:50 PM   Visual Studio Tips and Tricks 2 comments

Most of the developers who are using Visual studio have encountered the above problem. As a ASP.Net Developer I have this atleast once a day. So the below are my tricks to get ride of this issue.

 

1) Just Close the VS IDE.

2) Go to Task Manager and kill the worker process. (If you are working on  ASP.Net application).

3) Go to the .Net installation folder ( Normally it should be C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files OR C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files) and clear the temp files from the temporary folder.

4) Open the solution and "Rebuild" entire solution. Now try to attach the debugger.

 

Please note that, in some machines you may have 2 framework installation, one for 32-bit and another for 64-bit. So when you go with step 3, pay close attention and make sure which .net framework was used and also which version no (either 2,3,3.5 or 4) was used by your application.

 

Hope this helps!

Connect with Us