Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!

Manu Ramakrishnan

Greenhorn
+ Follow
since Jun 07, 2003
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 Manu Ramakrishnan

Hi,
My application involves building spanning trees. It takes one minute to create trees from 3 MB data. But it takes close to 1.5 hours to create tree for 15 MB data. Is is taking this long because it takes a while to allocate space during new operation? I thought the algorithm is straight forward and I don't see any performance tuning in the algorithm.
I need convincing answers of time taken is because of new object creation only.
18 years ago
I have a batch process that writes an output of 155 MB file to disk. When I observed the progress, it looks like it takes 10 minutes to write first 10 MB, about 20 minutes for the next 10 MB and so on. I used
Writer out = new PrintWriter(new BufferedWriter(new File Writer(fileName)), true);//true for auto flush
out.write(String);

Is this the most efficient way of writing or is it better to split the output to different files and merge all the files at the end? Are there more efficient ways of writing to file? I need suggestions.
Thanks
18 years ago
Hi guys,
I think the question in my previous post was not clear enough.
Please go through the code snippet.
con=ConnectionManager.getConnection();
PreparedStatement ps = con.prepareStatement("UPDATE GIFI SET DESCRIPTION=?,TYPE=? WHERE ACCNO=?");
ps.setString(2, "CHEQUE");
ps.setString(3, "1000");
System.out.println(ps.execute());
For some updations,I have to skip the first parameter, because I will not have genuine value for this field. In that scenario, I don't want the existing value in the database field to be disturbed. I want to retain the value.
How will I go about this by using prepared statements instead of building the queries dynamically using simple statements?. we are more inclined towards prepared statements b'cos we have a huge amounts of data inserted/updated.
Thanks
Manu
Hi all,
My issue is that I want to skip the updation of one parameter, without getting an exception.
I am not setting the first parameter.Here is the code snippet. Can anyone please help ?
con=ConnectionManager.getConnection();
PreparedStatement ps = con.prepareStatement("UPDATE GIFI SET DESCRIPTION=?,TYPE=? WHERE ACCNO=?");
ps.setString(2, "CHEQUE");
ps.setString(3, "1000");
System.out.println(ps.execute());
Thanks
Manu
Hi friends,
Can anybody please help ?
My scriptlet argument of the onclick event fuction is not getting translated.
<% int i=0;
i++;
%>
<html:link href="/pm/do/perform_guarantor_search" indexed="true" indexId='<%=searchBeanInstance.getPatientNumber()%>' onKlick="fillForm(<%=i%> ">
MANU
</html:link>
Thanks
18 years ago
Can anybody please help ?
I would like to use a Java String array by passing it as an argument to a Javascript function. How can I go about it. I am using IE as my browser.
Thanks
Manu
Can anybody please help ? I am using WebSphere 4.0 Application server.
I am using the validate() method for client side validation. I am getting redirected to the input Page after validation errors. But the Error Messages which are coded in ApplicationResoureces.properties not shown in the page
JSP PAGE
<%@ page language= "java" session="true" %>
<%@ taglib uri="/WEB-INF/lib/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/lib/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/lib/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/lib/struts-validator.tld" prefix="validator" %>
<html>
<head>
<title></title>
</head>
<body bgcolor="#E2E2E2">
<html:errors/>
<font face="Trebuchet MS" size=1>
<html:form action="/change_password">
<br><br><h4><b>                        
            CHANGE AUTHENICATION PASSWORD</b></h4><br><br>
<html:hidden property="userId" value='<%=(String)session.getAttribute("userId")%>'/>
<table border="0" width="50%" height="127" cellspacing="1">
<tr>
<td width="50%" height="26" align="right">User</td>
<td width="50%" height="26" align="left">
<input type="text" name="userName" size="20" value='<%=(String)session.getAttribute("userName")%>' style="background-color: #C0C0C0" readonly="true">
</td>
</tr>
<tr>
<td width="50%" height="26" align="right">Old password</td>
<td width="50%" height="26" align="left">
<html assword property="oldpwd" size="12" maxlength="8"/>
</td>
</tr>
<tr>
<td width="50%" height="26" align="right">New password</td>
<td width="50%" height="26" align="left">
<html assword property="newpwd" size='12' maxlength='8'/>
</td>
</tr>
<tr>
<td width="50%" height="26" align="right">Re-type new password</td>
<td width="508%" height="26" align="left">
<html assword property="rnewpwd" size="12" maxlength="8"/>
</td>
</tr>
<tr>
<td colspan="2" height="26"align="center">
</td>
</tr>
<tr>
<td colspan="2" height="26" align="center">
<html:submit property = "change" value="Change Password"/>
<html:reset value="Reset"/>
</td>
</table>
</font>

</html:form>
</body>
</html>
Validate method
public ActionErrors validate(ActionMapping amapping, HttpServletRequest request)
{
ActionErrors errors=new ActionErrors();
if ((oldpwd==null) || (oldpwd.length() != 8))
errors.add("oldpwd", new ActionError("error.changepwd.oldpwd"));
if ((newpwd==null) || (newpwd.length() != 8))
errors.add("newpwd", new ActionError("error.changepwd.newpwd"));
if ((rnewpwd==null) || (rnewpwd.length() != 8))
errors.add("rnewpwd", new ActionError("error.changepwd.rnewpwd"));
if (!newpwd.equals(rnewpwd))
errors.add("notmatch", new ActionError("error.changepwd.notmatch"));
return errors;
}
ApplicationResources.properties
errors.header=<h3>Errors :</h3><UL>
errors.footer=</UL><hr>
error.changepwd.oldpwd=<li>Old password length is invalid</li>
error.changepwd.newpwd=<li>New password length is invalid</li>
error.changepwd.rnewpwd=<li>Retyped new password length is invalid</li>
error.changepwd.notmatch=<li>New password and Re-typed new password do not match</li>
[ July 02, 2003: Message edited by: Manu Ramakrishnan ]
19 years ago
For a seeion scoped bean, the struts checkbox does not get rechecked after a checked value was submitted, eventhough the getter & setter methods are called in the right sequence. A value of 'N' was set as the initial value while 'Y' value denoted checked status.
Can anybody please help in this ?
19 years ago
Is there any tool available for integrating the struts-config.xml files of different developers while packaging the application ?
19 years ago
Can anybody help me in this ?
If struts checkbox tag is not checked what will be the value returned ? The mutator methods of the Form Bean is not getting invoked. Can I specify an unchecked value for this tag ?
Regards
19 years ago