Tuesday, June 21, 2016

Adding a PPA through a proxy server

PPA stands for Personal Package Archive and it is a special software repository for uploading source packages to be built and published as an APT repository by Launchpad.
Simply PPAs are for non standard software or updates. We can find latest software or updates that doesn't normally provided by Ubuntu software center. So people add these PPAs to system in order to use latest softwares. Some times there might be risks of adding PPA.

On the command line you can add a PPA using apt-add-repository,
e.g.: sudo apt-add-repository ppa:strukturag/libde265 

If you are connected to Internet through a proxy server above command will give an error.
e.g.:
Cannot add PPA: 'ppa:strukturag/libde265'. 
Please check that the PPA name or format is correct.

Thursday, June 9, 2016

Serializing objects in java

Serialization is the conversion of an object to a series of bytes, so that the object can be easily saved to persistent storage or streamed across a communication link. The byte stream can then be deserialized - converted into a replica of the original object.

There are few important things that need to be known.

  • In Java, the serialization mechanism is built into the platform, but you need to implement the Serializable interface to make an object serializable.
  • You can also prevent some data in your object from being serialized by marking the attribute as transient.
  • It is important to notice that what gets serialized is the "value" of the object, or the contents, and not the class definition. Thus methods are not serialized.
Here is an example of a Java class that can be that can be instantiate as a serializable object.


import java.io.*;


public class Student implements Serializable {
 public String name;
 public String address;
 public transient int regNumber;
 public int classNumber;
 
 public Student(String name,String add,int regNo,int clsNo){
  this.name=name;
  this.address=add;
  this.regNumber=regNo;
  this.classNumber=clsNo;
 }
 

Sunday, June 5, 2016

What is Activiti and Installing Activiti plugin to eclipse

What is Activiti?? Activiti is a light-weight workflow and Business Process Management (BPM) Platform targeted at business people, developers and system admins.

It helps to build and structure the solutions on business processes.

A business process is defined as a set of activities and tasks that, once completed, will accomplish an organizational goal. Here are some examples for business processes of an organization.
  • A billing process 
  •  A risk management process 
  •  An invoicing process 
  •  An product assembly process 
  •  A quality assurance process
Lets see how to install Activiti plugin on eclipse
  1. click Help -> Install New Software... in eclipse IDE
  2. Click on  Add button to add a new repository
  3. Give Activiti BPMN 2.0 designer as the Name and http://activiti.org/designer/update/ as the Location.

Saturday, June 4, 2016

What are In-Memory Databases and why we need them????

An in-memory database (IMDB) is a database management system that primarily relies on main memory for computer data storage. It is also known as main memory database system (MMDB) or memory resident database.
Traditional database systems are designed to store data on persistent media. But working with a data in memory is much faster than working with persistent medias.
When working with a traditional database system there are disk I/O processes, caching processes. and the following diagram will describe the process of accessing and modifying data with a traditional database.


Why use Hibernate and what is JPA ???

Hibernate is an object-relational mapping framework for the Java language. It provides a framework for mapping an object-oriented domain model to a relational database.
There are some key points about Hibernate

  • It is an ORM (Object Relational Mapping) framework.
  • It implements JPA (Java Persistence API).
    JPA is a set of standards that have been described for implement any persistence in software.


Optimize you working enviorenment : Single command to create & move to a directory in linux (C Shell, Bash)

Usually move to a directory just after creating is bit of a anxious task specially if the directory name is too long. mkdir long-name-of...