Thursday, July 28, 2011

Fall 2011 Utah Code Camp

I'm planning on attending this fall's Utah Code Camp. It will be my first time attending but I have heard great things about it. Best part is that it's free.


http://utahcodecamp.com/

Wednesday, July 13, 2011

Query Trigger

I had a need recently to programattically query the triggers for a set of tables in my database. Here's the code that I used:

 SELECT DISTINCT
Tables.Name TableName
, Triggers.name TriggerName
, Triggers.crdate TriggerCreatedDate
, [Type] = CASE WHEN Triggers.xtype = 'TR' THEN 'SQL Trigger'
ELSE 'CLR Trigger'
END
, [Disabled] = OBJECTPROPERTY(OBJECT_ID(Triggers.name), 'ExecIsTriggerDisabled')
FROM
sysobjects Triggers
INNER JOIN sysobjects Tables
ON Triggers.parent_obj = Tables.id
AND Tables.xtype = 'U'
AND Tables.name = 'eperson'
LEFT JOIN syscomments Comments
ON Triggers.id = Comments.id
WHERE
Triggers.xtype IN ( 'TR', 'TA' )
ORDER BY
Tables.Name
, Triggers.name

Updated the above query to handle CLR triggers and to show if the trigger is disabled.

Regular Expression Editor/Helper

I’ve been using Expresso for a while now. It’s a handy tool for working with regular expressions. It has a library of regular expressions which is very helpful. The editor lets you try your regular expression against a whole bunch of test data so you can test your expression against all sorts of data. The tool has been key in my getting better at regular expressions. The best part is that it’s FREE. That just makes me feel so good.

http://www.ultrapico.com/Expresso.htm

Wow, Two Years

Wow, it's been two years since my last post. I think I've been recovering from my masters degree. I'm now feeling more inclined to get involved with the blog again, if anybody cares. I expect to start posting again. My current job has me doing more and more SQL projects so my posts will be more focused to that. Besides, we're still on .NET 3.5 and really need to get up-to-date on .NET 4.0 before I start posting .NET again. So embarrassing :D

Saturday, May 16, 2009

TSQL Between

I've been spending A LOT of my time in SQL logic lately. It's been pretty rare that I've opened up Visual Studio. Not necessarily pleased with this but one bonus is that I've learned a bit more about SQL. I just found out the other day that you there is a SQL operator called BETWEEN. It allows you select a range of values:

SELECT *
FROM MyTable
WHERE Year
BETWEEN 2000 AND 2009

I guess you're never too old to learn some new tricks.

School is Done

I just finished my last final for my masters degree! Next stop: Disneyland.

Master's Done!!

I just finished my last final for my masters degree. Hopefully I can start focusing on posting again to this blog.

Thursday, October 02, 2008

Website Printing

I found this cool website for helping you print website. It allows you to control everything that is to be printed. Give it a look.

http://www.printwhatyoulike.com

Tuesday, May 13, 2008

I'm So Stylish ....

I just found the coolest Firefox extension. It allows you to control the style of any website that is loaded into your Firefox browser. The extension has a community website that users submit their own styles so that others can share. For example, I really love using Gmail but I think their look-and-feel could have been done by a 10 year old. I grabbed a really nice looking user submitted file and voila .... I have a very nice looking email interface.

The style control can be used for all sorts of things:
-Remove annoying ads
-Change color scheme
-Adjust usability of website

One nice option is if you know CSS (Cascading Style Sheets), you can modify the style yourself. I have downloaded the user styles that I liked the best and then tweaked the style to be more what I like. It is amazing what you can do with this extension and CSS. I modified the Google search results page to keep the search box and button at the top of the page as I scroll. Now I can have Google return 50 search items and still be able to easily adjust my search criteria without scrolling anywhere.

I've been using it for a week and I am in love. Check out the Stylish extension website at: http://www.userstyles.org/

Tuesday, April 22, 2008

Encryption Question

I'm working on an encryption solution at work. We currently need to symmetrically encrypt a user's password and store it in a database field. I need to somehow securely store the symmetric encryption key so that no one can access it except this application. I can't store it in the code because tools like Reflector and can find it. Has anybody found a great way of doing this?