Wednesday, October 10, 2012

Getting started with MassTransit - a .net message queueing system

The instruction on the mass transit project gets you started with how to setup mass transit within a single application publishing messages to itself. But this example shows you how to do messaging between applications.

http://www.codewrecks.com/blog/index.php/2012/08/03/quick-start-on-mass-transit-and-msmq-on-windows/

Sunday, September 02, 2012

Creating classes and extension methods in LINQPAD

A very good thing to know is that you can actually define your own classes in LinqPad. The trick to it is that you must put a closing bracket to the linqpad code and start your class, but omit the last bracket.

This post explains why.

Thursday, August 09, 2012

Interacting with Iframes using Javascript

// reference to iframe with id 'ifrm'

var ifrm = document.getElementById('ifrm');

// reference to window in the iframe
var win = ifrm.contentWindow;

// reference to document in iframe
var doc = ifrm.contentDocument? ifrm.contentDocument: ifrm.contentWindow.document;

// reference to a form named 'ifrmTest' in iframe
var form = doc.getElementById('ifrmTest');


http://www.dyn-web.com/tutorials/iframes/refs.php

Sunday, June 17, 2012

Best practices for estimating projects & satisfied customers


* Components of a project (notes from 1/28/2012)
  • Customers
  • Requirements
  • Estimated time
  • Estimate a project and communicate any changes to the plan.
  • Elapsed hours
  • Actual time
    • You must track your actual time and compare it to estimated time 
    • You are still on track if you spend more time, but explained to customers what's happening.
    • this is how you schedule estimated hours
* Completely satisfied customers
Ask customers if they are completely satisfied, not just if they are satisfied. If they are not completely satisfied, ask what can we do to make you completely satisfied.

Tuesday, May 29, 2012

Online Regex Builder makes Regex fun again

Check out tihs link: http://gskinner.com/RegExr/

It lets you

  • write regex
  • see what it matches
  • hover over sections of the regex to get a nice explanation of what it does
  • save a library of your own regex
  • browse through other people's shared libraries
Here's a screenshot :

Monday, May 28, 2012

Getting started with Backbone.js

I think this link is a good place to start on Backbone.js.

Thursday, May 03, 2012

PhoneGap and Playing MP3 File in Windows Phone 7 Project

It took me a while to find this link, so I am posting it here for future reference and hopefuly it will make your .

The solution is here.

and the text reads as follows:

Add the following to Properties/WMAppManifest.xml
<Capability Name="ID_CAP_MEDIALIB"/>And then the path for the mp3 needed the following:
app/www/test.mp3 or you could try /app/www/test.mp3

For more on PhoneGap's Media API, see this doc page.

Wednesday, April 04, 2012

Bing Maps with jQueryMobile

It took me a while to find this link, so here it is and hope it helps you on your way.

Other Resources:


Thursday, March 22, 2012

Linq SelectMany and GroupJoin to do a join

Here's how to do a join between two arrays in a Linq Lambda expression:
var list1 = new int[] {1,2,3,4,5};
var list2 = new int[] {2,3};
var result = list1.SelectMany(l2=>list2, (l1,l2)=>new {l1,l2, sum=l1+l2})
.Where (x=>x.l1==x.l2)
.Select(x=> x); 

The result is this:




And now here is the GroupJoin version which actually does a nice left join:
 
var groupJoinResult = list1
 .GroupJoin(list2, 
  L1=>L1,
  L2=>L2,
  (l1, l2) => new {l1,l2}).Dump();

The result is this:

And finally to do a left join, use DefaultIfEmpty qualifier in inner query of select many, as shown in this stackoverflow q and a.