Win a copy of Spring Boot in Practice this week in the Spring forum!

imran quazi

Greenhorn
+ Follow
since Dec 01, 2006
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 imran quazi

Thanks a lot David,
I was doing the same thing, i.e, iterating the 1st array and putting the value in the 2nd one. this method does it more neatly.

BTW, this is ok for arrays, but what if its not an array? then is it possible to do what i asked for?
14 years ago
Hi,

I have this code:

Now I want a copy of a1 assigned to a2, but the original a1 will not be affected, so if I remove an element from a2, from a1 it won't remove.

I don't want to use clone. Is there any way to do that?

Kindly help.

Advance thanks, imran
14 years ago
Thanks everybody . It worked.

but I couldn't find any method as getKeys().
15 years ago
sorry please ignore the <code> & </code> part
15 years ago
Scenario:
I'm populating a hashtable by taking values from 2 columns of a csv file. Now, I want to write the key/value into a properties file with some formatting, such as:
<code>
key = value;
</code>
I'm having problem in writing into the file as I want to loop through the hashtable until it ends, and taking the key/value pair from it.

Please suggest mer hoe to do that.
15 years ago
Hi,

I want to know is it possible to set the values in a properties file thru java program?
The scenario is like this: i'm getting 2 or more product id's from xml. Now i've to display a proper message where that 2 product_id will be inserted. The message is already defined in the properties file as a template. Now i've written the properties file like this:

That product1 & product2 value should come from xml.How can i do this?

Another thing is that,i'm using eclipse and its giving error:

Where i've to keep the properties file? i've tried keeping it at the same place where java files are residing, in a different folder outside the package...but its giving the same error...

please help
15 years ago
My friend has a situation: a jsp page having links to different project specific details. When user clicks on any link it will fetch the related details from the DB and should show that in the same page. He's stuck in the thing that it has to be shown in the same page.

Please suggest.

Regards.
15 years ago
JSP
HI,

I'm trying to connect with oracle installed in different machine. I've oracle client installed in my machine. So i'm writing like this:


abcd is the dns name.
My question is what i've to pass as parameter in the getConnection() method if the other machine has ip: 10.124.12.148 and port:8081.?
Just do:

int x=0;
char c='a';

x=c;


You can always convert a char, byte or short into an int without explicit casting, because they're widening conversion.
15 years ago
HI,

I'm trying to connect with oracle installed in different machine. I've oracle client installed in my machine. So i'm writing like this:


abcd is the dns name.
My question is what i've to pass as parameter in the getConnection() method if the other machine has ip: 10.124.12.148 and port:8081.?
15 years ago
Hi Ranchers,

I want to read a csv file and separate out and store in String each comma separated values. I am stuck at reading a single line at a time. Can anybody please show me a piece of code to do these?

Thanks
15 years ago
Thanks,

I used strategy pattern and its working nicely.
15 years ago
A scenario occurred like this:
3 classes: Bat, Eat, Fat. When Bat is instantiated only Bat related methods are called. When Eat is instantiated Eat+ Bat related methods are called. When Fat is instantiated Fat+Eat+Bat (means all) methods are called.

Bat & Eat are language specific & there are nine languages. So, nine Bat & nine Eat. But, Fat is not language specific, there's only one Fat. Now, the question is how it can be designed so that when suppose french is passed as language parameter Bat_fr+Eat_fr+Fat specific methods will be called.

I thought of making Bat as interface which will be extended by Eat interface & which will be implemented by Fat. Don't know if it is ok.

Kindly guide me.

Regards,
Imran
15 years ago
HI,

I would like to know is there any way in java to control the precision of floating point while printing like there in C? (%f etc.)?
15 years ago