User Profile
Collapse
-
They reloaded because of a redirect on the previous page. Double-clicking the back button usually fixes those. No magic involved there - it's actually normal behaviour on large sites that move pages from time to time. -
Oh - and reading 50,000 words into a HashSet like you described in the above code may work, but it's going to kill some serious memory. HashSet really wasn't meant to contain that many entries. Besides, you have to create the HashSet every time your program runs.Leave a comment:
-
You might need to rethink this. An exhaustive search of english.0 is going to take a while. You probably need to build a binary file that contains a search tree instead. Then you would traverse the tree until you found the word (spelling was correct) or you ran to the end of the tree (word was not correct). You can get some very good performance this way.Leave a comment:
-
You can trap the onunload event in Firefox and do it using some very Firefox-specific code, but otherwise it is impossible. It opens up a whole can of worms with privacy anyway.Leave a comment:
-
I think the bit of code where you check the highScore and the current score should go in your function right after you display the Congrats message. Checking the scores outside of that would be pointless because you just declared them as zero and they haven't changed yet!Leave a comment:
-
Let me start by saying all the techniques for hiding JavaScript code can be exposed. It is a script language; it gets interpreted, not compiled, so the source always remains intact in some fashion.
If IE is the only thing you are going to use, then you can "encode" your javascript into .jse files.
http://www.microsoft.com/mind/0899/s...riptengine.asp
This is really nothing more than...Leave a comment:
-
If I am reading your question correctly, you want to pass some sort of encoded binary information in the HTML page to be read in by a JavaScript that is included on that page.
To do this, the binary content will need to be Base64 encoded or somesuch. Browsers get ugly when raw binary data appears in the HTML. There are plenty of places you can find a JavaScript Base64 decoder.
You can simply place the Base64 encoded...Leave a comment:
-
-
Simple. Assuming x and y are already initialized doubles containing the x and y coordinates respectively:
Code:Point2D.Double p1 = new Point2D.Double(x, y);
Leave a comment:
-
Okay... First off, don't expect to get your assignments done by asking for solutions in a public forum. Since it's almost a month since your post, I'll assume that the assignment is passed and give you the "meat" of the work:
Code:for(int i = 1; i < 20; i++) { System.out.println(""); // start new line for(int j = 1; j < 10; j++) { System.out.print((j*i)*9 + " ");
Leave a comment:
-
My apologies if I seem a bit nosy, but I am interested. May I ask what is motivating your shift from Gentoo to FreeBSD?Leave a comment:
-
Try:
Code:javac -cp . *.java
Code:javac -cp .;c:\my\dir\here\;c:\some\other\path;c:\path\to\jarFile.jar *.java
Leave a comment:
-
Assuming you are working in a Windows environment, it might be a better idea to use a different approach. Instead of connecting to the DB2 database directly with IBMs JDBC driver, try using a Windows ODBC driver for DB2 to create an ODBC data source in Windows. Then use the JDBC/ODBC bridge to connect to the ODBC source. Generally, I have found that the more advanced features are better supported in the ODBC drivers than in the JDBC drivers in most...Leave a comment:
-
You can integrate ant build scripts into NetBeans and you can integrate svn into ant scripts by using something like svnAnt. SvnAnt is available from http://subclipse.tigris.org.
It's not the best documented tool in the world, but I've been using it for a while - not in NetBeans, but just with Ant - and it works great.Leave a comment:
-
First off, I think this is in the wrong forum. This is JavaScript, not Java - there is a HUGE difference.
But, here is an answer anyway:
In the editor that works, this.parentNode .parentNode refers to the form tag - which is the parent of the textarea named "txt". This code works.
The problem is in the other half of your code. Here, this.parentNode .parentNode refers to the tr element - which is...Leave a comment:
-
The performance loss is minimal in most implementations . It depends on the JVM and the compiler.
Generally, the data written to the ObjectOutputStr eam will be the same as if calling writeUTF() on the underlying OutputStream. There is one key difference though and this is true of all Java objects written to ObjectOutputStr eams:
If you use writeObject() multiple times for the same object instance, only the first call will...Leave a comment:
-
Your question can be interpreted several different ways. If you are looking at a text file that is always formatted the way you have described in your example, you can simply read in the line and split it with space as the delimiter and read the second field.
If you are asking how to find out if a line in a text file that is supposed to contain numbers actually contains a letter, you might need to take a look at using regular expressions....Leave a comment:
-
You might want to check to make sure the element you are looking at actually HAS nodes. A common mistake some developers make is assuming that the nodes they are querying have content. Try the hasChildNodes() function before querying the firstChild.Leave a comment:
No activity results to display
Show More
Leave a comment: