Jaap Vermeer

Greenhorn
+ Follow
since Apr 04, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jaap Vermeer

The (small) company i work for is going to hold a contest targeted mainly at IT students at the nearby university.
Since our company mostly makes webapps in Java, we want the contest to be in that direction too.
Now we have to come up with a nice challenge for these IT students. This is pretty hard.
Would anybody have any ideas for such a contest? I could say in what direction i'm thinking but i don't want to push you in a specific direction here so i won't.
It should be possible to make it in a couple of days.

I forgot to mention: the resulting code will be made availble to the world.
[ June 27, 2006: Message edited by: Jaap Vermeer ]
17 years ago

Originally posted by Trevor Price:




This is not a very efficient way to put a tree in a database. A better way (in some respects, not all) is this:

No data redundancy. It could be a bit harder to build a tree from this, though.
17 years ago
Well... Paul Clapham's code is definitely the way to go if you want any sort of maintainability. Then to make it faster, you'll have to profile the code and see what it is doing in thos 6 seconds.
Although 1000 iterations a second does not sound absurd, you might be able to make it faster.

The direction you are going, given your example, sounds bad. The order in which the nodes are processed will (likely) not have a major effect on performance, you still need to go through 7000 nodes.
17 years ago
No at the moment we do not. If we start doing that in the future, i will let you know.
17 years ago
Better Be B.V. is looking for people for multiple positions as Java Developer, both junior and senior.

Based in Enschede, The Netherlands, Better Be is expanding with a branch office in Eindhoven to better serve customers in the south of The Netherlands.

If you are interested, mail your resume to anita.van.de.weijer@betterbe.com or take a look at http://betterbe.com/
17 years ago
Personally i think those kind of systems suck, but who am i to judge you?
Any language/environment will do for suck a program, but since you asked here, we will of course tell you that Java is the way to go.

Is there any language/environment that you have experience in, building webapps?
17 years ago
Double-escape your regex identifiers like this:

Because you are creating a string first, and then a regex from that string.
[ May 02, 2006: Message edited by: Jaap Vermeer ]
17 years ago
You could make a new int yIncrement and make it -1 if you want to go down and +1 if you want to go up and then do
y += yIncrement;
17 years ago
Because my compiler sais:
The method format(String, Object[]) in the type String is not applicable for the arguments (String, int)

I'm using Java 1.4
17 years ago
Is there a simpler way to write this:

I am trying to convert "3" to "0003", or "32" to "0032" etc.
17 years ago
That may not be possible with NumberFormat. You could therefore use
java.util.formatter
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html
17 years ago
Are you allowed to assume that the source is valid xml? If so, use an XML parser and SAX or DOM through it.
If you just go through the xml in a "linear" way, you can keep a stack of open tags and check that if the one currently closed equals the last opened.
17 years ago
More efficient in what?
- Memory usage
- CPU usage
- Programming time
- Maintainability

The first 2 you can test yourself in 5 minutes, as for maintainability and such i would prefer the second way, but some may not.
17 years ago
For future reference:
There's a method named setCheckbox() that can be used for this.
17 years ago