1. Add reference to COM object Microsoft.Office.Excel 12.0 or any other available library. 2. Code: using Microsoft.Office.Interop.Excel; private void anyfunction() { Microsoft.Office.Interop.Excel.Application xlapp = new Microsoft.Office.Interop.Excel.Application(); Microsoft.Office.Interop.Excel.Workbook xlWkb = null; Microsoft.Office...
/usr/include/objc/objc-class.h file not found
For this you need to change this import statement to,
#import <objc/runtime.h>
This applies to xCode 4.2 above
Servlet Lifecycle
Hi friends, in this post we will take an overview of servlet lifecycle. First of all lets just know what is servlet? Servlet is a java program which runs on server side. Servlet interacts with the client via request-response. It is nothing but HTML code embedded into java code. When any servlet get called container first checks that whether the object of requested servlet is already exists, if...
how to rotate the AI car according to the Track/Road in Unity3d
The following link it would be helpfull
How to make an AI Enemy Car in which it follows the track during the Race ?
The AI for enemy car can be done by using waypoints method.. the following code is used var waypoint : Transform[]; var speed : float =20; private var currentWaypoint : int; var loop : boolean = true; function Awake() {waypoint[0]=transform;} function Update () { if(currentWaypoint < waypoint.Length) { var target : Vector3 = waypoint[currentWaypoint].position; var moveDirection : Vector3 =...
How to move the image on touch in android
image.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { layoutParams1 = (RelativeLayout.LayoutParams) image.getLayoutParams(); switch(event.getActionMasked()) { case MotionEvent.ACTION_DOWN: break; case MotionEvent.ACTION_UP: x_cord = (int) event.getRawX(); if (x_cord la.getWidth()) { x_cord= la.getWidth();...
How to pick music file from music library in iPhone application
Like UIImagePickerView to pick image from image gallery we can also pick up any music file from the music gallery of the device and can use it in our application with the help of MPMediaPickerController. For that you need to add AVFoundation framework in your application. also to play the picked file we need to add MediaPlayer framework. and to use them just import them in respective view...
Custom Fonts in Blackberry Application
Download the .ttf (True Type Font)file and include it in src folder. Include this code into the constructor. EditField edField1 = new EditField (“”, “TestEditField”, 30, EditField.READONLY| EditField.FIELD_VCENTER){ protected void layout(int width, int height) { super.layout(customWidth, customHeight); setExtent(customWidth, customHeight); } }; Font fo3 =...
How to get parameters passed to a URL in salesforce apex
If we pass parameter while creating a page in salesforce apex like this public PageReference setParameter() { public papageReference ref = new PageReference(‘/apex/print?email=’ + textEmail1); ref.setRedirect(true); return ref; } where email is the parameter. Then using the following function we can get the value of the parameter passed public getParameter() { email = ApexPages...
Function For returning Multiple values in iphone
Function For returning Multiple values in iphone – (void)viewDidLoad { [super viewDidLoad]; //Return In Dictionary NSDictionary *FullName = [Self FullnameDict:@”AAAA,BBBB”]; NSString *FName = [Name objectForKey:@”firstame”]; NSString *LName = [Name objectForKey:@”lastname”]; //Return In Array NSArray *FullName1 = [Self...