NEWS

Monday, August 13, 2012

Windows 7 trick: unlock the secret God Mode folder

So, what exactly is God Mode in Windows 7? 

Well, for starters, it's not really a mode. And it's nothing you need to be a deity to pull off, either.

Rather, it's a folder packed with shortcuts to just about every settings change and administrative function in Windows 7. Everything you'll find in the Action Center, Backup and Restore, Autorun, Desktop Gadgets, Devices and Printers -- it's all there. All dumped in one central location for easy access.

No, this trick doesn't involve entering IDDQD in the run box - but it's just about that simple. Here's the magic, as provided by the guys at Windows 7 Themes:
  • Create a new folder anywhere (I set mine up in d:\)
  • Rename the folder and paste in the following text: GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
That's it! You've now got your new, somewhat handy folder. Why somewhat handy? Well, because you can already access everything in there by typing a few letters into the search box on your start menu. 

Friday, July 20, 2012

Free E-book: Time-Saving VS11 and ASP.NET 4.5 Features You Shouldn’t Miss

Thursday, July 19, 2012

SQL Server: Easily detect if a table or other object exists


Generally people write as below to check whether table or object exists:


IF  EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[dbo].[TableName]')
AND type in (N'U'))
  DROP TABLE [dbo].[TableName];

However, this is more complicated than needed. You can just do this:

IF Object_ID('dbo.TableName', 'U') IS NOT NULL DROP TABLE dbo.TableName;

The second parameter of Object_ID accepts any value from the xtype column of the sysobjects table. U is for user table.

To check for temp tables and temp stored procedures, do this:

IF Object_ID('tempdb.dbo.#TableName', 'U') IS NOT NULL DROP TABLE #TableName;