Difference Between OOP and POP

Mahesh Parahar
Updated on 27-Nov-2019 07:04:54

23K+ Views

OOPOOP, refers to Object Oriented Programming and its deals with objects and their properties. Major concepts of OOPs are −Class/objectsAbstractionEncapsulationPolymorphismInheritancePOPPOP, refers to Procedural Oriented Programming and its deals with programs and functions. Programs are divided into functions and data is global.Following are the important differences between OOP and POP.Sr. No.KeyOOPPOP1DefinitionOOP stands for Object Oriented Programing.POP stands for Procedural Oriented Programming.2ApproachOOP follows bottom up approach.POP follows top down approach.3DivisionA program is divided to objects and their interactions.A program is divided into funtions and they interacts.4Inheritance supportedInheritance is supported.Inheritance is not supported.5Access controlAccess control is supported via access modifiers.No access modifiers are ... Read More

Difference Between MD5 and SHA1

Mahesh Parahar
Updated on 27-Nov-2019 06:55:02

1K+ Views

MD5 and SH1 are hashing algorithms. MD5 is much faster than SH1Following are the important differences between MD5 and SH1.Sr. No.KeyMD5SH11DefinitionMD5 stands for Message Digest.SHA stands for Secure Hash Algorithm.2Supported LengthMD5 can have 128 bits length of digest message.SHA can have 160 bits length of digest message.3SpeedMD5 is faster than SHA.SHA is slower than MD5.4ComplexityMD5 is simple than SHA.SHA is quiet complex than MD5.5SecurityMD5 provides poor security.SHA provides balanced security.6Crack CodeIf one want to seek two messages having same identical message digest, 264 operations to be performed.If one want to seek two messages having same identical message digest, 280 operations ... Read More

Difference Between UMA and NUMA

Mahesh Parahar
Updated on 26-Nov-2019 12:20:48

11K+ Views

UMA and NUMA are shared memory models. Multiprocessors are divided among these type of categories. In UMA, Uniform Memory Access, a single memory controller is used and it is applicable for general purpose applications and time sharing applications. In NUMA, Non-Uniform Memory Access, multi memory controllers are used. NUMA is suitable for real-time applications and time critical applications.Following are the important differences between UMA and NUMA.Sr. No.KeyUMANUMA1DefinitionUMA stands for Uniform Memory Access.NUMA stands for Non Uniform Memory Access.2Memory ControllerUMA has single memory controller.NUMA has multiple memory controllers.3Memory AccessUMA memory access is slow.NUMA memory accsss is faster than UMA memory.4BandwidthUMA has ... Read More

Differences Between getc, getchar, getch and getche Functions

Mahesh Parahar
Updated on 26-Nov-2019 10:42:58

1K+ Views

All of these functions are used to get character from input and each function returns an integer signifying the status code as well.Following are the important differences between getc(), getchar(), getch() and getche() functions.getc()getc() can read characters from any stream. Returns EOF on failure.Syntaxint getc(FILE *stream);getchar()getchar() can read characters from standard input only.Syntaxint getchar();getch()getch() can read characters from standard input but it does not use any buffer and returns immidately without waiting for enter key pressed.Syntaxint getch();getche()getche() behaves similar to getch() as it can read characters from standard input and it does not use any buffer and returns immidately without ... Read More

Add Shadow and Border on Circular ImageView in Android

Azhar
Updated on 26-Nov-2019 09:59:21

885 Views

This example demonstrates how to add a shadow and a border on circular imageView androidStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         Step 3 − Add the following code to src/MainActivity.javapackage com.app.sample; import androidx.appcompat.app.AppCompatActivity; import androidx.core.graphics.drawable.RoundedBitmapDrawable; import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory; import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.RelativeLayout; import android.os.Bundle; public class MainActivity extends AppCompatActivity ... Read More

Bind Data from Database to Android Checkbox in ListView

Azhar
Updated on 26-Nov-2019 09:55:30

900 Views

This example demonstrates how to bind data from a database to an Android CheckBox in a ListView.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     Step 3 − Add the following code to res/layout/row_item.xml.         Step 4 − Add the following code to src/MainActivity.javapackage com.app.sample; import androidx.appcompat.app.AppCompatActivity; import android.view.View; import android.widget.AdapterView; import android.widget.ListView; import java.util.ArrayList; import android.os.Bundle; public class MainActivity extends AppCompatActivity {    ArrayList dataModels;    ListView ... Read More

Justify Text in TextView in Android

Azhar
Updated on 26-Nov-2019 09:45:20

785 Views

This example demonstrates how to Justify Text in TextView on Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     Step 3 − Add the following code to res/layout/list_item.xml             Step 4 − Add the following code to src/MainActivity.javapackage com.app.sample; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.os.Bundle; import java.util.ArrayList; import java.util.List; public class MainActivity extends AppCompatActivity {    private final String TAG = "MainActivity";    private ... Read More

Detect User Inactivity for 5 Seconds in Android

Azhar
Updated on 26-Nov-2019 09:37:18

1K+ Views

This example demonstrates how to detect user inactivity for 5 seconds in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     Step 3 − Add the following code to src/MainActivity.javapackage com.app.sample; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.os.Handler; import android.widget.Toast; public class MainActivity extends AppCompatActivity {    Handler handler;    Runnable r;    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       setContentView(R.layout.activity_main);       handler = ... Read More

Scale Image in ImageView to Keep Aspect Ratio in Android

Azhar
Updated on 26-Nov-2019 08:15:19

1K+ Views

This example demonstrates how to scale an Image in ImageView to keep the aspect ratio in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     Step 3 − Add the following code to src/MainActivity.javapackage com.app.sample; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.widget.ImageView; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       setContentView(R.layout.activity_main);       ImageView my_image = (ImageView) findViewById(R.id.my_image);   ... Read More

Support Different Screen Sizes in Android

Azhar
Updated on 26-Nov-2019 08:12:25

1K+ Views

This example demonstrates how to support different screen sizes in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         Step 3 − Add the following code to src/MainActivity.javapackage com.app.sample; import androidx.appcompat.app.AppCompatActivity; import android.util.DisplayMetrics; import android.widget.TextView; import android.os.Bundle; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       setContentView(R.layout.activity_main);       DisplayMetrics metrics = new DisplayMetrics();       ... Read More

Advertisements