Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

D Preethi

Ranch Hand
+ Follow
since May 24, 2008
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by D Preethi

Hi All,

I have a basic question to ask. I have a java application, for which there are multiple places where the jre memory options can be passed. So, if I end up with a command line like this:
java -Xms=512m -Xmx=512m -Xms=128m

I wanted to know which of the Xms value is honored? 128 or 512? Is there a way I can check this?


Thanks,
Preethi
7 years ago
Thanks Bill! What do I do after extracting the values? I have the flow paths ready, but I want to automatically be able to generate a flow chart from them.

- Preethi
Hi All,

I am not sure if this is the right forum to ask this question. Please redirect me if this is not the right place. The issue I have is this:
There is a xml file which is having some info about the flow of an application. The xml has info about each state, and where to go to from each state. I want to generate a state flow diagram by looking at this xml. Any ideas on what tools I would need to use to achieve this? Any pointers would definitely help. I am ok with using any eclipse plugin as well. Please advise.

thanks in advance!

- Preethi
What I want is just a closed text box, instead of a single line. This should be something really basic. But I am not able to find which particular settings I need to change to see this in the virtual android device.

I have attached 2 screen shots here:
present_text_box.JPG - the text field as it looks now
desired_closed_text_box.JPG - the text field I want to see it as

Thanks!
7 years ago
Hi All,

I just started my first android program, and I have one issue with EditText. I have created a new EditText component and I am trying to run it in the virtual android device. What I see is this:
Label: _________________

But what I want to see is a closed text box. Something like this:
_________
Label: |_________|


I am not able to figure out where exactly I can make this change. I am trying to do this in a ScrollView. I am very new to android development. Please help me.


Thanks!
Preethi
7 years ago
Hi All,

I have an application which i can launch from cmd line, and optionally that application can take some jvm args on cmd line. There is some processing I want to do by getting the list of jvm args that were passed on cmd line. I tried to use this API:
=================
RuntimeMXBean RuntimemxBean = ManagementFactory.getRuntimeMXBean();
List<String> arguments = RuntimemxBean.getInputArguments();
=================

But this gives a list of jvm args in the env, including the ones I passed on cmd line. I am only interested in the jvm args passed on cmd line. Is there any API to get that? Or, is it something I should enhance in my application only?


Thanks,
Preethi
8 years ago
Hi All,

Given just the parent class name, is there a way to get the list of child classes?


Thanks,
Preethi
8 years ago
Hi All,

I have an example in which there is a JComboBox in one of the columns of a JTable. This combo box can have only values - X,Y or Z. However, when I try to prepopulate the table, I pass a wrong value "A" to the combo box column. This column has an associated editor and renderer. And as per the default working of a combo box, it shows the value as "X" (as that is the first option) when I pass "A". I have an array of strings maintained as a member variable in the model class of this JTable. This member variable is initiallized with "A". So, getValueAt method at this row and column shows "A" only, not "X".

The problem now is, I want to know the actual updated values in the JTable. The value "A" could not be populated, and value "X" is shown in the UI. However, if I want to get this value "X", how do I achieve that? I know I should just try to get the selected item of the combo box. What I wanted to know is, whether I should put that getter method in the editor class or the renderer class of this JComboBox column. I think my question would just help me understand how the value is getting set to default value in the first place.( what does the setting? editor or renderer)

Can someone help me understand this please?


Thanks
Preethi
8 years ago
Just wanted to add here that I do not want to use a solution like:


I am looking for a more optimized way. That is, if java itself has some class to return the list of numbers given an upper bound and lower bound. Something like this:
http://commons.apache.org/lang/api-2.4/org/apache/commons/lang/math/IntRange.html

8 years ago
Hi All,

I want to generate a series of numbers based on the range provided by a user. Like, if he provides 30-100, I want to generate numbers - 30,31,32,33,34,35...97,98,99,100. Is this possible through regular expressions in java?

Thanks
Preethi
8 years ago
You mean there is no way to do this at all in java 5 or java 6? ZipEntry class seems to have been there from 1.4 time. I am actually surprised how noone across community would have this use case. Is there no other way to address this?
8 years ago
For example, I have a file called "runMyTask.sh" which is having permissions as "710" in the zip file. But when I used the above code to unzip it, in the unzipped location, I am seeing the permissions of this file as "644".
8 years ago
In the unzipped directory, I want to retain the permissions of the files as it is there in the zipped format.
8 years ago
Hi All,

Can someone point me to the exact code that is required in order to unzip a file by retaining the permissions? I have code that is similar to the one shown in this link - http://www.devx.com/getHelpOn/10MinuteSolution/20447

I am not sure how I can make sure that the permissions are retained.

Thanks,
Preethi
8 years ago
Hi All,

I have code that looks like this:



Now, my question is:
1. I saw some intermittent errors which complained about java.util.ConcurrentModificationException. Is the above code not threadsafe?
2. Can I do the following to be sure that i never see that exception? How can I test this code? (since the issue is intermittent..)



9 years ago