Friday, October 01, 2010

Windows Phone 7 – emulator’s shortcut

I discovered about these shortcut only today, so maybe this short post it can be useful to other devs.

When you enter a textbox in the emulator, the virtual keyboard comes up; and you can use it with your mouse. But if you need to enter text in a faster way, you can hit PageUp, and use the “real” pc keyboard.

Then you can switch back to the virtual keyboard with PageDown.

Other useful shortcut:

  • F1 – corresponds to the Back button on the emulator
  • F2 – the "Start" button on the emulator
  • F3 – the Search button on the emulator

Windows Phone 7 – my first app :-)

I’m working on a little application for the new Windows Phone 7 operating system.

The app, TimeToRead, is a client for Read It Later ( Its goal is to let you access your “reading list” when you have time… to read something you pinned earlier.

It will provide you the lists of read / unread / all articles; tapping an article you can read it directly from the web version or choose to read only the “text version” (this is a service provided by site), mark as read an article and finally tweet about the article on your Twitter account.

The app uses some libraries like and Hammock for REST in order to access the external sites. It’s not very complicated, still I think that it can be useful – let’s see.

A few screenshots:




and here’s a little video I posted on Msdn Italy’s Facebook page – it’s not of the latest release, but it gives an idea.


Monday, August 02, 2010

Sql Server Fragmentation

Found in an article on SqlServerCentral (VERY useful site), some scripts that show the fragmentation degree of your database objects:

-- check fragmentation on @db
Declare @db     SysName;
Set @db = 'MCD_SAWFC_PROD';

CAST(index_type_desc AS VARCHAR(20)) AS 'Index Type',
I.Name As 'Index Name',
avg_fragmentation_in_percent As 'Avg % Fragmentation',
record_count As 'RecordCount',
page_count As 'Pages Allocated',
avg_page_space_used_in_percent As 'Avg % Page Space Used'
FROM sys.dm_db_index_physical_stats (DB_ID(@db),NULL,NULL,NULL,'DETAILED' ) S
LEFT OUTER JOIN sys.indexes I On (I.Object_ID = S.Object_ID and I.Index_ID = S.Index_ID)
ORDER BY avg_fragmentation_in_percent DESC

The following SQL can be used to rebuild all indexes for the specified table;


while the following SQL can be used to rebuild a specific index.

ALTER INDEX <Index Name> ON <Table Name> REBUILD;

Alternatively, indexes can be reorganised. The following SQL can be used to reorganise all indexes for the specified table;


while the following SQL can be used to reorganise a specific index.

ALTER INDEX <Index Name> ON <Table Name> REORGANIZE; 

Tuesday, June 29, 2010

stsadm, where is it?

I often forget the location of stsadm, the admin command line tool for MOSS. Here it is:

%COMMONPROGRAMFILES%\microsoft shared\web server extensions\12\bin


Monday, June 14, 2010

Get a list of installed programs in Windows

I’m in the middle of a transition from a pc to another, and I’d like to reinstall all the software I (probably) need.

I recently discovered that there is a way to get such a list without the need of third party software, using WMIC (Windows Management Instrumentation Command-line). Here’s how.

  • open a command prompt with administrative rights (“cmd” and Control+Shift+Enter)
  • type wmic and press enter
  • then type this command: /output:C:\swlist.txt product get name,version,installdate,description

This way you’ll obtain the complete list of what has been installed on your Windows environment… but do not forget that sometimes you use software that does not installs but instead runs directly – so probably this list will not be complete.

To get more insights on WMIC you can browse the command-line help with /? – or read articles like this one.

Tuesday, May 11, 2010

SOLVED: Sql Server 2008 log shipping on servers not in same domain

Lately I suffered some headache trying to set up log shipping on a couple of Sql Server 2008 machines.

In my farm, the “second” server arrived when the first was already running, responding to a high traffic website. And the two servers are not in the same domain – actually they are not in any domain.

I won’t enter in detail on how to set up log shipping, follow the wizard, it’s quite easy (to reach the wizard: right click on a db, choose Tasks, then “Ship transaction logs”).

When you set up log shipping, and the servers are in the same domain, you have little problems: you need to create a couple of file share on the two servers, and give read permissions to accounts running the Sql Server Agent service “on the other” server. But that is quite easy, follow instructions and it’s done.

A different story is when the shipping server don’t know anything of the “shipped” one. I tried different configuration, but I always end in “Access denied” errors.

At last I found this answer on, and that was the path to follow. The answer is about Sql 2005, but the same works on sql 2008.

In brief, here’s what I did:
- created an account on the two servers, with exactly the SAME NAME and the SAME PASSWORD, and put the user in Administrators group
- changed identity (“log on” tab) of both Sql Server Agent AND Sql Server services (only Agent did not suffice) on both servers
- gave read permission on the share used in the log shipping configuration

Done all that, when I ran the log shipping job they started working immediately.

Now I’m not a windows authentication guru, but all this looks a little crazy to me… but hey, who cares! Now log shipping works… :-)

Tuesday, January 05, 2010

Speeed Reader, Google Reader client for WinMobile

A couple months ago I found Speeed Reader, a Windows Mobile client to access Google Reader accounts. Yes it’s Speeed, with three “e” in it.

I wasn’t using my Google Reader account anymore exactly for the reason that it was difficult to access it from my WinMo phone, so when I read of this software I decided immediately to try it.

And let me say that Speeed Reader is exactly what I needed… and probably what you need if you have a Google Reader account. And use Windows Mobile.

The interface is simple: after logging in (you can ask Speeed Reader to login automatically when launched) the application loads all the feeds grouped by “tag” (as you categorized them in Google Reader) and shows an indicator reporting the number of unread items in each tag / category.

You can browse the tags, and see all the feeds in it, open a feed and read the posts.

There are (and I find this particularly useful) some tools to share the posts through twitter / email / sms. And you can set refresh intervals, if you want.

The reading is very good, Speeed Reader does a pretty good job in rendering tags and downloading images. There is the possibility to tell the application to cache a fixed number of article, and read them in “offline” mode".

Did I tell you that it’s also very fast? Right now this is one of the most used apps in my device.

You can download a trial version of Speeed Reader 1.11 from this url: then if you like it you can reach it in Handango for $1.99, exactly here:

I think that for $1.99 this is a must-have.

Now some screenshots. First the tags list:


Then some articles from


This is one article from the Speeed Reader blog:


Some menu entries:


Another “skin” applied (the list is from Seth Godin’s blog):


The sharing options available:


Happy reading with Speeed Reader! :-)