Posts

Showing posts from March, 2006

Cross Browser CSS

Getting a website's CSS to run consistently across the popular browsers is easier said than done. These CSS Hacks, Tips, Tricks and Fixes can help.

Cool tools for the Web developer

When you need to build code quickies or prototypes to test out ideas when they strike, these tools are invaluable - ASP.NET Web Matrix is a free IDE for building ASP.NET (1.x) apps. Snipper Compiler is great for running code snippets in a jiffy and is available for both .Net 1.x and 2.0 flavors.

HOW TO find the biggest tables in a database

acperkins has an answer : Create Table #temp ( table_name sysname , row_count int, reserved_size varchar(50), data_size varchar(50), index_size varchar(50), unused_size varchar(50)) SET NOCOUNT ON insert #temp exec sp_msforeachtable 'sp_spaceused ''?''' select a.table_name, a.row_count, count(*) as col_count, a.data_size from #temp a inner join information_schema.columns b on a.table_name = b.table_name group by a.table_name, a.row_count, a.data_size Order by CAST(Replace(a.data_size, ' KB', '') as integer) desc drop table #temp sp_MSforeachtable is an undocumented stored procedure that can be used to perform the same actions for all tables in the database.

Regex resources

Eric Gunnerson's C# Compendium has a series of posts dedicated to learning regular expressions through exercises - Regex 101 RegExLib.com also has a good search-able collection of expressions.

HOW TO detect if a browser supports Javascript & it is ENABLED.

The Request.Browser property which is an instance of the HttpBrowserCapabilities object can be used to determine browser information using ASP.NET. The BrowserCapabilities object contains properties that describe the features available in a particular browser. Request.Browser.JavaScript property returns either true or false depending on its availability in the browser. A user having a Javascript supported browser may opt to disable it. How to detect that? One technique to determine if a user has JavaScript enabled is to create a HIDDEN form field in the HTML and call a JavaScript function on the ONLOAD page event, altering the value of this HIDDEN form field. That way, if the form field has been altered, then we know JavaScript is enabled (else the JavaScript function that alters the HIDDEN form field wouldn't have been called). Update: You can prevent a web application from breaking in a case where there is some dependent functionality built with Javascript & the user has d...

SQL Server Performance Audit Checklist

The key counters (& suggested threshold values) to monitor with Performance Monitor (PerfMon) in order to identify & avoid hardware bottlenecks are: Memory: Pages/sec - 0-20 Memory: Available Bytes - 10% of physical memory Physical Disk: % Disk time - less than 55% Physical Disk: Avg. Disk Queue Length - less than 2 per physical disk Processor: % Processor Time - less than 80% System: Processor Queue Length - less than 2 per CPU SQL Server Buffer: Buffer Cache Hit Ratio - greater than 99% SQL Server General: User Connections - setting for "Maximum Worker Threads" should be higher than the maximum number of user connections your server ever reaches. Its a time to worry if the counters start crossing the suggested threshold values. For more comprehensive analysis, additional counters can be chosen. Proactive tuning & effective maintenance is required for the smooth functioning of a data driven website.

MSMQ versions

MSMQ comes as part of the Windows OS . MSMQ 1.0 came with Windows NT 4, Windows 95 and Windows 98. MSMQ 2.0 was available with Windows 2000 & runs only on Windows 2000 platform. MSMQ 3.0 comes with Windows 2003 and Windows XP. MSMQ can be leveraged to implement an asynchronous model in web applications requiring extensive processing.

Reload page every N minutes

Image
The Opera browser has a nifty feature to automatically reload a web page at pre-defined intervals. Right click Context menu, choose the "Reload every" option, set the desired time & "Enable" the feature

Source Control for the solo developer

Vault is a source control tool built entirely on Microsoft's .NET platform, including C#, IIS and SQL Server 2000. Vault is free for use by a single user .