Translate

Tuesday 20 May 2014

Difference Between Applet And Swing



Swing
Applet
Swing have its own Layout like most popular Box Layout.
Applet uses AWT Layouts like flowlayout.

Swing have look and feel according to user view you can change look and feel using UIManager.
Applet Does not provide this facility.

Swing have some Thread rules.
Applet doesn't have any rule.

Swing is light weight Component.
Applet is heavy weight Component.

Swing uses for stand lone Applications, Swing have main method to execute the program.
Applet need HTML code for Run the Applet.

Swing uses MVC Model view Controller.
Applet not.

To execute Swing no need any browser By which we can create stand alone application But Here we have to add container and maintain all action control with in frame container.
To execute Applet programe we should need any one browser like Appletviewer, web browser. Because Applet using browser container to run and all action control with in browser container.


Wednesday 9 April 2014

Difference Between Call By Value And Call By Reference

Call By Value:-

      call by value passes the copy of the variable to the function that process it

      Let’s take a look at a call by value example:
  
#include <stdio.h>
#include<conio.h>
 
void call_by_value(int x) 
{
       printf("Before adding 10 x = %d .\n", x);
       x=x+10;
       printf("After adding 10 x = %d.\n", x);
}
 
void main() 
{
  int a=10;
  clrscr();
  printf("a = %d before function call_by_val.\n",a);
  call_by_value(a); 
  printf("a = %d after function call_by_val.\n",a);
  getch();
}



Call By Reference:-

    call by reference passes the memory reference of the variable (pointer)
    to the function. 
Let’s take a look at a code example:
#include <stdio.h>
#include<conio.h>
 
void call_by_reference(int *y) 
{
      printf("Before adding 10 y = %d .\n", *y);
      (*y) += 10;
      printf("After adding 10 y = %d .\n", *y);
}
 
void main() 
{
      int b=10;
      clrscr();
      printf("b = %d before function call_by_ref.\n",b);
      call_by_reference(&b);
      printf("b = %d after function call_by_ref.\n",b);
}

Differences Between Java And C++

Differences between Java and C++ are:

Java
C++
Java is a true and complete object oriented language.
C++ is an extension of C with object oriented behavior. C++ is not a complete object oriented language as that of Java.
Java does not provide template classes.
C++ offers Template classes.
Java supports multiple inheritance using interface.
C++ achieves multiple inheritance by permitting classes to inherit from multiple classes.
Java does not provide global variables.
Global variables can be declared in C++.
Java does not support pointers.
C++ supports pointers.
In Java, destruction of objects is performed in finalize method.
In C++, destruction of objects is performed by destructor function.
Java doesn’t provide header files.
C++ has header files.


Differences Between C And C++

Basic Introduction:

·                     C++ is derived from C Language. It is a Superset of C. 
·                     Earlier C++ was known as C with classes. 
·                     In C++, the major change was the addition of classes and a mechanism for inheriting class objects into other classes. 
·                     Most C Programs can be compiled in C++ compiler. 
·                     C++ expressions are the same as C expressions. 
·                     All C operators are valid in C++. 





                               C
                              C++
1. C is Procedural Language.
1. C++ is non Procedural i.e Object oriented Language.
2. No Following are the differences Between C and C++ :
virtual Functions are present in C
2. The concept of virtual Functions are used in C++.
3. In C, Polymorphism is not possible.
3. The concept of polymorphism is used in C++.
Polymorphism is the most Important Feature of OOPS.
4. Operator overloading is not possible in C.
4. Operator overloading is one of the greatest Feature of C++.
5. Top down approach is used in Program Design.
5. Bottom up approach adopted in Program Design.
6. No namespace Feature is present in C Language.
6. Namespace Feature is present in C++ for avoiding Name collision.
7. Multiple Declaration of global variables are allowed.
7. Multiple Declaration of global varioables are not allowed.
8. In C
·                     scanf() Function used for Input.
·                     printf() Function used for output.
8. In C++
·                     Cin>> Function used for Input.
·                     Cout<< Function used for output.
9. Mapping between Data and Function is difficult and complicated.
9. Mapping between Data and Function can be used using "Objects"
10. In C, we can call main() Function through other Functions
10. In C++, we cannot call main() Function through other functions.
11. C requires all the variables to be defined at the starting of a scope.
11. C++ allows the declaration of variable anywhere in the scope ie at time of its First use.
12. No inheritance is possible in C.
12. Inheritance is possible in C++
13. In C, malloc() and calloc() Functions are used for Memory Allocation and free() function for memory Deallocating.
13.In C++,  new and delete operators are used for Memory Allocating and Deallocating.
14. It supports built-in and primitive data types.
14. It support both built-in and user define data types.
15. In C, Exception Handling is not present.
15. In C++, Exception Handling is done with Try and Catch block.


Saturday 5 April 2014

Microsoft Word Shortcut Keys



Microsoft Word Shortcut Keys

The followings are shortcut keys and mouse shortcuts that can be used for Microsoft Word
Use at your own risk.

Mouse shortcuts

Shortcut
Description
Double-click (on a word)
Select the word.
Single-click (anywhere in a sentence) + Holding CTRL
Select the entire sentence.
Triple-click (anywhere in a paragraph)
Select the entire paragraph.
Click, hold, drag, then release
Select text from the click position to release position.
Click first position, hold SHIFT key, then click 2nd position
Select text from the 1st position to the 2nd position.
Hold ALT key, then click and drag
Vertical select text.
Hold CTRL key, then scroll wheel
Zoom in/out.

Keyboard shortcuts

Shortcut
Description
Ctrl + A
Select all (including text, graphics).
Ctrl + B
Bold.
Ctrl + I
Italic.
Ctrl + U
Underline.
Ctrl + C
Copy.
Ctrl + V
Paste.
Ctrl + X
Cut.
Ctrl + F
Find.
Ctrl + Z
Undo.
Ctrl + Y
Redo.
Ctrl + P
Open the print dialog.
Ctrl + K
Insert link.
Ctrl + L
Left align.
Ctrl + E
Center align.
Ctrl + R
Right align.
Ctrl + M
Indent.
Ctrl + (left arrow)
Moves one word to the left.
Ctrl + (right arrow)
Moves one word to the right.
Ctrl + (up arrow)
Moves cursor to the beginning of the paragraph.
Ctrl + (down arrow)
Moves cursor to the end of the paragraph.
Ctrl + Shift + F
Change font.
Ctrl + Shift + *
View/hide non-printing characters.
Ctrl + Del
Deletes word to the right of cursor.
Ctrl + Backspace
Deletes word to the left of cursor.
Ctrl + End
Moves cursor to the end of document.
Ctrl + Home
Moves cursor to the beginning of document.
Ctrl + Spacebar
Reset highlighted text to the default font.
Ctrl + 1
Single-space.
Ctrl + 2
Double-space.
Ctrl + 5
1.5-line.
Ctrl + Alt + 1
Format text: heading 1.
Ctrl + Alt + 2
Format text: heading 2.
Ctrl + Alt + 3
Format text: heading 3.
F1
Help.
F4
Repeat the last action
F5
Go to .
F7
Spelling and grammar.
F12
Save as.
F8 then (left arrow)
Increase selection to the left by one character
F8 then (right arrow)
Increase selection to the right by one character
Ctrl + F1
Task Pane.
Ctrl + F2
Print preview.
Alt + Ctrl + F2
New document.
Shift + F3
Cycle between capitalized formats
Ctrl + Insert
Copy.
Shift + Insert
Paste.
Shift + End
Select from current position to the end of the line.
Shift + Home
Select from current position to the beginning of the line.
Ctrl + Shift + (left arrow)
Select from current position to the beginning of the word.
Ctrl + Shift + (right arrow)
Select from current position to the end of the word.
Ctrl + Shift + (up arrow)
Select from current position to the beginning of the document.
Ctrl + Shift + (down arrow)
Select from current position to the end of the document.
Ctrl + Shift + Page Up
Select from current position to the beginning of the window.
Ctrl + Shift + Page Down
Select from current position to the end of the window.
Shift + Page Up
One screen page up.
Shift + Page Down
One screen page down.
Shift + F7
Thesaurus check selected text.
Shift + F12
Save.
Ctrl + Shift + F12
Print.
Alt + Shift + D
Insert the current date.
Alt + Shift + T
Insert the current time.