Thursday, 21 May 2015

how to keep cursor normal blinking

I pushed a magic button and now my cursor (the blinking thing that shows where you type) split itself and now Eclipse is acting like a plain text editor/like Microsoft Word. The cursor now looks like the character above backslash (a thin vertical bar with a gap in the middle.)
I just want to know how to get Eclipse to act normal again, and what I accidentally did so I don't do it again.
shareimprove this question

1  
"the character above forward slash" is a question mark on my keyboard... can you be more specific? –  DNA Mar 5 '12 at 11:42
    
pretty sure the question mark is above the back slash. I thought that the direction of the slash is based on starting at the top and going to the bottom... If I'm mistaken then obviously I mean the backslash. –  Jeremy Mar 5 '12 at 11:45
1  
What does "fugoogin" mean? What does it mean when Eclipse acts like MS Word? –  Gabe Mar 5 '12 at 11:52
1  
That was a very well-posed question. –  Leo Mar 1 '13 at 21:47
4  
Funny how you describe it as "the character above backslash (a thin vertical bar with a gap in the middle.)" instead of just typing ¦ –  Valentin Milea Dec 28 '13 at 17:10

6 Answers

up vote 76 down vote accepted
It sounds like you have accidentally switched from Smart Insert mode to Insert mode.
Press Ctrl + Shift + Insert or tick Smart Insert Mode on the Edit menu to switch back.
Smart Insert is the feature that automatically insert closing quotes and brackets when you type the opener and places semi-colons at the end of the line when you press semi-colon (if you have the preference for that enabled.)
shareimprove this answer

    
Thank god, this split caret would have made me crazy! –  STM Apr 10 '12 at 8:42
1  
@STM: It's funny how an apparently negligible cosmetic change to the cursor can drive us up the wall! Ctrl+Shift+Insert fixed it, though! –  WeNeigh Dec 20 '12 at 19:42
    
Took me a while to find this on google. I knew something was wrong. –  rottz Jan 28 '13 at 18:23
2  
Ahhh, brilliant. I don't even know how I turned it on (how the hell do you accidentally press Ctrl + Shift + Insert?), but you saved me! –  Davor Jul 10 '13 at 21:33
1  
I think it went from smart insert to normal insert when I changed the file extension to an unknown one, thanks, it was driving me insane! Also, it tells you which more you are in on the bottom bar :) –  Liam W Feb 8 '14 at 17:51
Maybe you pressed the insert key, which will change the Eclipse editor to Overwrite rather than Smart Insert (see the info bar at the bottom of the editor), and will change the cursor to a block rather than a vertical line?
Update: Thanks for clarification - see mikej's answer which is correct.
shareimprove this answer

    
Incorrect, Insert would make it behave like Command prompt, not Microsoft word. Also insert makes the cursor a block and not a split cursor, as you said. I have a vertical line with a gap in the middle of it, like the character above the forward slash... –  Jeremy Mar 5 '12 at 11:52
    
@DNA nice thread isn't ... +1 –  mKorbel Mar 5 '12 at 11:54
    
@Jeremy it would help if you explained what you mean by "acting like Microsoft Word" then...and "split cursor"... –  DNA Mar 5 '12 at 11:57
@Jeremy by saying " I have a vertical line with a gap in the middle of it, like the character above the forward slash " i guess you are referring to the ' Pipeline 'symbol, the one you use to denote' OR ' in programming languages. As people already answered, you are in Raw Insert Mode (as opposed to Smart Mode) so try Edit->Smart Insert Mode (Ctrl+Shift+Insert by default). For more info you can visit this thread http://www.eclipse.org/forums/index.php/t/53833/
And remember, the symbol is called 'Pipe' symbol or 'Pipeline' symbol.
shareimprove this answer

If nothing works, restart eclipse. That is what I did !
shareimprove this answer

I've encountered this symptom in Eclipse 3.7 before. And after I restarted machine, it disappeared.
shareimprove this answer

I also had same problem, you can fix this by pressing just INSERT button on keyboard (on windows platform) also.
It worked for me.
or you can restart your eclipse.

Tuesday, 19 May 2015

OOPS Concept With Real Life Example

OOPS Concept With Real Life Example

This is the most asked Question in a technical interview in any domain.. OOPs Concept is very very important.. Today I will explain OOPs concept with real Life Example that will help you to grasp the concept well and excel in the interviews...
Objects: Object is the basic unit of object-oriented programming.Objects are identified by its unique name. An objectrepresents a particular instance of a class. There can be more than one instance of an object. Each instance of an object can hold its own relevant data.
An Object is a collection of data members and associated member functions also known as methods.
Classes: Classes are data types based on which objects are created.Objects with similar properties and methods are grouped together to form a Class. Thus a Class represent a set of individual objects. Characteristics of an object are represented in a class as Properties. The actions that can be performed by objects becomes functions of the class and is referred to as Methods.
Example #1:
For example consider we have a Class of Cars under which Santro Xing, Alto and WaganR represents individual Objects.In this context each Car Object will have its own, Model,Year of Manufacture, Colour, Top Speed, Engine Power etc.,which form Properties of the Car class and the associated actions i.e., object functions like Start, Move, Stop form the Methods of Car Class.No memory is allocated when a class is created. Memory is
allocated only when an object is created, i.e., when an instance of a class is created.
Example #2:
An architect will have the blueprints for a house....those blueprints will be plans that explain exactly what properties the house will have and how they are all layed out.  However it is just the blueprint, you can't live in it.  Builders will look at the blueprints and use those blueprints to make a physical house.  They can use the same blueprint to make as many houses as they want....each house will have the same layout and properties.  Each house can accommodate it's own families...so one house might have the Smiths live in it, one house might have the Jones live in it.

The blueprint is the class...the house is the object.  The people living in the house are data stored in the object's properties.

Abstraction: Abstraction means showing essential features and hiding non-essential features to the user.

For Eg.  Yahoo Mail...

When you provide the user name and password and click on submit button..It will show Compose,Inbox,Outbox,Sentmails...so and so when you click on compose it will open...but user doesn't
know what are the actions performed internally....It just Opens....that is essential; User doesn't know internal actions ...that is non-essential things...

For Eg. Tv Remote..
Remote is a interface between user and tv..right. which has buttons like 0 to 10 ,on /of etc but we dont know circuits inside remote...User does not  need to know..Just he is using essential thing that is remote.
 

Encapsulation: Encapsulation means which binds the data and code (or) writing operations and methods in single unit (class).
 
For Example:
A car is having multiple parts..like steering,wheels,engine...etc..which binds together to form a single object that is car. So, Here multiple parts of cars encapsulates itself together to form a single object that is Car.

In real time we are using Encapsulation for security purpose...
Encapsulation = Abstraction + Data Hiding.
Inheritance: Deriving a new class from the existing class,is called Inheritance.
Derived(sub class) class is getting all the features from Existing (super class\base class) class and also incorporating some new features to the sub class.
For Eg.,
class Address
{
String name;
Srting H.no;
String Street name;
}
class LatestAddress extends Address
{
String City;
String State;
String Country;
}
public class Vishal
{
{
LatestAddress la = new LatestAddress();
//Assign variable accordingly...
}
}
In the above Example class LatestAddress getting all features from the Address class.
In the LatestAddress class we have total 6 properties..3 are inherited from Address class and 3 properties are
incorporated. So In the class Vishal we are declaring the object of class LatestAddress and then assign new variables using the properties of the previous base classes... So this is a nice example of inheritance..
Polymorphism :
Polymorphism means ability to take more than one form that an operation can exhibit different behavior at different instance depend upon the data passed in the operation.

1>We behave differently in front of elders, and friends. A single person is behaving differently at different time.

2> A software engineer can perform different task at different instance of time depending on the task assigned  to him .He can done coding , testing , analysis and designing depending on the task assign and the requirement.

3> Consider the stadium of common wealth games. Single stadium but it perform multiple task like swimming, lawn tennis etc.

4> If a girl is married and mother of 2 children doing teaching job then  she is a women first ,, teacher in a school when she is in school,,wife of someone at home,, mother of her children,, and obvious daughter of someone & may be girl friend of someone (just kidding) means a woman plays diffent roles at different times dats the polymorphism (many forms).

Summary:

OOPs have following features:

1. Object             - Instance of Class
2. Class               - Blue print of Object
3. Encapsulation    - Protecting our Data
4. Polymorphism   - Different behaviors at different instances
5. Abstraction        - Hiding our irrelevant Data
6. Inheritence        - One property of object is acquiring to another property of object

OOPS Concept with Real-world example

Introduction

OOP is Nothing but Object Oriented Programming.According to Wikipedia,  Object-oriented programming (OOP) is a programming paradigm that uses "objects" and their interactions to design applications and computer programs.


OOPs have following features

1. Object   - Instance of class
2. Class    - Blue print of Object
3. encapsulation  - Protecting our data
4. polymorphism   - Different behaviors at diff. instances
5. abstraction    - Hidding our irrelavance data
6. inheritence    - one property of object is aquring to another property of object

1. Object
Basically an object is anything that is identifiable as an single material item. You can see around and find many objects like Camera, Monitor, Laptop etc. In OOP perspective, an object is nothing but an instance of a class that contains real values instead of variables

2. Class

A class is a template definition of the methods and variables for a particular kind of object. In other words, class is the blue print from which an individual objects are created.

every human has eye ,so eyecolor can be considered as the property of human being which can be encapsulted as a data in our class Human

class Human
{
    private:
    EyeColor IColor;
    NAME personname;
};

Consider object of class of

                Human myhuman;

we want set myhuman's name as "linto" and IColor as "black", For that we want methods to do that task.

So need methods for class to do a particular task on the data

class Human
{
    private:
    EyeColor IColor;
    NAME personname;
    public:
    void SetName(NAME anyName);
    void SetIColor(EyeColor eyecolor);
};

3. Abstraction

Abstraction is a process of identifying the relevant qualities and behvaiors an object should possess. Lets take an example to understand abstraction. A Laptop consists of many things such as processor, motherboard, RAM, keyboard, LCD screen, wireless antena, web camera, usb ports, battery, speakers etc. To use it, you don't need to know how internally LCD screens, keyboard, web camera, battery, wireless antena, speakers works.  You just need to know how to operate the laptop by switching it on. The intrinsic details are invisitble. Think about if you would have to call to the engineer  who knows all internal details of the laptop before operating it. This would have highly expensive as well as not easy to use everywhere by everyone. So here the Laptop is an object that is designed to hide its complexity.

Think If you need to write a piece of software to track the students details of a school, you may probably need to create Students objects. People comes in all different backgrounds, educational qualifications, locations, hobbies, ages and have multiple religion, language but in terms of application, an student is just a name, age, class and roll number, while the other qualities are not relevant to the application. Determining what other qualities (background, qualifications, location, hobbiels etc) are in terms of this application is abstraction.

In object-oriented software, complexity is managed by using abstraction. Abstraction is a process that involves identifying the critical behavior of an object and eliminating irrelevant and complex detilals. A well thought-out abstraction is usually simple, and easy to use in the perspective of the user, the person who is using your object.

4. Encapsulation

Encapsulation is a method for protecting data from unwanted access or alteration by packaging it in an object where it is only accessible through the object's interface. Encapsulation are often referred to as information hiding. But both are different. Infact information hiding is actually the result of Encapsulation. Encapsulation makes it possible to separate an object's implementation from its orgiinal behavior - to restrict access of its internal data. This restriction facilitate certains detiails of an object;s behavior to be hidden. This allows to protect an object's interal state from corruption by its user.

It is the mechanism by which Abstraction is implemented. In other words you can say that it is the result of the Encapsulation. For example,  the Laptop is an object that encapsulates many technologies/hardwares that might not be understood clearly by most people who use it.
Inheritance

5. Inheritance

Inheritance is the ability to define a new class or object that inherits the behaviour and its functionality of an existing class. The new class or object is called a child or subclass or derived class while the original class is called parent or base class. For example, in a software company Software Engineers, Sr. Software Engineers, Module Lead, Technical Lead, Project Lead, Project Manager, Program Manager, Directors all are the employees of the company but their work, perks, roles, responsibilities differs. So in OOP, the Employee base class would provide the common behaviours of all types/level of employee and also some behaviours properties that all employee must have for that company. The particular sub class or child class of the employee would implement behaviours specific to that level of the employee. So by above example you can notice that the main concept behind inheritance are extensibility and code reuse (in this case you are extending the Employee class and using its code into sub class or derived class).

6. Polymorphism

As name suggests, Polymorphism means an ability to assume different forms at different places. In OOP, it is a language's ability to handle objects differently based on their runtime type and use. Polymorphism is briefly described as "one interface, many implementations".Ppolymorphism is a characteristic of being able to assign a different meaning or usage to something in different contexts - specifically, to allow an entity such as a variable, a function, or an object to have more than one form.

There are two types of polymorphism.
  •     Compile time polymorphism - It is achieved by overloading functions and operators
  •     Run time polymorphism - It is achieved by overriding virtual functions
Lets say you have a class that have many Load methods having different parameters, this is called Compile time polymorphism. Lets take another example where you have a virtual method in the base class called Load with one parameter and you have redefined its functioanlity in your sub class by overriding base class Load method,  this is called Run time polymorphism.

- See more at: http://chiragkanzariya.blogspot.in/2012/11/oops-concept-with-real-world-example.html#sthash.LGY2VUDN.dpuf

OOPS Concept with Real-world example

Introduction

OOP is Nothing but Object Oriented Programming.According to Wikipedia,  Object-oriented programming (OOP) is a programming paradigm that uses "objects" and their interactions to design applications and computer programs.


OOPs have following features

1. Object   - Instance of class
2. Class    - Blue print of Object
3. encapsulation  - Protecting our data
4. polymorphism   - Different behaviors at diff. instances
5. abstraction    - Hidding our irrelavance data
6. inheritence    - one property of object is aquring to another property of object

1. Object
Basically an object is anything that is identifiable as an single material item. You can see around and find many objects like Camera, Monitor, Laptop etc. In OOP perspective, an object is nothing but an instance of a class that contains real values instead of variables

2. Class

A class is a template definition of the methods and variables for a particular kind of object. In other words, class is the blue print from which an individual objects are created.

every human has eye ,so eyecolor can be considered as the property of human being which can be encapsulted as a data in our class Human

class Human
{
    private:
    EyeColor IColor;
    NAME personname;
};

Consider object of class of

                Human myhuman;

we want set myhuman's name as "linto" and IColor as "black", For that we want methods to do that task.

So need methods for class to do a particular task on the data

class Human
{
    private:
    EyeColor IColor;
    NAME personname;
    public:
    void SetName(NAME anyName);
    void SetIColor(EyeColor eyecolor);
};

3. Abstraction

Abstraction is a process of identifying the relevant qualities and behvaiors an object should possess. Lets take an example to understand abstraction. A Laptop consists of many things such as processor, motherboard, RAM, keyboard, LCD screen, wireless antena, web camera, usb ports, battery, speakers etc. To use it, you don't need to know how internally LCD screens, keyboard, web camera, battery, wireless antena, speakers works.  You just need to know how to operate the laptop by switching it on. The intrinsic details are invisitble. Think about if you would have to call to the engineer  who knows all internal details of the laptop before operating it. This would have highly expensive as well as not easy to use everywhere by everyone. So here the Laptop is an object that is designed to hide its complexity.

Think If you need to write a piece of software to track the students details of a school, you may probably need to create Students objects. People comes in all different backgrounds, educational qualifications, locations, hobbies, ages and have multiple religion, language but in terms of application, an student is just a name, age, class and roll number, while the other qualities are not relevant to the application. Determining what other qualities (background, qualifications, location, hobbiels etc) are in terms of this application is abstraction.

In object-oriented software, complexity is managed by using abstraction. Abstraction is a process that involves identifying the critical behavior of an object and eliminating irrelevant and complex detilals. A well thought-out abstraction is usually simple, and easy to use in the perspective of the user, the person who is using your object.

4. Encapsulation

Encapsulation is a method for protecting data from unwanted access or alteration by packaging it in an object where it is only accessible through the object's interface. Encapsulation are often referred to as information hiding. But both are different. Infact information hiding is actually the result of Encapsulation. Encapsulation makes it possible to separate an object's implementation from its orgiinal behavior - to restrict access of its internal data. This restriction facilitate certains detiails of an object;s behavior to be hidden. This allows to protect an object's interal state from corruption by its user.

It is the mechanism by which Abstraction is implemented. In other words you can say that it is the result of the Encapsulation. For example,  the Laptop is an object that encapsulates many technologies/hardwares that might not be understood clearly by most people who use it.
Inheritance

5. Inheritance

Inheritance is the ability to define a new class or object that inherits the behaviour and its functionality of an existing class. The new class or object is called a child or subclass or derived class while the original class is called parent or base class. For example, in a software company Software Engineers, Sr. Software Engineers, Module Lead, Technical Lead, Project Lead, Project Manager, Program Manager, Directors all are the employees of the company but their work, perks, roles, responsibilities differs. So in OOP, the Employee base class would provide the common behaviours of all types/level of employee and also some behaviours properties that all employee must have for that company. The particular sub class or child class of the employee would implement behaviours specific to that level of the employee. So by above example you can notice that the main concept behind inheritance are extensibility and code reuse (in this case you are extending the Employee class and using its code into sub class or derived class).

6. Polymorphism

As name suggests, Polymorphism means an ability to assume different forms at different places. In OOP, it is a language's ability to handle objects differently based on their runtime type and use. Polymorphism is briefly described as "one interface, many implementations".Ppolymorphism is a characteristic of being able to assign a different meaning or usage to something in different contexts - specifically, to allow an entity such as a variable, a function, or an object to have more than one form.

There are two types of polymorphism.
  •     Compile time polymorphism - It is achieved by overloading functions and operators
  •     Run time polymorphism - It is achieved by overriding virtual functions
Lets say you have a class that have many Load methods having different parameters, this is called Compile time polymorphism. Lets take another example where you have a virtual method in the base class called Load with one parameter and you have redefined its functioanlity in your sub class by overriding base class Load method,  this is called Run time polymorphism.
- See more at: http://chiragkanzariya.blogspot.in/2012/11/oops-concept-with-real-world-example.html#sthash.LGY2VUDN.dpuf

Thursday, 23 April 2015

Pleasure Hunt: MCA course is out of date in high-tech world

Pleasure Hunt: MCA course is out of date in high-tech world: MCA course is out of date in high-tech world Dibyajyoti Chatterjee, ET Bureau Feb 17, 2010, 02.59pm IST MUMBAI: Asish Tilak, ...

MCA course is out of date in high-tech world

MCA course is out of date in high-tech world

Dibyajyoti Chatterjee, ET Bureau Feb 17, 2010, 02.59pm IST
MUMBAI: Asish Tilak, a software programmer with Jindal Saw, says his job is an art that's slowly fading out. He sees fewer students with the wherewithal for programming — the once-coveted MCA, or master of computer applications course — apply for interviews these days. The three-year degree course has been upstaged by short-term, job-oriented certifications in an uncertain economic climate.
"Students these days opt for short-term certification programmes like .Net, Oracle or Cisco which provide good jobs," he says.
Software programmers are also being edged out by professionals with engineering degrees, as outsourcing work gets more complex. The global economic slowdown saw most multinational companies cut down their IT spends, and this seems to have taken away some sheen from the MCA degree. At the same time, a sharp increase in the number of engineering colleges in the country has given students a wider choice in the form of a B Tech or a BE degree, which are preferred by employers.
"A candidate with an MCA degree might be good with programming, but when it comes to design and technical know-how, he is in a disadvantageous position compared to a BE or a B Tech degree holder," says Pradeep Bahirwani, VP, talent acquisition, Wipro.
In such an environment, fewer students are applying for the MCA entrance test every year. Nearly 9,276 students took the entrance test in 2009, while 10,398 students had taken it in 2008.
Universities and institutes across the country are also witnessing dwindling interest in the course. There were just 29 takers for the 39 seats on offer last year at the New Delhi-based Jawaharlal Nehru University, whose MCA course is considered among the best in the country. At the National Institutes of Technology or NITs, 6,504 students appeared for the combined entrance exam in 2009, compared to 8,223 in 2008. Of the 20 NITs spread across the country, 11 offer the MCA programme, with 766 seats in all.
Another reason for the course losing its appeal is the transformation of software work in India from back-office outsourcing to the more complex "high-end" outsourcing. "One finds more product development and hardcore technical jobs being outsourced compared to plain software testing earlier," explains Srivas Ramgopal, who works with a subsidiary of Tata Communications. Companies therefore prefer to hire people with engineering backgrounds.
Though the world's economies are showing signs of improvement, interest levels in MCA are not likely to revive soon. "Instead of a three-year programme, MCA should be made a two-year programme to make it competitive vis-à-vis the B Tech programme. The industry considers an MCA degree equivalent to a B Tech one, whereas one takes longer to finish the MCA," says ARKS Srinivas, director, TIME Mumbai, a coaching institute.
The top three NITs secured 30% of the students — the one in Tiruchirappalli, followed by Motilal Nehru NIT, Allahabad and NIT Warangal.
Sonajharia Minz, dean, school of computers and systems sciences at JNU and Krishna Kant, professor at the computer science and engineering department of the Motilal Nehru NIT blame the economic recession for the slump in interest among students. "Students are opting for MBA or other courses, as the IT industry has borne the brunt of the recession," says professor Kant.

The similar trend is being replicated in colleges across Maharashtra. The occupancy rate is witnessing a sharp fall. In 2009, 5,369 candidates were admitted for 6988 seats available across 114 colleges in the State. So, about 77% of the seats were filled up in 2009, compared to 89% of the seats in 2008. Some 5,289 candidates opted for the programme from a pool of 5,908 seats in 2008. It must be noted that of the 114 colleges, 45 are under Pune University, which is one of the top universities for MCA. "Lack of placement facilities and presence of institutes in remote areas could be the reasons for such a bad show," said an official from the Directorate of Technical Education of Maharashtra.
ARKS Srinivas, director, TIME Mumbai, a private coaching institute said that MCA as a business vertical is losing out due to fall in number of students. "Some 4,500 students will write the Integrated Common Entrance Test for MBA and MCA in Andhra Pradesh this year, whereas, previous about 6,500 students wrote the test for 60 seats," said Srinivas.
However, the colleges offering MCA degree are considering to increase the number of seats. For instance JNU will be offering 46 seats in this schoolyear. Number of seats in Maharashtra could be risen by up to 20% this year. Seats in various NITs are also on the rise.

Wednesday, 25 March 2015


"The Degree of you feel separation That Degree represent your love with them"
Everyone says that loves hurts, but that’s not true. Loneliness hurts. Rejection hurts. Losing someone hurts. Everyone confuse these things with love but reality, love is the only thing in this world that covers up all the pain and makes us feel wonderful again.When two people are meant for each other, no time is too long, no distance is too far, no one can ever tear them apart.