Tuesday, March 21, 2006

Tools for debugging web applications

Fiddler. This program runs as a proxy that logs all HTTP traffic. It supports Internet Explorer and other browsers. Using Fiddler, you can examine each request and response, including headers, cookies, and the message contents.

Web Development Helper. This tool works only with Internet Explorer, but in addition to logging HTTP traffic, it can be used to inspect the HTML DOM, display trace information in a separate window, shut down the application, and decode the page's view state.

"Atlas" is amazing...

Microsoft introduce "Atlas," powerful new framework for building cross–browser, cross–platform AJAX applications in its MIX06 event. Compared to Google, Yahoo, Microsoft is more focusing on the developement tools instead of the applications for Web 2.0. Now this baby is really a powerful tools for asp.net 2.0.

Wednesday, February 22, 2006

Array in SQL Server 2000

Just found a good article about table variable in T-SQL.

-- Transact SQL Cursor
CREATE PROC SQL_Cursor
AS
/*Local variables */
DECLARE @ContName VARCHAR(100),
@CompName VARCHAR(50)
/*create the cursor*/
DECLARE MyCursor CURSOR FOR
SELECT CompanyName, ContactName
FROM Suppliers
WHERE ContactName LIKE 'c%'
/*open the cursor*/
OPEN MyCursor
/*get row values*/
FETCH MyCursor INTO @CompName, @ContName
/*perform oterations with single row*/
PRINT 'T_SQL cursor row ' + @ContName + ' ' + @CompName
/*establish loop structure*/
WHILE @@FETCH_STATUS = 0
BEGIN
/*get row values*/
FETCH MyCursor INTO @CompName, @ContName
/*perform operations with single row*/
PRINT 'T_SQL cursor row ' + @ContName + ' ' + @CompName
END
/*close the cursor*/
CLOSE MyCursor
/*remove the cursor definition*/
DEALLOCATE MyCursor


-- Cursor Simulator
CREATE PROC CursorSimulator
AS
/*Prepare TABLE variable to take resultset*/
DECLARE @tbl TABLE(
RowID INT IDENTITY(1, 1),
CompanyName VARCHAR(100),
ContactName VARCHAR(50))
/*Local variables */
DECLARE @ContName VARCHAR(100),
@CompName VARCHAR(50),
@count int, /*create local @@fetch_status*/
@iRow int /*row pointer (index)*/
/* create array simulator */
INSERT @tbl
SELECT CompanyName, ContactName
FROM Suppliers
WHERE ContactName LIKE 'c%'
/*get array Upper Bound (highest ID number)*/
SET @count = @@ROWCOUNT
/*initialize index counter*/
SET @iRow = 1
/*establish loop structure*/
WHILE @iRow <= @count BEGIN /*get row values*/ SELECT @ContName = CompanyName, @CompName = ContactName FROM @tbl WHERE RowID = @iRow /*perform operations with single row*/ PRINT 'My cursor row ' + @ContName + ' ' + @CompName /*go to next row*/ SET @iRow = @iRow + 1 END

Google China Blog

http://www.googlechinablog.com/

Thursday, February 02, 2006

vnfo.reg

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Console\nfo]
"CodePage"=dword:000001b5
"FontSize"=dword:000c0008
"FontFamily"=dword:00000030
"FontWeight"=dword:00000190
"FaceName"="Terminal"
"QuickEdit"=dword:00000800
"ScreenBufferSize"=dword:012c0052
"WindowSize"=dword:00240052

[HKEY_CLASSES_ROOT\MSInfo.Document\Shell\View]
@="view nfo"

[HKEY_CLASSES_ROOT\MSInfo.Document\Shell\View\Command]
@="cmd.exe /c start \"nfo\" cmd.exe /c type \"%1\" ^& pause"

Tuesday, January 31, 2006