ArchiveJuly 2012

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=”{...

Code to add facebook share button

C

<script> function fbs_click() { u=location.href; t=document.title; window.open(‘(u)+’&t=’+encodeURIComponent(t),’sharer’, ‘toolbar=0, status=0, width=626, height=436’); return false; } </script> <a rel=”nofollow” href=”javascript://” onclick=”return fbs_click();” style=”background:url( …...

Category