Kelly Harris

Greenhorn
+ Follow
since Mar 27, 2002
Merit badge: grant badges
For More
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 Kelly Harris

This should be simple but I am having no luck. I want to be able to convert a String like "05/01/03" to a Date type. A have found SimpleDateFormat and can only convert a String like "07/10/96 4:5 PM, PDT" to a Date type. Any ideas?
Thanks
kelly
20 years ago
Thanks Ramesh and CJ. Your examples are similar to mine but yet mine does not work. I guess the difference is I need to put public instead of function? I believe I tried it but I will try again. Maybe it is a problem with Tomcat?
21 years ago
JSP
Thanks for the answer but beans are not the answer I was looking for. I did not wnat to create any Java code. It appears that beans & servlets are the only answer here. Thanks anyway.
21 years ago
JSP
I want to be able to reuse code through a functional process without having to do a cut & paste and not have to create .JAVA code and be needing to recompile.
ASP does what I am trying to do very well. Unfortunately or fortunately I need to write in JSP.
21 years ago
JSP
I have a small sample of a JSP that I would like to get working. It does not do anything special but the concept I want to get working. What am I doing wrong.
Thanks,
"contents of .JSP"

<SCRIPT LANGUAGE=javascript RUNAT="Server">
function String funcTest( String value)
{
return value;
}
</SCRIPT>
<HTML>
<BODY>
<%= funcTest( "Test text") %>
</BODY>
</HTML>
21 years ago
JSP
I was not sure what you are trying to accomplish. Does this help?
kelly
public class TestBreak3
{
//Main method
public static void main(String[] args)
{
double pi$$ = 4.00000;
double pi1$ = 3.14159;//Math.PI;
double pi2$ = 3.14;
double pi3$ = 3.141;
double pi4$ = 3.1415;
double divisor = 3;
double dividend = 4;
int count = 1;
System.out.println("Term\tValue of pi\n");
////////////////////////////////////////////////////////////
while ( (pi$$ < pi1$ || pi$$ > pi1$) && (count < 10000) )
{
pi$$ -= (dividend/divisor);
if ( ( pi$$ >= pi2$ && pi$$ < 3.15)
||( pi$$ >= pi3$ && pi$$ <= 3.15)
||( pi$$ >= pi4$ && pi$$ <= 3.15)
)
{
System.out.println(count + ":\t" + "-(" + dividend + "/" + divisor + ") =" + pi$$ + "\n");
}
divisor = divisor + 2;
count = count +=1;
pi$$ += (dividend/divisor);
if ( ( pi$$ >= pi2$ && pi$$ <= 3.15)
||( pi$$ >= pi3$ && pi$$ <= 3.15)
||( pi$$ >= pi4$ && pi$$ <= 3.15)
)
{
System.out.println(count + ":\t" + "+(" + dividend + "/" + divisor + ") =" + pi$$ + "\n");
}
divisor = divisor + 2;
count = count +=1;
} // while
}
}
21 years ago
I have a need to be able to set/change a String value in a called method. Does anyone know how to pass a String "by reference" and not "by value"?
example code might be:
public void setValue( String value)
{
value = "I am now set to a value";
}
public static void main(String args[])
{
MainClass test = new MainClass();
String str1 = "";
String str2 = new String("");
test.setValue( str1);
System.out.println( "str1=" + str1);
test.setValue( str2);
System.out.println( "str2=" + str2);
}

I DO NOT want to have a method like:
public String setValue()
{
return "I am now set to a value";
}

Thanks for your help
kelly
21 years ago
I think I spoke too soon. I will be trying RandomAccessFile. Any other ideas will be appreciated.
21 years ago
Howdy.
For example: I want to search a file for a string. If I find the string I would like to replace the text I find with some other text. I was planning on writing the file contents un to that point to a temporary file. Concat the text I want to replace and then concat the rest of the original file.
I cannot seem to find anything that is similar to the seek & tell functions that C/C++ has. Is there anyway to do this other than to write the file out to a temporary location and then about that file is the text is not found?
Thanks
21 years ago
I have heard much talk about the two subjects but would not know if I caould really use the informaton in some way. Can anyone suggest a good web page or white paper that discusses this area?
Thanks
Thanks again Angela, you are the best.
21 years ago
Data Pooling is great the only caveat you have to pay attention to is the number of connections. Older versions of Access only allowed a small number of connections (like 20) at the same time. More recent versions of the drivers allow a more realistic amount.
21 years ago
This is why I like this site so much, people are willing and able to answer questions without expecting anything in return.
I am not real familiar with servlets yet but I appreciate having people like you around.
Thanks
Kelly Harris
21 years ago
Thank you Angela. I do not know why I used the Enable Method. So what does Enable do? From what I read it should have worked.
21 years ago
I have never heard of any menu system that will display a sub menu when ALT + A + B is pressed. The way I have seen menus work, ALT + A will bring up the A menu. Pressing a B will bring up the B Sub-menu.
Recently working with menus I found that Listeners are the way to implement most items associated with the clicking of menu items. Check them out.
As you can see I am new to Java Also and I hope I am helping here.
21 years ago