Monday, October 23, 2017

why can't you try interviewbit to get a chance in top reputed software companies

You can login to below url and sign up here to get opportunities in top software companies like facebook,google,microsoft,amazon etc. . https://www.interviewbit.com
If you login with above url and get an opportunity with help of interview bit, you will get INR 25000 or $1000 worth of interview bit goodies.

Friday, August 23, 2013

selenium xpath ancestor example

The below codes explains how to use xpath ancestor in your selenium code. I wrote code snippet here in java programming language.
import org.openqa.selenium.By;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class SeleniumAncestorEx2 {
 public static void main(String[] args) {
  WebDriver driver = new FirefoxDriver();
  driver.get("file:///D:\\ancestor.html");
  WebElement element = driver.findElement(By
    .xpath("//div[@id='div4']"));
  String id=element.getAttribute("id"); 
  System.out.println("required element id" + id); 
  element = element.findElement(By.xpath("./ancestor::div[1]")); 
  System.out.println("above one level the parent element id of id \""+id +"\" is :"+element.getAttribute("id"));
  id=element.getAttribute("id"); 
  element = element.findElement(By.xpath("./ancestor::div[1]")); 
  System.out.println("above one level the parent element id of id \""+id +"\" is :"+element.getAttribute("id"));
  id=element.getAttribute("id"); 
  element = element.findElement(By.xpath("./ancestor::div[1]")); 
  System.out.println("above one level the parent element id of id \""+id +"\" is :"+element.getAttribute("id"));
  element = driver.findElement(By.xpath("//div[@id='div4']"));
  id=element.getAttribute("id");
  element = element.findElement(By.xpath("./ancestor::div[3]"));
  System.out.println("outer most parent div element id of id \""+id +"\" is :"+element.getAttribute("id"));
  
 }  
}

<html>
<body>
<div id="div1">
<div id="div2">
<div id="div3">
<table>
<tr>
<td>
<div id="div4">Ancestor Check</div>
</td>
</tr>
</table>
</div>
</div>
</div>
</body>
</html>
you can save the above html content as ancestor.html and refer that in above java code.
Output:
above one level the parent element id of id "div4" is :div3
above one level the parent element id of id "div3" is :div2
above one level the parent element id of id "div2" is :div1
outer most parent div element id of id "div4" is :div1
You can also refer basic example of ancestor in below link
http://softwares-list.blogspot.in/2013/08/selenium-xpath-ancestor-example.html

Thursday, August 22, 2013

selenium xpath ancestor example

The below codes explains how to use xpath ancestor in your selenium code. I wrote code snippet here in java programming language.
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class SeleniumAncestorEx {
 public static void main(String[] args) {
  WebDriver driver = new FirefoxDriver();

  driver.get("file:///D:\\ancestor.html");
  WebElement element = driver.findElement(By
    .xpath("//div[@id='innerDiv1']"));

  System.out.println("inner element id" + element.getAttribute("id"));
  element = element.findElement(By.xpath("./ancestor::div[@id='div1']"));
  System.out.println("ancestor element id  : " + element.getAttribute("id"));
 }
}
<html>
<body>
 <div id="div1">
  <table>
   <tr>
    <td>
     <div id="innerDiv1">Ancestor Check</div>
    </td>
   </tr>
  </table>
 </div>
</body>
</html>
you can save the above html content as ancestor.html and refer that in above java code. After running the above program and observing the output, you can clearly understand the usage.

Sunday, September 23, 2012

Apache Shale Framework

Shale is a modern web application framework, fundamentally based on JavaServer Faces. Architecturally, Shale is a set of loosely coupled services that can be combined as needed to meet particular application requirements. Shale provides additional functionality such as application event callbacks, dialogs with conversation-scoped state, a view technology called Clay, annotation-based functionality to reduce configuration requirements and support for remoting. Shale also provides integration links for other frameworks, to ease development when combinations of technologies are required.

To know more about shale framework , visit the following links.


http://shale.apache.org/documentation.html

http://www.developersbook.com/articles/Shale-framework-introduction.php

http://www.javabeat.net/tips/154-what-is-shale-web-framework.html

http://www.devx.com/java/Article/31419/1763/page/2

http://www.jsfcentral.com/articles/mcclanahan-05-05-2.html



Javassist

Javassist (Java programming assistant) is a load-time reflective system for Java. It is a class library for editing bytecodes in Java; it enables Java programs to define a new class at runtime and to modify a class file before the JVM loads it. Unlike other similar systems, Javassist provides source-level abstraction; programmers can modify a class file without detailed knowledge of the Java bytecode. They do not have to even write an inserted bytecode sequence; Javassist instead can compile a fragment of source text on line (for example, just a single statement).

To know more about Javassist , refer the following links.

http://www.jboss.org/javassist

http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/tutorial/tutorial.html

Friday, July 29, 2011

Mastering Enterprise JavaBeans Third Edition

Published in January 2005, the best-selling book Mastering EJB is now in its third edition and has been updated for EJB2.1 and also features new chapters on security and Web services integration. The book is about EJB concepts, methodology and development. This book also contains a number of advanced EJB topics, giving you a practical and real�world understanding of the subject. By reading this book, you will acquire a deep understanding of EJB.

Book Content in PDF Format
http://www.theserverside.com/books/wiley/masteringEJB/downloads/MasteringEJB3rdEd.pdf 

Source code of the above book
http://www.theserverside.com/books/wiley/masteringEJB/downloads/3eCode.zip

Saturday, September 25, 2010

Spring Rich Client Project(RCP)

The goal of the Spring Rich Client Project (Spring Rich) is to provide a solution for developers that need a platform for constructing high-quality Swing applications quickly.
       To know about Spring RCP more visit the following links

http://www.springsource.org/spring-rcp


http://java.dzone.com/news/spring-rcp-tutorial


http://opensource.atlassian.com/confluence/spring/display/RCP/User+Documentation


http://www.core-dump.ch/stuff/spring-rcp-manual/index.html

Saturday, June 26, 2010

Eclipse 3.5 Galileo Tutorials

If you want to know about Eclipse 3.5 Galileo , and it's important features visit
http://www.vogella.de/eclipse.html .

One of the Javascript Plugin for Eclipse is JSEclipse and through this you can easily develop javascript files in your eclipse IDE.
For JSEclipse Update site   Click Here .

To generate PDF files using Java Programming language we have so many options,but one option is itext.

To know about itext visit the url    http://itextpdf.com/ .
To download all examples related to how to generate different types of pdf files like editable text in pdf
http://itext.svn.sourceforge.net/viewvc/itext/book.tar.gz?view=tar

Request Java Related Jar Files Here

Hi , Request any Jar file related to Java Technology if you are not able to get with in short period,or if you don't want to waste so much time for a jar file,just give complete package with class name  or jar file with what ever details you know and send mail to pavanm.msc@gmail.com with subject as Requesting Jar File,thanks.

Sunday, May 2, 2010

How to Paste Telugu Letters in Ms Word

If you want to paste telugu letters in ms word from some websites like www.eenadu.net,www.sakshi.com and some other newspaper or any telugu content which opened in Internet Explorer(Note : Some fonts in firefox browser does not be able to copy into ms word through this tool what i want to explain) you have to visit
the following url
http://specials.msn.co.in/ilit/Telugu.aspx

To download the required file Click Here
If you want to know about how to use this tool visit the following url
http://specials.msn.co.in/ilit/GettingStarted.aspx?languageName=Telugu&redir=true&postInstall=true#WindowsXP

Wednesday, April 7, 2010

word to pdf converter free download

To convert ms word document file into pdf document we have 1 free software that converts your document into pdf and it supports multiple languages also.

To dowload that software Click Here.

To know about that software visit the following url

http://www.dopdf.com/

Monday, March 29, 2010

Customize Javascript Confirm Box

Main.html
<html>
<head>
<title>
Customized Javascript Confirm Box Example
</title>
<script type="text/javascript">
function doDelete()
{
var returnVal=0;
if(window.showModalDialog)
{
returnVal=window.showModalDialog("YesOrNo.html","name","dialogWidth:455px;dialogHeight:140px");
}
if(returnVal==1)
{
alert("Deletion Succesfully Done");
// write your own functionality here
}
else
{
        alert("Deletion Cancelled");
// write your own functionality here
}
}
</script>
<body>
<font size="5">
<pre>
By clicking the bellow button you can observe customized javascript confirm dialog box
for deleting or some functionality what you require in your application.
                              

                                 <input type="button" value="Delete" onclick="doDelete();" style="font:20px"/>
</font>
</pre>

YesOrNo.html
<html>
<script>
function yesDelete(){
window.returnValue = 1; 
window.close();
return false;
}
function noDelete() {
window.returnValue = 0;  
window.close();
return false;
}
</script>
<body>
<div style="position:relative;left:0px;top:0px;background:#000066;color:#FFFFFF;font-size:20px;font-weight:bold;width:396px;height:25px;padding-left:38px;border-bottom:solid 2px #000000;">Confirm Delete...</div>
<blockquote style="font-size:18px;font-weight:bold;color:#FF0000;margin-top:50px;">Are you sure you wish to Delete this Record?</blockquote>
<div style="width:396px;text-align:center;">
<input type="button" value="    YES    " onclick="yesDelete();"  style="font-weight:bold;margin-right:10px;cursor:pointer;"><input type="button" value="     NO     " style="font-weight:bold;margin-left:10px;cursor:pointer;" onclick="noDelete();">
</div>
</body>
</html>

Both Main.html and YesOrNo.html files should be in the same folder.

Wednesday, March 17, 2010

Basic Servlet Structure

A servlet is a small Java program that runs within a Web server.Servlets receive and respond to requests from Web clients,usually across HTTP, the HyperText Transfer Protocol.

To write a Servlet Class we follow some basic steps.
1.Implement the Servlet interface available in javax.servlet package(javax.servlet.Servlet).
2.The acees speifier for your servlet class must be public.

Syntax:
 public class BasicServlet implements Servlet
 {
                   // Here we have to implement all methods in Servlet inteface.

  }

Methods in Servlet Inteface:

public void init(ServletConfig config) throws ServletException
{

}

By seeing the above method,we easily understand the init(ServletConfig config) always throws ServletException.So we have to handle when we implement our own Servlet class.

An Example to Implement init(ServletConfig config) method with some different syntax
Ex 1:
import javax.servlet.*;
public class SampleServlet implements Servlet
{
       public void init(ServletConfig config)
       {
                  try
                 {
                         //your code

                  }
                  catch(ServletException se)  { se.printStackTrace(); }
        }

// implement remaining all methods availabe in Servelt interface with some code to properly compile the java file
}

Ex 2:
import javax.servlet.*;
public class SampleServlet implements Servlet

{
       public void init(ServletConfig config) throws ServletException
       {

                    // your code
       }
// implement remaining all methods availabe in Servelt interface with some code to properly compile the java file

}

By seeing the above two examples,it is clear that when ever we write init(ServletConfig config) method ,it is not necessary to declare throws ServletException for inti(ServletConfig config) method.
    For informing the ServeltContainer to say initilization failed we are throwing ServletException to not to put  Servelt Object in service,instead of explicity handling ServletException using try/catch blocks.If we are handling exception explicity how to inform the container about init() fail.Is there any solution in this case.Think your self.

Monday, March 15, 2010

Software Jobs

visit the following links to know about the software jobs
1   http://www.javaken.com/
2.  http://www.presentjobs.com/
3.  http://www.jobconsultancy.com/