Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!

Eiji Seki

Ranch Hand
+ Follow
since Feb 15, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Eiji Seki

The point is that I don't need to submit a form with the link. I just want to use a navigation case configuration to dynamicaly create the link.
14 years ago

I am a Struts veteran beggining with JSF playing with tutorials and stuff.
I want to know if there is a way to work with regular dynamic links intead of the always-use-javascript way. More exactly, I want a link object that referers to a navigation name like "home", for example:

But instead of using javascript, simply reads the configuration and renders a html output like

pretty much like Struts' ActionForward. I understand why using javascript in links is good sometimes, but it also limits the user capability of accessing directly a link or using the "open in new window" feature.

Thanks for any help.
14 years ago
So that's one of the many things you may learn taking the Developer exam.
Add a couple of wheels to your portfolio.
Err... I guess I did not explained it well.
I meant neighter of the mentioned possibilities.

I am using english for all comments and names and no special characters at all (sorry, Andrew, I will not be able to answer your question). But even doing so, I am saving all my files in UTF-8 format. Well, for this project I see no special reason for doing that, so I will keep it simple and use iso-8859-1 instead.
No need for you to go back .
Your solution looks very consistent, so I will think about using Condition or Lock for each record. Thanks a lot.
Sorry, Ronald, I did not understand what is the use of Condition. If I understood correctly, it is kind of an extesion of the Object wait and notify methods. With it we can have separate waiting groups and notify only the objects in one of them.

But since I am just controlling access to record writing, I see no need for that. Even if I was doing read and write locks, them should not I just use the ReentrantReadWriteLock?

I now undertood your implementation and where you are using Lock. I'm planning a different aproach: using an ConcurrentMap to store Lock objects, one for each record (together with the client ID). Is it too strange? Since I never worked with this concurrent package, I'm not sure how it works, but as fas as I read I think this solution is possible.

BTW, I'm also working on URLyBird 1.3.3.
Thanks, Ronald, I'll take a deeper look.
You should stick with the second one, since that is the official convention.
Conventions are supposed to be followed, and good conventions minimize the exceptions. If there were many of them, it would be pointless, since the code would look chaotic.

Specially if they were to use some relative requirement like "if it is simple". Much better and easier if we just use the same rule for all cases.

Besides, spaces around == operator is a great idea.
From the FAQ:

* Which version of SDK should I use?

Your submission should have something like this:

(...) the submission that you return must have been tested and
shown to work under a production (not development) version of
the Sun Microsystems' Java 2 plataform and that plataform must
not have been superseded by a new production version for more
than 18 months by the time you make your submission.

You may use the link in the next question and do the math. When in doubt, just use the latest version.

Example calc: I want to use 1.4.1, but 1.4.2 (the right next version, although 1.5 is also released) has already been released on June 26, 2003. Adding 18 months to that, around January 26, 2005. So if you upload your assignment before that, you are ok.

* How can I find out when a version of the JDK was released?
About returning String[][], you can just get the int[] and then call the read(int) method for each of the ID's. Although it certainly is not an optimized solution, is the one that uses only the given interface.

You can also assume that the interface is required but not necessarily needs to be used by you. In this case, the given interface will probably be used by an automated test engine. You may then create another interface that is used by your business layer that contains a String[][] findValues(String[]) method (or subclass the existing interface). I am not sure this is a valid way out, though. Since I had no such problems with my interface, I am just sticking with the given interface (and doing like the first solution I mentioned).

Now, the exact match is problematic. You could use the starts-with (SW) method and then re-test the matches in the business layer.

You could also take advantage of the fact data on the data file has blank spaces filling the space (at least in my case) and send a query also with blank spaces.

If you are using a different interface as the second solution for the first problem, you may just specify that the String[][] findValues(String[]) method just do exact matches.

Well, you get the point... it looks like some weird solution is necessary.

I just noticed that my locking solution will not use much of the java.util.concurrent package. Is it strange? Is someone implementing in JDK 1.5 and using some important class of that package?

The only one I am planning to use right now is ConcurrentMap.

Another one interesting is the Lock interface and the ReentrantLock class. I'm thinking about using it's lock() method for record locking. Is it appropriate?

Should I study more about the features the package provides? Any advices on this?

I think you will have an automatica failure. The spec is clear about not using anything not included in the standard JDK. Even if you provide the necessary library, then you will be breaking the "all code must be implemented by you" rule. You should take it away.
Don't rework.
Try to elaborate your solution, research it, design it and ask questions to yourself or to this forum before implementing.
Just an advice.
Try using a temporary file for storing the data. Read from it to show the user.
Even if the JTextArea supports it, it is not a good idea to show all the data, though... try breaking it into pages.
If the user needs all the text, really, just give him on a text file instead.
14 years ago
Maybe you should try the Java in General Forum.
1) Work in memory and then write the file using DataOutput, OutputStream or Writer.
2) Directly into the file using RandomAccessFile.

If what you really want is to look for text to replace, (the question is a bit too simple) try the regular expression feature.

ps. c'mon, let's try searching the Javadoc or even google, plz.
[ March 21, 2006: Message edited by: Eiji Seki ]
14 years ago