The problem is at this line.
if (!inFile.delete()) {
System.out.println("Could not delete file");
}
This is the line that deletes the original file in order for it to be...
Type: Posts; User: aesguitar
The problem is at this line.
if (!inFile.delete()) {
System.out.println("Could not delete file");
}
This is the line that deletes the original file in order for it to be...
I'm writing a program that dynamically updates an xml file as it is being edited. It needs an add function, delete, and save, and so far, I've gotten only the add function working properly. I've got...
Yeah, no. No one should/is going to do your homework for you.
Look up the Scanner class and/or JOptionPane
The -18 is the offset from the end of the file to put the addition inside the <channel> element.
technically, this should work.
this week will take place today from 3:15 to 4:15 in the...
All the changes are made at the bottom of the file.
<rss xmlns:media="www.hardytechsolutions.com" version="2.0">
<channel>
<title>BMHS Daily Announcements</title>
<link />...
Code to run
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.channels.FileChannel;
2688
Attached is a ZIP file containing all the files in the project, assuming you are using Eclipse, you can right click on the file manager in Eclipse and import the file system after you unzip...
Firstly use the
tags when posting code.
Second, remember, a char is a number associated with a letter, if you convert the string to an array of chars, you can xor each letter using the ^...
No, it is not always a Z and it is always in the same location. There isn't anywhere in the code that a random letter like that should show up. Aside from the Item class, all code used in that method...
I'm writing a program to dynamically update an xml file to add, delete, and edit entries in the file. I've run into an issue with the add method because when I write into the file, a random letter is...
OK, let's slow down here. Here's how I parse equations right now, minus functions and variables (why I'm here).
1. Take an input expression
2. Set up the equation for input into the parser
...
Norm, yes, at least, just the sin(2pi) part.
I know how to use the Math class and have used third party libraries in the past for mathematical purposes. My question is how to solve those functions inside of an expression, ie 3+sin(2pi)^(-3)....
You could've also moved the return statement outside of the try/catch block
If you know how to use arrays, then this problem becomes very, very simple.
What is the purpose of this jar file? Are there methods in the jar that you need somewhere else? Is the jar a part of a larger project?
Also, this thread should be in java theory as this is not...
I'm writing a calculator program for fun that takes an input from a user, via typed commands. So far, it works very well with basic ^*/+- arithmetic, however, I want to start adding functions, such...
Yes, I still don't know what it does.
That's not how my algorithm works... Care to elaborate?
I'm writing a calculator, and to start, I'm writing basic arithmetic functionality. I've figured out how to tackle the "EMDAS" portion of the Order of Ops, however, I don't have a clue on how to...
I'll give you a hint, here is the formula.
An = An-1 + An-2
Where A1 = 1 and A2 = 1.
Problem 160 - Project Euler
Problem 160. I've been working on it for a while. First attempt was to brute force the factorial using JScience's LargeInteger class and huge multi-threading. That took...
Ok, well, you can use De Polignac's formula to figure out how many factors of a prime factor there are in n!.
Could you also explain this a different way?
This is a project Euler...
For a problem I'm working on, I need to calculate some very, very large factorials; or at least the first five non-zero digits of said factorial. I've worked out the function:
F(n) =...