Skip to main content

Posts

Rounding to quarter hours with a solution in SQL Server

A co-worker asked me the other day about an application where they want to sum values and round them to a quarter of a while number. In this case we had a time entry tool where users entered time in any format, not specifically quarter of hours, but it needed to be summed and rounded to the quarter hour. For example, I have a number 6.6143 and it needs to be rounded to 6.5. Looking around I just couldn’t find an example where pure math was used, the best were some general rounding to different values using a case statement. In the end I took this approach, throwing together a quick SQL Server function to get the results. the solution essentially takes the number, removes the whole digits, rounds to two decimals, then checks if those two decimals all in a range. 1: -- ============================================= 2: -- Author: Tom Leary 3: -- Create date: 8/13/2009 4: -- Description: Rounds the given number to a quarter of an hour. 5: -- =================...

Zoho for SharePoint

Zoho , the online document collaboration tool, now has an add-on to SharePoint that will allow users to edit documents online, behind the network firewall without having to install separate software. It also allows users to edit documents collaboratively in real-time, though we have a lighter version of that using LiveMeeting. It’s worth noting that while you edit documents behind the firewall, when they are opened, they are copied to the Zoho server during editing, then discarded. So it is clearly not for secret information, but that information shouldn’t be on an unsecured SharePoint in any case. The main benefit is that, when allowed by the agency, users can edit Office documents, and do that collaboratively, without installing the latest version of Office, though they will still need a Zoho license. Check out some more details here: http://blogs.zoho.com/general/introducing-zoho-office-for-microsoft-sharepoint Peace, +Tom

Dropbox Limerick

It’s funny, but I never really get to rhyme much in my daily life. I remember a year or so ago having dinner with our extended family, aunts and uncles at Red Robin, and somehow deciding the rhyme everything I said during the entire meal. It’s pretty amazing how quickly you can come up with rhymes, though they sure aren’t immensely clever. I’ve been using Dropbox for a while now and fallen in love with it. Essentially you have a folder on your desktop and anything you put in it gets uploaded to a shared directory. You can share individual files, or make a public folder. While it’s a little less intuitive than YouSendIt for e-maling files, I’ve found I really prefer using Dropbox for simply copying a file to a folder and copying the public link, as well as having the file sit up there as long as I want. Plus I find YouSendIt to be pretty expensive for just e-mailing files. To kick off them having a million users, and a new 50GB storage option, they opened a forum for people to win a...

RealWarriors

I got to work on a Web site recently called RealWarriors.net . This is probably one of the more interesting projects I’ve supported, where we built the site in about four days, and it really provides some value to people. It’s all about raising awareness and helping people connect who have mental wounds from serving in the military. At this point its been featured on CNN and the Today Show (though we got a little shafted on the Today Show). While it serves a pretty specific audience, it was great to be able to manage this thing into reality. Peace, +Tom

Fanatics

I saw this comic today by Debbie Ridpath Ohi . If you’re a writer, or just like books and reading, she is definitely one to follow, her comics are hilarious. This reminded me of a conversation I had with a friend yesterday. We were talking about the things that we’re good at. She mentioned that I’ve always been really good ad keeping people in mind, considering their feelings and needs, even if I don’t have much reason to. For me it simply boils down to loving people, even if I don’t like them very much, and doing whatever I can to help them to have the best life possible. I was also thinking about how my friend is incredibly good at pursuing excellence in whatever she does. She’s one of those people who, if they agree to do something, you know will be done better than you’d have ever done it yourself. You also know that once you give her the task you don’t need to look over her shoulder or check up on how it’s going. It’ll just get done, and she’ll even be pro-active and let y...

The Creation of Man

Erin and I had an odd conversation where we tried to track down exactly when she taught me that if you close your eye, and put eye drops in the corner, then open your eye, the drops don’t bother you. Good stuff to remember for both kids and adults, since I didn’t know until I was 26 or something. The final decision was that I learned this pearl of wisdom before watching The Scarlet Pimpernel at National (or Ford’s) Theater. If you ever get a chance, this is the musical to see, you’ll laugh your tukus off. Erin always rolls her eyes at this, but one of the best songs ever made is the Creation of Man. Here the Pimpernel describes how great it is to be a man, and how we should live up all the flourishes and dressing styles afforded to us men. Not just plumes in our hats, but “lights in our pants.” The suits they come out wearing are just so outrageous that I could only ever dream of being able to wear something like it to work. If only I’d thought of it for my wedding… This song is hil...

Dr. Horrible

I’ve been listening to Dr. Horrible’s Sing-Along Blog soundtrack on the way in, and it’s just awesome. If you ever think that the jerk who beat you up in school doesn’t want to be loved, this will set you straight… and remind you the jerk is trying to destroy the world at the same time. Truly, it’s just hilarious, and I’m beginning to sing along to some of the songs. I haven’t had time to actually watch the Blog, which you can get on iTunes or Hulu , but the soundtrack is pretty darned good. So, if you’re feeling in the mood to relate to some bad guys, since they are people with feelings too, then check it out! This could all just be a humorous review of Dr. Horrible. Every time I listen to it though I end up thinking about those people I don’t like, or do some pretty idiotic (or hurtful) things. Remember the kid in 3rd grade who ran over and hit the girl… because he liked her? Oh, wait… that was me doing the hitting. Maybe it comes from working with kids so much, but I see s...