Sophia Choi

Ranch Hand
+ Follow
since Mar 22, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Sophia Choi

http://v40z1.cs.cityu.edu.hk:10380/jsp-examples/ajax/restaurant.jsp

After I click the menu id and go into the statistics linkage, the whole page cannot refresh well. So, I go back and click the statistics linkage again. The page can show all.

Why the statistics page cannot show well?

I pass 3 arrays and width length to a javascript function. Actually, I would think they do the same.

function drawGraph(g1,g2,g3,gwidth){

// Graph for main dishes
var total=0;
var calpercentage =0;
var calwidth=0;
var output="";


for (i=0;i<g1.length;i++){
total+=parseInt(g1[i][1])
//alert(g[i][1]);
}
output = '<a href=restaurant.jsp>Main Page</a>'
output += '<h2>Main Dishes</h2>'
output +='<table border="0" cellspacing="0" cellpadding="0">'
for (i=0;i<g1.length;i++){
calpercentage=Math.round(g1[i][1]*100/total)
calwidth=Math.round(gwidth*(calpercentage/100))
output+='<tr><td>'+g1[i][0]+' </td><td><img src="'+graphimage+'" width="'+calwidth+'" height="10"> '+calpercentage+'%</td></tr>'
}
output+='</table>'
document.write(output+'<br>Total participants: <b>'+total+'</b><p></p>')

... same as g2 and g3
Where can I find the other AJAX API refereces?
So, I know a little bit like XMLHTTPRequest, XMLHTTPResponse etc.

I'm using it for data exchange from server's side XML to client side because of performance.


What are advantages?
Thanks for your reply.

But when I run the code, it said log is null instead of an object.
What am I missing?

Is the log4js.js storing in web server?

I am using Tomcat and XP.
When users click the combo box like a menu from a restaurant, I want the server can store that selected value such as ip, selected value and time. So, these data can be used for graphing. This mean a report can show which food is the most popular.
In fact, I want to save this info in server side. So, this info for tracking users' behavior.
I use AJAX to retrieve a XML in Javascript. This data displays in combo box.
When an user clicks a value, the data from XML displays in DIV.
I've a question how to save the selected value of the combo box in a file ?
Hello,

Do anyone know which hosting site is free for holding perl and cgi or php ?
Also,how about JSP & servlet ???

Thanks
20 years ago
go to tucows.com . find popup . This will stop advertisment.
20 years ago
Who know how to do the following?
I really can't get any idea.
Thank you very much.

2. The propagation delay is the time required for the energy of a signal to propagate from one point to another

a)Find the propagation delay for a signal traversing the following networks at the speed of light in cable (2.3x108 meters/second):

a circuit board10 cm
a room10 m
a building100 m
a metropolitan area100 km
a continent5000 km
up and down to a geostationary satellite2x36,000 km

b)How many bits are in transit during the propagation delay in the above cases if bits are entering the above networks at the following transmission speeds: 10,000 bits/sec; 1 megabit/second; 100 megabits/second; 10 gigabits/second

3. In problem 2, how long does it take to send an L-byte file and to receive a 1-byte acknowledgment back ? Let L = 1, 103, 106 and 109 bytes.
20 years ago
I have both. Maybe they are personal use software,not include advance function like exe scanning, so they can kill the ads.Unless I buy the full version, they have fully support. Any freeware I can use instead of buying them?
20 years ago
Anyone knows how to get rid of ads234.com?
It is because it 's so annoying when I am surfing web sites. When I want to go from one site to another, ads234.com must post the adverstiment before going on.

Someone say it has a folder in program files\common \ MidADdle.
I have deleted it already.I don't know how to delete its backup files.

Anyone has my experience?
20 years ago
Thanks. Yes,I check the char before reading the whole line.
FileReader fr = new FileReader(path + fileName);
char ch = (char)fr.read();
if((ch >='0' && ch <= '9') || (ch >='a' && ch <= 'z') ||
(ch >= 'A' && ch <= 'Z')){
BufferedReader br = new BufferedReader(fr);
21 years ago
Steps:
1. upload file, expected xxx.csv. In jsp, I can only check the extension.
If not csv, prompt out an error message.
2. read upload file content and compare to my db
3. result comes out.
The problem is someone changes the xx.xls to xx.cvs.
My program does it work actually. But infinitively
because they are machine codes.
try
FileReader fr= new FileReader(path + filename);
BufferedReader br = new BufferedReader(fr);
String Line = br.readLine(); <-- problem
.....
catch exception..
21 years ago
Normally, my program can read csv files.
I change an excel.xls to excel.csv intentionally.
The file reads unexpected codes and runs without stop.
How can I detect this problem?
21 years ago
In JSP, there have servername and path in the form.
The form contains enctype="multipart/form-data" and posts to a servlet.
The problem is I can't use getParameter or session.getAttribute to retrieve
value.
So, how can I do?
Thanks
21 years ago