|
Member 13515332 wrote: ,its urgent as i have to complete my project.
I suspect you are out of luck then.
You have specified something that requires quite a bit of code and knowledge. Presumably you need to create both ends.
If you had time I would suggest that you learn one side first and use something simple like a hello world example. You can find examples of that by googling.
But either your class is poorly designed (teacher fault) or you haven't been keeping up (your fault) if this is the project and you have no idea how to do it.
|
|
|
|
|
Hello
I am a beginner in programming java jee, I am currently working on an application and I hangs the derapt how to establish a connection between eclipse and mysql 2014, I also ask if you have links and even book that explains how program with jee (jsf and primefaces also spring for security),
excuse me I do not speak well English
|
|
|
|
|
See The Java™ Tutorials[^]. Also, you do not want a connection between eclipse and mysql, but between your Java application and MySql. See the section in the tutorials on Data Bases. You can also find lots of useful information from Google.
|
|
|
|
|
thank you for the information
|
|
|
|
|
|
Please consider the following Java fragment where there are two classes defined: Tire and Radial. The class Radial has Tire has its super class. That is, Radial extends Tire.
public static void addBrandTires(List<Radial> parts1, List<? extends Tire> parts2,
String brand)
{
ListIterator<Radial> li = parts1.listIterator();
while ( li.hasNext() ) {
Radial t1 = li.next();
if ( t1.getBrand().equals( brand) ) {
parts2.add( t1 );
}
}
}
The call to add generates the following compiler error:
error: no suitable method found for add(Radial)
parts2.add( t1 );
Since t1 is of type Radial, it is of type Tire therefore I expected it to work. I tired putting in a cast of t1 but that did not work either.
Bob
-- modified 8-Nov-17 16:23pm.
|
|
|
|
|
|
|
Missed that casting requirement.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Probably the first time I've seen you make a mistake.
|
|
|
|
|
You cannot add a Radial object to a List of Tire s, only a Tire object. If you were allowed to then you could start trying to call Radial methods, or access Radial properties on Tire objects, which is not possible.
|
|
|
|
|
Hey there, it seems like you're using the wildcard operator "?" and trying to use a method which is modifying the list at the same time.
Now I am no expert but I think the above combination cannot be used since if you want to add something to a generic collection then as far as I remember you have to use the "super" keyword with the wildcard operator to let the compiler stop bothering you from adding modifying your collection and with the keyword super you'll have to change the declaration to one hierarchical level lower as well.
Hope this helps, pardon me if I got it wrong though.
Cheers.
modified 8-Feb-18 1:11am.
|
|
|
|
|
I'm slowly learning Javascript, and am trying to error trap this statement to determine if the file exists. My webcam writes a snapshot every x amount of seconds and I want to try to display the latest snapshot. Synchronizing the time from camera to server, to user is impossible, so I want to run a loop to check for the latest file, then display it.
Anyway, error trap for this statement. That would throw an error if the file didn't exist
document.write('')
I played with the TRY function, but it didn't detect an error.
dsp
|
|
|
|
|
Member 13508034 wrote: I'm slowly learning Javascript Well the first thing you need to learn is that Javascript is not the same as Java.
|
|
|
|
|
yea, figured that out, but still hoping there is a way.
|
|
|
|
|
And this still has nothing to do with Java. Please use the correct forum.
|
|
|
|
|
|
|
No, because JavaScript cannot access the hard drive so it won't be able to determine if the file exists or not.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hello! I'm having a bit of trouble with 2-dimensional arrays. Currently, I am using netBeans 8.0.
I don't believe I need a loop to do what I'm trying to achieve, but nonetheless I'm stuck. Here is the code for reference:
<pre>
package nb.test.gamepackagev1;
import edu.sjcny.gpv1.*;
import java.awt.Color;
import java.awt.Graphics;
import java.io.File;
import java.io.IOException;
import java.util.Scanner;
public class Homework4 extends DrawableAdapter
{ static Homework4 ge = new Homework4();
static Character[][] parade = new Character[4][2];
static int[][] aNum = new int[4][2];
static GameBoard gb = new GameBoard(ge, "Homework 4 by Sam Tahiri");
public static void main(String[] args) throws IOException
{
showGameBoard(gb);
int newX, newY;
for (int i = 0; i < parade.length; i++) {
parade[i][0] = new Character[4][2];
newX = aNum[i][0];
newY = aNum[i][1];
parade[i][0].setX(newX);
parade[i][1].setY(newY);
}
readArray();
}
public static void readArray() throws IOException {
File fileObj = new File("Array.txt");
if (!fileObj.exists()) {
System.out.println("File does not exist");
}
else {
Scanner fileIn = new Scanner(fileObj);
for (int i = 0; i < aNum.length; i++) {
int x = fileIn.nextInt();
int y = fileIn.nextInt();
System.out.println(x + " " + y);
aNum[i][0] = x;
aNum[i][1] = y;
for (int j = 0; j < parade.length; j++) {
parade[i][0].setX(x);
parade[i][1].setY(y);
}
}
}
System.exit(0);
}
public void draw(Graphics g) {
for (int i = 0; i < parade.length; i++) {
parade[i][0].show(g);
parade[i][1].show(g);
}
}
}
Ultimately, what I would look to do is to place the values of the array aNum[4][2] into each of the 4 objects of parade. The file, Array.txt, has 4 rows of 2 columns, therefore, 4 sets of [x][y] coordinates for the 4 objects I would like to create.
How can I place these values into said objects?
For example, if the first line of the array aNum is 120, 150, then the first object, parade, would be located at (120, 150) on the GameBoard. Thank you so much for helping me out!!
|
|
|
|
|
just give me an ideas or else if u know please send a sorce code.
please
|
|
|
|
|
Generically for all possible cases it is not possible because html need not be rigorously defined.
And there are other general problems such as what one is supposed to do with links and images during the conversion.
Further just converting it to XML generically isn't generally useful. One normally expects a certain format of some sort.
So if one wants to proceed one should define the following
1. What is allowed. Both as 'legal' html, and what data will be converted.
2. Use an html parser (HTML library)
3. Provide a source log both errors found and content for further analysis but otherwise skip it
4. Determine how to convert valid attributes to XML. The XML that was previously decided on
5. Get a XML library and use it to create the XML
|
|
|
|
|
Can we convert HTML to XML like this,First Can we convert HTML into XHTML and then to XML.
Is it possible?
|
|
|
|
|
Yes, it is possible, but it will require you to write the code.
|
|
|
|
|