List/Grid

Technology Subscribe to Technology

Allow objects to communicate using events

We can allow objects to communicate using events. We will create an event in one class and let the other class define the event handler for that event. Data that… Read more »

Write a class which implements IDisposable interface and provides a finalize method. The finalize method should not get called if the object is disposed

This is an interview question “Write a class which implements IDisposable interface and provides a finalize method. The finalize method should not get called if the object is disposed” class… Read more »

Simple Indexer Example In C#

In this example I will create a simple indexer in C# class indexer_class { List<int> index = new List<int>(); public void set_length(int length) { if (index.Count < length) { index.AddRange(new… Read more »

FB’s Multi Friend Selector using Facebook Connect

To display multi-friend-selector on your application using facebook connect, you first need to include the js for that. < script src=”http://connect.facebook.net/en_US/all.js” type=”text/javascript” /> Initialize facebook object with you appid FB.init({… Read more »

Lambda expression, predicates and anonymous method C#

Suppose we have a list of integers and we are required to find all the numbers divisible by 3 from the list. So what we eventually do in the previous… Read more »

Authenticate User From LDAP – .NET

The following code will authenticate user from LDAP and is written in C#. string domainAndUsername = _domain + @”\” + userName; DirectoryEntry entry = new DirectoryEntry(_ldapConnectionString, domainAndUsername, userPassword); DirectorySearcher search… Read more »

Ajax POST method, using xmlhttprequest

To post data using ajax xmlhttp protocol. var request; function createAjax(url,callbackfunction,parameters,method) { try { request = new ActiveXObject(“Microsoft.XMLHTTP”); } catch(e1) { try { request = new ActiveXObject(“Msxml2.XMLHTTP”); } catch(e2) {… Read more »

Handle QueryString Using Reflection In .NET

Recently we encountered an instance where we are required to use the querystring. I created a small class, that will read the query string and return the properties based on… Read more »

Remove WordPress Admin Bar Showing On Website

Remove WordPress Admin Bar Showing On Website

The new wordpress admin bar is a cool feature introduced in the newer wordpress versions. However for some reasons you don’t like it ant want to get rid of it,… Read more »

How To Get Most Commented posts In WordPress

How To Get Most Commented posts In WordPress

In this post i will show how to display most commented posts (most popular) in WordPress. To display n number of popular posts, this is you should do: $popular =… Read more »