Skip to main content


Showing posts from July, 2015

Startup with JQUERY


jQuery is a JavaScript Library.
jQuery greatly simplifies JavaScript programming.
jQuery is easy to learn.
jQuery also simplifies a lot of the complicated things from JavaScript, like AJAX calls and DOM manipulation.

<!--Include one from following library //CDNs host JQuery libraries i.e. Google & Microsoft//-->
<!--type="text/javascript" inside the tag is not required in HTML5-->


Examples(Types of selectors):
$(this).hide() - hides the current element.
$("p").hide() - hides all elements.
$(".test").hide() - hides all elements with class="test".
$("#test").hide() - hides the element with id="test".

//The Document Re…

Start querying with LINQ

Two fundamental building blocks of LINQ are the concepts of "elements" and "sequences"


A sequence can be thought of as a list of items, with each item in the list being an element. A sequence is an instance of a class that implements the IEnumerable<T> interface.

Example for sequence

int[] fibonacci = {0, 1, 1, 2, 3, 5};

sequence could be a local sequence of in-memory objects or a remote sequence

In the case of remote data sources (for example SQL Server), these remote sequences also implement the IQueryable<T> interface    

Queries that run on local sequences are known as local queries or LINQ-to-objects queries

Return value of query can be sequence or scalar value

int[] fibonacci = { 0, 1, 1, 2, 3, 5 };
// Scalar return value
int numberOfElements = fibonacci.Count();

Console.WriteLine("Count: {0}", numberOfElements);

// Output sequence return value

IEnumerable<int> distinctNumbers = fibonacci.Distinct();

Console.WriteLine("Elements in o…