ning sample code