Pages

Friday, April 29, 2011

Microsoft Community Contributor Award 2011

Hello Friends,
I am very much Happy to inform you guys that I have been awarded the Microsoft Community Contributor Award 2011. This is another happiest moment in my life. I can not express that how much happy I am. I would like to thanks all my friends, who have supported me in each and every part of my life and my family for supporting me, and a Special thanks to the Entire Dotnetspider team, by which I got this much name and fame in the .Net technical community. Here is the Certificate which I received from the Microsoft.





Here is the mail content I recieved from Mr. "Nestor Portillo, Director "Community & Online Support, Microsoft ".

Dear Contributor,

Congratulations! We’re pleased to inform you that your contributions to Microsoft online technical communities have been recognized with the Microsoft Community Contributor Award.

The Microsoft Community Contributor Award is reserved for participants who have made notable contributions in Microsoft online community forums such as TechNet, MSDN and Answers. The value of these resources is greatly enhanced by participants like you, who voluntarily contribute your time and energy to improve the online community experience for others.

Becoming a Microsoft Community Contributor Award recipient includes access to important benefits, such as complimentary resources to support you in your commitment to Microsoft online communities. To find out more about the Microsoft Community Contributor Award and to claim your recognition, please visit this site: http://www.microsoftcommunitycontributor.com/




Thanks Once again to every one for supporting me.. And thanks to Microsoft for giving me this Honor.


Thanks a lot.


Anil Kumar Pandey
MVP (Visual C# 2009-2010)

Tuesday, April 19, 2011

Best Forum Supporter Award in DNS again..

Hello Friend,
with the grace of GOD and by all my friends Well wishes I am selected for the "Best Forum Supporter" award in one of the leading site of .NET in India that is dotnetspider. I would like to thanks all my frinds for there support and help in each and every minute of my life..

Here is the certificate from the DNS








Thanks,

Anil Kumar Pandey
MVP (Visual C# 2009-2010)

Thursday, April 14, 2011

SilverLight 5 Beta

Hello All ,

The New Silverlight 5 (Beta) is available to download. You can download it from the below location. There are almost 40 new features are added in this new version. Some of them are listed below. Download from here.


There are a lot of new features has been added to this version for ease of developing some very good application. Some of the new features are as follows.

  • XAML Debugging with breakpoints for binding debugging
  • Implicit data templates for easy UI reuse
  • Double (and multi) click support
  • GPU-accelerated XNA-compatible 3D and immediate-mode 2D API
  • Low-latency sound effects and WAV support
  • Real operating system windows and multi-display support
  • Significant performance improvements, fixes and much more
Please check this details document of the new features available in Silverlight 5 Download
Here you can find the details Description of the new features of silverlight 5.

I hope You are going to have a look on this New Silverlight 5. Waiting for all your valuable comments on this new version of Silverlight and o suggestions as well.


Thanks,

Anil Kumar Pandey
MVP (Visual C# 2009-2010)

Friday, April 8, 2011

Free Windows Azure Camp

Hello Friends,
The Microsoft MVP community is organizing the camp on Windows Azure, Entry is free so you can make this opportunity as a Big one and Enroll for the same.





For any query mail-to: i-abhib@microsoft.com






Thanks

Anil Kumar Pandey

Friday, April 1, 2011

New MVP's Announcement for Apr- 2011

Hello Friends,
Here are the list of new MVP(Most Valuable Professional) announce for this quarter. I like to welcome all the new MVP's in this elite group of community leader.

Sunil Kumar Singh

Project

Ahsan Murshed

ASP.NET

Gouri Subodh Sohoni

Visual Studio ALM

Sameer Desai

Xbox

Kartik Mudgal

Xbox

Hoping to see some more name in the Field if Visual C# and ASP.NET for the next quarter.


Thanks,

Anil Kumar Pandey
MVP (Visual C# 2009-2010)



Monday, March 21, 2011

Google Search API & Bing Search API in C#

Hi all,
Making use of the Google search or Bing search in our business application is a very common and general task, with the help of these search API's we can make our application very effective and user friendly. The 2 top search engine that are Google and Bing has provided API that can be easily used in our application. What is required is a class that can handle the response from these search engine. here I am going to explain the general search result class that can be used to accommodate both the search engines. here is the sample code for the same.

public class result
{
public string url;
public string title;
public string content;
public Engine engine;

public enum Engine { bing,google };

public Result(string url, string title, string content, Engine engine)
{
this.url = url;
this.title = title;
this.content = content;
this.engine = engine;
}
}



this is a sample Wrapper for the result handling. Class having a constructor that can initialize all its member, having normal member variables like URL, Content, Engine and the Title. Both the search engines result contains all these field values so I have simply created a warper using the above fields..

Now Lets c the main API accommodation of the Google search API

public class result
{
public string url;
public string title;
public string content;
public FindingEngine engine;

public enum Engine { bing,google };

public Result(string url, string title, string content, Engine engine)
{
this.url = url;
this.title = title;
this.content = content;
this.engine = engine;
}public static List<Result> GoogleSearch(string expression,
Dictionary<string, object> stats_dict)
{
var template = "http://mannpandey.blogspot.com";

Uri search_url;
var results_list = new List<SearchResult>();

int[] offsets = { 0, 8, 16, 24, 32, 40, 48 };

foreach (var offset in offsets)
{
searchuri = new Uri(string.Format(template, expression, offset));

var page = new WebClient().DownloadString(searchuri);

JObject obj = (JObject) JsonConvert.DeserializeObject(page);

var results =
from result in obj["responseData"]["results"].Children()
select new SearchResult(
url: result.Value<string>("url").ToString(),
title: result.Value<string>("title").ToString(),
content: result.Value<string>("content").ToString(),
engine: SearchResult.FindingEngine.google
);

foreach (var result in results)
results_list.Add(result);
}

return results_list;
}
}


In this class we are simply passing the search expression and the dictionary object. Where the URL is passed and the response coming from the API is deserialize using the JSON deserialization.

What ever member variable we have used in the above class are coming from the APi result. like TITLE, CONTENT etc. The de serilizer can be found in the JSOn library that is Json.NET .

Here is the API accommodation for the Bing search

public static List<SearchResult> BingSearch(string expression, Dictionary<string, object> stats_dict)
{
var template = "http://mannpandey.blogspot.com";

var offset_template = "&Web.Offset={1}";
var listresult= new List<Result>();
Uri search_url;
int[] offsets = { 0, 50, 100, 150 };

foreach (var offset in offsets)
{
if (offset == 0)
searchurl = new Uri(string.Format(template, search_expression));
else
searchurl = new Uri(string.Format(template + offset_template, expression, offset));

var page = new WebClient().DownloadString(searchurl);

JObject obj = (JObject)JsonConvert.DeserializeObject(page);

var results_query =
from result in obj["SearchResponse"]["Web"]["Results"].Children()
select new SearchResult
(
url: result.Value<string>("Url").ToString(),
title: result.Value<string>("Title").ToString(),
content: result.Value<string>("Description").ToString(),
engine: SearchResult.FindingEngine.bing
);

foreach (var result in results_query)
listresults.Add(result);
}

return listresult;
}


Bing search API is also similar to the Google API except some difference in there Offset, here also I am making use of the JSON serializer because its very easy to use and can be found in our .net library..


Now you can easily create the object of these classes or put them under separate project that can be used as a DLL. The idea for the same article was taken from one of the popular publishing site "Oreilly", that publishes so many books in the C# and ASP. You can found the details here. URL

I Hope you like this article, if you have any Query please feel free to contact me.. Thanks.

Anil Kumar Pandey
MVP (Visual C# 2009-2010)

Friday, February 18, 2011

Tracking and Loging using Google Analytics

Hello Every one,
This is very important to check the popularity the site frequently, and for maintaining the same we can make use of the Tracking and Loging facility. What we do is simply get the Information that,

1 How many Members are coming to our site?
2. What is the geographical position of them?
3 What was the channel for them to visit our site?
4. And having the statistics in our hand for the performance measurement.

All this activity can be simply manage by using the Google Analytic. It is an enterprise class that let us know that what is the traffic in our site, How many new and old user are visiting our site, and many more, in a very easy way.


The Google Analytic handle all the headache of maintaining the traffic records and we can also view the report based in the Daily, Weekly and Monthly basic. What we have to do is , we just need to Registered into the site, to have an account where we can watch the activity, and a small piece of JavaScript code we need to put in our application that can track the page.


Now, Here the most important things is that if you just want to maintain the list of user that visited the site only, you can post the code in the Default or the Home page only, but if you wish to maintain the list of all the pages then place the code in all the pages.

If you are making use of the Master Pages, simply put them inside the master page so that they can appear on all the pages.

I will provide you the information that how can you set up the Google Analytic in your .NET application.


Step 1. Registration

You first have to Create an account with the Google Analytic for that make use of the URL.

SignUp

Provide the details there like Your UserId and password and other details and create an account.


Step 2. Confirmation Account

An email will be sent to you on the email address that you have provided while registration to activate the account. The email will contain a link and as you click that link your account will be activated.

Step 3. Sign-up to the account


SignUp to the account by using the User name and the password Provided by you at the time of registration.

Step 4. Provide the Website details

As you login to the site first time a page will be opened where you need to provide the information like your time zone and the website details.

Step 5 . Google Analytics Code

Once you fill that information you will come with a page where you will get a User id as UID.
This is your Unique Identification page that you must use inside the script of your page.

Step 6. Write the Script int the Code just below the End of Form Tag

You need to put the Script inside the page just before the end tag of the form tag, because this is the fixed location,. if there are any Master pages, put them just before the Form End tag.


<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

script>


In the Below line You have to Provide the ID generated or given by the Google at the time of registration.

_gaq.push(['UID']);


In Place of UID post your Unique Identification No.

Thanks all, You Tracking and login code is ready, you may wish to view the traffic by simply login to the Google Analytic site and viewing the reports.




I hope You have understood all the step as these are very easy to do and clear steps. If you want any more information you can log in to the official Google Analytic site.

Hope You have Like this Post, If there are any Queried please feel free to post a Comment.


Thanks

Anil Kumar Pandey

Kontera