Monday, 21 April 2014

MyEcllipse 2013 Professional Crack Free Download

Leave a Comment
Hello friends its time to work on latest myecllipse and don't worry about activation because i provide you crack and step to how to crack your MyEcllipse 2013 Professional easily.
 Here's my break step.
To close the Myeclipse2013 crack front
Download Crack of MyEcllipse 2013 Professional
  • (1)Input usercode can be input, (2) and then select the version of the Myeclipse, click the systemid button (3)




  • Then click the Tools menu bar under the RebuildKey menu item




  • Click the Active button



  • Click the Tools ReplaceJarFile menus, pop-up file selection dialog box.



  • Choose the Myeclipse2013 installation directory plugins folder, click open, then the program will card for a while, don't worry, program in the jar file to replace.





  • Output done jar file replacement.
  • The last step, click on the Tools under the SaveProperites, save properties




  • Well, you can close the tool, open the Myeclipse2013, there will be no longer requires you to activate the window.



  • Can according to the following method to check the activation information




  • Reprint please keep source


Read More...

Friday, 18 April 2014

How to disable back button using JavaScript

Leave a Comment
Hello friends i am telling you a really cool trick . I found this when i face a problem to develop a online examination web application in Struts 2.0. When we conduct a exam then we want to disable a back button on browser until they doesn't complete their exam.
And if you're faced similar problem then its the end of them.

How to disable back button using JavaScript,disable back button using JavaScript,back button using JavaScript,button using JavaScript,

It just a simple code in javascript given below:
<html>
<body>
<head>
<SCRIPT type="text/javascript">
    window.history.forward();
    function noBack() { window.history.forward(); }
</SCRIPT>
</head>
<body onload="noBack();"  onpageshow="if (event.persisted) noBack();" onunload="">
<h1>Disable Back Button Demo</h1>
</body>
</html>
Please comment if any queries you have
Read More...

Fetch your Gmail Account using Java Mail API

Leave a Comment
Today i am telling you how to fetch your gmail account using java mail api where you can see your mail on your application . After taking reference you can be implement in your web application. If you got some problem then comment me or my next post would be  on web application soon.
Now lets start with coding in java
First of all you need to download two jar file
  • jaf-1.1.1
  • javamail-1.4.5
One more things you need to enable the POP protocol in your gmail account .


  • You login in your gmail account.
  • Click on the Gear icon in the top right-hand corner of your screen and select Mail settings.
  • Click on Forwarding and POP/IMAP.
  • Under POP Download/Status select the Enable option that you prefer.
  • Under POP Download/When messages are accessed with POP select the option that you prefer. We recommend that you select one of the options that leaves a copy of your messages on the server. This allows you to view your e-mails from more than one location and also insures that you always have a backup on the Gmail servers.
  • Click Save Changes.
At last run your below program
import java.util.*;
import java.io.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.mail.search.*;
import javax.activation.*;
public class FetchMail 
{
    public static void main(String[] args) {
        // SUBSTITUTE YOUR ISP's POP3 SERVER HERE!!!
        String host = "pop.gmail.com";
        // SUBSTITUTE YOUR USERNAME AND PASSWORD TO ACCESS E-MAIL HERE!!!
        String user = "your user name";   //eg.  "ishwar"
        String password = "your gmail password";   //e.g "ishwar123"
        // SUBSTITUTE YOUR SUBJECT SUBSTRING TO SEARCH HERE!!!
        String subjectSubstringToSearch = "Test E-Mail through Java";
        
        Properties props = new Properties();
        props.put("mail.pop3s.starttls.enable", "true");
         Session session = Session.getDefaultInstance(props,null);
        try
         {
            // Get a Store object
            Store store = session.getStore("pop3s");
            store.connect(host,995,user, password);
            // Get "INBOX"
            Folder fldr = store.getFolder("INBOX");
            fldr.open(Folder.READ_WRITE);
            int count = fldr.getMessageCount();
            System.out.println(count  + " total messages");
            // Message numebers start at 1
            for(int i = 1; i <= count; i++) 
            {
                        // Get  a message by its sequence number
                Message m = fldr.getMessage(i);
                // Get some headers
                Date date = m.getSentDate();
                Address [] from = m.getFrom();
                String subj = m.getSubject();
                String mimeType = m.getContentType();
                System.out.println(date + "\t" + from[0] + "\t" + subj + "\t" + mimeType);
            }
            // Search for e-mails by some subject substring.
            String pattern = subjectSubstringToSearch;
            SubjectTerm st = new SubjectTerm(pattern);
            // Get some message references
            Message [] found = fldr.search(st);
            System.out.println(found.length +" messages matched Subject pattern \"" +pattern + "\"");
            for (int i = 0; i < found.length; i++) 
            {
                Message m = found[i];
                // Get some headers of email
                Date date = m.getSentDate();
                Address [] from = m.getFrom();
                String subj = m.getSubject();
                String mimeType = m.getContentType();
                System.out.println(date + "\t" + from[0] + "\t" + subj + "\t" + mimeType);
                Object o = m.getContent();
                
                if (o instanceof Multipart) 
                {
                    System.out.print("**This is a Multipart Message.  ");
                    Multipart mp = (Multipart)o;
                    int count3 = mp.getCount();
                    System.out.println("It has " + count3 +
                        " BodyParts in it**");
                    for (int j = 0; j < count3; j++) 
                    {
                        // Part are numbered starting at 0
                        BodyPart b = mp.getBodyPart(j);
                        String mimeType2 = b.getContentType();
                        System.out.println( "BodyPart " + (j + 1) +
                                            " is of MimeType " + mimeType);
                        Object o2 = b.getContent();
                        if (o2 instanceof String) 
                        {
                            System.out.println("**This is a String BodyPart**");
                            System.out.println((String)o2);
                        }
                        else if (o2 instanceof Multipart) 
                        {
                            System.out.print(
                                "**This BodyPart is a nested Multipart.  ");
                            Multipart mp2 = (Multipart)o2;
                            int count2 = mp2.getCount();
                            System.out.println("It has " + count2 +
                                "further BodyParts in it**");
                        }
                        else if (o2 instanceof InputStream) {
                            System.out.println(
                                "**This is an InputStream BodyPart**");
                        }
                    } //End of for
                }
                else if (o instanceof String) 
                {
                    System.out.println("**This is a String Message**");
                    System.out.println((String)o);
                }
                else if (o instanceof InputStream) 
                {
                    System.out.println("**This is an InputStream message**");
                    InputStream is = (InputStream)o;
                    // Assumes character content (not binary images)
                    int c;
                    while ((c = is.read()) != -1) 
                    {
                        System.out.write(c);
                    }
                }
            } //End of for
            
            fldr.close(true);
            store.close();
        }
        catch (MessagingException mex) 
        {
            
            mex.printStackTrace();
        }
        catch (IOException ioex) 
        {
            ioex.printStackTrace();
        }
    }
}
Please comment for more posts............
Read More...

Tuesday, 15 April 2014

Simple Calculate Application in DWR with JSP

Leave a Comment
After reading my previous post on DWR : Simple DWR Demo Example with JSP
You're able to do more work with some experiments and in this tutorial i am telling you a simple calculate in DWR.

Simple Calculate Application in DWR with JSP,Calculate Application in DWR with JSP,Application in DWR with JSP,DWR with JSP,

Calculate.java
package org.koliamorev.dwr;
public class Calculator {
public float Square(float num) {
return num * num;
}
}
dwr.xml
 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dwr PUBLIC
    "-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN"
    "http://www.getahead.ltd.uk/dwr/dwr10.dtd">
<dwr>
<allow>
<create creator="new" javascript="Calculator">
<param name="class" value="org.koliamorev.dwr.Calculator" />
</create>
</allow>
</dwr>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>dwr</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dwr-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
</web-app>
 index.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<script type='text/javascript' src='dwr/engine.js'></script>
<script type='text/javascript' src='dwr/interface/Calculator.js'></script>
<script type='text/javascript' src='dwr/util.js'></script>
<script type='text/javascript'>
// <![CDATA[
function sendNumber()
{
    var number = DWRUtil.getValue("number");
    DWRUtil.setValue("result", "");
    Calculator.Square(gotResult, number);
}
function gotResult(number)
{
    DWRUtil.setValue("result", number);
}
// ]]>
</script>
<p>
  GeekOnJava:
  <input id="number"/>
  <input type="button" value="Square a Number"
      onclick="sendNumber()"/>
</p>
<p>Output: <span id="result"></span></p>
</body>
</html>
 Download Project>>>
Read More...

Simple DWR Demo Example with JSP

Leave a Comment
You can see my previous post on DWR : First DWR program with JSP
In my previous post i didn't tell you much more details about DWR 
Most of my friends tell me similar question like What and Why DWR
What is DWR?
  • Is a Java and JavaScript open source library which allows you to write Ajax web applications
  • Hides low-level XMLHttpRequest handling
  • Specifically designed with Java technology in mind
  • “Easy AJAX for Java
  • Allows JavaScript code in a browser to use Java methods running on a web server just as if they
  • were in the browser
  • Why it is called “Direct remoting”

Why DWR?
  • Without DWR, you would have to create many Web application endpoints (servlets) that need to
  • be address'able via URI's
  • What happens if you have several methods in a class on the server that you want to invoke from
  • the browser?
  • Each of these methods need to be addressable via URI whether you are using XMLHttpRequest directory or clientside only toolkit such as Dojo or Prototype
  • You would have to map parameters and return values to HTML input form parameters and responses yourself
  • DWR comes with some JavaScript utility functions
Now lets go with coding and fun with DWR
Simple DWR Demo Example with JSP,DWR Demo Example with JSP,Demo Example with JSP,dwr tutorial,DWR introduction


Creating MyJavaClass.java file
package mypack;  
public class MyJavaClass  
{  
public String getMessage()  
{  
return "Wow! First DWr Example Success.hello from " +  
"Jagadeesh using server" ;  
}  
//we will call this method  
//in client side using javascript class  
}  
Configuring DWR servlet in web.xml
web.xml
<web-app>  
<servlet>  
<servlet-name>  
dwr-invoker  
</servlet-name>  
<servlet-class>  
uk.ltd.getahead.dwr.DWRServlet  
</servlet-class>  
<init-param>  
<param-name>  
debug  
</param-name>  
<param-value>  
true  
</param-value>  
</init-param>  
</servlet>  
<servlet-mapping>  
<servlet-name>  
dwr-invoker  
</servlet-name>  
<url-pattern>  
/dwr/*  
</url-pattern>  
</servlet-mapping>  
<welcome-file-list>  
<welcome-file>  
index.jsp  
</welcome-file>  
</welcome-file-list>  
</web-app>  
creating dwr.xml to convert java class to javascript class:
dwr.xml
<dwr>  
<allow>  
<create creator="new" javascript="MyJavaScriptClass">  
<!-- here MyJavaScriptClass is dynamic javascript class generated by dwr-->  
<param name="class" value="mypack.MyJavaClass"/>  
<!-- now dwrservlet convert mypack.MyJavaClass to MyJavaScriptClass.  
so we can call methods of mypack.MyJavaClass using MyJavaScritpClass-->  
</create>  
</allow>  
</dwr>  
Creating jsp page for frontend: index.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"%>  
<html>  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
<title>Dwr Example</title>  
<!-- You have to include these two JavaScript files from DWR -->  
<script type='text/javascript' src='dwr/engine.js'></script>  
<script type='text/javascript' src='dwr/util.js'></script>  
<!-- This JavaScript file is generated specifically for your application -->  
<!-- in dwr.xml we have converted MyJavaClass to MyJavaScriptClass.js-->  
<!-- so we can call java class methods using this javascript class-->  
<script type='text/javascript' src='dwr/interface/MyJavaScriptClass.js'>  
</script>  
<script>  
function getMessageFromServer()  
{  
//getMessage is a method in java class. we can call this method  
//using our generated javascript class  
//handleReceivedData is a call back method  
MyJavaScriptClass.getMessage(handleReceivedData);  
}  
function handleReceivedData(str)  
{   
alert(str);  
}  
</script>  
</head>  
<body onload="getMessageFromServer()">  
</body>  
</html>  

Download DWRExample Project 
Read More...

Saturday, 12 April 2014

First DWR program with JSP

Leave a Comment
Hello friends i am introduce a new version of AJAX for Java. It is DWR(Direct Web Remoting) thats a cool name which define their work. In this article, i am going to explain the step by step approach to create the DWR (Direct Web Remoting) application in JAVA.

DWR with JSP,dwr in jsp,dwr demo tutorial,dwr first program, new ajax dwr,reverse ajax with dwr,Direct Web Remoting


DWR consists of two main parts:

    DWR with JSP,dwr in jsp,dwr demo tutorial,dwr first program, new ajax dwr,reverse ajax with dwr,Direct Web Remoting
  1. A Java Servlet running on the server that processes requests and sends responses back to the browser.
  2. JavaScript running in the browser that sends requests and can dynamically update the webpage.
Now start our first dwr demo program with jsp:
  • First of all create a Dynamic JSP Web Directory.
  • Download the dwr.jar file from http://directwebremoting.org/dwr/downloads/index.html and place in web-inf/ lib.
  • Add below code in web.xml
  <servlet>
  <servlet-name> dwr-invoker </servlet-name>
  <display-name> DWR Servlet </display-name>
  <servlet-class> org.directwebremoting.servlet.DwrServlet </servlet-class>
  <init-param>
     <param-name> debug </param-name>
     <param-value> true </param-value>
  </init-param>
</servlet>

<servlet-mapping>
  <servlet-name> dwr-invoker </servlet-name>
  <url-pattern> /dwr/* </url-pattern>
</servlet-mapping>


  • create a dwr.xml alongside the web.xml and add below code:
<!DOCTYPE dwr PUBLIC
   "-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN"
   "http://www.getahead.ltd.uk/dwr/dwr10.dtd">
<dwr>
<allow>
   <create creator="new" javascript="Message">
   <param name="class" value="com.G2.POJO.Message"/>
   </create>
</allow>
</dwr>
As you can see in above code, i have added the creator attribute which will tell the dwr engine to create the javascript object named “Message”, using which we can call the server side methods.
  • create Java class, which will be called by the DWR javascript: 
package com.G2.POJO;

public class Message {
 public String getMessage() {
  return "Hello DWR from Server";
 }
}

  • create index.html with below code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>DWR Demo</title>
<script type='text/javascript' src='/SimpleDWR/dwr/interface/Message.js'></script>
<script type='text/javascript' src='/SimpleDWR/dwr/engine.js'></script>
<script type='text/javascript' src='/SimpleDWR/dwr/util.js'></script>
</head>
<body>
<input value="click me!!!" type="button" onclick="update();" />
<div style="background-color: #ffeaa7;font-weight: bold;width: 300px;" id="divResponse">
Message From Server</div>
<script type="text/javascript">
function update()
{
    Message.getMessage(function(data) {
  dwr.util.setValue("divResponse", data);
   });
}
</script>
</body>
</html>
Note :
As you can see the above code JavaScript file that must be included in your application for DWR:


  • Auto generated Javascript of your equivalent class. in this case, my java class name is “Message”, so the javascript complete path is “/<App NAME>/dwr/interface/<YOUR CLASS NAME>.js“.

in my application the path is “/SimpleDWR/dwr/interface/Message.js

  •  DWR engine file : “/<APP NAME>/dwr/engine.js”. This is responsible for marshaling of Java objects/Values between Client and Server.
  • This is not necessary, but it provides nice set of utility methods to work with HTML code : “/<APP NAME>/dwr/util.js
Now run your program and output would be like below images.
DWR with JSP,dwr in jsp,dwr demo tutorial,dwr first program, new ajax dwr,reverse ajax with dwr,Direct Web Remoting


Read More...

Tuesday, 25 March 2014

Create Custom Gesture on Emulator in Android

Leave a Comment
In my previous post : Create Your Own Gesture Overlay in Android where you can use your gesture overlay in your program. In my previous post you'll use my predefined overlay but if you want to make your own custom gesture overlay then what you need to do ?
Don't take tension i am here then why are you fear...
Here i am telling you how to make your own custom gesture in emulator in android.

  • First of all you need to open your android emulator.
  • After that you'll open the Gestures Builder  option  in emulator screen.






  • Open them and click on Add gesture button.


Create Custom Gesture on Emulator in Android,how to Create Custom Gesture on Emulator in Android,Custom Gesture on Emulator in Android,Gesture on Emulator in Android,Emulator in Android,


  • Then you'll see the next screen called create a gesture and enter the name and draw your pattern.

Note : Here name is a message which will be give you as output when draw that particular pattern.


  • At last click on Add Gesture button.
  • In order to get gesture file, open the FileExplorer tab in the DDMS perspective. (If you don’t have the FileExplorer tab available, add it from: Window -> Show View -> File Explorer). Navigate to /sdcard directory and copy the gesture file to your computer, for example on your desktop.



  • To copy the gesture file from the emulator, select it and click the “Pull a file from the device” button, marked with red in the screenshot below:




  • Paste gestures file in res/raw/gestures file.
Read More...