Code:// Writing<ol style="background-color: #f8f8f8; color: #222222; font-family: monospace; font-size: 10px; line-height: 12px; list-style-position: outside; margin: 0px; padding: 0px 0px 0px 4em;"><li class="li1" style="line-height: 1.3; margin: 0px; padding: 0px;"><div class="de1">FileOutputStream fos = context.openFileOutput(SAVENAME, context.MODE_PRIVATE);</div></li><li class="li1" style="line-height: 1.3; margin: 0px; padding: 0px;"><div class="de1">ObjectOutputStream oos = new ObjectOutputStream(fos);</div></li><li class="li1" style="line-height: 1.3; margin: 0px; padding: 0px;"><div class="de1">oos.writeObject(object); oos.close();</div></li></ol><div class="de1" style="background-color: #f8f8f8; color:...

You can use the next method:<pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"> public static void add(Activity activity, String title, String description, Calendar initDate, Calendar finalDate) { final String baseUriCalendar =...

Merge two images:<pre style="background-color: #f0f0f0; border: 1px dashed rgb(204, 204, 204); font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; width: 646.4666748046875px;"> public static Bitmap overlay(Bitmap bmp1, Bitmap bmp2) { Bitmap bmOverlay = Bitmap.createBitmap(bmp1.getWidth(), bmp1.getHeight(), bmp1.getConfig()); Canvas canvas = new Canvas(bmOverlay); canvas.drawBitmap(bmp1, new Matrix(), null); canvas.drawBitmap(bmp2, 0,...

NSString *myString = ... bool isNull = myString == nil || [@"" isEqualToString:myString]; Now isNull variable have true if the string myString is null otherwise will have false.

Add in header (.h) file:<ol><li>Create a UNIQUE_CLASS_H identifier (this is used to avoid import link errors in compilation) BE CAREFUL: this identifier must be diferent for each .h file.</li><li>Inside de define .. add each define for each constant:</li></ol><pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial;...