Dec
20
2010

MIX11 Open Call for Content

Be a “Best of Web” Presenter at MIX11

Are you an expert on web development, design or monetization? Do you have interesting and unique information to deliver on creating next generation web sites? Submit your session proposal by Friday, January 14, 2011. The MIX content team will select the best proposals, and the MIX community will vote to determine who will present. Presenters will receive 3 nights hotel and a conference pass. Visit the Open Call page for detailed terms and conditions. See last year’s open call presenters and topics.

Save $500 + one night hotel at MIX11 – register by Feb 11

MIX11 registration opens in late January with a special offer for early birds – register by February 11 and save $500 on your conference pass, and receive one free night hotel when you book two or more nights at the Mandalay Bay. Join the MIX email newsletter and be among the first to learn about open registration, special offers, speakers and content for this year’s event.

MIX11 event details

When:

April 12-14, 2011; MIX Boot Camps on April 11

Where:

Mandalay Bay, Las Vegas

Cost:

Full Price Conference Pass - $1395
MIX Boot Camps - $295

More Info:

http://live.visitmix.com/

    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
Dec
10
2010

Technical Blogs at MSDN

p4msdnI am positioning all my technical blog posts to http://blogs.msdn.com/palermo4/

If you are curious why I am doing so, go read the first blog post and find out!

    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
Oct
3
2010

Tech Ed 2010 South Africa Sessions Online

This month I am travelling to South Africa to speak at Tech Ed.  Below is a screen capture of the sessions I will be delivering:

teched2010sessions

    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
Sep
20
2010

Interstellar Pong v4.0

splashScreenI am “working” this week at Interface Technical Training by attending the new Silverlight 4.0 class taught by Dan Wahlin.

While Dan was dazzling the attendees with his Silverlight prowess, I got inspired to convert a game I wrote in version 1.0 of Silverlight to the latest version.

While the game is upgraded to v4.0 of Silverlight, the game could use more revisions in terms of feature enhancements.  Nonetheless, I offer the humble code to anyone who would like to make improvements.

    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
Jul
26
2010

How to Get jQuery 1.4.2 IntelliSense to Work in Visual Studio 2008

jQueryIsReady For those still using Visual Studio 2008 and developing using jQuery, you will no doubt desire the use of IntelliSense in your text editor to browse the jQuery objects.

To make sure you get this benefit, you must have SP1 for Visual Studio 2008 applied and run a patch which you can download here.

Download jQuery 1.4.2 and the –vsdoc.js for jQuery 1.4.1 and place them in the same folder in your web app.  Rename the –vsdoc.js file to “jquery-1.4.2.min-vsdoc.js”. 

Add a script tag to the top of your ASP.NET web form or master page:

 

You should now be able to see IntelliSense at work anywhere you reference jQuery.

    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
Jul
23
2010

Getting the Event-Causing Control ID in ASP.NET Web Forms

Very early in the life of a web form in ASP.NET, you may need to know what control fired the event that caused the post-back to occur.  Perhaps you need to know what button was clicked before the click event handler is executed.  If that scenario is the one you find yourself in, then the following code can help!

If you include the following extension method in your code, you can get the ID of the event causing control from the HttpRequest instance:

public static string GetEventTargetId(this HttpRequest req)
{
    return GetOriginalControlId(req.Form["__EVENTTARGET"]);
}// extension method

The above code is dependent on a helper method to strip the ugly nonsense potentially added while the control was rendered (can now be avoided in ASP.NET 4.0).  The helper method is defined below:

public static string GetOriginalControlId(string renderedControlId)
{
    if (renderedControlId == null) return null;
    int indexOfSeparator = renderedControlId.LastIndexOf('$');
    if (indexOfSeparator >= 0)
    {
        renderedControlId = renderedControlId.Substring(indexOfSeparator + 1);
    }
    return renderedControlId;
}// method
    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
Jul
9
2010

Is Your jQuery Ready?

For those that don’t know this, you can shorthand the following script:

$(document).ready(function () {
    alert("Giddyup!");
});

… and replace the above with the following equivalent:

$(function () {
    alert("Giddyup!");
});
    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
Jul
8
2010

How to Get the Last Number of an Integer

When I teach my introduction to C# course, I typically provide a tough numeric challenge to stimulate thinking and use all the features of the language learned up to that point.  In a recent class, I was presented the challenge of determining the last number of any integer.  For example:

  • 12 == 2
  • 337 == 7
  • 1000 == 0
  • 987654 == 4

In each example above, I needed to simply return whatever was in the “singles” place – the last number of the number.

My first approach felt like I was cheating, but it worked:

public static int GetLastNumber(string stringifiedNumber)
{
    return Convert.ToInt32(stringifiedNumber[stringifiedNumber.Length -1].ToString());
}// method

After brooding over it, I decided to challenge myself to do this mathematically instead.  Here is the final code:

public static int GetLastNumber(dynamic anyNumber)
{
    double fractional = anyNumber * .1;
    double truncated = Math.Truncate(fractional);
    return (int)(Math.Round((fractional - truncated),1) * 10);
}// method

The use of the dynamic keyword above allows me to pass in any numeric data type.

Updated: Thanks to Nicki for identifying how I over-engineered this problem.  I simply needed to get the modulus of 10 to get what I wanted.  So in one simple statement I could write:

 anyNumber % 10;
    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
Jul
6
2010

Why I Returned to OmniFocus

OmniFocus Inbox As a disciple of GTD (Getting Things Done™), I need to have a “system” for organizing my action items, projects, areas of focus, goals, reference materials, among other things.  In the years that I have implemented GTD methodologies, I have changed my “systems” frequently (which is a problem, and worthy of another blog post).  I have tried Outlook hacks, paper-based implementations, Toodledo, Things, Google Tasks, and other short-lived solutions.

Another application that many of my co-workers use is called OmniFocus by the OmniGroup.  I also used this application a while ago.  This is probably the best GTD application on the market.  Unfortunately, it is only available on Mac OS, and there is no web presence or service to access the data.  These factors have held me back from using the application despite its superiority in features.

Since I own both the iPhone and iPad, I have experimented with OmniFocus once again.  Recently, OmniFocus was updated to take advantage of iOS 4.0, and I have been happy with things so far.  I also own a MacBook Pro, but spend most of my time in BootCamp running Windows 7 (which rocks on a Mac by the way).  So while I am in Windows, I keep track of my projects and action items on my iPad (or iPhone if I am out and about).

I am still disappointed with the OmniGroup for not making my data available through a web UI (so I can manage from PC).  I am also frustrated that there has been no release specifically targeting the iPad.  I would even be happy if OmniGroup provided the data through a web service or OData.

So I have returned to OmniFocus because it is the best GTD so far.  Having said that, I believe in this saturated market there is still an opportunity for a better application to emerge.

Stay tuned…

    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
May
16
2010

Desert Code Camp 2010

desertcodecamp2010sign Thanks to all who attended my session(s) at Desert Code Camp this year!  Despite technical difficulties, I was happy to hear how many benefited from my Zero to Hero: Getting Started with jQuery session.  The website that contains the best tutorials I have seen for getting started is http://www.w3schools.com

With regard to my session on ASP.NET Web Forms MVP, please check out http://www.webformsmvp.com for more information.

Thanks Devry for letting us use their campus and  to Joseph Guadagno for his great leadership - and all the volunteers who made
Desert Code Camp 2010 a great success!

    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).

Resources

Archives