Share MotionBased activities on Facebook with MyMotionBased – Garmin Developer

 

We were quite impressed when we heard about the MyMotionBased application (requires login to view) for Facebook written by Matthew Underwood.

This application allows Facebook users to integrate their recent MotionBased activities into their Facebook profile and see their friends’ activities.

Here’s what the application looks like in my Facebook profile view:

image

Share MotionBased activities on Facebook with MyMotionBased – Garmin Developer

Developer’s Guide – Google Chart API

 The Google Chart API lets you dynamically generate charts. To see the Chart API in action, open up a browser window and copy the following URL into it:

http://chart.apis.google.com/chart?cht=p3&chd=s:hW&chs=250x100&chl=Hello|World

Press the Enter or Return key and – presto! – you should see the following image:

Yellow line chart

Developer’s Guide – Google Chart API – Google Code

Also Google Chart C# API: First grab the Google C# API Wrapper source code. Then take and unzip that and open that project in Visual Studio and compile the DLL.

Dissecting ASP.NET Version 3.5′s Web.config File

 By Scott Mitchell

Introduction
In November, Microsoft released the final version of ASP.NET 3.5 and Visual Studio 2008. As discussed in An Overview of ASP.NET 3.5 and Visual Studio 2008, version 3.5 is not a major reworking of the .NET Framework. Rather, it adds new classes and functionality on top of the existing core.

If you’ve had a chance to check out Visual Studio 2008, you may have noticed that it creates a rather verbose Web.config file with a bevy of configuration elements not found in the more terse Web.config file created by Visual Studio 2005. Likewise, when opening an existing Visual Studio 2005 project in Visual Studio 2008, you are prompted with a dialog box asking if you want to upgrade the website to use .NET Framework version 3.5. If you click Yes, Visual Studio updates the application’s Web.config file to include the additional markup.

In this article we will examine each of the additional configuration elements added by Visual Studio 2008 to ASP.NET 3.5 applications. Read on to learn more!

Via ASP.NET.4GuysFromRolla.com: Dissecting ASP.NET Version 3.5′s Web.config File

How to determine your consulting rates?

For some good links on how to determine your rates check out these links.
- A Guide To Information Technology Consulting Rates
- Independent Consulting and Back Office Services
- Consulting Rate Worksheet

Here is how I came up with my rate

Step 1
Choose a target billable rate – for this demo we will say it is $65 an hour (going rate in the Chicago land area).

Step 2
Determine your current hourly rate.  This is your salary divided by 2080, total number of ‘work’ hours in a year.  Now you have a baseline for what you make now, including benefits.

Step 3
Now that we have our rate, we need to determine how much all our expenses are going to cost and subtract them out.

  1. 401k matching – lets say your company will match up to 3k a year (and you get the full matching).  At 3k a year, this is worth $1.44 an hour off your billable rate.
  2. Health insurance (cost if you had to buy it own your own) – lets say you need to cover you and your family, this could cost you about 5-6k a year.  At 6k a year, this is $2.88 an hour off your billable rate.
  3. FICA (Social security and Medical tax) – As a employee, your company will pay 7.65% for you, while you pay the other 7.65%.  So, at 7.65%, this is $4.97 an hour off your billable rate.
  4. Vacation/Sick/Holiday time – I assume that I am going to take 3 weeks vacation, 2 weeks holiday time, and 1 week sick time.

Step 4
Time to figure out your ‘actual’ rate after expenses
65 – 1.44 (401k matching) – 2.88 (Insurance Cost) – 4.97 (FICA) = $55.71

So, that $65 number is really more like $55.  So, if your salary rate is not at least $10 an hour less then the ‘actual’ consulting rate, I would say that it is not worth the effort.  For me, I don’t have to worry about insurance (on wife’s plan) and my company does not have any matching, so the only subtraction I have is the FICA expense.

So my actual rate calculation is really
65 – 4.97 = 60.03

Via Derik Whittaker

Windows Services Can Install Themselves!!!

 

In this short article, I’ll show you a way to make your Windows Services install themselves without needing InstallUtil.exe at all.

Thanks to Reflector for .NET by Lutz Roeder, it’s easy to discover that InstallUtil.exe tool jumps to a method called InstallHelper in the ManagedInstallerClass in the System.Configuration.Install namespace. And what’s really interesting is that the command line arguments passed to InstallUtil.exe as an array of strings are then passed directly to this helper method.

Sample Code:

// First create a new .cs file with the following code

// Add Reference to System.Configuration.Install.dll from the Global Assembly Cache

image 

 

 

Via CodeProject: Windows Services Can Install Themselves. Free source code and programming articles

Hyper-V Virtual Server Beta

Release Notes:

http://download.microsoft.com/download/e/4/8/e48d5cff-53d2-4eed-85bf-4af50e25b78c/relnotes.htm

Step-by-step guide:

http://download.microsoft.com/download/1/b/6/1b687175-0b30-4f56-bb58-2349b2ee1c98/Step-by-Step_Guide_to_Getting_Started_with_Hyper-V.doc

 

Installation step-by-step guide 

 

Screencast Demo

Download here Windows Server 2008 Release Candidate 1 Enterprise with Hyper-V Beta

LINQ let Keyword

 

The new keyword “let” which is used inside LINQ queries to create temporarily variables.

check this out

var list = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
var query = from i in list
            let j = i + 2
            let k = j * j
            select new { i, j, k };

As you can see the let keyword was used to create two new temp variables (j, k) which their values were calculated inside the query.

Also with let query clauses, you can introduce a variable into scope and use it in the subsequent query clauses. Similar to local variables in a method body, this gives you a way to avoid evaluating a common expression multiple times by storing it in a variable.

For instance, inexperienced Linq developer quickly codes up a query that looks like this:

var nameList = new List<string>
                   {
                       "Matt",
                       "Adam",
                       "John",
                       "Peter",
                       "Owen",
                       "Steve",
                       "Richard",
                       "Chris"
                   };
var vowels = new List<string> {"A", "E", "I", "O", "U"};
var names = (from p in nameList                                                  
            where
            (vowels.Any(v => p.ToUpper().StartsWith(v)) 
            || vowels.Any(v => p.ToUpper().EndsWith(v))) &&
            (p.Length == 4 
            || p.Length == 5)
            select p).ToList();

 

Using “let”, we can define four intermediate variables that hold our vowels and booleans for our tests, then in the where clause we just check our boolean values:

var names = (from p in nameList
            let vowels = new List<string> { "A", "E", "I", "O", "U" }
            let startsWithVowel = vowels.Any(v => p.ToUpper().StartsWith(v))
            let endsWithVowel = vowels.Any(v => p.ToUpper().EndsWith(v))
            let fourCharactersLong = p.Length == 4
            let fiveCharactersLong = p.Length == 5
            where
            (startsWithVowel || endsWithVowel) &&
            (fourCharactersLong || fiveCharactersLong)
            select p).ToList();