Thursday, July 22, 2010

Browser : Epic

Bangalore-based startup, Hidden Reflex, has developed a browser for the Indian audience called Epic, thanks to Mozilla’s popular open-source platform. Though made on lines of the Firefox browser, it has many firsts

It’s the only browser that has an in-built anti-virus scanner and other unique privacy features like the flash cookie deletion.

Epic also has a side-bar with shortcut icons for frequently used applications and websites – all of which are a part of the 1500+ apps that ‘Epic’ boasts of.

Epic provides a uniquely Indian browsing experience. Epic's India sidebar supports Indian content by providing users access to the latest national and regional news from popular publications, live television channels, videos, stock quotes, live cricket scores, top music albums, and local events

My favourite, however, is the ‘type in Indian languages’ widget that can be done using the English script, which the browser instantly converts into the regional language chosen.

Users can choose from 1500+ customised Indian themes and wallpapers ranging from freedom fighters to famous Bollywood and regional film stars. Writing in Indian languages is supported throughout Epic. Users can instantly write in Indian languages on any webpage or in Write, Epic's free built-in word processor. Twelve Indian languages are currently supported. Free antivirus scanning and healing is built into Epic

Download Epic from here.

Friday, July 16, 2010

Karbon Flv Downloader for Firefox

Here is the nice plug-in you can add-on for Mozilla.

You Download and install Karbon here. Once you install this plug-in you can see an icon in the Mozilla status bar.

karbon

You can see the number of downloadable files. Click on Karbon icon to see all the downloadable files

karbon2

You can Download FLVs and MP3s from almost any embedded web pages. Have Fun.

Thursday, July 15, 2010

Windows 7: SMTP Server

I am using Windows 7, as a developer some times i need to send emails from my applications. But using Windows 7  i can’t send emails as SMTP service used to ship with IIS 6.0 and earlier versions are missing from IIS 7.0 on Windows 7.  there is no default SMTP configured, I am very impressed with Windows 7 but  IIS 7.0 does not include Post Office Protocol or Simple Mail Transfer Protocol.

For this there many third party free SMTP Servers available over net.  But for me after trying various SMTP service solutions, the one that I found to be pretty simple to install and configure is hMailServer. Just like the old SMTP that ships with IIS 6.0, hMailServer allows one to restrict access to the local machine (127.0.0.1) only in order to prevent being vulnerable to spam. It installs a SQL database meant for storing inbound email for users to POP/IMAP mail out of. Its a security features of locking it down to the loopback address. But as developer its simple and easy to use

Download and install hMailServer.

Some pointers on ensuring you restrict access to your local machine only.

Once you attempt to connect i ask for the password which is give at the time of installation.

8

This will open the admin console.  Go to Protocols section in Settings, and check only SMTP and save.

9

Now go to Advanced in Settings –>Settings –> Advanced. Select IP Ranges section

image

Select My Computer from IP Ranges and click Edit,

image

Uncheck all from Require SMTP authentication section. And keep the rest all default settings as it is.

That is it.  You have a mail server now on Windows 7.  This software has a lot of options including having multiple domains.  Remember to secure it the best you can so you don’t become a spam haven.  Happy SMTP Mailing Smile

Wednesday, July 14, 2010

SP_EXECUTESQL vs EXECUTE/EXEC

Common Properties

  • The Transact-SQL statements in the sp_executesql or EXECUTE string are not compiled into an execution plan until sp_executesql or the EXECUTE statement are executed. The strings are not parsed or checked for errors until they are executed. The names referenced in the strings are not resolved until they are executed.
  • The Transact-SQL statements in the executed string do not have access to any of the variables declared in the batch that contains the sp_executesql or EXECUTE statement. The batch containing the sp_executesql or EXECUTE statement does not have access to variables or local cursors defined in the executed string.
  • If the executed string has a USE statement that changes the database context, the change to the database context only lasts until sp_executesql or the EXECUTE statement completes.

Comparison SP_EXECUTESQL vs EXECUTE/EXEC

sp_executesql gives you the possibility to use parameterised statements, EXECUTE does not. Parameterised statements gives no risk to SQL injection and also gives advantage of cached query plan. The sp_executesql stored procedure supports parameters. So, using the sp_executesql stored procedure instead of the EXECUTE statement improve readability of your code when there are many parameters are used. When you use the sp_executesql stored procedure to executes a Transact-SQL statements that will be reused many times, the SQL Server query optimizer will reuse the execution plan it generates for the first execution when the change in parameter values to the statement is the only variation.

sp_executesql can be used instead of stored procedures to execute a Transact-SQL statement a number of times when the change in parameter values to the statement is the only variation. Because the Transact-SQL statement itself remains constant and only the parameter values change, the SQL Server query optimizer is likely to reuse the execution plan it generates for the first execution.

Use SP_EXECUTESQL rather than EXEC(), it has better performance and improved security.

sp_executesql [ @statement= ] statement
[ 
  { , [ @params = ] N'@parameter_name data_type [ OUT | OUTPUT ][ ,...n ]' } 
     { , [ @param1= ] 'value1' [ ,...n ] }
]

Thursday, July 08, 2010

How to: Drop a Database if it exists

Here is the T-SQL code for checking to create if the database exists. This code below drops the database and creates new.

-- Changed database context to 'master'
USE master
GO
-- Check Exists
IF EXISTS(SELECT name FROM sys.databases
WHERE name = 'Angel83')
DROP DATABASE Angel83
GO
-- Create Database
CREATE DATABASE Angel83
GO