Archive for March, 2007

Find number of years, months and days between two dates using C#

Recently I ran into a situation where I had the start date and the end date and had to store the start date and the difference between the end and the start date (in terms of years, months, days) as string.

Here is a C# code to do that:

public static string DateDiff(DateTime startDate, DateTime endDate)
{
   string timeStr = string.Empty;
   int yr = 0;
   int mth = 0;
   int days = 0;

   TimeSpan ts = new TimeSpan();
   ts = endDate.Subtract(startDate);
   yr = (ts.Days/365);

   do
   {
       for(int i=0; i <= 12; i++)
       {
         if(endDate.Subtract(startDate.AddYears(yr).AddMonths(i)).Days > 0)
         {
             mth = i;
          }
          else
          {
             break;
          }
        }

        if(mth > 12)
           yr = yr + 1;
    }while(mth > 12);

    days = endDate.Subtract(startDate.AddYears(yr).AddMonths(mth)).Days;

    if(yr > 0)
                timeStr += yr.ToString() + "y";
    if(mth > 0)
                timeStr += mth.ToString() + "m";
    if(days > 0)
                timeStr += days.ToString() + "d";

     return(timeStr);
}
How would you have done this?
Technorati tags: , , , , ,

Popularity: 5% [?]

PracticeFusion : Free EMR Courtesy Google

Electronic Medical Records are deemed to be a big step in the direction of reducing healthcare costs and such systems tend to cost around $20,000 to install for a physician. But in comes Practice Fusion a San Francisco based startup that offers a web-based digital medical record system for free.

The service will generate revenue from Google Adsense advertisements. AS per the agreement, Google won’t have access to any patient data and the advertisers will get basic information about the physicians seeing their ads. The doctors have an option to opt out of advertisements by paying a monthly fees of $250.

Here are the challenges which their tool addresses:

  • Free: We do not charge licensing fees for our application, nor do we charge for hosting.
  • Integrated and Interoperable: Connecting physicians to other physicians, their patients, healthcare groups and RHIOs–delivering secure, shared patient information.
  • On-Demand: Our Solution is web-based requiring no software to implement and manage. Provisioning is a fraction of the time of client-server solutions.
  • One View: We provide unified, aggregated views into clinical data across the entire physician and patient community.

This would indeed be a cost-effective solution for small clinics and individual doctors but bigger organizations will adopt tools which work in-house so they have control over the data they generate.

Source (here)

Popularity: 6% [?]

Gliffy : Create And Share Diagrams Online

Don’t have Visio to create your UML model/ network diagram/ flowchart, no problem, try Gliffy, a web-based diagram editor which supports rich diagramming capabilities right in your web browser. It is available for free.

Besides the rich drawing capabilities with support for Flowcharts, UML, Network Diagrams, User Interface, Floor Diagram, it also allows you to upload your own image and use it.

Read more »

Popularity: 7% [?]

Collection of Firefox Wallpapers

Firefox has been generating waves and has been getting lot of acceptance within the user community. I am a Firefox fan and decided to look for Firefox wallpapers for my desktop. I decided to share my collection of Firefox wallpapers from various sites out here. The images link to the wallpapers on the site or the post on the sites from which I took them.

Here is the list (click on images to go to the site):

 

 

 

Popularity: 7% [?]

Windows Explorer Tips For XP

Some useful settings for windows explorer on Windows XP:

  1. Launch Windows Explorer Shortcut: “Windows Key” + E
  2. Show full path in the address bar: Tools -> Folder Options -> View (Tab) -> check the checkbox “Display the full path in the address bar”
     
  3. Show extensions for files in the Explorer Window: Tools -> Folder Options -> View (Tab) -> Uncheck “Hide extensions for known file types”
  4. Show hidden files: Tools -> Folder Options -> View (Tab) -> Check “Show hidden files and folders”   
     

Popularity: 5% [?]

Hear Any RSS Feed

Recently lee in a comment on the article Let The Computer Read PDF Docs For You wondered how nice it would be to have blog postings read out loud (may be mp3 on a CD). I thought may be I should try and work on it. I wrote a rudimentary application to which you can feed any valid RSS feed and it will read the feed to you (yes you will hear sound!)

For this application I used ASP .NET 2.0 along with Microsoft Speech API.

Here is the main snippet of code:

Read more »

Popularity: 5% [?]

IE7pro : IE7 Comes Closer To Firefox

Wouldn’t it be nice if IE7 provided more control over how you want to use your tabs, had an ad filter like AdBlock Plus for Firefox, allowed crash recovery, move the IE menu bar above the address bar, may be even allow mouse gestures for navigation, and how about “find as you type” (nice to have).

Well, that is not a lot to ask and guess what, you can have all that now and much more (capture a webpage as an image, view page info, save flash/video, custom User Agent, “Open in New Tab” in context menu when Drag & Drop URL; new Tab from search bar etc.) with this free tool called IE7Pro.

IE7pro is an add-on for Internet Explorer 7 which adds lots of features and extras that make your IE easier, more useful, more secure and more customizable.

This tool brings Internet Explorer experience to a much higher level and much closer to Firefox 2.0 but I wish they could integrate few more must have tools - spell checker, session restore, a better RSS reader - in this bundle. You can request features here.

It is a very handy tool to have and I sincerely hope they keep working and providing more features in time. Security in IE is something which Microsoft is really committed to and I think they are on the right path. Read security comparison of IE7 and Firefox here.

Download IE7Pro | Read IE7Pro User Guide | Seven Best IE7 Add-ons

Popularity: 6% [?]

Open Source Windows : Free, Open-Source Software For Windows

There are tons of software available for Windows out there but today I came across a site which lists the best free and open-source software for Windows, aptly named Open Source Windows

What I also liked was their six point advice on how to increase downloads of your software:

Read more »

Popularity: 4% [?]

Next Page »

Technology Blogs - Blog Top Sites Blog Flux Directory Blogarama - The Blog Directory BuzzBums Technology blogs Technology blogs blog search directory
Dreamsubmitting Directory Free Link Directory