Calender
<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

1.  Login to gmail and export contacts into vcf format.

2.  Open a cmd prompt and use the following command to push the file onto the SDCARD of the emulator

      - adb push contacts.vcf /sdcard/contacts.vcf

3.  Open the contacts application, hit the menu button and choose "import from sdcard" ... it should automatically pick up the vcf file.

 

 

Posted by: Jason | Created on: 06/07/2010, 21:37

This is one of those errors that is misleading because it obfuscates the REAL issue.  I realized today that I forgot to add a namespace to my WCF project.  So I dutifully went back and add it.  Then I got this error.  

WCF Service Host cannot find any service metadata

Turns out that this broke the references to the contracts in my app.config (or web.config.)  All I had to do was right click on my app.config and click "Edit WCF Configuration" and troll through the tree of settings and re-set my contract fields.  By clicking the ellipses and browsing to the DLL and then the interface, it would refresh the setting with the appropriate namespace in the value.  Alternatively you can just type the namespace in the config file directly of course, but I rather like using the tool.

Posted by: Jason | Created on: 06/07/2010, 17:57
If you're looking for a great way to help your kids learn, and have an iPhone or iPad, take a look at what KeyesKode has to offer. Check out his work! More information can be found here: http://www.roodev.com/keyeskode

Posted by: Jason | Created on: 06/07/2010, 17:46

I am using Sandcastle to generate my documentation, but I am also using Codesmith to generate all my DTOs.  When I try to generate documentation against the DTO library I get the following error:

SHFB: Error BE0065: BUILD FAILED: The imported project "C:\Program Files\MSBuild\CodeSmith\CodeSmith.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.  C:\projects\[dir]\[dir]\[dir]\my.project.file.csproj

The workaround is rather lame, but easily done.  I have to open the project file for the project that contains the CodeSmith generated content and remove the following line:

<Import Project="$(MSBuildExtensionsPath)\CodeSmith\CodeSmith.targets" />

 

Save it, and then rebuild your sandcastle project in the "Sandcastle Help File Builder GUI."

Don't forget to put that line BACK after you have generated your code.  Like I said, lame.

Today I had a strange issue with my WCF service.  I was getting an error in the wcftestclient after I made a change to a method and published it.  The odd part is there was no "exception" information at all.  Everything was null, but I did have a stacktrace that ended with:

System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood ... 

I googled this problem only to find lots of people having this issue but no one offered up the real cause, and I had to discover it myself.  The reason is so simple it made me feel pretty dumb but on the flip side, I've managed to work with WCF for this long without making this mistake so ... there is that.

Turns out I simply WASN'T catching an exception.  WCF can not raise an exception past the service boundary of course.  I think for grins I actually tried to serialize an exception once and it wasn't pretty, but anyway ... to resolve this, I simply wrote an Error object that has everything I need about the exception and added it to my response object that the service method returns. If an exception occurs, I capture the information into the Error object and make sure my WCF service returns the response regardless.  On the client side you simply have to check the error object to see if its' not null, and react appropriately.  This is 101 stuff but I thought I'd mention it just in case it may help someone. 

If anyone reading this knows of a slicker way, please post a comment with a link to further reading!

 

j

 


Android dev on a windows machine is a little bit different than what all the "books" seem to tell you, since they primarily assume you're deving on ubuntu or whatnot.  To generate an MD5 fingerprint in windows try something like this:

C:\Program Files\Java\jre6\bin\keytool -list -alias androiddebugkey -keystore c:\users\[yourname]\.android\debug.keystore -storepass android -keypass android

 

 

Posted by: Jason | Created on: 14/03/2010, 05:23

I thought the enTourage eDGe looked pretty sweet, until I watched the commercial.  I kept waiting for them to offer me a free Slap-Chop if I ordered one in the next 20 minutes. 

Check it out:  http://www.entourageedge.com/blog/?p=325

 

This video for the Qualcomm Mirasol device is just BAD.  And by that I mean I watched it 10 times because I couldn't stop laughing.

Let me summarize for you.

  • You should care about this display because it is actually going to bring some consumer value to you when it comes to market.  (So in English, what you're saying is that I should care about this device now because I will care about this device later?)
  • The 4 things that are going to drive the difference for you are:

  1.  
    1. Incredibly ... low ... power. (She corrects herself but I had to laugh when I heard it.)
    2. It's color, which is important because we live in a color world. (Wait, but I'm color blind ... WHAT WORLD DO I LIVE IN?!?)
    3. You'll see butterflies in here.  That is how we create color. (Wow, that explains the incredibly low power.)
    4. ... (4?  Hello? 4 are you there?  Can someone please find 4 and tell them that we're on?)
Having said that, wow this device looks awesome.  Good job Qualcomm!  But all she had to say was:  Look at this folks. Full color. Full motion. No back-lighting, Boom.  You're gonna love my nuts.

Check it out:  http://www.crunchgear.com/2010/02/15/color-e-reader-uses-butterfly-based-technology-to-save-power/

Ok now I'm not proud of this, but we all have funny business requirements that hit us sometimes and you do what you can to make "stuff" work.  I had an "emergency" come down from on-high and it was made clear that I had to implement a fix in production right away. I was told to avoid a recompile at all costs.  Aka they wanted me to change some text on an asp.net page but not touch the code-behind, which would require the recompile.

Unfortunately the requirement was that the text had to show up for only 1 item inside a repeater control.  The problem is you can't have conditions inside a binding expression.

You can tell just by looking at the following line how not-gonna-happen this is...

<%# if DirectCast(Container.DataItem, myFakeObject).ID = x then %>

Anyway ... IIF to the rescue, although this is horrid in every way .... here is the kludge.

<%# iif(DirectCast(Container.DataItem, myFakeObject).ID = x, "Some incredibly long html that outputs if the condition is true", " ") %>

In my case that html was an entire paragraph.  I'm not looking forward to hearing the screams of the developer that rolls up behind me and sees this.  Que Sara Sara.

 

 

Posted by: jason | Created on: 23/02/2010, 17:15

 

I recently wrote some RSS feed logic into a site.  I used an HttpHandler to do this, so it will return to the browser xml instead of html in the Response.OutputStream.  I did what I’m guessing every person new to this area does and tried to write a function that returns the xml data into the Response.OutputStream property and got the following error:

Property or indexer 'System.Web.HttpResponse.OutputStream' cannot be assigned to -- it is read only

Oh.  Ok, well that’s pretty clear … but how do I put my data into the OutputStream?  Looks like you dump it all into a MemoryStream and then call the OutputStream.Write method to shove it all in.  Not bad!  Here is some psuedocode to illustrate.

MemoryStream stream = new MemoryStream();
stream = bl.GetMemoryStreamOfXML();
context.Response.OutputStream.Write(stream.ToArray(), 0, stream.ToArray().Length);