Skip to main content

Posts

Featured post

Tennis-Paddle game

Recent posts

interface and interface collections in java

Interfaces: Interface in Java refers to the abstract data types. They allow Java collections to be manipulated independently from the details of their representation. Also, they form a hierarchy in object-oriented programming languages. As you have already learnt about Abstract methods and abstract classes and how they are implemented. The main difference between an abstract class and an interface is that in an abstract class there exists at least one abstract method. On the other hand, an interface consists of all the methods as abstract. Here, by abstract we mean that the methods are unimplemented.We all know that multiple inheritance is not supported in java. This is because of the conflicts that might arise when both the parent classes are having the same variable declarations. This makes it hard for the child class to infer which class the particular variable or the method belongs.Even though it is said that Java directly doesn’t support multiple inheritance, it might support the…

Logging levels and Resources in Android

Logging and Resources in Android
In these series of posts, we are going to learn about the Android permission system, Network IO and how to move time consuming tasks off the main UI thread. In this post we will learn about the logging levels in android and the use of Resources directory in Android.
Logging:
Whenever you run an application, you might have seen a window pop up showing different messages like “A slow app needing to skip frames” or “An Error occurred” or perhaps “Some request or process finished”. These messages are called Log Messages. Developers use log messages to communicate information about their application. When you use logs in your app, you must declare the log level that your app must use.




There are 5 log levels in Android:
·ERROR: Use error to log any error messages·WARN: Use warn to log messages that wont crash your app but remain a concern.·INFO: Info is mainly used to log informative messages like “CONNECED TO THE INTERNET”.·During development, we can use both d…

What’s the difference between AngularJS, Angular2 and Angular4?

One question that often comes out is “What is the basic difference between AngularJS, Angular 2 and Angular 4 and how to jump from Angular 2 to Angular 4?”


Angular JS was introduced in 2010 as a JavaScript framework for building client side single page web applications. So it gained popularity and the Angular team at google started to add some more features to the core. But the framework was not designed with the needs of today’s applications in mind and moreover it was totally complex. So the Angular team decided to rewrite the entire framework using TYPESCRIPT and as a result Angular 2 was released in mid 2016. The new Angular framework is completely different from the previous version and we can think of it as a completely different framework compared to the earlier one.

The decision was frustrating to most of the developers since a lot of applications have been designed using AngularJS. I personally liked the direction that Angular developers took in rewriting the entire framework a…

ANGULAR-2

Angular JS is an open source framework built on JavaScript. It was built by the
developers at Google. This framework was used to overcome obstacles encountered while
working with Single Page applications. Also, testing was considered as a key aspect while
building the framework. It was ensured that the framework could be easily tested. The
initial release of the framework was in October 2010.

Features of Angular 2:Components: The earlier version of Angular had a focus of Controllers but now has changed the focus to having components over controllers. Components help to
build the applications into many modules. This helps in better maintaining the
application over a period of time.

TypeScript: The newer version of Angular is based on TypeScript. This is a
superset of JavaScript and is maintained by Microsoft.

Services: Services are a set of code that can be shared by different components
of an application. So for example, if you had a data component that picked data
from a database, you …

what Is Big Data?

OverView:

“90% of the world’s data was generated in the last few years.”
Due to the advent of new technologies, devices, and communication means like social networking sites, the amount of data produced by mankind is growing rapidly every year. The amount of data produced by us from the beginning of time till 2003 was 5 billion gigabytes. If you pile up the data in the form of disks it may fill an entire football field. The same amount was created in every two days in 2011, and in every ten minutes in 2013. This rate is still growing enormously. Though all this information produced is meaningful and can be useful when processed, it is being neglected.

What is Big Data?

Big Data is a collection of large datasets that cannot be processed using traditional computing techniques. It is not a single technique or a tool, rather it involves many areas of business and technology.

Thus Big Data includes huge volume, high velocity and an extensible variety of data. The data in it will be of three…

Efficiency of an algorithm

Efficiency of an algorithm
Programmers find a tough time writing efficient code. But what exactly do we mean by efficiency? What difference does it make if we write normal code instead of an efficient code? Let’s find out with a simple example of traditional sorting problem.


The first, known as insertion sort, takes time roughly equal to c1*n2 to sort n items, where c1 is a constant that does not depend on n. That is, it takes time roughly proportional to n2. The second, merge sort, takes time roughly equal to c2*n lg n, where lg n stands for log2 n and c2 is another constant that also does not depend on n. Insertion sort usually has a smaller constant factor than merge sort, so that c1 < c2. We shall see that the constant factors can be far less significant in the running time than the dependence on the input size n.


    Where merge sort has a factor of lg n in its running time, insertion sort has a factor of n, which is much larger. Although insertion sort is usually faster than mer…