Peter Allen

Greenhorn
+ Follow
since Apr 13, 2002
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 Peter Allen

Just a question that I was wondering about. I remember reading that Servlets have a speed advantage over JSP. Why is this the case, shouldn't it be about the same? What's causes JSP to load slower? Any answers would help, thanks.
18 years ago
Thanks for the help. My friend found what was wrong, the HTML tags I was inserting was affecting the final String and how the StringTokenizer worked. I knew I had it working, but at the same time I feel stupid for not catching it. Thank you for your help though.
18 years ago
I'm not trying to get too fancy with this. It ALMOST works, I just need help recognizing keywords when they're at different positions like the one I mentioned (like if its not surrounded by a space, tab, etc.) I just wanted help finding a way to fix this, otherwise it works the way I wanted to, even if it is very very messy. Thanks
18 years ago
Oops, sorry I should have seen that.
18 years ago
Sorry, I couldn't find an answer to this. I've been trying to create my own parser to convert a .java file into .html format and inserting syntax highlighting. I thought I would give it a try, but it seems harder than I thought. My code is very sorry, for that I'm sorry, but it actually highlights all the keywords defined. The only exception is when a keyword doesn't have a delimiter character before it. This is a big problem for me. Here is what I have:

This code is reading it's own .java file and creates an HTML file and should color all the keywords red. The first import statement isn't highlighted red because it has no character before it, and there are other times when this error can occur (ex: if(true) {break;} or any other keyword in a way like this). I believe I have bad design or I'm overlooking something. Can anyone help me out? Thanks
PS: Also if anyone can find a better algorithm or can do something more efficiently, I'd appreciate help on it or a solution to that particular problem. I know this code is pretty inefficient, but this is the best I could do. Thanks again.
[ April 26, 2002: Message edited by: Peter Allen ]
[ April 26, 2002: Message edited by: Dirk Schreckmann ]
18 years ago
You'll probably want Tomcat. Here's a link to a tutorial, it shows you everything you'll need as well as the installation. Good luck.
18 years ago
I needed help on this, but I'm not finding an answer. I'm trying to focus on java programming, but I'm out of ideas of what I could program. This isn't ideas for final projects in college, just simple exercises and programs I could make. I think it would be helpful if everyone could post ideas or links for simple program ideas. I'm trying to focus on algorithm designs also (usually dealing with arrays or Strings). Here's what I'm looking for:
http://www.javaranch.com/cattledrive.jsp
or
http://mindprod.com/projects.html
but I've done all those that I could do at this point. Even college pages with exercises will do, I'm just in need of ideas Thanks for any suggestions.
18 years ago
Thank you for the reply. Interestingly enough I found another solution from delphi code I saw, also some java code and I combined it. This does both functions, to roman numerals and also to arabic numbers. If anyone is interested, take a look
18 years ago
I've been reading up on Web Start and it sounds very interesting. I remember having found a link, it may have been javaworld, sun's page, or I'm not sure where, but it had a listing of professional programs using web start technology, does anyone know what I'm talking about or has a link to it? I'd like to see web start in implementation. Thank you for any help.
18 years ago
This is an ugly way of doing it, but maybe it'll give you an idea. It works as long as the input is always given in that way.

I hope that'll help you.
[ May 03, 2002: Message edited by: Dirk Schreckmann ]
18 years ago
Thanks, I'll look around for it. I'm positive that my book has a serious problem in its exercises. It assigns this particular problem prematurely. I've been working at a solution, and there is no way this can be done using only if statements (which is as far as the book goes when assigned this exercise). It hasn't even gone into loops, Strings (in detail), anything. Only simple math functions and if and case statements. I guess it's ok, I want a real solution using any technique, just because this problem has been bugging me
[ April 13, 2002: Message edited by: Peter Allen ]
18 years ago
This question has always bothered me in a book I read a while ago and I can't find a proper solution. It's a program to convert a given number(integer) to roman numerals, for some reason I think I'm not doing this the most efficient way. Whenever code is repeated like this, there has to be something I missed. Loops aren't even covered yet in the book, yet this exercise is given. I've long finished the book, but I just wanted to know what I was doing wrong if loops weren't intended to be used, and my code looks bad enough as it is... here it is

There must be some other design I was overlooking, especially since this book is easy, including the exercises. This code is very ugly. Can anyone see what I'm overlooking in the design? Thanks.
18 years ago