Posts

Showing posts from April, 2007

HOW TO find the city and ISP of a visitor to your website.

Fetch the visitor's IP address using Request.ServerVariables("REMOTE_ADDR") [in ASP & ASP.NET] and use one of the many IP address lookup databases available on the web, some of them for free . The price of these databases may vary depending on the accuracy, frequency of database updates, features it offers like Region/State, City, Latitude, Longitude, ZIP Code, Domain Name, Time Zone, Connection Speed, Proxy (including anonymous and open proxies ) detection and may run into hundreds of dollars.

What's new in SQL Server 2005 for the T-SQL programmer

I have been taking a course on SQL Server 2005 Transact-SQL and having already worked on SQL Server 7 & 2000, I was keen on knowing what new Transact-SQL features SQL Server 2005 offers. With help from other online resources as well, I have summarized the key enhancements for quick reference - TOP — Row count based on an expression. TOP can also be used with INSERT, UPDATE, and DELETE. OUTPUT clause with DML Commands - to determine the changes from an INSERT, UPDATE, or DELETE PIVOT/UNPIVOT - to create crosstab queries TRY-CATCH - for improved error handling Ranking Functions [ ROW_NUMBER(), RANK(), DENSE_RANK(), and NTILE() ] - ranking adds an extra value column to the resultset that is based on a ranking algorithm being applied to a column of the result. DDL Triggers - fire when CREATE, ALTER, or DROP statements are executed, useful for auditing Common Table Expression (CTE) - to create recursive query expressions TABLESAMPLE clause - lets you efficiently sample pages from

HOW TO consume Amazon's E-Commerce Service(ECS) 4.0

When you are out to buy a technical book either online or at a bookshop by spending a considerable amount, it helps to check beforehand which are the best selling books on that topic and how well they compare with the others. A fair indicator of the popularity of the book is the Amazon Sales Rank and also their customer reviews and rankings. Philip Miseldine 's article shows how you can consume Amazon's E-Commerce Service(ECS) to build your own web application that gets a snapshot of all the vital details using Visual Web Developer 2005 Express or even Visual Studio .NET 2003.

Book Review: Teach Yourself Regular Expressions in 10 Minutes by Ben Forta

Image
"So you've got a problem, and you want to use Regular Expressions to solve it. Now you've got two problems." - Scott Hanselman Although numerous languages (including the .NET languages like C#, VB.NET and Javascript) and tools (editors like VS.NET & EditPlus) support Regular Expressions, it is a daunting topic for developers due to its hieroglyphic & cryptic nature. When I came across the book, SAMS Teach Yourself Regular Expressions in 10 Minutes I was a little put off by the boastful and exaggerated title. Although the title does serve well to make the subject less daunting, it is a nice marketing gimmick and the author reveals in the preface that it is a tutorial book organized into a series of easy-to-follow 10 10-minute lessons. I took more time than 10 minutes to read through each of the 10 chapters and appendices and found it insightful & educative. The author follows a hands-on approach & a informal style to guide the reader gently through

HOW TO write browser specific CSS

The need to write browser specific CSS arises due to browser quirks and web designers have to invent CSS hacks when nothing else works. There are 2 techniques to display style settings conditionally depending on the browser - Conditional Comments & CSS child selector. I assume here that there are only 2 types of browsers (as a majority of people categorise). IE and non-IE. To make a style take effect ONLY in IE (5 and above) Conditional Comments can be used. The functionality of conditional comments is derived through HTML comments and conditional expressions that are designed to be understood by IE 5 and above only. The CSS child selector technique exploits the fact that IE (except IE 7 in standards-compliant mode, more about it in a moment) cannot understand child selectors but works for all (ok, atleast Firefox, Opera & Mozilla based) non-IE browsers. IE 7 has greater CSS standard compliance that IE 6 and it now supports CSS child selector . So web pages which earlier