Latest stories

How to use inbuilt Facebook/Twitter API in iOS6.

H

You need to add Social.framework in your project. Add to your file following #import “Social/Social.h”  You can create 3 type of service: SLServiceTypeTwitter; SLServiceTypeFacebook; SLServiceTypeSinaWeibo; I have created service of Facebook. SLComposeViewController *fbController=[SLComposeViewControllercomposeViewControllerForServiceType:SLServiceTypeFacebook];...

Hello …. Monkey !!!

H

The main issue i used to struggle with while developing android applications was stress testing. As a beginner it was very hectic job to test the application from the naive users perspective. As we develop the application we know what things to do to get the result but to check whether the app responds properly even for wrong events like tapping wrong button etc. Android provided a tool Monkey...

Draw a line by touch On UIImageView in iPhone

D

Its much useful for drawing something on screen by touch. 1) Declare 4 objects in .h file CGPoint lastPoint; BOOL mouseSwiped; int mouseMoved; UIImageView *signImage; 2) First create a UIImageView object ie. a blank image in viewDidLoad signImage = [[UIImageView alloc ] initWithFrame:CGRectMake(15, 60, 290, 320)]; signImage.image = nil; signImage.tag = 1000; signImage.layer.borderWidth = 3.0;...

How to read excel file in php

H

<?php // SimpleXLSX php class v0.4 // MS Excel 2007 workbooks reader // Example: //   $xlsx = new SimpleXLSX(‘book.xlsx’); //   print_r( $xlsx->rows() ); // Example 2: //   $xlsx = new SimpleXLSX(‘book.xlsx’); //   print_r( $xlsx->rowsEx() ); // Example 3: //   $xlsx = new SimpleXLSX(‘book.xlsx’); //   print_r( $xlsx->rows(2) ); // second worksheet...

Simple Custom UITabBarController with UINavigationController in iPhone/iPad programatically

S

//In AppDelegate.h file UITabBarController *tabBarController; @property (strong, nonatomic) UITabBarController *tabBarController;   //In AppDelegate.h.m file @synthesize tabBarController = _tabBarController;     self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];   NSMutableArray *tabBarViewControllers = [[NSMutableArray alloc] init];...

How to read from CSV file in iPhone code ?

H

  So you exported your data as csv file, and now say you want to make your piechart reading the data from csv file. Then you need to read the csv file. Well, its simple !   So our csv file looks like following and we will read say 1st column of each line.                         We will call method with column value 0, you can...

Save NSDate in CoreData

S

1. In your model file.Create an entity MyDate with attribute datestring of datatype date(select it from dropdown). 2. Save your date //Create date from the string    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];    [dateFormatter setDateFormat:@”dd-MM-yyyy”];    NSDate *date=[dateFormatter dateFromString:dateString_];    [dateFormatter release];   ...

SOLVED: “This record type cannot be deactivated because the following profiles use this record type as default.”

S

I just thought I’ll play with a Record Type for Opportunity and delete it later but got an headache finding how to solve this error. Finally, here is the way: Goto Setup -> Administration Setup -> Manage Users -> Profile Go inside your corresponding profile and search for that particula Record Type name, in my case it was “Partner Opportunity Record Type”. Edit this and...

IntentService on Android– asynchronous background tasks made easy

I

IntentService on Android– asynchronous background tasks made easy. Android services are the workhorses of the platform. They allow applications to run long running tasks and give functionality to outside applications. Unfortunately, since they run in the background and are not visually obvious to developers, they can be a source of major headaches. If you have seen an ANR (activity not...

Creating Dependent SelectLists in VisualForce

C

We can create the SelectLists in VisualForce whose values will depend on the value selected in another selectlist.The method i have used here is using the Lists collection by programatically filling the values of the dependant selectlist based on the selected value. VisualForce code: <apex:outputLabel value=”Select State”‘> <apex:selectList value=”{...

Category