Saturday, December 10, 2011

Mac OS X Enable/Disable Dashboard

This is a quick way to enable or disable the mac os x's shining dashboard.

Enable:
defaults write com.apple.dashboard mcx-disabled -boolean YES
killall Dock
 
Disable: 
defaults write com.apple.dashboard mcx-disabled -boolean NO
killall Dock 

Tuesday, July 12, 2011

C# Format string with a number to two decimal places

formattedValueFrom =  String.Format("{0:0.00}", decimal.Parse(row["ValueFrom"].ToString().Trim()))

row - A DataRow in a DataTable
ValueFrom - A column in the DataRow