XML :: Draw A Graph And Display It In The Mail

Jul 3, 2013

I have few values for X and Y axis from the Oracle DB table. SO is there any java technology available to display the values in the form of graph with the valuesfrom the table along X and Y axis and represent it in any form of graph , which we could chose.

View Replies


ADVERTISEMENT

Graph In Java - How To Draw Curve

Apr 8, 2014

If I have a function for example y=x^2

How can I draw the curve?

View Replies View Related

Send Email Through Mail API

Dec 22, 2014

This is the program i tried

package com.readAlerts;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;

[Code]...

But I am getting below error:

Exception in thread "main" java.lang.RuntimeException: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 587;
nested exception is:
java.net.SocketException: Permission denied: connect
at com.readAlerts.SendEmailUsingGMailSMTP.main(SendEmailUsingGMailSMTP.java:63)
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 587;
nested exception is:

[Code]...

Tried every permutation and combination but all leading to this same error.

View Replies View Related

Sending Mail From JSP File

Jan 23, 2014

I want to send email from my jsp file .. And I have a html code which contains form and inputs. How can I send the email? And I am using netbeans ..

View Replies View Related

Unable To Execute The Mail Code

Mar 6, 2014

I am unable to run this java mail code, whats the error!!

public class Class1 {
final String senderEmailID = "from@gmail.com";
final String senderPassword = "password";
final String emailSMTPserver = "smtp.gmail.com";
final String emailServerPort = "465";
String receiverEmailID = null;

[Code] ...

I get an error as this

javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465, response: -1
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1949)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:654)
at javax.mail.Service.connect(Service.java:317)

[Code] ....

View Replies View Related

Mail Error - Can't Connect To SMTP Server

Mar 6, 2014

Java Code:

import java.util.Properties;
import javax.mail.Authenticator;
import javax.mail.Message;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;

[Code] ....

Here is my sample email in java i am enable to send mail .....

View Replies View Related

Reading Excel File And Sending Mail

Feb 4, 2014

This is the code for reading and sending the mail

package com.abhi;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;

[Code] ....

Its showing error like..

BIFFVIEWER REQUIRES A FILENAME***
java.lang.NullPointerException
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at org.apache.poi.hssf.dev.BiffViewer.run(BiffViewer. java:68)
at org.apache.poi.hssf.dev.BiffViewer.main(BiffViewer .java:649)

View Replies View Related

Java Mail API Returning Invalid Characters In File Name

Jun 13, 2014

I am facing an issue with my java program, it is returning/storing file name with some junk characters i,e the file name with some '?','=' and '_'. Below is the example of file names.

Ex : abc.doc
ab=?Windows-1252?Q?=c.do?c
=?Windows-1252?Q? (prefixed with space)
=?utf-8?Q? (prefixed with space)
=?iso-8859-1?Q? (prefixed with space)

View Replies View Related

Expire Sending Link To A Mail After Particular Period Of Time

Feb 5, 2011

How to Expire the sending link to a mail after particular period of time

View Replies View Related

Mail Reading Functionality Is Not Working Properly Using POP3 Protocol

Mar 17, 2014

My Mail reading functionality is not working properly using POP3 protocol. Actually I can read the mail but the status is not changed as read.

Java Code:

public static void main(String arg[]) throws MessagingException, IOException{
String host = "pop.test.net";
String user = "test@beq.com";
String password = "abc10";
String protocol = "pop3";

[code]....

View Replies View Related

How To Leave Copy Of Email On Server By Using POP3 In Java Mail

Mar 20, 2014

I am reading mail by using pop3 in java mail. In outlook I found we can leave the copy of mail in server side after reading. Shall we do that process in java mail ?

View Replies View Related

Servlets :: Gmail - Webpage Will Automatically Update Whenever New Mail Arrives

Apr 12, 2014

So, I've seen in google mail that the webpage will automatically update whenever a new mail arrives without the user manually refresh the gmail webpage. I'm curious how this is done. Is it polling? or is it something else? how is this done in java web app?

View Replies View Related

How To Plot Graph

Nov 13, 2014

I am new to java. I wana create a java program that can plot a graph for that I've already written this:

/ x axis would be the ,,elemszam" from 0 to 599;
y axis would be ,,resz_xy"
double sum_xy=0;
double g=10000.0;
double z_xy;
double xy=0;

[Code]...

--- Update ---

Actually i'm using netbeans...

--- Update ---

and the datas are coming from a text file...

View Replies View Related

In And Out Degree Of A Graph

May 2, 2014

I have this code for reading a text file and printing out information about the graph, the program works perfectly but I need to figure out the in degree and out degree of the graph if it is an directed graph. So my question is how would I go about implementing that? I know what in degree and out degree does but in terms of the code I'm not so sure, so I'm thinking if the case of vertex 0,1 the first vertex comes before the second vertex so that would in an in degree right? But how would I do that?

graphs.txt
6,1
0,2 0,4 1,4 1,5 2,1 2,3 2,5 3,2 3,4 4,1 4,5 5,1 5,3 5,2

import java.io.File;
import java.util.Scanner;
 public class Vertices {
public static void main(String[] args) throws Exception {
@SuppressWarnings("resource")

[Code] ....

View Replies View Related

Generate Bar Graph From Data

May 22, 2014

I need to generate a bar chart given the data that is in main. The relative performance of each sorting algorithm with respect to time, number of comparisons, and number of swaps for each data set (e.g., 50,000 –400,000 random integers). Each algorithm will have 5 bars corresponding to the 5 data sets. The height of these bars will depend on the performance of the algorithm for that data set.

I know how to write a bar with normal values like integers but for this I'm not sure because the values for instance comparisons and swaps are not given they are calculated. I just need to know what steps to go about doing that, you can even express them in pseudocode or even just explaining it I don't need the code, I think. Here is the main

public class Main {
public static void main(String[] args){
int t= 50000;
int t2=100000;
int t3=200000;
int t4=300000;
int t5=400000;

[Code] .....

View Replies View Related

Adjacency List Graph

May 4, 2014

I'm trying to read a text file of a graph and print information about the graph including the order and size of the graph, rather it is a directed or undirected graph, if it is directed the in and out degree, and the and a list of all vertices for which it is adjacent. The problem is the adjacency list is just printing out the list of vertices instead of the adjacency list. Is there something in my code that is problematic? Also I'm unsure of how to go about the in and out degree

"graphs.txt"
6,1
0,2 0,4 1,4 1,5 2,1 2,3 2,5 3,2 3,4 4,1 4,5 5,1 5,3 5,2
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner; 
public class AdjList {
private Node first; // beginning of list

[Code

View Replies View Related

Java Graph - Cannot Find Symbols

Feb 27, 2015

I am taking an algorithm class and i am having some problems trying to get this program to work.The file name is Graph.java

package graphs;
import java.util.HashSet;
import java.util.ArrayList;
public abstract class Graph

[code]....

View Replies View Related

Swing/AWT/SWT :: Graph Plotting In Java

May 22, 2014

What are the different options available to plot graphs in Java other than JFreechart API?

View Replies View Related

Each Bar In Graph Will Represent Value Of Each Element Of Array

Nov 5, 2014

So I have an array which holds 19 elements, each element represents a value of 'income'. I'm trying to code the graph so that each bar will represent the value of each element of the array (income). I have been given the code ' for (int Bar = 0; Bar < array of values.length; bar++);' however i'm unsure if this is how to do it, or what to add to this code to make it work.

View Replies View Related

How To Print All Paths Of Cyclic Graph

Sep 14, 2014

I print a path like below with iteration. It is redundant as you see. How can I remove the redundant path? im using arrayList .

1. [0, 1]
2. [0, 1, 2]
3. [0, 1, 3]
4. [0, 1, 3, 4]

View Replies View Related

Reading A Text File For A Graph?

May 2, 2014

I'm trying to print the number of vertices in a text file on a graph which is the first integer in the file and then the type of graph is an undirected graph for a 0 or a 1 for a directed graph. Right now I'm just trying to print the number of vertices which is a 6 in the text file.

Here's the text file:

6,1
0,2 0,4 1,4 1,5 2,1 2,3 2,5 3,2 3,4 4,1 4,5 5,1 5,3 5,2
Im getting the following error:
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 6, Size: 0
at java.util.ArrayList.rangeCheckForAdd(Unknown Source)
at java.util.ArrayList.add(Unknown Source)
at Vertices.main(Vertices.java:21)

Then I need to know how to go about reading the next line in the file, do you read it with the nextLine and put it into an arrayList or do I read each index in the graph?

public class Vertices
{
public static void main(String[] args) throws Exception
{
Scanner inFile = new Scanner(new File("graphs.txt"));
// Read the number of vertices
String line = inFile.nextLine();
ArrayList<Integer> list=new ArrayList<Integer>();
String[] data=line.split("[\,]");
int numberofvertices=Integer.parseInt(data[0]);
int typeOfGraph=Integer.parseInt(data[1]);
list.add(numberofvertices,typeOfGraph);
System.out.println("The number of vertices is " + numberofvertices);
}
}

View Replies View Related

Function That Returns The Panel Of The Graph

Jun 9, 2014

Before I created the data file are the points of x and y I created a model class that represents the graph. I have a problem with making a function that returns the panel of the graph.

Attached File(s)

 data.cvs.txt (726bytes)
Number of downloads: 12
 chart.txt (3.72K)
Number of downloads: 10

View Replies View Related

Control Flow Graph In Jframe

Apr 23, 2014

Java code to build control flow graph of any user program in jframe...

View Replies View Related

Displaying A Graph From Data In File

Oct 12, 2010

A graph consists of vertices and edges that connect vertices. Write a program that reads a graph from a file and displays it on a panel. The first line in the file contains a number that indicates the number of vertices (n). The vertices are labeled as 0, 1, ..., n-1. Each subsequent line, with the format u x y v1, v2, ..., describes that the vertex u is located at position (x, y) with edges (u, v1), (u, v2), etc. Your program prompts the user to enter the name of the file, reads data from the file, and displays the graph on a panel.

Example File:
6
0 30 30 1 2
1 90 30 0 3
2 30 90 0 3 4
3 90 90 1 2 4 5
4 30 150 2 3 5
5 90 150 3 4
Analysis:

A graph is a mathematical structure with vertices and edges that connect the vertices. A graph is a very useful tool for modeling real-world problems. This project is to display the graph. The information for the graph is stored in a file. The number of the vertices n is stored in the first line of the file. The vertices are labeled 0, 1, 2, ..., n-1. The format of each subsequent line is u x y v1, v2, ..., which describes vertex u at location (x, y) and u is connected to vertices v1, v2, etc.

Design:

The program should first read the information about the graph from a file. The program prompts the user to enter the file name and read vertices location information into a two-dimensional array named position, where (position[0][0], position[0][1]) is the x- and y-coordinates for vertex 0. For example, in the sample graph, (position[0][0], position[0][1]) is (30, 30). The program reads the edge information into an array of ArrayList named edge (ArrayList is covered in Chapter 11). For example, in the sample graph, edge[0].Is an ArrayList that contains elements 1 and 2, which indicates that vertex 0 is connected to vertex 1 and vertex 2. position and edge should be created as followed:

int[][] position = new int[n][2];
ArrayList[] edge = new ArrayList[n];

I don't know how to implement the code. I have started but I am not sure how to proceed.

import java.awt.Graphics;
import java.util.*;
import java.io.*;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class Exercise15_27 extends JFrame {

[code]....

View Replies View Related

Directed Graph Cycle Detection

Jan 4, 2015

I have some problem checking if a directed graph has a cycle or not. So I have a given rooted directed graph, and find if there at least one existing cycle.

For example, I have to input the Root Node, followed by a number of nodes, the nodes in the graph, number of edges, and the adjacency list representing the edges. Each entry in the adjacency list contains a pair of nodes. The ordering of the nodes in the pair represents the direction of the edge. An entry A, B means that there is an edge from A to B. Nodes in each pair is separated by a space. One input per line.

And the output should display whether the directed graph has a cycle or not.

Sample input:

A //Root Node
6 //Number of Nodes
A //Nodes in Graph
B
C
D
E
F
6 //Number of edges
A B //Adjacency list representing the edges
B C
C D
C F
F E
E B

Output:
Cycle!

Graph Representation:

Based on the illustration above, the graph has one cycle. The cycle exists in nodes B, C, F and E.

View Replies View Related

Making Graph Work Correctly

Nov 9, 2014

I'm working on a homeowork assignment here URL... and I can't get the graph to work correctly. I'm not really sure how to print the string of names, gender and rank at the point on the graph. Also I'm just wondering if I set up the scanner to find names right.

import java.util.*;
import java.io.*;
import java.awt.*;
public class Names {
public static final int year = 1880;
public static final int decades = 14;
public static final int decadeWidth = 70;

[code]....

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved