Saturday, December 13, 2008

How to [mount_point cannot contain the following How to [mount_point cannot contain the following chacharacters: newline, G_DIR_SEPARATOR (usually /)]

Open gconf-editor in terminal:

$ gconf-editor
In the left panel:
Goto:

System -> Storage -> volumes

Here you will see the mount point you specified for the device.
Change it to just a single word (OR just remove it :) )
Thats it. Replug your device.

Enjoy!!!

EDIT:
1. Do not use sudo for this purpose.
See this comment by Anonym... (Thanx to Anonym) for detail.

2. Sometimes instead of System -> Storage -> volumes you may also get System -> Storage -> drives , depending upon what you messed up. The rest process is same.

Wednesday, September 17, 2008

Abstract v/s Interface

There are lost of discussion on the internet about the Interface vs Abstract class. Also, as base class whether we have to use interface, abstract class or normal class.

I am trying to point out few considerations on which we can take decision about Interface vs Abstract class vs Class.

Abstract Class vs Interface

I am assuming you are having all the basic knowledge of abstract and interface keyword. I am just briefing the basics.

We can not make instance of Abstract Class as well as Interface.

Here are few differences in Abstract class and Interface as per the definition.

Abstract class can contain abstract methods, abstract property as well as other members (just like normal class).

Interface can only contain public methods, this is the nature of interface.

//Abstarct Class

public abstract class Vehicles

{

private int noOfWheel;

private string color;

public abstract string Engine

{

get;

set;

}

public abstract void Accelerator();

}

//Interface

public interface Vehicles

{

string Engine

{

get;

set;

}

void Accelerator();

}

We can see abstract class contains private members also we can put some methods with implementation also. But in case of interface only methods and properties allowed.

We use abstract class and Interface for the base class in our application.

This is all about the language defination. Now million doller question:

How can we take decision about when we have to use Interface and when Abstract Class.

Basicly abstact class is a abstract view of any realword entity and interface is more abstract one. When we thinking about the entity there are two things one is intention and one is implemntation. Intention means I know about the entity and also may have idea about its state as well as behaviour but don’t know about how its looks or works or may know partially. Implementation means actual state and behaviour of entity.

Sunday, July 20, 2008

LAMP interview Question

Question1 : Regular Expression.
Question2: Persistant Connection.
Question3: Which function is use for File Uploading.
Question4: In one table there is one field salary select first 3 higher salary.
Question5: Fileatime function.
Question6: Which php function is use for connect database (Pconnect).
Question7 : short method of if ternary operation.
Question 8 : Error Control.