SQL XQuery Returning Empty Rows
If you have done any work work with XQuery in SQL, you will find that it will return empty rows for those that don’t pass the query condition. This can be annoying especially if you have thousands/millions rows of data. For example: To combat the potential for an exuberant amount of useless data being returned from this kind of query, you will need to wrap your XQuery statement within an another SELECT statement. E.g: SELECT [SubmissionID] , [SubmissionDate] , [xdata] FROM ( SELECT [SubmissionID] , [SubmissionDate] , [XmlData].query('for $g in...
read moreShrink SQL Database Log File Size
Always a problem and a simple solution for databases that are configured for SIMPLE recovery mode. Open SQL Management Studio Select the database Right-click, and select Tasks -> Shrink -> Files In the dialog window, select Log Check “Reorganize pages …” and enter in a new log file size in MB Click on OK Alternatively, you can write the script: USE [dbtest] GO DBCC SHRINKFILE (N'dbtest_log' , 10) GO Once done, you can/should restrict the file size growth of the log...
read moreIE JPEG RGB color profile
One of our clients was trying to update an image on their site and found out that the image didn’t show up in IE browsers, but in all the others. Weird! So they gave us a call and we looked into it. After going through the usual steps in debugging an issue, we couldn’t find a reason for this to be happening. But after some Googling on the issue “JPEGs not showing up in IE”, we found something that pointed us the right direction. It turns out that IE can only process/show JPEGs that have the color profile of sRGB. All the other browsers take into account the possibility...
read moreJavaScript Benchmarking Sites
Working on a JavaScript intensive application and I really needed to see how JavaScript preforms differently in the various browsers (not from a third-party). Here are 2 sites that will help you (an maybe convince your employer/client to not support certain browsers) SunSpider JavaScript Benchmark – http://www2.webkit.org/perf/sunspider/sunspider.html V8 Benchmark Suite Version 6 – http://v8.googlecode.com/svn/data/benchmarks/v6/run.html Cool...
read moreSSL VPN and File Sharing in Windows Server 2008
A simple tutorial on how to setup secure file sharing using the SSL VPN functionality in Windows Server 2008. How-to: Install IIS on the VPN server with all security settings marked for installation Use a valid trusted SSL certificate (E.g: verisign, Geotrust etc) Assign the cert to the website with the same domain name (CN), or assign the host name to website with cert already setup Install Routing and Remote Access using the “Add Role Wizard” in Server Manager. Select the Network Policy and Access Services check box, click Next, and then click Next again. In the Select Role...
read moreWindows XP 9th B-Day
It has been 9 years since its first release date, and boy I can’t wait till the support on this product is completely dropped … no more IE 6! http://en.wikipedia.org/wiki/Windows_XP
read more