Tuesday, April 26, 2011

Renumbering Table Rows

For the life of me, I can never remember the syntax for this!  Ack!

-- hack to get WITH expression to work
set @user_code = @user_code;

/* renumber now that we have the data massaged how we want */
WITH newPH
AS (SELECT
  [rowid]
  ,ROW_NUMBER() OVER(ORDER BY AUDIT_LOG_DATA_ID DESC) AS [newRowID]
FROM   web_sp_AUDIT_LOG_View
WHERE  userkey = @userkey)
--SELECT * FROM newPH
UPDATE newPH
SET    [rowid] = newRowID

declare @total_records int
SELECT @total_records = COUNT(*) FROM web_sp_AUDIT_LOG_View WHERE userkey = @userkey
UPDATE web_sp_AUDIT_LOG_View SET [total_records] = @total_records where userkey = @userkey

Monday, April 25, 2011

DebugView - view Debug output without opening Visual Studio.

"DebugView is an application that lets you monitor debug output on your local system, or any computer on the network that you can reach via TCP/IP. It is capable of displaying both kernel-mode and Win32 debug output, so you don't need a debugger to catch the debug output your applications or device drivers generate, nor do you need to modify your applications or drivers to use non-standard debug output APIs."


http://technet.microsoft.com/en-us/sysinternals/bb896647


Genius!

Tuesday, April 5, 2011

MSDN Magazine: Natural Algorithms - Use Bee Colony Algorithms to Solve Impossible Problems

MSDN Magazine: Natural Algorithms - Use Bee Colony Algorithms to Solve Impossible Problems: "Volt Information Sciences"

team - How do deal with developers that over complicate projects - Stack Overflow

team - How do deal with developers that over complicate projects - Stack Overflow

This thread has some really thought provoking things -- and some good articles referenced. I really want simplicity ...





HTML5 Boilerplate - A rock-solid default template for HTML5 awesome.

HTML5 Boilerplate - A rock-solid default template for HTML5 awesome.

This is awesome indeed!

Conditional stylesheets vs CSS hacks? Answer: Neither! « Paul Irish

Conditional stylesheets vs CSS hacks? Answer: Neither! « Paul Irish

Brilliant! Here is an excerpt from this great article:

"Here's my proposed solution:

          <body> 

Using the same conditional comments, we're just conditionally adding an extra class onto the body tag. This allows us to keep our browser-specific css in the same file:

 div.foo { color: inherit;} .ie6 div.foo { color: #ff8000; }

Plus it totally validates and works in all browsers.

(Hat tip to Paul Hammond and Adam McIntyre for being s-m-r-t.)"