Help coderanch get a
new server
by contributing to the fundraiser

Raj Ohadi

Ranch Hand
+ Follow
since Jun 30, 2006
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Raj Ohadi

Suppose a J2EE app is deployed to a clustered server that has a few cluster nodes a) b), c), etc. From one browser window if we access the java application from following URLs simulataneously


Do they share same session ?

10 years ago
Seeking help from some native English speakers -- Apple CEO said they are going to release new products across 2014. Does "across 2014" in English mean it includes 4 seasons of 2014 (winter , Spring, summer, fall)?
10 years ago
Borders was my favorite bookstore to browse java books. It is gone now. Barners and Nobles is OK but does not have that many java books. Anybody knows any good bookstore ?
11 years ago


Doing the exact same thing of instantiating an instance of MyClass?
12 years ago
Bought windows 7 laptop. Open IE browser, it looks different from my windows XP. There is no top tabs like "view"--> source, etc. How to restore those tabs ?
12 years ago
I use RAD 8. In one workspace, I used "help->install new software" and added a plug-in. Then I created a new workspace, in the new workspace, I thought I needed to install this new software again. So I did the same thing "help-> install new software " and input the same URL, and click next, it started installing and at the end it gave error. Then I clicked 'what's already installed" and found it is already there. My questions are

1) Is it true that if I install one plug-in in one workspace, then in any new workspace that plug-in is automatically there and we don't need to install it again ? If this is true, how can this plug-in be "carried" from one workspace to another new workspace ? Please help explain little bit.

2) As I said, in the new workspace, I tried to install the same plkug-in software again, and it started all the way till end and gave me error saying it can't complete. If this error is caused by the fact that it can't install something is already there, then does this second attempt of install cause any problem ? i.e. If this extra install attemp causes trouble, maybe I need to uninstall this plug-in and install it again ?

Although this is RAD question, I believe it applies to eclipse as well since RAD is built on top of eclipse.

Thanks. I like Aditya Jha 's approach. Clean and nice.
12 years ago
I know if it is double then there is no problem. But my prbolem is --- The Double d1, d2,d3, d4 are some variables created by other part and they have reason for it to be wrapper class, in my part I need to sum them up. Actually I can't not even replace it with 0.0 if it is null. If it is null I should just skip that one, if all of them are null then I should return null. If some of them are not null I should sum those non null values up.

12 years ago
If I have a few Double variables and I need to add them together. If any of them is null then I get null pointer exception
Doubel d1, d2, d3, d4;
Double sum = d1 + d2 + d3 + d4;

what's the easiest way to code to ensure that if any of them is null just skip it or use "0." to replace it ?
12 years ago

Hebert Coelho wrote:Iterate over it and persist each one.

isn't a simpler way (java jpa syntax wise) to persist the entire list at once ?
new to jpa. if I have a table CUSTOMER (NAME, ADDRESS, PHONE) and I have a list of <Customer> object which has the values for these 3 columns. What's the easiest way to insert the List inot table ?

The ouput is 500. It means it just simply truncates the digits after decimal. How do I use the Decimal pattern like
"###0;-###0" to indicate it has no decimal but maintain an half-even rounding mode ? I read the DecimalFormat API and it says its default rounding mode is half-even. But it seems this rounding is not applied here.

Please help.
12 years ago
I thought using <div id="xyz"> helps group html elements on a page.

1. If inside the <div id="xyz"> I need to put a few different sub-elements like <input id="abc"> , <select id="def">, etc. Then what's good about using <div> at all ? I mean, anyway I am going to use the id for each subelement.

2. If you apply a stylesheet to <div id="xyz"> , does it mean this style sheet will be applied to *every* elements inside this <div> ?
finally that "reload" javscript syntax worked for me. Thanks !
Bear, I am sorry to say that it did not work for me.

As I said, I have a click button, when it clicks it shows the hidden iFrame.

The iFrame embeds a jsp page which includes some elements. Every time after I click something on the jsp, it "memorize' it, i.e. when I click somewhere else on the main page and then click back the button, it pops up the iframe with the jsp I already clicked around instead of a fresh jsp. Did I use the syntax correctly ??