anirudh jagithyala

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

Recent posts by anirudh jagithyala



where 'x' is the integer array name, 'n' is the number of elements in 'x'.
This for loop sorts the elements of the array in ascending order. To sort in descending order, change "if ( x[ i ] < x[ i + 1 ] )" to "if ( x[ i ] > x[ i + 1 ] )"

I have no way of testing all of these, but I'm pretty sure they'll work.
12 years ago
the code in the first case executes the finally block


try{
//some code
return;
}finally{

}


12 years ago
Hey Dom,

Your code works fine for me..
i get the output as that of the file.
your output is obtained only when there is a space in the file. You could check comparing the output with space.

Please try out with some other files to read...... and i feel its the error is with the file you read.
12 years ago
hi R Dom,

Could you post the entire code.....?
Might be you are printing some blank space.........

12 years ago
Agree.

Further (Adding to the explanation which i came across in my early days when i was learnin C++)

if we observe


i=i+1;--> 2 operations i.e, mathematical addition operation and then assignment operation.

i++ or ++i ----> only one operation i.e, increment

I guess these operators existed in C and C++ because some microprocessors have instructions for exactly these operations. A compiler has an easy job when it finds one of these operators in your source code, because it can then just convert the code to those machine language instructions directly. I think any modern C or C++ compiler nowadays would be smart enough to also optimize a statement like i = i + 1 to an efficient, single machine language instruction, but really old C compilers of the 1970's might not have such optimizations built-in.





This number of operations also effect the processing time, processing efficiency and also the complexity,
We would be more clear if we think the same in view of cpu processing.

This is also one of the reason but is not the only reason.. as there may be many other factors effecting the processing capabilities....

13 years ago
hey Caleb,
where are you getting the errors.... Isit for your code or the code which i gave
Did you try the code with prepared statement..

please ellaborate
you can also try the concept of prepared statement



i am not clear with the question, might be this would help....
Hey Manish,

After observing your files closely i found a mistake.....
Mostly that might cause the error

First remove all the error tags { sorry for that}
then check yout EmployeeLogin.jsp withe the validation.xml file

EmployeeLogin.jsp






login-validation.xml









The name in the login.jsp and the validator.xl must be the same ,,, here you user "userName" in login.jsp and "userNAME" in validator.xml they are different.........



Hope this helps
13 years ago
check the tld file for each kind of the error tags as below............{please read the previous messages in details}


<s:errors/> tag { it needs to be used in EmployeeLogin .jsp}.......???
with an taglib statement in the begining as: <%@taglib uri="/WEB-INF/struts-html.tld" prefix="s" %>




On the top of your jsp page you can have some like this:
view plaincopy to clipboardprint?
<%@ taglib uri="taglib.tld" prefix="s" %>

<s:forEachError>
<br><%=errorProperty%> : <%=errorMessage%>
</s:forEachError>


13 years ago



On the top of your jsp page you can have some like this:
13 years ago
Please edit your first post with code tags....

i feel the EmployeeLogin.jsp is not complete.....

where did you use the <s:errors/> tag { it needs to be used in EmployeeLogin .jsp}.......???
with an taglib statement in the begining as: <%@taglib uri="/WEB-INF/struts-html.tld" prefix="s" %>
13 years ago
Welcome to Ranch..

Please use code tags to post any kind of code

Now, about your question did you try to refer and use the error tags
<html:errors/>

in your case try to insert the tag <s:errors/> ---------- this tag is used to display all the error messages
if you need to display the error message for each and every property at different positions <s:errors property="propertyname"/>

Hope it helps
13 years ago


If the array is given with some value before using it then it would work....
13 years ago
Might be a "NullPointerException" or "ArrayIndexOutOfBoundsException"..........
Did you try to execute the same....?
13 years ago
Try to experiment with other options in the security tab....
Mostly this error would be due to "Initializing and Script Activex controls not marked as safe"-----

if that doen't work try out this

http://forums.devx.com/showthread.php?threadid=5092