Posts

Showing posts from August, 2012

Draw Graph

Use the Google Chart API to create charts for your web application link 1 http://ajaxian.com/archives/use-the-google-chart-api-to-create-charts-for-your-web-applications link 2 http://www.vvidget.org/manuals/VvidgetCode/Programming/Web/Tutorial/index.html Pie chart http://core-plot.googlecode.com/hg/documentation/html/iOS/interface_c_p_t_pie_chart.html

Age between two dates for age calculator

     NSCalendar *sysCalendar = [ NSCalendar currentCalendar ];     unsigned int unitFlags = NSHourCalendarUnit | NSMinuteCalendarUnit | NSDayCalendarUnit | NSMonthCalendarUnit ;          NSDateComponents *conversionInfo = [sysCalendar components :unitFlags fromDate :firstDate   toDate :secondDate   options : 0 ];          NSLog ( @"Conversion: %dmin %dhours %ddays %dmoths %dYear" ,[conversionInfo minute ], [conversionInfo hour ], [conversionInfo day ], [conversionInfo month ]% 12 ,[conversionInfo month ]/ 12 );     NSString *result2 = [ NSString stringWithFormat : @"%d year, %d month and %d day" ,[conversionInfo month ]/ 12 ,[conversionInfo month ]% 12 ,[conversionInfo day ]];