Pages

Saturday, February 27, 2021

Java Class

Wednesday, December 21, 2016

java compilation and execution

Java program can be save with an extention .java. It would be the source file which input for the compilation process. After successful of compilation, the class will created.
    Execution process will be run the program which present in the class file.
   Java is a high level programming languague which is user understandable. The language would facilitate to convert the high level to low level languge.

FEATURES:
Java is the platform independent.
Robust
Security

Saturday, October 29, 2016

Servicenow

        servicenow is the cloud based company where web application provide the software as a service to develop the ITIL application.
        Incident, problem and change management.

Wednesday, May 25, 2016

Ionic

Ionic is the frame work use to develop hybrid application for both Android and iOS. It is very user friendly for mobile app developer

Friday, April 29, 2016

Peru vellam

The Teaser of short movie explain about the flood happen in the chennai, Tamil nadu on December 2015. The shooting in progress.



Director : Ramanujam

Actor: Ramanarayana

Camera : Karthikeyan

Music : Remo

Editing : Pannir Selvam




Monday, October 19, 2015

mini version of javascript file


Many javascript file will have two version normal and mini version.

Normal will be understandable where the reader may understand the flow of javascript as per below.

function write()
{
alert("good work fine!!!!!!!!");
}

Some javascript file will be mini version , it would be as

function write()(alert("good work find!!!!!!!!!!");}

Reason behind the release the mini version,

  • find the difference between the normal and mini, it would be enter space will be find in the noraml where as mini will not have
  • because if you use the enter space for every line, it will alocated the character of  \n\r.
  • This character will be take the size of 2kilobyte
  • If you are have 1000 line of code in javascript, then the calcualtion will be

2*1000=2000kb=>2MB.

Let us the consider the user request the website using the noraml version of javascript, unwantedly extra 2mb size of downloading the enter space. It is waste of the data usage for end user.

So, the mini version of any file will be effective and useful of the user's data consumption.

Monday, August 31, 2015

JAXB

It is java in-build function which can help to convert bean to XML and XML to java bean.
It wouldn't expect the external jar for java 1.6 or above.
It is the XML format of parent and child tag.
for example,


<name>siva</name>
<age>age10</age>
<mark>
      <english> 99</english>
       <tamil>88</tamil>
</mark>

JAVAXML to OBJECT:-


try {
            JAXBContext context = JAXBContext.newInstance(Student.class);
            Unmarshaller un = context.createUnmarshaller();
            Student std= (Student) un.unmarshal(new File(FILE_NAME));
            System.out.println(emp);
        } catch (JAXBException e) {
            e.printStackTrace();
        }


OBJECT to JAVAXML:-

 try {
            JAXBContext context = JAXBContext.newInstance(Student.class);
            Marshaller m = context.createMarshaller();
            m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
            m.marshal(emp, new File(FILE_NAME));
        } catch (JAXBException e) {
            e.printStackTrace();
        }

Monday, January 5, 2015

Arithmetic operation for given input string values as equation

package com;

import java.util.Scanner;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;

public class Equation {

static Scanner s = new Scanner(System.in);

public static void main(String[] args) throws NullPointerException,
ScriptException {

String eq = null;

Scanner s = new Scanner(System.in);
System.out.println("enter the equation");
eq = s.nextLine();
char[] aa = eq.toCharArray();
String bb = new String();

for (int i = 0; i < aa.length; i++) {
if (aa[i] != '+' & aa[i] != '-' & aa[i] != '*' & aa[i] != '/'
& Character.isDigit(aa[i]) == false) {
bb = bb.concat(String.valueOf(insert(aa[i])));

}

else {
bb = bb.concat(String.valueOf(aa[i]));

}
}
System.out.println(bb);

ScriptEngineManager mgr = new ScriptEngineManager();
ScriptEngine engine = mgr.getEngineByName("JavaScript");
System.out.println("Result : "+engine.eval(bb));

}

private static int insert(char val) {

int a;
System.out.println("Enter the value of " + val + ": ");
a = s.nextInt();
return a;

}
}



OUTPUT:-

enter the equation
a*x+y*3+z*2
Enter the value of a: 
4
Enter the value of x: 
3
Enter the value of y: 
2
Enter the value of z: 
2
4*3+2*3+2*2
Result : 22.0

Monday, December 22, 2014

java program to display rhombus using the star key (*)

public class Star {

public static void main(String[] args) {               

                int i,j,space,rows=5,k=0;
   
   for(i=1;i<=rows;++i)
   {
       for(space=1;space<=rows-i;++space)
       {
          System.out.print("  ");
       }
       while(k!=2*i-1)
       {
          System.out.print("* ");
          ++k;
       }
       k=0;
       System.out.print("\n");
       
   }
   
   for(i=rows-1;i>=1;--i)
   {
       for(space=0;space
          System.out.print("  ");
       for(j=i;j<=2*i-1;++j)
         System.out.print("* ");
       for(j=0;j
           System.out.print("* ");
       System.out.print("\n");
   }
   
}
}  



output:



        * 

      * * * 
    * * * * * 
  * * * * * * * 
* * * * * * * * * 
  * * * * * * * 
    * * * * * 
      * * * 
        * 

Friday, December 19, 2014

Java program to find the duplicate element in the given string sentences and its count.

import java.util.HashSet;
public class DuplicateElement 
{
 public static void main(String a[])
{
    String Str="welcome to program";
        DuplicateElement dcs = new DuplicateElement();
        for (String retval: Str.split("\\s", 0))
        {
        dcs.duplicate(retval);
         }
  }
 public static void duplicate(String str)
    {
    char[] chrs = str.toCharArray();
    HashSet s=new HashSet();
    for(int i=0;i
    {
    if(!s.add(chrs[i]))
    {
   System.out.println("The duplicate element contain in the word : "+str);
    System.out.println("and its count is : "+str.length());
    }
    }
   
    }
}

Monday, November 24, 2014

SQL Injection

It is type of attack perform in the online web application in order to get the admin access without entering the credential for authentication.
It can happen because of improper validation in client and server side.
For Client side, java-script will help to validate the input data from the end user. After travel through the network, it can be validate in the server side using PL SQL.
T
Type the character as mentioned below in the field of log in username and password.

'
admin'
admin' or '1'=='1
admin' or 1==1--

The result for injecting the sql will execute the query to produce the error for back end or successful authentication occurs.

Thursday, August 28, 2014

Java Program for Floyd's triangle


Program:-

class Floyd {
public static void main(String args[]) {
int num = 1, c, d;
System.out.println("Floyd's triangle :-");
for (c = 1; c <= 4; c++) {
for (d = 1; d <= c; d++) {
System.out.print(num + " ");
num++;
}
System.out.println();
}
}
}


Output:


Floyd's triangle :-
1
2 3
4 5 6
7 8 9 10

Wednesday, August 6, 2014

Fabricators In Delhi | Supplier of Steel Doors Windows | Fabricatorsindelhi.com


We are one of Top Fabricators in Delhi
and NCR . Leveraging to the vast experience, NEW KALKAJI STEEL has marked its distinctive place in the domain of manufacturer and supplier of

, Gates, Grills, Railling, Rolling Shutter, Boundry Wall Raillings,Fiber Shade,Heavy North Star Shade,Steel Drain Cover etc .
Being registered with ROF, GST, CST, ST, PF, ESI, etc, the company is thoroughly committed towards delivering the consistent quality products to the clients. Located in New Delhi(Delhi), the company is known as the foremost Manufacturer and Supplier in India.
We also deal in Factory shade, Heavy structure and all type iron and ss work in-house, factory, farm houses etc.

We provide services in all over Delhi and NCR.
Our products serve the diverse purposes and thus are used in Pharmaceuticals, Chemical Drugs, Dies,
Air Conditioning, Power Plants, Chemical Plants, Petrochemical Plants, Petroleum Refineries, etc.
We firmly believe in developing a strong bond with the clients by providing them the unmatched products. Our chief motto is to gratify the esteemed clients to their full extent. The success of our company largely depends upon the trust of the clients in our venture.
Specialization :-
(a)Fiber Shade
(b)Stainless Steel Gate
(c) Backside covering
More Details contact us at +91-9312408169 / 8586911805 email:- newkalkajisteel@gmail.com

Sunday, May 18, 2014

Heap Graph Based Software Theft Detection



Objective:
The objective of the project is our birthmark system brings to the industry a practical solution to protect their intellectual property right. Although software birthmark is a relatively new and less focused research area for the time being.

Features:

  •  A dynamic birthmark is one that is extracted when the program is executing.
  •  It also gives the definition of graph isomorphism as follows.
  • JavaScript Heap Profiler
  • Graph Generator and Filter

Scope of Project:
The scope of the project is to proposed a robust heap graph based software birthmark system for JavaScript programs and against reference injection attacks and streamlined every process of the system to make it scalable

Limitations:

  • There are 3 kinds of potential attacks to our birthmark system
  • The attacker can inject objects or references that are of no use into the program. There will be addition nodes and edges on the resulting heap graph
  • The attacker can purposely remove classes or references from the program. The resulting heap graph will have some nodes and edges missing
  • Class refactoring refers to the process of restructuring classes. It is commonly used to improve the design of object oriented programs.


Abstract:
As JavaScript is becoming more and more popular, JavaScript programs are valuable assets to many companies. However, the source code of JavaScript programs can be easily obtained and plagiarism of JavaScript programs is a serious threat to the industry. There are techniques like code obfuscation and watermarking which can make the source code of a program difficult to understand by humans and prove the ownership of the program. However, code obfuscation cannot avoid the source code being copied and a watermark can be defaced. In this paper, we use a relatively new technique, software birthmark, to help detect code theft of JavaScript programs. A birthmark is a unique characteristic a program possesses that can be used to identify the program. We extend two recent birthmark systems that extract the birthmark of software from the run-time heap. We propose a redesigned system with improved robustness and performed extensive experiments to justify the effectiveness and robustness of it. Our evaluation based on 200 large-scale websites showed that our birthmark system exhibits 100% accuracy. We remark that it is solid and ready for practical use.

Monday, March 17, 2014

Simple Socket program in java


 DATA CLIENT:

package soc;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.Socket;

import javax.swing.JOptionPane;

/**
 * Trivial client for the date server.
 */
public class DateClient {

    /**
     * Runs the client as an application.  First it displays a dialog
     * box asking for the IP address or hostname of a host running
     * the date server, then connects to it and displays the date that
     * it serves.
     */
    public static void main(String[] args) throws IOException {
        String serverAddress = JOptionPane.showInputDialog(
            "Enter IP Address of a machine that is\n" +
            "running the date service on port 9090:");
        Socket s = new Socket(serverAddress, 9090);
        BufferedReader input =
            new BufferedReader(new InputStreamReader(s.getInputStream()));
        String answer = input.readLine();
        JOptionPane.showMessageDialog(null, answer);
        System.exit(0);
    }
}


DATE SERVER

package soc;

import java.io.IOException;

import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Date;

/**
 * A TCP server that runs on port 9090.  When a client connects, it
 * sends the client the current date and time, then closes the
 * connection with that client.  Arguably just about the simplest
 * server you can write.
 */
public class DateServer {

    /**
     * Runs the server.
     */
    public static void main(String[] args) throws IOException {
        ServerSocket listener = new ServerSocket(9090);
        try {
            while (true) {
                Socket socket = listener.accept();
                try {
                    System.out.println("dateserver is started.........");
                    PrintWriter out =
                        new PrintWriter(socket.getOutputStream(), true);
                   out.println(new Date().toString()+"welcome");
     
                } finally {
                    socket.close();
                }
            }
        }
        finally {
            listener.close();
        }
    }
}

Saturday, February 22, 2014

c program for factorial of given number

PROGRAM:

#include
#include
void main()
{
int a,fact=1,i;
printf("\nEnter the number:  ");
scanf("%d",&a);
for(i=1; i<=a;i++)
{
fact=fact*i;
}
printf("The factorial of %d is %d",a,fact);
 getch();
}


OUTPUT:






EXPLANATION:


The above program will the multiply the each iteration with previous iteration until the give number

c program for sum of digits

PROGRAM:

#include
#include
void main()
{
int a,sum=0,k;
printf("\nEnter the number:  ");
scanf("%d",&a);
while(a>10)
{
       k=a%10;
       sum=sum+k;
       a=a/10;
      
}
sum=sum+a;
 printf("%d",sum);
 getch();
}


OUTPUT:




EXPLANATION:


This program has simple logic

If you given number is 345

Then it can be divide by 10  and gave by reminder as 5, it can be add with the variable of sum,

The quotient value 34 can store again the variable of a,

The while loop can be continue until the value of a <10 p="">
The finial quotient value will be less than 10, it should add with the sum.


Tuesday, January 21, 2014

xerago interview question


1.      The percentage increase in the area of a rectangle, if each of its sides is increased by 20% is:
40%
42%
44%
46%
Answer: Option C

2.      Choose the alternative which is closely resembles the mirror image of the given combination.


1
2
3
4
Answer: Option A




3.      Choose the alternative which is closely resembles the water-image of the given combination.

1
2
3
4
4.      Statements: No women teacher can play. Some women teachers are athletes.
Conclusions:
1.      Male athletes can play.
2.      Some athletes can play.
Only conclusion I follows


Only conclusion II follows

Either I or II follows

Neither I nor II follows

Both I and II follow





Answer: Option D
Explanation:
Since one premise is negative, the conclusion must be negative. So, neither conclusion follows.

5.      If A + B means A is the brother of B; A x B means A is the son of B; and A % B means B is the daughter of A then which of the following means M is the maternal uncle of N?
M + O x N
M % O x N + P
M + O % N
None of these
Answer: Option D
Explanation: Because the sex of O is not known.
 
6.      Pointing to a photograph. Bajpai said, "He is the son of the only daughter of the father of my brother." How Bajpai is related to the man in the photograph?
Nephew
Brother
Father
Maternal Uncle
Answer: Option D
Explanation: The man in the photo is the son of the sister of Bajpai. Hence, Bajpai is the maternal uncle of the man in the photograph. 

7.      Rasik walked 20 m towards north. Then he turned right and walks 30 m. Then he turns right and walks 35 m. Then he turns left and walks 15 m. Finally he turns left and walks 15 m. In which direction and how many metres is he from the starting position?
15 m West
30 m East
30 m West
45 m East
Answer: Option D

8.      A family consists of two grandparents, two parents and three grandchildren. The average age of the grandparents is 67 years, that of the parents is 35 years and that of the grandchildren is 6 years. What is the average age of the family?
28 
4
years
7
31 
5
years
7
32 
1
years
7
None of these
Answer: Option B
Explanation:
Required average
=
67 x 2 + 35 x 2 + 6 x 3
2 + 2 + 3

=
134 + 70 + 18
7

=
222
7

= 31 
5
years.
7

9.      On what dates of April, 2001 did Wednesday fall?
1st, 8th, 15th, 22nd, 29th
2nd, 9th, 16th, 23rd, 30th
3rd, 10th, 17th, 24th
4th, 11th, 18th, 25th
Answer: Option D
Explanation:
We shall find the day on 1st April, 2001.
1st April, 2001 = (2000 years + Period from 1.1.2001 to 1.4.2001)
Odd days in 1600 years = 0
Odd days in 400 years = 0
Jan. Feb. March April
(31 + 28 + 31 + 1)     = 91 days 0 odd days.
Total number of odd days = (0 + 0 + 0) = 0
On 1st April, 2001 it was Sunday.
In April, 2001 Wednesday falls on 4th, 11th, 18th and 25th.

10.  Choose the word which is different from the rest.
. Hangar
Platform
Dock
Park
Bus stand
Answer: Option D
Explanation: All except Park are halting places of various transport means.

11.  Choose the word which is different from the rest.
Deck
Quay
Stern
Bow
Mast


Answer: Option B
Explanation:All except Quay are parts Of a ship.

12.  To catch a tartar
To trap wanted criminal with great difficulty
To catch a dangerous person
To meet with disaster
To deal with a person who is more than one's match
None of these
Answer: Option B

13.  AFTER:BEFORE
first:second
present:past
contemporary:historic
successor:predecessor
Answer: Option D