What kept me busy recently #2

Links (from february…)

Another short(?) list of links, still from February:

Projects currently involved in are using…

Don't wait to hear names of clients here – just technology 🙂

In the meanwhile, list of technologies involved in projects are opening to an even wider platform (yeah, gaming):

  • Windows Media Player
  • Windows Media Center
  • Wii
  • PSP
  • Nintendo DSi
  • PS3
  • XBOX360

What kept me busy recently #1

I try to keep this up as a series, let's give it a try – you probably know my older series like this or this or even saw this live. And of course don't forget this. So after a long round of various sites and formats, here we are again. New age, new format – I try to break it into sections.

Certification

  • Another paper (next to being Ariba Certified Developer, and of course many MS related things) to be hang on the wall – yesterday I became V5.3 Certified Developer Level 1 for Sitecore.

Humbling

  • I look around the local IT, and what I see? We have 'cubic beer', BPNT (btw – congrats for 2nd birthday:)), Architecture forum (long live the dead), Architecture Academy (not quite architecture and not quite academy), Hungarian User Groups (long live the dead), HUNSUG (hope that there will be some success with this), inetpub, and more (sry if left out, it was not accidentally :)). I have a dream that one day this IT Crowd will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident, that all IT people are created equal, and there should be NO 10 different gatherings, groups, events, etc.". In my imaginary world people would drop their preconceptions and forget their affairs with other companies, and spend time together. These would mean a f.e. bimonthly full day gathering in a multiroomed place (think of a school), with many 'tracks' running parallel like one for startups and investors, other for IT Pros, again another for Architects, one for the Business Analyst kind, etc. Sponsoring would be no brainer – IT newspapers, hardware and software stores would be more than happy to spend time there. It may be called just ITHU – no fancy names. But I see this would be a dream for another looooong time.

Projects currently involved in are using…

Don't wait to hear names of clients here – just technology 🙂

  • Windows Mobile 6.1; PhoneGap; BlackBerry
  • Storing data and running services in S3 & Azure
  • Silverlight video player
  • Multiple facebook and iWiw applications
  • Live Services

Links (from february…)

Disabling buttons/lists/etc when executing ASP.NET AJAX request

Just drop it in your page before the </body> tag:

    <script language="javascript" type="text/javascript">
        var prm = Sys.WebForms.PageRequestManager.getInstance();

        prm.add_initializeRequest(InitializeRequest);
        prm.add_endRequest(EndRequest);

        var oldClass = "";
       
        function InitializeRequest(sender, args) {
            var postBackElement = $get(args._postBackElement.id);
            if (postBackElement != null) {
                postBackElement.disabled = true;
                oldClass = postBackElement.className;
                postBackElement.className = postBackElement.className + " disabled";
            }
        }
       
        function EndRequest(sender, args) {
            var sourceElement = $get(sender._postBackSettings.sourceElement.id);
            if (sourceElement != null) {
                sourceElement.disabled = false;
                sourceElement.className = oldClass;
            }
            oldClass = "";
        }
    </script>

And add this to your CSS (you may differentiate this among various tags like img.disabled for imagebuttons or input.disabled for textboxes etc.):

.disabled
{
    FILTER: alpha(opacity=70);
    BACKGROUND-COLOR: gray;
    opacity: 0.7
}

Just be carefull if you change the class of the element in question (that originated the ajax postback) to register a client script block to set oldClass to the new value as well, otherways it would be overwritten.

Streaming server and ASX

At one my clients occured the problem of all videos being played 3 times 3 times 3 times instead of just one.

After some investigation, it turned out, that for each request coming for a WMV file instead of an ASX file is returned. For example, for a request for http://stream/stream.wmv the following asx was generated:

<asx version="3.0">
  <title>Stream</title>
<entry>
    <title>www.stream.hu</title>
    <ref href="http://stream3/stream.wmv" />
    <author>Stream</author>
    <copyright>(c) 2008 stream</copyright>
  </entry><entry>
    <title>www.stream.hu</title>
    <ref href="http://stream1/stream.wmv" />
    <author>Stream</author>
    <copyright>(c) 2008 stream</copyright>
  </entry><entry>
    <title>www.stream.hu</title>
    <ref href="http://stream2/stream.wmv" />
    <author>Stream</author>
    <copyright>(c) 2008 stream</copyright>
  </entry>
</asx>

If you read the specification for the ASX file format, this should/may be rewritten as:

<ASX VERSION="3.0">
<TITLE>Stream</TITLE>
   <ENTRY>
   <TITLE>www.stream.hu</TITLE>
      <REF HREF="http://stream3/stream.wmv" />
      <REF HREF="http://stream1/stream.wmv" />
      <REF HREF="http://stream2/stream.wmv" />
      <AUTHOR>Stream</AUTHOR>
      <COPYRIGHT>(c) 2008 stream</COPYRIGHT>
   </ENTRY>
</ASX>

This would instead of playing the three items after each other just choose the first one, that responds in a timely fashion from the list. The day is saved, the roundrobin load balancing still works as it should, and nothing plays three times three times three times.