Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-14-2013, 04:00 AM   PM User | #1
coolcod
New to the CF scene

 
Join Date: Feb 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
coolcod is an unknown quantity at this point
Java Programming please help!

dsafsfv

Last edited by coolcod; 02-15-2013 at 02:19 AM.. Reason: added code BB tags
coolcod is offline   Reply With Quote
Old 02-14-2013, 05:10 AM   PM User | #2
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 453 Times in 451 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
Quote:
Originally Posted by coolcod View Post
The problems i am having are:
1. I need to keep track of the maximum and minimum temperature in the weather-short.csv file and compare it with the max or min global variables in the compare method, what is the way to do it?
2. How should I then link this code in the html file?
Can I add:

3. Don't know the difference between java and javascript

?
xelawho is offline   Reply With Quote
Old 02-14-2013, 05:20 AM   PM User | #3
coolcod
New to the CF scene

 
Join Date: Feb 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
coolcod is an unknown quantity at this point
sorry i didnt get you
coolcod is offline   Reply With Quote
Old 02-14-2013, 05:24 AM   PM User | #4
low tech
Regular Coder

 
low tech's Avatar
 
Join Date: Dec 2009
Posts: 740
Thanks: 149
Thanked 67 Times in 67 Posts
low tech is on a distinguished road
Hi

Quote:
... trying to make a website that uses a java program ...
java and javascript are not the same

you are in the javascript forum

request a moderator to move this thread to the JAVA forum

LT
__________________
Ask not what can I do for myself, but what can I do for others

"The greatest revenge is to accomplish what others say you cannot do."
~ Unknown
low tech is offline   Reply With Quote
Old 02-14-2013, 01:54 PM   PM User | #5
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
This codes a bit tough to trace since you don't have indentation here.
The CSV is logically a two dimensional array or a collection of collection. So you could just split the readTextFile entries up into a collection. Problem is I have no idea what is in that collection, so I can't really tell you what to do with it.
You can write a simple CSV interpreter by simply splitting the string on the delimiter. A good one would need to also determine enclosure characters since a string in a csv file could include the delimiter character as well. If its something like a CSV of numbers, than a simple tokenizer on the delimiter would be sufficient. Collections can then determine min and max very easily using the Collections.min and Collections.max methods.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Tags
html, java

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:07 PM.


Advertisement
Log in to turn off these ads.