Skype is conflicting Wamp server. OR Wamp server error – though it is online,it is not working properly and showing orange color on quick launch icon.

Wamp server showing above error massage- Could not execute menu item (internal error). [execution ] Could not perform service action: The service has not been started.

This error is fault of Apache  service of Wamp server.

To solve this error-

1. left click on quick launch icon of wamp server .

2.then goto Apache–> Service–>click on Test Port 80. the following screen will appear.


In my case the Skype Software is conflicting to Wamp Server .

Then, after Exiting the skype Software , my Wamp Server is working Properly .

Another solution  for this error is  –Change the port number of either Wamp or Skype.

Change Port No of skype–>

In skype if you click “tools ” then “options” and connection down the left,

untick the box ” use port 80 and 443 as alternative incoming ports”

then you wont have this issue anymore

Thanks ..!


Uploading a document in apex salesforce using custom controller

sometimes you may want to create a process where uploading a document is mandatory. You can create a single Visualforce page with all of the fields for the record plus the field required to upload a document. code  below is an example

<apex:page controller=”docex”>
<apex:outputLabel value=”Document Name”/>
<apex:inputText id=”name” value=”{!}”/>

<apex:outputLabel value=”Upload Document”/>
<apex:inputFile value=”{!file}” />
<apex:commandButton value=”Save” action=”{!insert}” id=”save”/>

public class docex
Document d{get;set;}
public ID folderid{get;set;}

public docex
d= new Document();
public void insert()
folderid=UserInfo.getUserId();    //uses the current user id as folder id
d.body=file;            // body field in document object which holds the file.
d.folderid=folderid;        //folderid where the document will be stored
insert d;


for further reference you can store the id of an document along with other fields in your custom object . and retrieve the contents of the document object by using soql query:

document d=[select body, id , name from document where id=”<stored 18 character id>”]

Add UIButton on UITableView when drag , Swipe or touches moved on Cell Using UIGestureRecognizerDelegate in iPhone

UIButton *YourButton;

– (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
static NSString *SimpleTableIdentifier = @”SimpleTableIdentifier”;

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SimpleTableIdentifier];

if (cell == nil)
cell = [[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:SimpleTableIdentifier] autorelease];
UISwipeGestureRecognizer *gestureL = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(didSwipeL:)];
gestureL.direction = UISwipeGestureRecognizerDirectionLeft;
[cell.contentView addGestureRecognizer:gestureL];
[gestureL release];

UISwipeGestureRecognizer *gestureR = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(didSwipeR:)];
gestureR.direction = UISwipeGestureRecognizerDirectionRight;
[cell.contentView addGestureRecognizer:gestureR];
[gestureR release];

YourButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[YourButton addTarget:self action:@selector(YourButtonMethod:) forControlEvents:UIControlEventTouchDown];
[YourButton setTitle:@”MyButton” forState:UIControlStateNormal];
YourButton.frame = CGRectMake(320, 12.5, 104, 35);
[cell.contentView YourButton];

-(void)didSwipeL:(UIGestureRecognizer *)gestureRecognizer
CGPoint p = [gestureRecognizer locationInView:AppsTable];

NSIndexPath *indexPath = [AppsTable indexPathForRowAtPoint:p];
if (indexPath == nil)
NSLog(@”long press on table view but not on a row”);
NSLog(@”long press on table view at row %d”, indexPath.row);
UITableViewCell *cell = [AppsTable cellForRowAtIndexPath:indexPath];

CGPoint newLeftCenter = CGPointMake( 198 + AddToFavorities.frame.size.width / 2.0f,;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0f]; = newLeftCenter;
[UIView commitAnimations];
YourButton.tag = indexPath.row;
[cell.contentView addSubview:AddToFavorities];

-(void)didSwipeR:(UIGestureRecognizer *)gestureRecognizer
CGPoint p = [gestureRecognizer locationInView:AppsTable];

NSIndexPath *indexPath = [AppsTable indexPathForRowAtPoint:p];
if (indexPath == nil)
NSLog(@”long press on table view but not on a row”);
NSLog(@”long press on table view at row %d”, indexPath.row);
UITableViewCell *cell = [AppsTable cellForRowAtIndexPath:indexPath];

CGPoint newLeftCenter = CGPointMake( 320.0f + AddToFavorities.frame.size.width / 2.0f,;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0f]; = newLeftCenter;
[UIView commitAnimations];
YourButton.tag = indexPath.row;
[cell.contentView addSubview:AddToFavorities];

– (void) YourButtonMethod : (id) sender
//[self retriveAPps];

UIButton *clickedbtn = (UIButton *)sender;
NSLog(@”Added to favorities %d”,clickedbtn.tag);

Launch the app store app from your application


Step 1: Create an empty iPhone application with and add the UIViewController subclass to it.

Step 2: Create a view just like the one given below and the add the view of this view controller into the iPhone window.

Step 3: Create a function for the button and this function will contain the code for launching the app store application of the iOS device from your application. So declare a function with proper name into the your ViewController.h file and implement the same in the yourViewController.m file given below is the code for the same.


MyViewController.h file 


MyViewController.m file


Code Explanation: In the above code since we want to launch the app store we have used the itms-apps: in place of http followed by your application link which is present on the app store.
Step 4: Build your project and deploy the project into the iOS device.
Step 5: After you touch the button you will see the app store app is launched with the application details who’s link you have provided.
You can download the sample project from here.


Note: This demo cannot be tested in the iPhone simulator for the testing of this demo you require this application to be deployed into your iOS device.

This kind of requirement is mostly used when a client requests that he wants a review section in his application. You may also use the link maker from apple to get your application url link.


How to export leads to excel sheet in salesforce apex

Here is the code for exporting leads to excel in salesforce apex

Class Code:

public class exportExcel {

public string header{get;set;}

public List<wrapper> lstwrapper {get; set;}

public class wrapper{

public string Id{get; set;}

public string Name{get; set;}

public string Email{get; set;}    }

public string Filetype{get;set;}

public boolean isExcel {get;set;}

public boolean isCsv {get;set;}

public exportExcel(){

Filetype = ”;

lstwrapper = new List<wrapper>();

header = ‘Id,Name,Email’;


public void exportToExcel(){

string queryString = ‘Select Id, Name, Email from Lead’;

List<Lead> lstLead = DataBase.Query(queryString);
if(lstLead.size() > 0) {

for(Lead ld : lstLead)


wrapper w = new wrapper();

w.Id = ld.Id;

w.Name= ld.Name;

w.Email = ld.Email;







Page Code:

<apex:page controller=”exportExcel” action=”{!exportToExcel}” readOnly=”true”  contentType=”application/”>          <apex:pageBlock >

<apex:pageBlockTable value=”{!lstwrapper}” var=”x”>

<apex:column headerValue=”Id”>



<apex:column headerValue=”Name”>



<apex:column headerValue=”Email”>






To get geo location OR longitude and latitude current location OR current Location of user

To get longitude and latitude of current location there is simple java script function given below —

/*Location functions here*/

function getUserLocation() {

//check if the geolocation object is supported, if so get position
if (navigator.geolocation)
navigator.geolocation.getCurrentPosition(displayLocation, displayError);
document.getElementById(“locationData”).innerHTML = “Sorry – your browser doesn’t support geolocation!”;

function displayLocation(position) {

//build text string including co-ordinate data passed in parameter
var displayText = “” + position.coords.latitude + ” ” + position.coords.longitude;

//display the string for demonstration
document.getElementById(“locationData”).innerHTML = displayText;


function displayError(error) {

//get a reference to the HTML element for writing result
var locationElement = document.getElementById(“locationData”);

//find out which error we have, output message accordingly
switch(error.code) {
locationElement.innerHTML = “Permission was denied”;
locationElement.innerHTML = “Location data not available”;
case error.TIMEOUT:
locationElement.innerHTML = “Location request timeout”;
case error.UNKNOWN_ERROR:
locationElement.innerHTML = “An unspecified error occurred”;
locationElement.innerHTML = “Who knows what happened…”;

<div id=”locationData” align=”center”>


By using this script you can get current Geo location .
to display  massages or  longitude and latitude to user , here i used last div.

Thanks ..!!


To add Print button on your web page.

Adding Print Button on your web page is very simple .

I am giving you following simple example.

<title>Print Test</title>
<h1>Print Test</h1>
<input type=”button” onClick=”window.print()” value=”Print This Page”/>
The most important is ‘on click ‘event  , window.print () function is ready made function  of  operating system .
In this way you can add print button on your web page.


How to add share buttons on web Page .or To add plugin of social networking site to your web page .

It is very very simple work to add share button on your webpage . there are ready made code available for that .

you have to just go to this


in this url , you will find the  code of all  share button like facebook,twittrer, google+,gmail ,yahoomail and lots more near about there are 50 to 60 share button on this page .

you have to just copy and paste these buttons code.

You have privilege to add your custom button in that .

Adding “share button” is only matter of copy and paste , nothing else.

Thanks !!!!


Could not load file or assembly ‘MySql.Data, Version=, …” [Solved]

If you are accessing MySql from your ASP.NET code and getting this error after uploading code to Server:

Parser Error Message: Could not load file or assembly ‘MySql.Data, Version=, Culture=neutral, PublicKeyToken=c5687fc88969c44d’ or one of its dependencies. The system cannot find the file specified.

Make sure /bin/MySql.Data.dll exists on root folder.

I was accessing the code from url

So MySql.Data.dll should be present at location:

Even if you place the .dll in /SomeFolder/bin/, it does not work.

How to run/call Method when applicationDidEnterBackground And Get Updates By LocalNotification In Iphone/iPad Application

UIBackgroundTaskIdentifier bgTask;

– (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;

– (void)applicationDidEnterBackground:(UIApplication *)application
UIApplication* app = [UIApplication sharedApplication];
bgTask = [app beginBackgroundTaskWithExpirationHandler:^{
[app endBackgroundTask:bgTask];
bgTask = UIBackgroundTaskInvalid;
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSTimer* t = [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(YourMethodName) userInfo:nil repeats:YES];
[[NSRunLoop currentRunLoop] addTimer:t forMode:NSDefaultRunLoopMode];
[[NSRunLoop currentRunLoop] run];
– (void) YourMethodName
if (@”Satisfy Condition”)
[[UIApplication sharedApplication] cancelAllLocalNotifications];

NSDate *newDate = [NSDate date];

UILocalNotification *localNotif = [[UILocalNotification alloc] init];
if (localNotif == nil)
localNotif.fireDate = newDate;
localNotif.alertBody = @”Request For Cab”;
localNotif.soundName = UILocalNotificationDefaultSoundName;
localNotif.applicationIconBadgeNumber = 1;
NSString *StringPass = @”AppNotifier Notification”;
NSDictionary *userdict = [NSDictionary dictionaryWithObject:StringPass forKey:@”My notify”];
localNotif.userInfo = userdict;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif]; [localNotif release];

– (void)application:(UIApplication *)app didReceiveLocalNotification:(UILocalNotification *)notif
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;
[[UIApplication sharedApplication] cancelAllLocalNotifications];