Fritz Largosa

Ranch Hand
+ Follow
since Sep 12, 2005
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 Fritz Largosa

I should have been more precise here is the exact code:

String x = "1,046.57100000";
double double_val = Double.parseDouble(x);
[ January 15, 2008: Message edited by: Fritz Largosa ]
16 years ago
When I convert a number ####.###(1046.571) using

String x = "1046.571";
double double_val = Double.parseDouble(x);

I get an exception error "Fail to convert to internal representation".

I do not understand how there can be a conversion error with the string value being converted to a double.

Isn't the String value within the double range?
16 years ago
Okay, got it. My understanding is that a thread locks down all synchronize methods anytime it executes one of them, once it is done it releases all synchronize methods making all synchronize methods available to the next waiting thread.

My understanding of the ArrayList is that it is not safe for concurrent access since it can be read and written to at the same time by multiple threads. Of course a solution would be to synchronize access to it such as putting it inside a synchronize statement or method. Is my understanding about right?
16 years ago
Thanks, well unfortunately I am maintaining someone elses code, so I do not really want to do too many changes such as changing Vectors to ArrayList too soon as I am not yet familiar with the architecture and dependencies.

About what you said, I have some basic understanding of how synchronize methods and statements work, as in no other thread can used the synchronize method or statement until it is release by the first thread which locked it. What I do not understand is, how a Vector is said to be thread safe, and why it is called a synchronize object, without the having to put it inside a synchronize statement or method.
16 years ago
Does it mean the vector object itself is locked down, when ever a code accesses that object? Or does it mean an object in a vector is locked down, when being access? Or does it mean something else?
16 years ago
I was just wanting to know if it is possible to put some functions on a different js file. Rather than having a single huge file with all different kinds of functions mixed together. I wanted to separate the functions to different js files, to be reused later on for other projects. Kind of like putting Java files in Jar files for better reusability, and accesability. Better than having one gigantic file with all functions in it.
No inline code, everything is inside functions.
I just want to separate my function and put related function to different js files, and objects in its own files then use it all on my main.js file. I don't quite understand your question, sorry still a novice.

I was hoping for some type of Java like include function.
-------file: Math_Function_Container.js ----------


function add(){

}

function minus(){

}
----------End of File---------




----file: main.js------


How do I call function functions from Math_Function_Container.js file in this file?

---------End of File----------------
Thanks, I'll give this one a try.
16 years ago
Is there a way to search an array for multiple matches? For example My array will have
"A","AB","AAB","AA123","BC","BA","BA","BAC","C"..."Z". I want a function to be able to return, A, AB,AAB,AA123 if it receives "A", if the function receives AA it returns AAB,AA123. Anyone have any, ideas, links, documentation, which my be helpful? I'm stuck can't seem to find any helpful info for this one.

Thanks.
16 years ago
Ok I will look that up, I can use either servlet or JSP. Thanks.
16 years ago
For example I want a method which accepts a url and returns the html source of the target page. Anybody know if this can be done? Any documentations I can read or sample codes? I do not seem to find any information regarding this.

Pseudocode:

String html_source = method_get_html_source("http://www.my_page/page1.html");
16 years ago