Monthly Archives: April 2012

How to use a SWITCH Statement in SAS

In SAS, the switch statement is called a SELECT statement. SELECT <variable | expression>   WHEN(condition) …   <WHEN(condition) …>   <WHEN(condition) …>   …   <OTHERWISE …> END; http://support.sas.com/documentation/cdl/en/lestmtsref/63323/HTML/default/viewer.htm When a select expression is given, it evaluates this and does a relative jump, which is similar to the optimization done by a C or Java compiler in a switch […]

Facebook OAuth with Scribe and Gson in Struts 1

This is how I used Scribe to authenticate with the Facebook Graph API in Struts 1. The first half of the action redirects the client to Facebook, and basically says, “no code? come back when you have one buddy”. Then it goes to Facebook, who redirects the client back here (back to Facebook.redirect_uri), and with […]