Archive for the 'Programming' Category

Some Fun and Useful Google Map Apps

I have been experimenting with Google Maps for a recent project and needed a tool to get latitude and longitude for any location. Here are two tools written to get the same:

  1. Get Latitude and Longitude for any address you enter
  2. Get Latitude and Longitude for any place you click on the map

These should be fun to play with and one can use those geocodes (latitude and longitude) in various applications.

Google now has support for calculating geocodes for any location (earlier people had to use Yahoo to get the geocodes)

Some other fun Google Map apps to try out:

  1. America’s top 25 meanest drivers cities
  2. A set of interactive Google Maps on different categories on the topic of the 7 Wonders of the World
  3. Ever wondered which map technology is better, Google maps, Live Maps or Yahoo Maps? Try this tool and see for yourself
  4. Da Vinci Code Locations
  5. Forbes Magazine list of the Drunkest Cities in America
  6. Google Maps + Craigslist to create a visual housing search page via dynamic overlays of Craigslist home listings on Google Maps
  7. Up-to-date gas price search with Google Maps station display
  8. Track your packages with Google Maps and RSS feeds! Track UPS, FedEx, USPS, and DHL
  9. Map a phone number area code to a location
  10. Helps you determine if you are paying too much in rent. Enter an address, apartment size, and rent. It maps nearby units and shows a meter of your price versus min, max and average

I am developing a special section called “tools” on this site, where I will put utility and fun tools and apps.

Popularity: 4% [?]

Bookmark and Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • DZone
  • Furl
  • Reddit
  • Spurl
  • Technorati
  • IndianPad
  • StumbleUpon

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: 4% [?]

Bookmark and Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • DZone
  • Furl
  • Reddit
  • Spurl
  • Technorati
  • IndianPad
  • StumbleUpon

Programmatically Change The Data Range For A Chart In Excel

Sometime back I had to figure out a way to change the data range for a chart in excel dynamically at run-time based on certain conditions being met. This post covers provides a simplified version of the code with essential items and logic in it to help you put with the process.

The following function runs when the excel file is opened. It runs through a loop for all the charts in ”Sheet1″ and then finds a specific chart using the chart name (.Name). It reassigns a revised range for the various series of data in the chart.

Code:

Sub Auto_Open()
Dim chartCount As Integer
Dim i As Integer
Dim colName As String
Dim rangeStr As String
Dim chartOnSheet As Chart  

chartCount = ActiveWorkbook.Worksheets("Sheet1").ChartObjects.Count
For i = 1 To chartCount
  With ActiveWorkbook.Worksheets("Sheet1").ChartObjects(i).Chart
   If .Name = "Sheet1 Chart 103" Then
      colName = "D"
      rangeStr = "A84:" & colName & "84"
      .SeriesCollection(2).Values = Worksheets("Sheet1").Range(rangeStr)
      rangeStr = "A91:" & colName & "91"
      .SeriesCollection(3).Values = Worksheets("Sheet1").Range(rangeStr)
      rangeStr = "A85:" & colName & "85"
      .SeriesCollection(4).Values = Worksheets("Sheet1").Range(rangeStr)
   End If
  End With
Next i
End Sub

Technorati tags: , , ,

Popularity: 3% [?]

Bookmark and Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • DZone
  • Furl
  • Reddit
  • Spurl
  • Technorati
  • IndianPad
  • StumbleUpon

DuckSoup - Technorati API library In PHP

Kailash Nadh has published an API library in PHP for Technorati named DuckSoup.

The library supports all the Technorati APIs namely:

  • CosmosQuery
  • SearchQueryGetInfoQuery
  • OutboundQuery
  • BlogInfoQuery
  • TagQuery
  • TopTags
  • AttentionQuery
  • KeyInfo

It produces data in organized trees e.g.:

Read more »

Popularity: 2% [?]

Bookmark and Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • DZone
  • Furl
  • Reddit
  • Spurl
  • Technorati
  • IndianPad
  • StumbleUpon

Beginner Developer Learning Center From Microsoft

If you are interested in learning Microsoft .NET technologies from scratch then you are in luck. Microsoft has launched a new centralized learning environment on the web called Beginner Developer Learning Center.

I really like the way things are organized on the site. It will definitely help even a non-programmer to pick up things and not overwhelmed by the content. The site has huge library of learning content starting from the very basics and guiding you through step-by-step into becoming a fully-fledged developer.

The content is organized into two development tracks: Windows Development and Web Development. You can choose the track of your liking. They have nice lesson with options to follow in VB .NET or C#. The web track has extensive coverage of ASP .NET. 

Within a particular track the lessons are organized in 3 tiers, allowing you to choose lessons based on your skills:

  • Tier 1: Great place to start for someone new to programming
  • Tier 2: Cover a lot of the core concepts of Windows and Web development and assume prior understanding of foundations of .NET
  • Tier 3: Expand your knowledge of Windows and Web development with more advanced concepts such as data access and debugging

You can read the lessons online, download them as PDF files and even rate the lessons.

It would have been nice if you could login and track your progress on the lessons and the system kept a record of what all you have completed.

Popularity: 3% [?]

Bookmark and Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • DZone
  • Furl
  • Reddit
  • Spurl
  • Technorati
  • IndianPad
  • StumbleUpon

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