Sunday, 20 June 2010

Convert Wordpress to Blogger format

Having tried out Wordpress on a cheap host the experience was just too slow so now moving back to Blogger. If for any reason you need to move from Wordpress to Blogger you will need to convert the XML export file.

For Small Blogs
Wordpress2Blogger web service provides a simple Wordpress to Blogger conversion. Login into your Wordpress blog then goto "Manage" or "Tools" tab and export your blog as an XML file.

Now upload the file to Wordpress2Blogger online service to make it Blogger compatible. Download the resultant file and import it into Blogger via the Blogger dashboard. Your Wordpress posts will be imported as drafts, from there you can check and publish then as necessary. This method works for export files up to 1Mb.

For Larger Blogs
Larger blogs require a different method. Take a look at the Google Blog Converter project. As pointed by Google OpenSource blog this new Open Source project provides the ability to easily move blog posts and comments from service to service. This initial release provides Python libraries and runnable scripts that convert between the export formats of Blogger, LiveJournal, MovableType, and WordPress.

Wednesday, 16 June 2010

SQL Server Backup Job Script

BACKUP DATABASE [{{DBName}}] TO  DISK = N'{{FullBackupPath}}' WITH  INIT ,  NOUNLOAD ,  NAME = N'{{DBName}} backup',  NOSKIP ,  STATS = 10,  NOFORMAT

Windows 7 Shortcut Keys

Windows + ↑ (Up Arrow) – Maximize window
Windows + ← (Left Arrow) – Snap window to left side covering half of desktop space. Continue pressing the keyboard shortcut will rotate the window between snap to left, snap to right and restore to normal position.
Windows + → (Right Arrow) – Snap window to right side covering half of desktop space. Continue pressing the keyboard shortcut will rotate the window between snap to left, snap to right and restore to normal position.
Windows + ↓ (Down Arrow) – Minimize the window. Restore to normal size and position if the window is currently maximized.
Windows + Home – Clear all but the active window.
Windows + Space – All windows become transparent so you can see through to the desktop.
Windows + Shift + ← (Left Arrow) – Move the active window to the adjacent monitor on the left for dual or multiple monitors setup.
Windows + Shift + → (Right Arrow) – Move the active window to the adjacent monitor on the right for dual or multiple monitors setup.
Windows + T – Show preview thumbnail of running applications in Windows Taskbar one by one without mouse over.
Windows + P – Adjust presentation options of the display on computer or projector.
Windows + + (Add) – Zoom in.
Windows + – (Minus or Dash) – Zoom out.
Shift + Click a Taskbar item: Open a new instance of that particular application.
Windows + D – Show desktop and restore desktop (minimize or restore all windows).
Windows + M – Minimize all windows.
Windows + U – Open Ease of Access Center.
Windows + F – Search window.
Windows + G – Bring all gadgets on top and foreground.
Windows + X – Run Windows Mobility Center.
Windows + R – Open ‘Run’ command.
Windows + E – Run Windows Explorer.
Windows + L – Lock the computer.
Windows + Pause [Break] – Open System Properties.
Windows + [number] – Activate and run the program pinned on Windows 7 Taskbar, running program won’t be affected.
Windows + Tab – Windows Aero Task Switcher
F1 – Help
F3 – Search

SQL Server 2005 Error When Creating SQL Agent Job

I am running SQL Server 2005 Workgroup Edition, I get the following error when creating a SQL Server Agent Job:
Unable to cast object of type 'Microsoft.SqlServer.Management.Smo.SimpleObjectKey' to type 'Microsoft.SqlServer.Management.Smo.Agent.JobObjectKey'. (Microsoft.SqlServer.Smo)
Not good!
The error can have a number of causes. Solutions include:
  1. Installing SQL Server 2005 SP2 (claimed by a number of individuals to work).
  2. If you are accessing the SQL Server across a network, logon to the server using remote desktop or similar and attempt to create the job locally.

Sunday, 13 June 2010

Access each character of a string

foreach (char ch in stringVar)
{
  Console.WriteLine(ch.ToString());
}




OR


String.ToCharArray()

Environment SpecialFolder directory paths

The Environment.SpecialFolder enumeration can be used to obtain the full path to system special folders.
The enumeration includes:
Supported by the XNA Framework
ApplicationData
Common repository for application-specific data for the current roaming user.
CommonApplicationData
Common repository for application-specific data that is used by all users.
LocalApplicationData
Common repository for application-specific data that is used by the current, non-roaming user.
Cookies
Common repository for Internet cookies.
Desktop
The logical Desktop rather than the physical file system location.
DesktopDirectory
The directory used to physically store file objects on the desktop.
Favorites
Common repository for the user's favourite items.
History
Common repository for Internet history items.
InternetCache
Temporary Internet files folder.
Supported by the XNA Framework
Programs
The directory that contains the user's program groups.
MyComputer
The My Computer folder.
n.b.
The MyComputer constant always yields the empty string ("") because no path is defined for the My Computer folder.
MyMusic
The My Music folder.
MyPictures
The My Pictures folder.
Recent
The directory that contains the user's most recently used documents.
SendTo
The directory that contains the Send To menu items.
Supported by the XNA Framework
StartMenu
The directory that contains the Start menu items.
Supported by the XNA Framework
Startup
The directory that corresponds to the user's Startup program group.
System
The System directory.
Templates
The directory that serves as a common repository for document templates.
Supported by the
 XNA Framework
Personal
The directory that serves as a common repository for documents.
This member is equivalent to MyDocuments.
MyDocuments
The My Documents folder.
This member is equivalent to Personal.
ProgramFiles
The program files directory.
CommonProgramFiles
The directory for components that are shared across applications.
AdminTools
The file system directory that is used to store administrative tools for an individual user. The Microsoft Management Console (MMC) will save customized consoles to this directory, and it will roam with the user.
CDBurning
The file system directory that acts as a staging area for files waiting to be written to a CD.
CommonAdminTools
The file system directory that contains administrative tools for all users of the computer.
CommonDocuments
The file system directory that contains documents that are common to all users. This special folder is valid for Windows NT systems, Windows 95, and Windows 98 systems with Shfolder.dll installed.
CommonMusic
The file system directory that serves as a repository for music files common to all users.
CommonOemLinks
This value is recognized in Windows Vista for backward compatibility, but the special folder itself is no longer used.
CommonPictures
The file system directory that serves as a repository for image files common to all users.
CommonStartMenu
The file system directory that contains the programs and folders that appear on the Start menu for all users. This special folder is valid only for Windows NT systems.
CommonPrograms
A folder for components that are shared across applications. This special folder is valid only for Windows NT, Windows 2000, and Windows XP systems.
CommonStartup
The file system directory that contains the programs that appear in the Startup folder for all users. This special folder is valid only for Windows NT systems.
CommonDesktopDirectory
The file system directory that contains files and folders that appear on the desktop for all users. This special folder is valid only for Windows NT systems.
CommonTemplates
The file system directory that contains the templates that are available to all users. This special folder is valid only for Windows NT systems.
CommonVideos
The file system directory that serves as a repository for video files common to all users.
Fonts
A virtual folder that contains fonts.
MyVideos
The file system directory that serves as a repository for videos that belong to a user.
NetworkShortcuts
A file system directory that contains the link objects that may exist in the My Network Places virtual folder.
PrinterShortcuts
The file system directory that contains the link objects that can exist in the Printers virtual folder.
UserProfile
The user's profile folder. Applications should not create files or folders at this level; they should put their data under the locations referred to by ApplicationData.
CommonProgramFilesX86
The Program Files folder.
ProgramFilesX86
The Program Files folder.
Resources
The file system directory that contains resource data.
LocalizedResources
The file system directory that contains localized resource data.
SystemX86
The Windows System folder.
Windows
The Windows directory or SYSROOT. This corresponds to the %windir% or %SYSTEMROOT% environment variables.
Full Microsoft resource: http://msdn.microsoft.com/en-us/library/system.environment.specialfolder.aspx

Saturday, 12 June 2010

HTC Phone Comparison

I currently have an HTC Touch Diamond and have been looking at changing to an Android phone. A quick comparison of the main options of HTC Desire, HTC Legend and HTC Wildfire.
Touch Diamond Desire Legend Wildfire
CPU Speed 528 MHz 1 GHz 600 MHz 528 MHz
CPU Type Qualcomm® MSM7201A Snapdragon Qualcomm MSM7227 Qualcomm MSM7225
Width 51 mm 60 mm 56.3 mm 60.4 mm
Height 102 mm 119 mm 112 mm 106.75 mm
Depth 11.35 mm 11.9 mm 11.5 mm 12.9 mm
OS Windows 6.1 Android 2.1 Android 2.1 Android 2.1
Control TouchFLO 3D HTC Sense HTC Sense HTC Sense
ROM 256 Mb 512 Mb 512 Mb 512 Mb
RAM 192 Mb 576Mb 384 Mb 384 Mb
Internal Storage 4Gb
Additional Storage Micro SD up to 32 Gb Micro SD up to 32 Gb Micro SD up to 32 Gb
Weight 110 g 135 g 126 g 118 g
Display 2.8 in TFT-LCD VGA 3.7 in AMOLED WVGA 3.2 in AMOLED HVGA 3.2 in QVGA
Network Tri-band Quad-band Quad-band Quad-band
GPS GPS & GPS-A GPS GPS GPS
Bluetooth 2.0 with EDR 2.1 with EDR 2.1 with EDR 2.1 with EDR
Wi-Fi IEEE 802.11 b/g IEEE 802.11 b/g IEEE 802.11 b/g IEEE 802.11 b/g
3G 7.2 Mbps 7.2 Mbps 7.2 Mbps
GPRS 114 Kbps 114 Kbps 114 Kbps
EDGE 560 Kbps 560 Kbps 560 Kbps
Connector HTC ExtUSB Micro-USB Micro-USB Micro-USB
Connector jack 3.5 mm stereo jack 3.5 mm stereo jack 3.5 mm stereo jack
G-sensor Yes Yes Yes
Digital compass Yes Yes Yes
Proximity sensor Yes Yes Yes
Ambient light sensor Yes Yes Yes
Camera 1 3.2 mega pixel 5 mega pixel 5 mega pixel 5 mega pixel
Camera 2 VGA CMOS
Flash Yes Yes Yes
Geotagging Yes Yes Yes
Mic Built in
Radio FM with RDS FM FM FM
Audio formats MP3, AAC, AAC+, WMA, WAV, and AMR-NB .aac, .amr, .ogg, .m4a, .mid, .mp3, .wav, .wma .aac, .amr, .ogg, .m4a, .mid, .mp3, .wav, .wma .aac, .amr, .ogg, .m4a, .mid, .mp3, .wav, .wma
Video formats .3gp, .3g2, .mp4, .wmv .3gp, .3g2, .mp4, .wmv .3gp, .3g2, .mp4, .wmv
Battery Li-Ion 900 MAh Li-Ion 1400 MAh Li-Ion 1300 MAh Li-Icon 1300 MAh
Talk time 270 min WCDMA

330 min GSM
390 min WCDMA

400 min GSM
440 min WCDMA

490 min GSM
440 min WCDMA

490 min GSM
Standy time 396 hrs WCDMA

285 hrs GSM
360 hrs WCDMA

340 hrs GSM
560 hrs WCDMA

440 hrs GSM
690 hrs WCDMA

480 hrs GSM

Thursday, 10 June 2010

Orange Mobile Contract Renewal - Beware

For any existing Orange customers hoping to obtain a competitive renewal on their Orange contract, beware!
A number of phone companies commit to providing the same deals to their existing as they use to lock in new customers. Some, T-Mobile for one, even claim to offer better deals to their existing customers.
Orange used to be fair handed on contract renewals and would assess past usage, upgrade phones and commitment to future usage on a new contract. This is no longer the case. Their policy is now to base all new deals (both contract and phone) on the past usage, regardless of the new contract value. In addition to this certain phones are flagged so Orange reps are unable to offer competitive deals to existing customers – this applies to the most popular handsets.
For a new customer it is possible to obtain an HTC Desire from almost any network for free on a £30 a month contract, this includes Orange on the rare occasions they have any in stock. My mobile usage is average but not heavy but will increase some what in the coming months with a high demand for data. Based on my past usage an HTC Desire would be £150 when obtained at the same as a contract renewal, this is the case even if I chose to renew with the most expensive £80 a month Panther deal!
I am sure Orange couldn’t care less that one customer is about to leave for another network but I can’t be alone in being screwed by their latest policies. Maybe when enough customers have left for other networks they will have to adjust their terms more in favour of the loyal customer who has stuck with them through good times and bad, mostly bad…

Wednesday, 2 June 2010

Apple iPhone and iPod WebClip icons

The iPhone and iPod Touch devices allow a user to save a WebClip bookmark to a site on their Home Screen.
To specify a bookmark icon for all pages of a web site, place a PNG image named "apple-touch-icon.png" in the root directory of your web site - similar to the "favicon.ico" for site icons.
To override the site bookmark icon on a specific web page, insert a <link> element similar to <link rel="apple-touch-icon" href="/customIcon.png"/> within the <head> element of the page.
The bookmark icon dimensions should be 57x57 pixels. If the icon is a different size it will be scaled and cropped to fit.
appleeg
Safari will automatically composite the icon with the standard "glassy" overlay so it looks like a built-in iPhone or iPod application.