Posts

Kindle, 6" E Ink Display, Wi-Fi

Having been a little overwhelmed by the choices between all the new Kindles and which one to get, I got this new basic Kindle first to take for a spin. So far, I like what I see.  1. Form-factor - Compared to the Kindle 3, this Kindle feels more compact, lighter and easier to hold. My hands wrap around this better than K3. Reading books for a few hours at a stretch will be easier on this device compared to the K3. It is the lightest such device I have used compared to all previous Kindles and other tablets. 2. Screen - I personally like the fact that there are no keys on the device and that keys come up on the screen when you need them. Delivers a better overall reading experience. However, navigating through the on-screen keyboard with the 5-way controller can be taxing if you need to do a lot of searching, and you might miss the full physical keyboard. I hardly search on the Kindle itself, I search for books on my laptop so this is a non-issue. 3. Price ! - At Rs 4999 (with

Unboxing Asus ZenFone 4 A450CG

Un Boxing  and First user experience pf Asus ZenFone 4 A450CG

Itrarting Bewteen Date Range using Foreach C#.

There are some situation when we want to itrate trough a range of date. Hear is ample how you can itrates through the date range using foreach in C# for itrating you will need to first create a function which will convert the date range in inumaration formate so that you can itrates. For this i have created the follwing function. public IEnumerable < DateTime > EachDay( DateTime from, DateTime thru) { for ( var day = from.Date; day.Date <= thru.Date; day = day.AddDays(1)) yield return day; } Now you can use the code like this. foreach (DateTime day in EachDay(strartDate, EndDate) {  //Do something }  

Placing Update Progress Control dynamically

Image
Contextual Links f you're using AJAX UpdateProgress control, you may find it difficuilt to set the best position where you should put it on the page, because user will not see it if he scrolls down (or up) from it. Here is a simple solution which will make your UpdateProgress more user-friendly, because it will set the position on the screen according to user's movement of the mouse. And you will prevent user to click on any button until the postback finishes execution.  here is the code place the below code in JavaScript SCRIPT LANGUGE=JAVASCRIPT tag, ending with appropriate closing tag     function SetProgressPosition(e)     {       var posx = 0;       var posy = 0;        if (!e) var e = window.event;        if (e.pageX ||  e.pageY)          {           posx = e.pageX;           posy = e.pageY;         }     else if (e.clientX || e.clientY)       {          posx = e.clientX + document.documentElement.scrollLeft;          posy = e.clientY + document.documen

Using CASE to transform a result set from multiple rows into a summary row

 Consider the situation where sales data is stored in a table by month. One row is stored per month with a table structure that looks like the following: CREATE TABLE prodsales   (product char(3),    mnth      smallint,    sales     money) In this table, sales amounts (sales) are stored by month (mnth) and product code (product). The mnth column stores an integer value ranging from 1 (for January) to 12 (for December). You can use the following single SQL statement to product one row per product with 12 totals, one for each month: SQL Statement will go like this SELECT product,    SUM(CASE mnth WHEN 1 THEN sales ELSE NULL END) AS jan,    SUM(CASE mnth WHEN 2 THEN sales ELSE NULL END) AS feb,    SUM(CASE mnth WHEN 3 THEN sales ELSE NULL END) AS mar,    SUM(CASE mnth WHEN 4 THEN sales ELSE NULL END) AS apr,    SUM(CASE mnth WHEN 5 THEN sales ELSE NULL END) AS may,    SUM(CASE mnth WHEN 6 THEN sales ELSE NULL END) AS jun,    SUM(CASE mnth WHEN 7 THEN sales ELSE NULL END) AS j