Jquery (via Naveen Bhardwaj)

Jquery Selector Vs Javascript Selector. jQuery, quite popular these days, has enabled us in developing more interactive and appealing websites. jQuery is a library that has facilitated us in building JavaScript webpages and web applications much more quickly and in an easy way. More often with jQuery you can write a single line of code to fulfill the requirement. jQuery is written in JavaScript, and is available  as a single .js file that you can … Read More

via Naveen Bhardwaj

Posted in Uncategorized | Leave a comment

Optimizing SQL Query Processing (via Ilyas Ahmad’s blog)

Optimizing SQL Query Processing Introduction SQL query processing requires that the DBMS identify and execute a strategy for retrieving the results of the query.  The SQL query determines what data is to be found, but does not define the method by which the data manager searches the database. Hence, query optimization is necessary for high-level relational queries and provides an opportunity for the DBMS to systematically evaluate alternative query execution strategies and to c … Read More

via Ilyas Ahmad's blog

Posted in Uncategorized | Leave a comment

Web Sockets soon going to overtake Ajax and comet (via Rahul Garg’ blog)

It is a technology that allows bi-directional,full-duplex communication between client-server over single TCP socket.In Ajax, browser makes an XMLHTTP request to the server, which is kept open until the server has new data to send to the browser, which is sent to the browser in a complete response. At the end of the processing of the response, the browser creates and sends another XMLHTTP request, to await the next event. Thus the browser always … Read More

via Rahul Garg' blog

Posted in Uncategorized | Leave a comment

Classes, Inheritance in JavaScript (via Abhishek Gupta)

Classes In Javascript In JavaScript there are no classes but Functions can be used to somewhat simulate classes. Everything is an object in JavaScript so Inheritance in JavaScript means objects inherit from objects, not classes from. Ways to Implement Classes in JavaScript: We can define a normal JavaScript function and then create an object by using the new keyword. To define properties and methods use the this keyword. Example 1:- <script ty … Read More

via Abhishek Gupta

Posted in Uncategorized | Leave a comment

Covariance and Contra-variance with delegates in C#

Covariance and Contra-variance seems to be scary terms for a very simple and familiar concept.  C# 4.0 introduces the notion of Covariance and Contra-variance of generic type parameters for interfaces and delegate types.  For delegate types: Covariance and contra-variance provide a degree of flexibility when matching method signatures.

Covariance permits a method to have a more derived return type than what is defined in the delegate. Following example shows how delegates can be used for covariance:

Here the data type returned by WebManager() is of type WebProjects, which derives from the Projects type that is defined in the delegate.

                            

class Projects
{
}

class WebProjects: Projects
{
}

class Program
{
    // Define the delegate.
    public delegate Projects dlgManager();

    public static Projects Manager()
    {
        return null;
    }

    public static WebProjects WebManager()
    {
        return null;
    }

    static void Main()
    {
        dlgManager dlgManager1 = Manager;

        // Covariance allows this delegate.
        dlgManager dlgManager2 = WebManager;
    }
}

Contra-variance permits a method with parameter types that are less derived than in the delegate type. Following example shows how delegates can be used for contra-variance:

System.DateTime dtWork;

public Form1()

{

Initialize();

dtWork = new System.DateTime();

this.textBox1.KeyDown += this. MultiPurposeHandler; //works with KeyEventArgs

this.button1.MouseClick += this. MultiPurposeHandler; //works with MouseEventArgs

}

// Event handler for any event with an EventArgs or derived class of EventArgs

private void MultiPurposeHandler(object sender, System.EventArgs e)

{

dtWork = System.DateTime.Now;

}

Posted in Uncategorized | Leave a comment

Hello world!

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Posted in Uncategorized | 1 Comment