Running an async operation from a synchronous function

One of those things that you almost never need, but if you need it, you need it. I hit a scenario where in Windows Phone 8 app, I had to have a Protocol launch handler. If you are not familiar, the protocol launch handler in Windows Phone 8 is done by deriving from the UriMapper […]

Windows Phone 8.0 Direct3d apps don’t have access to Launch Parameters

Recently, someone asked me that if a pure C++/Direct3d application on Windows Phone 8.0 was invoked via LaunchUriAsync, how would one go about getting the Launch Parameters? The MSDN documentation seems to say that  you can use the “ProtocolActivatedEventArgs” parameter in the OnActivated event handler and retrieve the data. After consulting with the appropriate engineering […]

How to add a refresh method to a backbone router

While creating a simple web app, where I created an ajax powered form using backbone.js, I needed the ability to clear the form if the user hit the reset button. So, I thought how about if I just refresh the current view. Backbone.js does not have a method to do that, which is a bit counter […]

Fall Fury Game as a Universal Windows and Windows Phone app

During Build 2014, I ported over the Fall Fury game, that was originally written for Windows Store using DirectX. Porting it over to a  Universal app was quite an experience. The game would compile and work on Windows just fine but as soon as I put Windows Phone 8.1 in the mix, things started going […]

Editing any document directly from the Windows Explorer using Notepad plus plus

This is a very short post on the excellent integration of Notepad++ with Windows Explorer Shell. I don’t know about you, but quite often, I want to look at contents of various kinds of files e.g. a XAML file or HTML file or a visual studio project (csporj, vcproj) file. If you try to double […]

How to pass loop variables in a JavaScript callback

This is a common problem encountered i.e. if you are making ajax calls in a loop and you need access to the loop index in the AJAX callback, people often hit the JavaScript ‘reference’ behavior i.e. copying or assigning one variable to another merely makes a reference, not a full copy. This even holds for […]

ASP.NET MVC – Adding RequireJS/Backbone/Marionette to your solution

Recently, while build a website on Azure, I needed a quick, simple login mechanism. There is an ASP.NET forms based authentication template, so this was pretty straightforward. All you have to do is to create a website based on the template and viola!, you have a login. However, if only life is so simple. The […]

C++/Cx: Getting around the very limited DateTime object

You know, I have been writing a LOT of C++/Cx recently and I have hit a bunch of issues. This particular one is about the DateTime object in C++/Cx. If you look at the C# version of the DateTime object, it contains a ton of niceties. There are properties that will give you the Day, […]

WinRT in C++/Cx and registering and unregistering event handlers

Having to work in C++/Cx, every day I have new appreciation for C#. Things that I take for granted in C#, well, they are not straightforward C++. Take the example of event handlers. In C#, the usual way of registering and unregistering event handlers is pretty straight forward: e.g. Click += Button_click_handler and Click -= […]

Getting access to the UI dispatcher from a background thread (Win8/8.1)

I recently struggled quite a bit trying to get access to the UI dispatcher from a background thread. I had a scenario where when I receive a push notification, I had to update the XAML page UI. Obviously, I did not have access to the UI thread from the background thread so I binged quite […]