Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Edgar Balderas

Greenhorn
+ Follow
since Jun 13, 2009
Veracruz, México
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 Edgar Balderas

Greg Charles wrote:The problem is <= should be <

args[args.length] is always going to cause an out-of-bounds exception no matter how many args there actually are. In Java (as in C and C++) arrays are indexed from 0 to length - 1.



He is right.
12 years ago

Rob Prime wrote:What happens if --day becomes 0, or ++day overflows to the next year (366 / 367)?



Yeaah, I thought that later, and made something like this:

Where ONE_DAY is the long static value in millis (86400000). But your code using:

Rob Prime wrote:Use cal.add(Calendar.DAY_OF_YEAR, -1) and cal.add(Calendar.DAY_OF_YEAR, 1) instead of setting the day of year.

instead of using Calendar.setTimeInMillis(long) works great also.
12 years ago
I made a little snippet that do what you need:





You pass to the methods a Calendar object, like today:
Calendar cal = Calendar.getInstance();
cal.set(2009,5,17);
12 years ago
You should get the day of the week with Calendar.get(Calendar.DAY_OF_WEEK) and compare this with SUNDAY/MONDAY (depending which your first day of a week). And update a new Date with the day you input minus the total of milliseconds of a day, and compare this again in a loop until your Calendar.DAY_OF_WEEK equals the day you want (SUNDAY/MONDAY).
12 years ago
So bad. But if you make your effort you won't need any second chance. Good luck.

Jeanne Boyarsky wrote:It's not like what you do at first will be what you have to do forever.



Great quote

I teach java principles and OO at my college as a service and it's gratifying when you see students that have not programmed anything ever, coding working-programs.
It's soo gratifying to see your applications working without fails, also.
12 years ago
Hi, it is good to know that you decided to take the exam. Now go focus on your questions:

1. Look at here for that: http://www.sun.com/training/savings/retake.xml

2. Yes, in the question you can see how many answers to check.

3. After you finish the questions, and before you submit the answers, you can see a table of marked questions (by you) and incompleted questions (unanswered and incompleted in the way you say).

I was curious about that, so I searched a little and found a very interesting article for everybody who is going to take the exam: http://certcities.com/editorial/exams/story.asp?EditorialsID=42
There you have your answer.

with the multiple-choice/multiple-answers questions, all the correct statements must be selected and none of the wrong ones -- otherwise you simply get no credit at all.

.

4. It depends of the programmer and the experience of everyone.
Your trace suggests that the java environment variables are not set correctly.

Look at http://java.sun.com/docs/books/tutorial/essential/environment/paths.html
12 years ago
JSP
Include directive appends the content of a jsp file to other. If you use <%@ include file="B.jsp"> inside A.jsp, the content of B.jsp will be added to A.jsp where it was called. Then, the compiler will compile them together as A.jsp.

Include action is equivalent of RequestDispatcher.include(ServletRequest, ServletResponse). In where you use <jsp:include page="B.jsp"> inside A.jsp, the processing will be delegated to B.jsp.

Static include occurs during translation time, so, works with JSP files which are going to be compiled and executed together.
Dynamic include occurs at running time (at requesting), so, works with compiled JSP pages which process requests and responses separately.
Try to reconfigure the launching.

I don't know the process very well. But you can look for Specifying System Properties at http://www.eclipse.org/articles/Article-Java-launch/launching-java.html and watch if everything is ok with your Eclipse configuration.
I passed SCWCD yesterday!
Since JavaRanch was one of my main resources for getting answers while coding (not directly because all my doubts already were posted), I would like to share my happiness with you all.

For the exam I read all the Manning SCWCD Exam Study Kit (its errata is big), wrote code samples for unknown topics, mock exams from partners, and read some chapters from Head First Servlets and JSP. This last one is soo good, but I had not enought time to read it entirely.


SCORE: 95%

[100%] The Servlet Technology Model
[100%] The Structure and Deployment of Web Applications
[100%] The Web Container Model
[100%] Session Management
[100%] Web Application Security
[100%] The JavaServer Pages (JSP) Technology Model
[80%] Building JSP Pages Using the Expression Language (EL)
[100%] Building JSP Pages Using Standard Actions
[87%] Building JSP Pages Using Tag Libraries
[100%] Building a Custom Tag Library
[83%] Java EE Patterns


My previous SCJP results:

SCORE: 87%

[83%] Declarations, Initialization and Scoping
[90%] Flow Control
[80%] API Contents
[75%] Concurrency
[100%] OO Concepts
[100%] Collections / Generics
[81%] Fundamentals


From now I expect to be an active member of this community.
12 years ago