Friday, 11 December 2015

How do I install the latest version of Flash Player in Google Chrome?

Chrome users don't have to download new versions of Flash Player. Chrome automatically updates when new versions of Flash Player are available. That way, users always have the latest security updates. Select About Google Chrome under the Tools menu to verify that your Chrome browser is up-to-date. (The wrench icon near the Chrome address bar indicates the Tools menu.)  It can take some time before updates roll out to all Chrome users.
Advanced users and developers can also install specific plug-in versions of Flash Player. They can also install preview or release versions of Flash Player or run developer debugger versions of Flash Player.

Monday, 24 June 2013

Introduction to C++ Programming

This article gives you an introduction to C++ Programming from ground level.
This article won't teach you all the fundas of C++ programming rather it gives
you the base to learn C++ programming, remember that for further learning, the
base should be strong and this is what this article tries to do. It would let
you know many fundas which will help you in further learning of the the language.
C++ was developed in 1980s in the Bell Laboratories by Bjarne Stroustrup as an
object oriented programming language. This language is considered by many as an
extension of the programming language C. The extension of programming language
C to create C++ is obtained by adding classes to C. This is why C++ was initially
called "C with Classes". The C++ programming language derives its
name from the increment operator used in C, which increments the value of a variable.
The symbolic name of C++ rightly indicates that this language is enhanced version
of C.
Features
of C++ Programming Language:-
 
  1. C++ programming language is highly flexible, versatile and very powerful programming language for developing any software specially the system software namely operating system, compilers etc.
  2. C++ is most ideally suited language for development of reusable programs, which is very important to keep the production cost minimum.

Comparison of C++ Programming Language
Let us see how C++ compares
with other programming languages. All the programming languages can be divided
into two categories:- 
  1. Problem oriented languages or High-level languages: These languages have been designed to give a better programming efficiency, i.e. faster program development. Examples of languages falling in this category are FORTRAN, BASIC etc.
  2. Machine oriented languages or Low-level programming languages. These languages have been designed to give a better machine efficiency, i.e. faster program execution. Examples of programming languages falling in this category are Assembly Language and Machine Language.

C++ stands in between these two categories. That's why it is often called 
a Middle level language, since it was designed to have both: a relatively good 
programming efficiency (as compared to Machine oriented languages) and relatively 
good machine efficiency (as compared to Problem oriented languages).
Getting Started with C++ Programming
Communicating with
a computer involves speaking the language the computer understands, which immediately
rules out English as the language of communication with computer. However, there
is a close analogy between learning English language and learning C++ language.
The classical method of learning English is to first learn the alphabets or characters
used in the language, then learn to combine these alphabets to form sentences
and sentences are combined to form paragraphs. Learning C++ programming is similar
and much easier.
Therefore, instead of straight-away learning how to write programs, we must first
know what alphabets, numbers and special symbols are used in C++, then how using
these, constants, variables and keywords are constructed, and finally how are
all these combined to form an instruction. A group of instruction would be combined
later on to form a program. Character SetCharacter set is a set
of valid characters that the language can recognize. A character represents any
letter, digit or any other sign. C++ has the following character set:
Letters A-Z, a-z
Digits 0-9
Special Symbols space + - * / ' " ( )[ ] etc.
White Spaces blank space, horizontal tab, carriage return, newline etc.
Other Characters, C++ can process any of the 256 ASCII characters as data or as
literals.
The alphabets, numbers and special symbols when properly combined form constants,
variables and keywords. Let us see what these are:- 
  • Constants: Constants are data items that never change their value during a program run. C++ programming language allows several kinds of constants.
  • Variables: Variables are quantities that may vary during program execution. Variable names are names given to locations in the memory of computer where the value is stored.
  • Keywords: These are the words that convey a special meaning to the language compiler. Keywords are the words whose meaning has already been explained to the C++ compiler. The keywords cannot be used as variable names because if we do so we are trying to assign a new meaning to the keyword, which is not allowed by the computer. Examples of keywords are if, void, for, switch etc.

Data Types in C++
Data types are means to identify the types of
data and the associated operations to handle it. In C++ data types are broadly
of two types:- 
  1. Fundamental Data Types: These are predefined to the C++ language itself. there are at least five fundamental data types.
    • char- represents that the declared variable of this type can store characters
    • int- represents integers
    • float- represents floating point numbers
    • void- represents valueless data
  2. Derived Data Types: These are constructed from the fundamental types. I will not give you the details here because this is a bit high-level.

Instructions in C++ Programming Language
Now that we seen the
different types of constants, variables and keywords the next logical step is
to learn how they are combined to form instructions. 
  • Type declaration instructions: to declare the type of variables used in the program. Eg:- int num; Here a variable num is declared of type int(eger).
  • Input /Output instructions: to perform the function supplying input data to a program and obtaining the output results from it. Eg:- cin>>a; cout In the first line input is taken from the keyboard by the function cin and is assigned to a pre-declared variable a. In the second line 'Hello' is printed using the function cout.
  • Arithmetic instructions: to perform arithmetic operation between constants and variables. Eg:- c=a+b; Here c is assigned a value which is the sum of the variables a and b.
  • Control instructions: to control the sequence of execution of various statements in a C++ program. Eg:- if (a>b) func1(); Here it is checked whether a is greater than b, if it is, then program execution goes to a user defined function 'func1'.

The first C++ Program
Armed with the knowledge about the
types of variables, constants, keywords etc. we would write down our first C++
program.
Each instruction in a C++ program would comprise of a series of statements. These
statements must appear in the same order in which we want them to be executed.
The following rules are applicable to all C++ programs no matter ho long or complicated
they are
  • Blank spaces may be inserted between two words to increase readability of the statements. However, no blank spaces are allowed within a variable, constant or keyword.
  • Usually all statements are entered in small case letters.
  • C++ has no specific rules for the position at which a statement is to be written. That's why it is often called free-form language.
  • Any C++ statement always ends with a semicolon (;).

Now, let us have a look at a program which calculates the sum of two numbers given 
by the user. 
//To calculate the sum of two given numbers
#include
main()
{
int num1; //declares a variable num1 of type int(etger)
int num2; //declares a variable num2 of type int(etger)
int sum; //declares a variable sum of type int(etger)
cin>>num1; //takes input and stores to the var num1
cin>>num2; //takes input and stores to the var num2
sum= num1+num2; //adds vars num1 & num2
cout

Wednesday, 6 February 2013

The Monkey and the Apples...


There once was a happy monkey wandering the jungle, eating delicious fruit when hungry, and resting when tired. One day he came upon a house, where he saw a bowl of the most beautiful apples. He took one in each hand and ran back into the forest. He sniffed the apples and smelled nothing. He tried to eat them, but hurt his teeth. They were made of wood, but they were beautiful, and when the other monkeys saw them, he held onto them even tighter.

He admired his new possessions proudly as he wandered the jungle. They glistened red in the sun, and seemed perfect to him. He became so attached to them, that he didn't even notice his hunger at first.

A fruit tree reminded him, but he felt the apples in his hands. He couldn't bear to set them down to reach for the fruit. In fact, he couldn't relax, either, if he was to defend his apples. A proud, but less happy monkey continued to walk along the forest trails.

The apples became heavier, and the poor little monkey thought about leaving them behind. He was tired, hungry, and he couldn't climb trees or collect fruit with his hands full. What if he just let go?

Letting go of such valuable things seemed crazy, but what else could he do? He was so tired. Seeing the next fruit tree, and smelling it's fruit was enough. He dropped the wooden apples and reached up for his meal. He was happy again.

Like that little monkey, we sometimes carry things that seem too valuable to let go. A man carries an image of himself as "productive" - carries it like a shiny wooden apple. But in reality, his busyness leaves him tired, and hungry for a better life. Still, letting go seems crazy. Even his worries are sacred apples - they prove he's "doing everything he can." He holds onto them compulsively.
Moral: :

Always carry the real apples to nurture your soul & ignore the fake one’s, which makes us weak n distressed.

Monday, 4 February 2013

Good Ideas Are Not The Monopoly Of The Educated


A lady bought some bathing soaps from a shop. When she opened one of the packets, she found that it was empty. There was no soap in there; it was just an empty wrapper! She lodged a complaint against the manufacturer and got her claim. That being settled, there was a task before the management of the soap factory. How had this happened? How could they ensure that the incident did not occur again? They had suffered enough bad publicity besides having to pay the compensation to the lady.

After a detailed investigation, it was discovered, that during the process of wrapping, it so happened that inevitably, one or two wrappers did get through, having no bar of soap in them! There was no way to make out the difference between a full wrapper and an empty one. The process of handling each one separately for this purpose seemed to be very cumbersome. So, the technical head was given the job of devising a method to overcome the problem. The man prepared a detailed report and proposed the setting up of a computer based system that would weigh and scan each bar, for the empty packs would not get detected by a normal x-ray machine. He proposed an expenditure of a large amount to put this system into place.

The management heard him out and passed the order to release the funds and to buy the machinery that he had proposed. An uneducated worker said, “Excuse me Sir, for my impertinence, but I have a solution that shall cost a fraction of what you are planning to go in for.”

The management hesitated initially. But eventually they heard him out and agreed to try out his proposal. The next day, the worker brought a strong industrial fan. He put it at an angle near the conveyor belt on which the packed soap bars were coming through and switched it on. The few empty wrappers that came through got blown off by the fan! The rest of them went past easily.

A simple solution, for a complex problem! This goes to prove that ideas are not the monopoly of the educated.

Thursday, 31 January 2013

The Painting on the wall



There was a king who was a great admirer of art. One day an artist came and said to the king, “Oh King! Give me a blank wall in your palace and let me paint a picture on it.”

The artist was given the job. Just then, another young man said, “Oh King! Please allow me to work on the opposite wall. I too am an artist.”  The king said, “What would you like to make?” The man said, “My Lord, I shall make exactly what that man will make on the opposite wall. Moreover, I shall do so, without looking at his work. I would even request you to have a thick curtain put up between the two walls so that either of us cannot see the other.”

Everyone in the king’s court, including the king was intrigued. He decided to give the young fellow a chance. The following day a thick curtain was put into place and both the artists got to work. The first artist brought in a regular supply of paint, oil, water etc. The second one worked with some cloth and a bucket of water. After a month the first artist told the king that his work was complete. The king sent for the second artist and asked him, “Young man, when would your work be ready? I am coming to see the first wall this evening.” The man said, “My Lord, my wall is ready too!”

The king went to see the first artist’s wall. He was very, very impressed with the painting and gave a hefty sum as a reward to the artist. He then asked for the curtain to be opened up. Lo and behold! The same painting was to be seen on the opposite wall too! Amazing! But true! Each line, each minor detail was exactly as it was on the first wall. But this man had not been seeing what was going on, on the other side of the curtain. So how had he done it?
The king wanted to know the secret. He gave a double reward to the fellow. Then he said, “Young man, I am indeed very happy with your work. But you must tell me; how did you do it?”
The lad said simply, “It’s very easy! I just polished the wall every day till it shone like a mirror!” It was a wall made of white marble! The reflection of the painting across the room, showed up in it!

That is what it means to polish yourself. World is a reflection of you. Whatever you are, the world will seem to be that too. If you are happy, the world will look to be happy. If you are sad; jealous; angry; restless... that is what the world will seem to be to you!

Answer it!!!!


1. 
Which is true about an anonymous inner class?
A.It can extend exactly one class and implement exactly one interface.
B.It can extend exactly one class and can implement multiple interfaces.
C.It can extend exactly one class or implement exactly one interface.
D.It can implement multiple interfaces regardless of whether it also extends a class.


2. 
class Boo 
{
    Boo(String s) { }
    Boo() { }
}
class Bar extends Boo 
{
    Bar() { }
    Bar(String s) {super(s);}
    void zoo() 
    {
    // insert code here
    }
}
which one create an anonymous inner class from within class Bar?
A.Boo f = new Boo(24) { };
B.Boo f = new Bar() { };
C.Bar f = new Boo(String s) { };
D.Boo f = new Boo.Bar(String s) { };


3. 
Which is true about a method-local inner class?
A.It must be marked final.
B.It can be marked abstract.
C.It can be marked public.
D.It can be marked static.


4. 
Which statement is true about a static nested class?
A.You must have a reference to an instance of the enclosing class in order to instantiate it.
B.It does not have access to nonstatic members of the enclosing class.
C.It's variables and methods must be static.
D.It must extend the enclosing class.


5. 
Which constructs an anonymous inner class instance?
A.Runnable r = new Runnable() { };
B.Runnable r = new Runnable(public void run() { });
C.Runnable r = new Runnable { public void run(){}};
D.System.out.println(new Runnable() {public void run() { }});