A Letter To Bill Gates From A First Time PC User

29. June 2011 14:45

Fundoo Microsoft 

I can't stop blogging about this. I found this image on Facebook and thought I should share on my blog too.

Read and laugh and let me know your comments too.Laughing

 

Currently rated 5.0 by 2 people

Prepare Your Site For IE9 With Pinify

14. May 2011 23:10

Jquery Microsoft Windows 

This is great stuff. If you own a website or a blog you should use this excellent feature of pinning fav links of your site on user's Windows 7 taskbar. Though this feature of IE9 was on hype since it's beta realease. Now it's time to use this feature for my blog. But before you start grab the latest stable version of the Pinify (formerly know as IE9ify) from Codeplex.
 
About Pinify
This plugin is written in jQuery and is hosted on Codeplex. I highly recommend you to follow this project on Codeplex. This plugin is not just about pinning, but also allows the user to customize the skin of the browser, adds a jumplist of your favourite links to the taskbar, overlay icons, tasks and thumbbar buttons. This is a total different user experience for the users /readers of your blog or site.

Preparing your site for the new experience
By now you have downloaded the latest release of the pinify from Codeplex. Open your site in Visual Studio and get to the head section. Fire the below NuGet command to install the Pinify plugin.
 
For the simplest implementation of this plugin, use the below script in the head section of your page.
<script src="Scripts/jquery-1.5.2.js" type="text/javascript"></script>
<script src="Scripts/jquery.pinify.js" type="text/javascript"></script>

<script type="text/javascript">
$().ready(function () {
     $('head').pinify();
});
</script>
Hit F5 and make sure you have selected IE9 as your default browser. After you see your site home page in the browser hit F12 to get the IE9 developer window. Under HTML tab expand the Head tree and you will come to see few meta tags.
Drag and drop the tab to your task bar. This time a new IE window will open but with a difference. Check out below, the navigation buttons has a different color, the site has an icon also.
In the above screenshot you can see the default IE icon because I have not set the favicon for my site. Once I set the fav icon in the head section of my page, I will then have a new favicon to show off. Same is with the navigation buttons, here what you are seeing is the default color, you can set your own like yellow or red or some other different color which matches the theme of your site.
 
Let's take a bit more complicate example. Now I want to do the same for my blog. For the moment I will have the following in the jumplist.
  • Archives - Link to my blog archive.
  • Twitter
  • Facebook and
  • Contact Me
The icon will be the same as my current favicon. To implement pinify for my blog I do all the work in master page which is site.master in my case. Copy and paste the below script in the head section of your page. Change the text and links accordingly.
<script src="Scripts/jquery-1.5.2.js" type="text/javascript"></script>
<script src="Scripts/jquery.pinify.js" type="text/javascript"></script>
<script type="text/javascript">
        $().ready(function () {
            $('head').pinify({
                applicationName: 'Midnight Programmer',
                tooltip: 'Programming For Fun',
                tasks: [{
                    'name': 'Archive',
                    'action': 'http://midnightprogrammer.net/archive.aspx',
                    'icon': 'favicon.ico'
                },
                {
                    'name': 'Twitter',
                    'action': 'http://twitter.com/prashantmx',
                    'icon': 'twitter.ico'
                },
                {
                    'name': 'Facebook',
                    'action': 'http://facebook.com/khandelwal.p',
                    'icon': 'facebook.ico'
                },
                {
                    'name': 'Contact Me',
                    'action': 'http://www.midnightprogrammer.net/contact.aspx',
                    'icon': 'favicon.ico'
                }]
            });
        });
</script>

After adding the script drag the tab to the taskbar and right-click it to view the task list.  

There are many other things which you can do with this plugin. I have just showed a simplest way to get you jump started with pinify. As you are reading this post try dragging the tab on your windows taskbar and right-click to see the task list as shown above.

Check out this video at Channel 9 by Brandon Satrom creator of pinify.

There are many things which can be done with pinify. To know more read the below links.

 No Rating

Microsoft TechNet Widget

15. March 2011 15:01

Microsoft 

To get the latest news on Microsoft products use the TechNet widget on your blog or website. You can generate it from TechNetWidget and from the location of your choice. I am using India to get all the latest information on Microsoft products.

To get started, go to http://technetwidget.com and select country (of your choice, I have selected India) to show the TechNet news from that area/zone.

Click Give me the Default Widget to get the default widget. The widget is in silverlight. This will give you the code to embed the widget which you can use in your blog or website. If you want to Customize Widget by your Interest, the widget generator gives you the below options to customize.

  • Customize by Keywords
  • Customize by Form Factor
  • Customize by Product Lines

Once done you can get the widget, which is now customized to show the news you have set.

Get Microsoft Silverlight
 No Rating

Working With Microsoft Web Helpers In MVC 3 Razor View

6. March 2011 10:58

API ASP.NET MVC Microsoft 

Building applications with ASP.NET MVC 3 and that too with RAZOR is easy. I believe most of the programmers out there found MVC 3 with RAZOR view engine found it easy. The best things I found in the new RAZOR view engine is the code is pretty much tidy no traditional code behinds and moreover you can work with the server-side code with the start of the @ symbol.
What is a Helper Class?
I am not going to copy and paste the definition from somewhere but I want to write my own thoughts on the helper class. Maybe this is not the best definition but this is how I would like to describe the Helper Class.
A class that minimize the effort incurred in the design, implementation of functionality on your application is called a helper class.
One of the best things that Microsoft incorporated in the framework is the use of the helper classes. Although this is not a new concept, previously also all the programmers are working on their own to create helper classes for the work they are doing to minimize the effort and time spend in writing the same lines of code again and again. Microsoft Web Helpers provides some of the best helper classes that can be used in almost every web application.
How to get Microsoft Web Helpers
To use Microsoft Web Helpers in your project use the below NuGet command:
If you are using Web Matrix then you can start using the helper class right away, but if you have created the application from Visual Studio then you still need the Web Matrix reference in you project. You can add the Web Matrix reference from C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies. Once installed, you can now use it for majority of the complex tasks with ease and in less time. Some of the major use of this helper class is listed below:
Using Web Helpers
Gravatar: To show the gravatar on your web page use the Gravatar class Gethtml() and pass e-mail address as a parameter. If the e-mail id provided, has no Gravatar then the default Garavatar image will be displayed. To get the Gravatar with default Gravatar image:
@Gravatar.GetHtml("prashant@midnightrogrammer.net")
 
You can also have your own default image to replace the default Gravatar image. To show your own default image use the defaultImage: attribute
@Gravatar.GetHtml("prashant@midnightrogrammer.net", defaultImage: "http://midnightprogrammer.net/pics/default.gif")
Twitter: Twitter helper class can be used to show your tweets using the Profile method. This will display the same widget that you can get for youself from the Twitter website. Moreover you can also change the apperance of the widget. To display your tweets you can use your twitter profile name as a parameter in the Profile method.
@Twitter.Profile("prashantmx")
 
You can also search Twitter and display all the reactions. If I have to search about Windows Phone 7 then I will use the keyword #WP7.
@Twitter.Search("#wp7")
 
For Twitter follow button:
@TwitterGoodies.FollowButton("prashantmx")
Tweet Button: The tweet button will help you to tweet your website or blog content. But this time we will use the TwitterGoodies class TweetButton
@TwitterGoodies.TweetButton(TwitterGoodies.DataCount.Horizontal, "This is RAZOR Tweet", "http://midnightprogrammer.net", TwitterGoodies.Languages.English,"prashantmx")
 
You can set the align of tweet counts either vertically or horizontally or none. I have set it to horizontal.
Google / Yahoo Analytics: Insert tracking code in your website directly
@Analytics.GetGoogleHtml("UA-9087")
Same can be done for Yahoo. Just use GetYahooHtml instead of GetGoogleHtml
Facebook: Facebook integration is now much easier. To get the like button use:
@Facebook.LikeButton("http://midnightprogrammer.net")
To show the latest activity feed use the ActivityFeed method. I am going to see the latest activity from Microsoft
@Facebook.ActivityFeed("http://www.microsoft.com")
 
Microsoft Bing Search: If you want to have a search then the best option is to use Microsoft Bing (Because It's Not Google). There are two Bing search boxes that you can use, but the most popular is the Bing Advanced Search Box. Below are the two ways to use the Bing Search box
Normal Search Box
@{
    Bing.SiteTitle = "Midnight Programmer";
    Bing.SiteUrl = "http://midnightprogrammer.net";
}

@Bing.SearchBox()
 
Advanced Search Box
The same code will be used to show the advanced search box, just use the AdvancedSearchBox method instead of SearchBox as done previously
@{
    Bing.SiteTitle = "Midnight Programmer";
    Bing.SiteUrl = "http://midnightprogrammer.net";
}

@Bing.AdvancedSearchBox()
The main advantage of using the advanced search box for Bing is that it will let you search the whole website/blog without taking you to the Bing site and display the search content in the small container with two tabs showing the search result from the website/blog and the other one from the web.
Note: Bing team at Microsoft announced that they will be shutting down siteowner service on April 4th. This will prevent you to use the AdvancedSearchBox feature of Bing on your website/blog or web applications. Here is the quote from Bing's official blog:
As of April 4th, 2011 we will discontinue support for the bing.com/siteowner functionality. If you continue to leverage the feature after this date (April 4th, 2011), users who attempt to query in the search box will be redirected to a 404 page. This means that you will need to move to the Bing API in order to continue to receive web or site search results from us. We have decided to take this step for two reasons.
First, the tool has not been getting a lot of use and while we have some very loyal customers on it, we believe we can provide you better alternatives in the future as we free up resources.
Second, the functionality available through bing.com/siteowner can be replicated with the Bing search API and so it feels a bit redundant.
As has become customary, we will give you a window to migrate off and ask us any questions you may have about this change. We will also provide reminders as we get closer to April 4th. Thank you so much for your support.
 
So this is it. These are some of the helper classes in action that I have described in this post. There are lot of others and I hope that there would be other helper classes would be added in the later releases of Microsoft helper classes for web. You can read more here on web helpers from the below official Mirosoft resources.

Download: DBMatrix.zip (1.13 mb)

Currently rated 5.0 by 7 people

How To Free Up Gigs of Space On Your Window 7 Machine

19. February 2011 03:34

Microsoft Windows 

I am now using Windows 7 since its beta release and so far my experience is awesome. But as a developer the hard drive space is always been a problem for me, no matter how many external drives or other stoarge devices you have connected to your machine but the disk space on the host machine is always a primary problem. Windows 7 is more stable OS in Windows family so far (I found it more stable than Win XP) and the reason it is being more stable because everytime you install a program on your Win 7 machine, it automatically creates a snapshot of the host drive. This is because if anything goes wrong with the program or it just crashes causing problems, Windows 7 can recover automatically from that state with the snapshot created before the installation.

But these snapshots hogs up a lot of hard drive sapce and there is no way that you can copy them and place it in a different drive or just change the location of the snapshots been taken by the OS. Therefore to maintain the balance, the OS automatically deletes the last/oldest snapshot from the hard drive resulting some free space for the user and for other processes of the system.  If you no longer require the snapshots (only if you think that your machine is running perfectly fine) execute the below command to delete all the snapshots created so far:

c:\>vssadmin delete shadows /for=c: /all

In the above command /for parameter should have the letter of your Windows OS drive. In my case it is C: (as in majority of the cases it will be C:)

Just in case if you don't want to delete all the snapshots then instead of using the /all parameter use the /oldest parameter. This will dleete the oldest snapshot from the drive:

c:\>vssadmin delete shadows /for=c: /oldest

This will free up some GIGs of space if you are using it for the first time and if you are using it quite frequently then also you end up with MBs of free space.

 No Rating