How to Fix Audible Alert Issue with The Reminder in WM 6.0
I have been enjoying my HTC S620 for the last couple of months, but there has been a small problem with my audible alerts when I set an appointment in my mobile calendar. The reminder has been just vibrating, not playing a sound even though I have set the right things for my “Normal” profile to get an audible alert. After a short googling, it turned out to be a bug in Windows Mobile 6.0 (maybe for 5.0 as well).
Thanks to Karl Gechlik that this small but important bug has a fix in this link. He simply explains a workaround about altering the XML file of the profile in order to solve the problem. It seems to be working for me at this time.
Rotate Array by N Position - Via Programming Pearls
Lately, I have been trying to finish reading the Programming Pearls written by John Bentley. The chapters related with designing and developing algorithms are really entertaining. One of the questions that was discussed in the early chapters of the book was about an algorithm of rotating a one-dimensional vector, and I want to share my solution written in VB.NET and C# by utilizing a simple string array.
Question (with the terms of an array)
Rotate a one-dimensional array of K elements from left by N positions.
For instance, with K=7 and N=3, the array {a, b, c, d, e, f, g} is rotated to {d, e, f, g, a, b, c}.
Solution
As suggested in the book, I will be using the Array.Reverse method. I will also write the function that rotates an array from right as well in order to carry out the discussion further.
In VB.NET - Rotate By N From Left

In C# - Rotate By N From Left

In VB.NET - Rotate By N From Right

In C# - Rotate By N From Right

Page_Load of an ASP.NET environment would be a good place to test and visualize the results in this case.
In VB.NET

In C#

Finally, results on the browser should be like:

What I Have Learned So Far While Developing My First Mobile Website
As I mentioned in my previous post, I did have a chance to develop a very simple ASP.NET application for my mobile browser about a week ago. It was actually just an experiment for me to play around, and dealing with these topics is a new hobby of mine nowadays. Here is the design related list of elements that I have figured out.
• Simplicity is the key for the best user experience.
Complex designs utilizing nice navigations and high quality graphics are fine with the regular websites, but not with the mobile ones. Complicated components on the UI generally makes the mobile websites difficult to read. I would concentrate on the functionality first, and then try to add some design figures as modest as I can by keeping in mind that the screen size is limited.
• Alternate texts can be a redeemer.
There is an option to choose not to load the images, and there may be some users selecting this option. Therefore, it would be a good practice to put expressive alternate texts to the images.
• AJAX is good friend of mobile IE.
Fortunately AJAX is supported by the mobile version of IE in Windows Mobile 6.0. Using asynchronous JavaScript and XML would be a neat choice in some scenarios.
• Ads should be well-balanced with the real estate of UI.
I would avoid using large ad graphics which may need some amount of time to be downloaded. They may also conflict with the usability of the pages.
Some Useful Readings
• Internet Explorer Mobile HTML Elements
http://msdn2.microsoft.com/en-us/library/bb415489.aspx
• Internet Explorer Mobile CSS Support
http://msdn2.microsoft.com/en-us/library/bb415434.aspx
• Support for the WIDTH Attribute on Tables
http://msdn2.microsoft.com/en-us/library/bb415484.aspx
My Jump Into The Windows Mobile Smartphone Space
I had been planning to spend some time with my new cell phone, HTC S620 that I purchased about a month ago, in order to push its borders for the best online user experience. Well, I finally had the time today and it is really good to have something that runs Windows Mobile 6.0.
Firstly…
I have added some new URLs to my Favorites folder and organized them for my small browser. Here is my list of best mobile websites:
- Yahoo Mail Mobile - http://m.yahoo.com/mail
- Gmail Mobile - http://m.gmail.com
(Gmail’s Java applet is significantly slow for me, therefore I prefer to use the regular mobile site.) - Google Reader - http://www.google.com/reader (It automatically formats itself for the mobile IE.)
- Weather Underground Mobile - http://mobile.wunderground.com
- Wapedia - http://wapedia.mobi (It is the mobile version of Wikipedia.)
- CNN Mobile - http://m.cnn.com
- MSN Mobile - http://m.msn.com
- Amazon Mobile - http://m.amazon.com
- Engadget Mobile - http://m.engadget.com
- Flight Stats - http://mobile.flightstats.com (It is an actual time saver when traveling.)
I guess “.mobi” extension was created for the mobile world, but almost every mobile site that I have faced with continue to use the “.com” extension with the transition of “www” to “m” or “mobile” which saved the site owners some amount of domain registration fees.
And Then…
I also spent couple of hours to write a simple ASP.NET application to be consumed by the mobile browser in order to explore the capacity. The application returns the area code information (city, state, etc.) if you provide a correct format of 3-digit area code. I will try to post more about it and my experiences.
Disable UpdatePanel’ed ListView with CSS and JavaScript While Sorting
When a ListView, or GridView as well, allows sorting and is inside an UpdatePanel, it always bothers me that any of the sorting links in the header row are still clickable even though the initiated sorting progress is not being completed. Most of the time this situation may yield an error if the ListView is dealing with many records since everything happens inside an UpdatePanel asynchronously. As there are some other possible ways to beat this, here is my solution by utilizing a transparent image to cover up the ListView while it is being sorted.
• This link about CSS image transparency and opacity would be a good reading before jumping into the solution.
• I will be extending one of my former sample codes that I created here.
Solution
Instead of creating large volume of data for the sample code, I will just simulate 5 seconds sleeping inside the sorting event of ListView1:

Then, I will create the DIV which holds the image that will be made transparent via CSS at a later time and place ListView1 inside an UpdatePanel to have asynchronous postbacks:


Final nested code view with a global DIV named as “ListViewGlobalDIV” should be similar to the following:

I will make the “transparent.gif” transparent by using the following CSS code:
(”transparent.gif” is just a plain gray image having the approximate width and height of ListView1.)

This way of creating transparent images is not a CSS standard yet, but it works well in most of the modern browsers.
Notice the usage of absolute positioning in order to overlap TempTransparentDIV and UpdatePanel1.
Finally, time to write the JavaScript part:

If the JavaScript code refers to any objects from the ASP.NET AJAX Library, then it should be placed after the library has been loaded. Therefore, putting the above script to the end of the page would be a good practice since ScriptManager1 loads the library in this sample code.
As a result…
When you sort ListView1, it will be covered by “transparent.gif” with an 40% opacity and cursor will show the sandclock. All links would be unclickable till the sorting progresses are completed each time.

Download
Sample code can be downloaded via here.