Daily .Net Tips

.NET Tip a Day, Keeps painkillers away!

Different Types of Display Format with in Watch Window

Watch window allows you to view the variables values in Hex Mode. This is very simple features, Just Right Click on Watch window and select Hexadecimal Display.

hex1

Once you select “Hexadecimal Display”,  you will get the screen similar like below

[Read the rest of this entry...]

Import and Export Breakpoints in Visual Studio

 Visual Studio saves breakpoints in a XML file. To save the breakpoints, you just need to click on the “Export” button in breakpoint window as shown in the following figure.

You can use the saved XML file for the future and you can pass the same to other developers. You can also save breakpoints based on the search on labels. Let’s have a quick look inside the content of the XML File. The XML file is a collection of BreakPoints tag within BreakpointCollection. Each breakpoints tag contains information about the particular breakpoint like line number, is enabled, etc.
[Read the rest of this entry...]

Getting Geolocation from browser using HTML5

As we are getting inclined more and more towards devices, browsers are trying to do their best to actually implement features to suit the needs. HTML5 introduces GeoLocation APIs to the browser which enables you to get the location of your position directly using javascript.

In spite being very much premitive, browsers are capable of detecting the actual location of the user using either WIFI, satellite or other external sources if available. As a programmer you just need to call the location API and everything is handled automatically by the browser.

[Read the rest of this entry...]

Working with NotificationUI on browsers with HTML5

Notification is one of the interesting thing that browsers are adding support to. Generally when we think of Web notification we always go for some HTML popup or using a new window through Javascript. But those html are generally does not follow any standards or even looks different to the user to different sites. Hence few of the notifications lacks consistency. HTML5 introduces new notification specs which enable the browser to send its own notification rather than going with custom notifications from the developer.

[Read the rest of this entry...]

Working with Web workers in HTML5

Web workers are one of the most awaited feature of entire HTML 5 specifications. Generally if we think of, the current environment is actually turning towards multicore machines. Today, its verbally every computer has at least 2 cores installed in their machine. Browser are well capable of producing multiple threads that can run in parallel in different cores. But programmatically until we cannot have the flexibility in javascript to run parallel tasks in different cores.

Developers previously uses setTimeout, setInterval or XMLHttprequst to actually create non-blocking calls before. But these are not truely a concurrency. I mean if you still put a long loop inside the setTimeout it will still hang the UI. Actually these works  asynchronously taking some of the UI threads timeslices but not actually spawning a new thread  to run the code.

[Read the rest of this entry...]

ApplicationCache of HTML for offline browsing in HTML5

Well, yet another offline storage can be the actual html that has been transferred from server. It is an important fact, that even if we use browser cache using cache header, the browser does not respond properly when offline as it does when one is online.  HTML5 introduces a new way of programming style which ensures that the browser cache can be used up to cache individual page of the website and these pages will work in the same way even in offline than it gets online.

[Read the rest of this entry...]

Working with IndexedDB Storage using HTML5

HTML 5 also introduces an IndexDb storage API just like SQL databases, which are high speed data access key value collection.  In this post, I am going to cover how to use IndexedDb storage using HTML 5 API.

On November 18, 2010, W3C announces that they are going to depreciate the addition to sql database but rather they will go with IndexedDB specification in HTML5.  So it is very important to learn how to use IndexedDb instead of proper SQL transaction as IndexedDb also supports transactions with few enhanced mode. Lets now look into the code on how to work with IndexedDb.

[Read the rest of this entry...]

Working with SQL databases with Transaction using HTML5

Html 5 has come across with lots of new stuffs, some of them are overwhelming and very interesting in real world. One of such storage APIs that is available with modern browsers are SQL databases on client side. The specifications allows you to open a Database, create tables, maintain relationship, open transactions etc.  These are in fact so much appealing that everything that you need in your server can have local copy on the browser itself if the Quota permits and hence releaving so much pain of the server in delivering and executing complex calculations and logic in the server.

[Read the rest of this entry...]