Victor Ho

Ranch Hand
+ Follow
since Sep 05, 2003
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 Victor Ho

I am new to both the Restlet and Mojasef framework.

I'd like to know if either of them support:
1. Auto generation of HTML documentations on the REST APIs registered (With info such as URL, HTTP METHOD, Query String, sample post xml request, sample xml response)

2. Versioning, backward compatibility support of REST APIs.

Thanks
-Victor
10 years ago
Hi,

I'd like to know if Tomcat divides the overall JVM heap into different compartments for different web application?

I am facing a situation where one webapp is noticeably slow, while another app is running swiftly. Signs are showing it is due to memory problem, as the slower webapp runs much better after incrasing the -Xmx. But my wonder is that if VM heap size was originally the problem, wouldn't it be a problem for the second (faster) webapp also?

Thanks for your inputs.

- Victor
10 years ago
Hi,

For the Java String's hashcode() implementation:
s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]

(jdk source code):
int h = 0;
int off = offset;
char val[] = value;
int len = count;
for (int i = 0; i < len; i++) {
h = 31*h + val[off++];
}

I am curious to find out the reason for using base 31.

From a performance perspective, choosing a binary number such as 32 would make the 0(n) multiplications faster (left bit shift).

I am guessing 31 has been proven to give the best hashcode distribution on random string values?

Thanks
Victor
10 years ago
Thanks Mark.

I am basically trying to avoid making the user to input which carrier he is using. Is there a way for an J2ME app to find out this information w/o asking the user?

If so, your suggestion would work.

Thanks
11 years ago
Hi,

I'd like to find out if there is a way for a servlet to distinguish between a request coming from a Verizon phone vs. other carriers through HTTP?

I understand that the wap user-agent header field tells about the phone model, is there a way to derive the carrier?

Thanks
Victor
11 years ago
Hi,

I have had success deploying applications as .war files into webapps/. E.g. applicaiton 'xyz' -> webapps/xyz.

However, this requires the users to type the sub-dir names in the url:
http://host:port/xyz/index.html

If I would like to deploy files to the webapps/ROOT directly, any pointers on how to do so?

Thanks
Victor
11 years ago
Hi,

I'd like to find out what is required on Tomcat setup to make index.wml to be retrieved by default when a request is coming from a WAP browser?

With my current setup, if url explicitly contains index.wml, page shows up. Otherwise, it complains resource not found.

Thanks
Victor
11 years ago
Hi,

If I have a custom Ant task which uses Runtime.exec() to run another process. Is there a way in the Ant build.xml file to set the PATH environment variable for appropriate for this user process?

Thanks
Victor
12 years ago
Hi,

For a property whose value is a location, for e.g.:
<property name="wtk.home" location="${build_dir}/j2me-wtk/2.2" />

Is there a way to validate the path of the location before actually defining the property? (I am thinking there must be some if/else Ant tasks or similar flow control tasks)

Thanks
Victor
12 years ago
Hi,

I am facing a problem launching my Midlet that has been signed by a Verisign code signing certificate.

Before the midlet is signed:
- It is installed as "untrusted" third party
- It launches fine
- It throws Security Exception when trying to send SMS

After the midlet has been signed with Verisign:
- It is installed as "trusted" third party
- It fails to launch, the screen just refreshes when trying to open the midlet

Has anyone face similar issues?

Please help!

Thanks
Victor
12 years ago
Hi,

I would like to find out the default location of keystore in JDK 142.

Thanks
Victor
12 years ago
I had the same problem. Instead of replacing jars in WTK:

I had:
<property name="wtk.wma.enabled" value="false"/>

And use this in my classpath explicitly:
<property name="wma.jar" location="${wtklib.dir}/wma11.jar" />

Victor
12 years ago
Hi,

Is it possible for a midlet to access images or ringtones saved on the phone?

Thanks
Victor
12 years ago
Hi,

Does anyone know (or have links to) a list of phones that have support for JSR75 (PIM for Contacts book access)?

Thanks
Victor
12 years ago