|
Are you planning to give us any idea what the problem is?
|
|
|
|
|
It is not giving any error..please check again It runs fine on my machine 
|
|
|
|
|
And you plan to tell us what errors and where ?
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
hi
plz explain attribute dependency in rough sets using java.............
modified 21-Apr-16 1:32am.
|
|
|
|
|
I already answered this below. Please do not a) ask for code, or b) repost the same question.
|
|
|
|
|
plz any one send indiscernibility relation code in rough sets using java.................
|
|
|
|
|
|
Hi,
I am working on a Java project. I want to get the content of a specific URL in an excel file.
i:e; Go to a given URL. there are different fields defined in the webpage, i:e: Name, ID, Address etc. I want to fetch these fields and store this information in an excel file.
Any help will be appreciated.
Regards,
mba
|
|
|
|
|
mbatra31 wrote: Any help will be appreciated. Help with what? You need to show what you have tried and what problems you are having.
|
|
|
|
|
Hi,
I am able to get the data from the web page into .html file or .txt file. But the problem is how to filter the data and get specific information which I want.
for example the data is in a .txt file spread over multiple lines. How to retrieve the specific fields from the file.
Here I am attaching the code which I have used:
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
public class GetContent {
public static void main(String[] args) {
URL url;
try {
url = new URL("http://www.mims.com");
URLConnection conn = url.openConnection();
BufferedReader br = new BufferedReader(
new InputStreamReader(conn.getInputStream()));
String inputLine;
String fileName = "E:\\sample.txt";
File file = new File(fileName);
if (!file.exists()) {
file.createNewFile();
}
FileWriter fw = new FileWriter(file.getAbsoluteFile());
BufferedWriter bw = new BufferedWriter(fw);
while ((inputLine = br.readLine()) != null) {
bw.write(inputLine);
}
bw.close();
br.close();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
|
|
|
|
|
If you are just reading the HTML from the web page then you need to parse the data from the HTML. See java html parse - Google Search[^] for samples and suggestions.
|
|
|
|
|
Very New to Java, just learning arrays
I have an Object[] contents
Object [] contents = new Object[3];
so contents [1] = 3;
contents [2] = 3, 4, 5;
contents[3] = 5;
for (i = 0; i < contents.length; i++) {
System.out.println(contents);
//what I want to do is print content[2] as this
contents[2].1st element = 3
contents[2].2nd element = 4
contents[2].3rd element = 5
|
|
|
|
|
Please do not crosspost; I already gave you the answer in QA.
|
|
|
|
|
Also, please do not create multiple identities to post the same questions.
|
|
|
|
|
Advice: read seriously the documentation and follow tutorials.
you can't learn a language by asking every time you try something fancy and wonder why it don't work.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
1. As a programmer you are tasked with a presentation to a group of investors to demonstrate how arrays (2D and Multi-dimensions) can be used in Real Time Systems. (20)
2. Name five tools from the JDK and explain what they are used for. Show a typical invocation for each of the four tools. (20)
3. If a VW GTi vehicle costs R. 119,995 or less, you receive a R. 1,000 discount and the finance charge is 5% per year. If the vehicle costs more, there is no discount but the finance charge is only 4% per year. In either case you have to pay off 10% of the original cost of the vehicle per year. Write a program and an application to convert between the cost of the vehicle and what you still owe exactly one year later. (10)
4. Suppose you are a software engineer working for South Africa Defense Force (SADF) , and you
have been asked to code a simple countdown timer that will be installed at new nuclear missile launch sites. Your timer should count down from 15 seconds to zero, update every 72 milliseconds, and display hundredths of a second.
4.1 Define the following class constants to specify the parameters of your timer:
o Start Time: the start time for your timer, set as 10,000 milliseconds.
o Unit Time: the time interval between each update, set as 72 milliseconds. (20)
4.2 Create a GLabel with font Segoe UI to display how much time is left on your timer, which can appear anywhere on the console window as long as all the digits are clearly visible. If 05:09 milliseconds are left, your timer should read 5:09 as shown above instead of 05: 09.
|
|
|
|
|
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
Try it yourself, you may find it is not as difficult as you think!
If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Sorry not an assignment working on a small work project
I'm the only one in the group willing to learn java
|
|
|
|
|
Well I am sorry, but we are still not going to do your work for you.
|
|
|
|
|
can u refer me to a good web site
|
|
|
|
|
|
OK specific question
how get elements from an array like this
array[1] = 3, 4, 5
now
get array[1]. first element which is equal to 3
|
|
|
|
|
|
i want to restore a backup file created by mysqldump but it doesn't respond and not restoring the file here is my command.
Process runtime = Runtime.getRuntime().exec("mysql -u root mysqlsarafi< C:\\xampp\\htdocs\\backup.sql");
JOptionPane.showMessageDialog(null, "Done");
int complete = runtime.waitFor();
JOptionPane.showMessageDialog(null, complete);
if(complete ==0){
JOptionPane.showMessageDialog(null, "Succed");
}
else{
JOptionPane.showMessageDialog(null, "not succed");
}
|
|
|
|
|