Thoughts and dreams for a better world… one smile, beat, code at a time

  • remove malicious script tags from file

    Here's a small Windows Forms application that I created to automate removal of malicious SCRIPT tags inserted into some web files. [more] (or in general – even non malicious scripts). Of course, you can always do this manually but if we're talking of hundreds or thousands of files, it will be one heck of a…

  • WindowsPrincipal.IsInRole doesn’t reflect changes until restart

    Just an observation sometime ago that if you create a new Windows Role and add a user to it and create a WindowsPrincipal using that user, the IsInRole method doesn't reflect the membership change made until a restart is made. [more] For example, given the code below (Console Application project) using System; using System.Collections.Generic; using…

  • Address1 vs Address2

    Update: I had a UPS package returned to sender (side note: they suck and given a choice I will not use UPS ever). I would recommend putting PMB (private mailbox number) in Address1 instead of Address2. What really is the difference between Address1 and Address2 and is it significant? It depends on the country but…

  • caution in dropping a temp table before creating it

    Recently I ran into a script instead a stored procedure IF OBJECT_ID(tempdb..#temp1) DROP TABLE #temp1 Basically, the object of this script is to check if #temp1 (regular temporary table) exists. If so drop it. However, I think it can have unintended consequences and maybe safer not to include. [more] Say you have a script that…

  • temp table (#), global temp tables (##) and @table variables

    I've been working "full-time" on TSQL scripts for the past month (no with .NET windows/web apps) and mostly on optimization. And I feel that I should share with everyone this article about temp tables and table variables and some of my own notes. Go read the article below then you may come back here. Take…

  • Convert Delimited Values to a table with Ordinal Column

    This is a script to conver a delimited/separated values given a delimiter into a table, via a User Defined Function.[more] This has saved me a lot of work already including just now so I gfigured this is a good share My apologies as I could not determine where I based this script from but definitely…

  • MCPD ASP.NET 3.5 beta exam

    You are invited to take beta exam 71-564: Pro: Designing and Developing ASP.NET Applications Using the Microsoft® .NET Framework 3.5. [more] If you pass the beta exam, the exam credit will be added to your transcript and you will not need to take the exam in its released form. The results will not appear on…

  • MCITP SQL 2008 Business Intelligence Developer exam 71-452 results out

    Just a quick note for those who have taken the MCITP SQL 2008 Business Intelligence Developer exam 71-452 that the results are out [more] (at least for mine) You should check in your prometric profile if you haven't got an email yet. And this my first MCITP certification. Yay for me! A little unexpected since…

  • MCPD Windows Applications .NET 3.5 beta exam

    You are invited to take beta exam 71-563: Pro: Designing and Developing Windows Applications Using the Microsoft .NET Framework 3.5. [more] If you pass the beta exam, the exam credit will be added to your transcript and you will not need to take the exam in its released form. The results will not appear on…

  • Performance, Measure and ANTS Profiler

    Might need to create a separate page for notes on performance since I've been doing a lot of C# and database tuning lately but having them on this post so far. Here are some of my notes on performance [more] * Before you optimize, ensure that your results are accurate first before optimizing. I would…

Got any book recommendations?