Think Tech

WCF self hosted gzip content without IIS

I’ve a self hosted wcf service (basichttpbinding) that communicate with an Android app it’s working ok. Now a new requirement to support gzip compression is added. I saw some examples and implemented them, but have no luck there: http://blogs.infragistics.com/blogs/anton_staykov/archive/2010/08/24/silverlight-wcf-service-compression-azure.aspx http://www.frenk.com/2009/12/gzip-compression-wcfsilverlight/ When I made a little test turning on the gzip...

Javascript Multiplayer Game – Server Side Validation.

I’m starting my hand at creating a multi-player game using HTML 5 / Javascript. I’m currently doing some prototypes on different ideas on how to stop people from cheating. Now I know I need to do everything server side and just have the client sending “actions”. My issue is I...

Is there a (legal) way to capture the ENTIRE screen under iOS?

I’ve tried several techniques to capture a screenshot of an app from within that app. None of the techniques appear to capture the status bar — it ends up being black. There apparently was once a way to do this, but that interface is internal and Apple will not let...

Which construct is better suited for this situation, an if-else or a switch?

Which construct is better suited for this situation, an if-else or a switch? - (id)hexEvaluator:(double)remainder { if(remainder == 0) {return [NSNumber numberWithInt:0];} else if(remainder == 1) {return [NSNumber numberWithInt:1];} else if(remainder == 2) {return [NSNumber numberWithInt:2];} else if(remainder == 3) {return [NSNumber numberWithInt:3];} else if(remainder == 4) {return [NSNumber numberWithInt:4];}...

Rails 3.1: Jbuilder rendering empty views

Trying to use Jbuilder to create some JSON views for my app, but the views are coming out empty. Using the builder code in the console, however, works just fine. Controller code: @placements = Placement.all respond_to do |format| format.html format.json end Jbuilder view (index.json.builder): Jbuilder.encode do |json| json.array!(@placements) do |json,...