Sunday, August 28, 2016

About a Stamp 1 - Life of the Prince "Siddhartha"

A plea to the Master to descend from the heaven.

A 12th century painting from Tivamka image house, Polonnaruva.





The gods approached the future Buddha in the heaven of delight (Tusitha) and begged him that the time has come for him to save mankind by descending to earth and attaining Buddhahood, The goods said "O" blessed one, you did not attain the ten perfection from the desire for the glories of Indra or Mara or Brahma or of a mighty emperor, but you fulfilled them for achieving Omniscience o that mankind can be saved.

Thursday, March 10, 2016

How Number Type Conversions works in java?

When an operator combine two or more operands in different number format all the numbers are converted to a common data type before they are combined.



1. If at least one of the operands is type of double others are also converted to double.

2. Else if either of operands is type of float other one is also converted to float.

3. Else if either of operands is type of long other one is also converted to long.

4. Else bothe operands are converted to int.



This is called auto casting.



Eg. When 'A'+2

char values 'A' is converted to the int value 65 and the final result type is int. Result should be 65+2=67.



In java number type conversion is always legal if there is no loss of information.

From byte to short, int, long, float, double.

From short to char, int, long or double.

From int to long or double.



From int to float and From long to float or double conversions are also legal, but they may lose informations.



Double can convert into int or float or byte using casting. But there may be information loss.

Eg. double a=3.7

int b=(int)a



value of b is 3. Whether it is 3.1 ----- 3.9.

Thursday, February 4, 2016

How to create a BIRT report?

Open the Eclipse.
Choose file--new-- Project
Then select Business Intelligence Reporting tools
select report project and click next
Give a name for the report and click finish

Click OK if asked to switch to the report design perspective.

What is String concatenation in java?

You can use + operator to concatenate two Strings.
Eg. String firstName=”Jenny ”;
String lastName= “Peter”;

When we want to get the full name of the person, we can concatenate two Strings firstName and lastName and get the fullName.
fullName=fisrtName+lastName;
or
fullName=”Jenny “+lastName;

When you concatenate a string with another value, that value is converted to String.

Eg. int age=25;
String output =age+” years”;

Now output is “42 years”

Thursday, December 31, 2015

How to install Mongo DB in Fedora?

Steps

  1. curl -o http://downloads.mongodb,org/linux/mongodb-linux-i686-2.6.3.tgz
  2. tar -zxvf mongodb-linux-i686-2.6.3.tgz
  3. mkdir -p mongodb
  4. cp -R -h mongodb-linux-i686-2.6.3/ mongodb  (to create the target folder)
Switch to the root user
mkdir -p /data/db
Create a mongodb.conf file and save it in /etc folder.
Create a folder named "mongodb" in /var/log

Then use below command

mongod --config /etc/mongodb.conf

After then
enter mongo in terminal to work on mongodb.

Monday, November 16, 2015

How to write a simple HTML?

<!Doctype html>
<html>
<head>
<title>This is the first html</title>
</head>
<body>
<h1> Hello World </h1>
<p> Hiiiiiiii, This is the begining of learning HTML </p>
</body>
</html>


Doctype tag describes that this is a html document. This tag helps browser to display webpage correctly.
<html> tag describes that this is html document.
<head> is for the details about the document.
<title> is for page title.
<body> describes the visible page content.
<h1> is for heading
<p> is for paragraph.


You can save above html code as somename.html. You can open it in any browser.
It will display

Hello World

Hiiiiiiii, This is the begining of learning HTML 

Versions of HTML

There have been many versions of HTML from the early days.
HTML in 1991
HTML 2.0 in 1995
HTML 3.2 in 1997
HTML 4.01 in 1999
XHTML in 2000
HTML 5.0 in 2014