Go to home page mail me! RSS Feed

December 2008 Entries

SQL Server 2008 - Unable to alter tables using the designer

I recently upgraded to 2008 to check out all the cool new stuff and I  bumped into a wall within the first 5 minutes of testing. I off course created a dumb table that I'll like to populate with data so that I can play with the new features, however, after saving the original schema, I needed to add another column but I was unable to, instead I got this message.     Saving changes is not permitted? The changes you have made require the following tables to be dropped and re-created. You have...

posted @ Thursday, December 18, 2008 2:09 PM | Feedback (0)

Replace all spaces using JavaScript.

Alright, so for the .NET developers, if you don't already know the .Replace JavaScript function does not work like the String.Replace function in .NET, in .NET, it replaces all occurrences while in JavaScript it only replaces the first instance.   "H e l l o W o r l d".replace(' ','');   will return "He l l o W o r l d" - notice the rest of the spaces weren't removed.   The easiest solution to the problem, assuming you want to replace all spaces in the string is to use...

posted @ Thursday, December 18, 2008 1:37 PM | Feedback (2)

Formatting a number to a friendly format such as 10K, 1.5M

If I could get a dollar for every missing .NET function, I'll be a millionaire by now but again, they can only write so much. With my current project, I needed a way to display numbers that are really large such as hundreds of thousands and millions. Its a whole lot cleaner when your interface displays 104.6K than 104,600 or 1.5M instead of 1,500,000 or better yet some obscure number such as 1,345,2356,344 - its just hard to read and messes with you tabular display. Anyway, here is  quick run down on how you can format your numbers nicely,...

posted @ Saturday, December 13, 2008 12:48 AM | Feedback (0)

Next entries »