Huang Qingyan

Greenhorn
+ Follow
since Jan 18, 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 Huang Qingyan

Hi,
How can I develop application on Symbian using Java? How do I go about it and is there any tutorial on J2ME with Symbian?
Please kindly advise me.
21 years ago
Thank you for your kindest reply. I know how to deal with the problem. Once again, thanks alot.
21 years ago
hi,
Can you guys please kindly teach me on how to encode a URL String(eg. MIDlet-Server-URL: http://123.123.123.1) into the MIDlet .JAD file so that my MIDlet can use the getAppProperty() to get the URL String value.
I heard about this once but I do not know how to add the value into my .JAD file and implement the getAppProperty() into my MIDlet source code.
Thanks alot.
Warmest regards,
Qingyan
21 years ago
Hi again,
First of all, thanks for you guys's kindest reply. Anyway, I guess I had to start learning XML parsing. I do heard alot about XML great stories in the past.
Can you guys please kindly tell me again what link that can give me good tutorial on XML parsing?
Warmest regards,
Qingyan
21 years ago
What I mean is there any other alternatives rather than using StringTokenizer()?
21 years ago
Hi,
Can you guys please kindly teach me on how to extract data from a webpage using J2ME?
I had succeded in the connection part and now my main problem is how do I extract the information that I wanted?
For example:
<html>
...
...
]1. the data i wanted<br>
</html>
Now form what you guys might had guess, the data that I wanted to extract is "the data I wanted". So how do I go about this?
Warmest regards,
Qingyan
21 years ago
Java may not be capable of doing this. Try using C/C++ to do it.
Read documentation on these topic and do some simple project for a start.
Dear Tiger,
It is so nice to hear from you again. Thanks for the trouble of your source code. Can I ask you another question again?
My question is how do I read the text data between two characters or two String, for example:
@HelloWorld@
test_HelloWorld_test
The data I wanted is of course the text "HelloWorld", but how can I do it? StringTokenizer class cannot do this kind of stuff.
Can you please kindly advise me on this?
Warmest regards,
Franco
21 years ago
I think the best effect is to read some documentation on sun website. Try some hints from the well known search engine and you will defintely find some answer.
21 years ago
Dear developers,
I wanted to send data in a java application to a servlet which the servlet has a post() method to extract the data. My problem is the whole thing just doesn't work. Below is my codes and please kindly advise me on my problem.
--------------------------------------------------
import java.io.*;
import java.net.*;
public class StarhubSms{

private String mobile = "90278850";
private String msg = "success";
private String host = "SHCORP";

public void startSms(){

try{
URL url = new URL("http://www.starhub.com.sg/servlet/SMSServlet");
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
conn.setUseCaches (false);
conn.setDefaultUseCaches (false);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");

String message = "host="+URLEncoder.encode("SHCORP") + "&mobile="+URLEncoder.encode("90278850") +"&msg="+URLEncoder.encode("she");

BufferedWriter out =
new BufferedWriter( new OutputStreamWriter( conn.getOutputStream() ) );

System.out.println(message+"\r\n");
out.write(message);
out.flush();

out.close();

System.out.println("Message sent!!");

}
catch(Exception e){}

}
}
-------------------------------------------------
Warmest regards,
Franco
21 years ago
Dear developers,
Can you please kindly advise me on how to send a whole
file across the network.
For example, I create a socket between a server and
client. I wanted to send a abc.exe file from server to
client. I have try using BufferedReader's readLine()
method to read the abc.exe file line by line and send
them line by line. It has no problem sending and
receiving but when I open the file at the other side,
the file seems to be corrupt.
My another question is how to write java codes to
block certain port from coming into my PC or network.
I think the concept is something like a Firewall. Can
you please tell me the Java APIs for this issue?
Warmest Regards,
Franco
21 years ago
Dear developers,
Can you please kindly advise me on how to send a whole
file across the network.
For example, I create a socket between a server and
client. I wanted to send a abc.exe file from server to
client. I have try using BufferedReader's readLine()
method to read the abc.exe file line by line and send
them line by line. It has no problem sending and
receiving but when I open the file at the other side,
the file seems to be corrupt.
My another question is how to write java codes to
block certain port from coming into my PC or network.
I think the concept is something like a Firewall. Can
you please tell me the Java APIs for this issue?
Warmest Regards,
Franco
21 years ago
Hi there,
I have try using Midlet on Nokia 9210 mobile phone. When I click on the "connect" button, it will prompt me for a dial up to my ISP. After dialing up, the process will be as usual.
I suppose using GPRS will create the same result.
Hope this may help.
Warmest Regards,
Franco
21 years ago
Dear expert,
What you mean is no matter what extension my file is, I can only use byte by byte or line by line. Here is an example:
-----------------------------------------------
Socket sock = new Socket("127.0.0.1", 15000);
FileOutputStream fs = new FileOutputStream("test.exe");
PrintWriter pw = new PrintWriter(sock.getOutputStream);
pw.println(fs);
pw.flush;
-----------------------------------------------
Can I do it inorder to send the whole file across? So the other side will receive the file line by line too.
Please kindly advise me.
Warmest regards,
Franco
21 years ago