Saturday, February 27, 2021
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
Director : Ramanujam
Actor: Ramanarayana
Camera : Karthikeyan
Music : Remo
Editing : Pannir Selvam
Monday, October 19, 2015
mini version of javascript file
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 wouldn't expect the external jar for java 1.6 or above.
It is the XML format of parent and child tag.
for example,
<mark>
<english>
<tamil>88</tamil>
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
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:-
Monday, December 22, 2014
java program to display rhombus using the star key (*)
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.
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 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
Sunday, May 18, 2014
Heap Graph Based Software Theft Detection
- 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
- 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.
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
#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
#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.
10>
Tuesday, February 4, 2014
Tuesday, January 21, 2014
xerago interview question
40%
|
42%
|
||
44%
|
46%
|
![]() |
1
|
2
|
||
3
|
4
|
1
|
2
|
||
3
|
4
|
Only conclusion I follows
|
||||
Only conclusion II follows
|
||||
Either I or II follows
|
||||
Neither I nor II follows
|
||||
Both I and II follow
|
||||
M + O x N
|
M % O x N + P
|
||
M + O % N
|
None of these
|
Nephew
|
Brother
|
||
Father
|
Maternal Uncle
|
15 m West
|
30 m East
|
||
30 m West
|
45 m East
|
|
|
||||||||||
|
None of these
|
Required average
|
|
|||||
|
||||||
|
||||||
|
1st, 8th, 15th,
22nd, 29th
|
2nd, 9th, 16th,
23rd, 30th
|
||
3rd, 10th,
17th, 24th
|
4th, 11th,
18th, 25th
|
(31 + 28 + 31 + 1) = 91 days 0 odd days.
. Hangar
|
|
Platform
|
|
Dock
|
|
Park
|
|
Bus stand
|
Deck
|
Quay
|
||
Stern
|
Bow
|
||
Mast
|
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
|
first:second
|
present:past
|
||
contemporary:historic
|
successor:predecessor
|



