Anthony Bailey

+ Follow
since Sep 11, 2008
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 Anthony Bailey

What does the hibernate config file look like? I am getting the following error when using your retrieve example. I have not used any other methods yet.

Here is mine.

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
<property name="connection.url">jdbc:postgresql:CORMDBASE</property>
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="connection.username">postgres</property>
<property name="connection.password">admin</property>
<!-- DB schema will be updated if needed -->
<!-- <property name="">update</property> -->

<!-- SQL Dialect -->
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>

<!-- Bean Mapping -->
<mapping class="org.christianassistant.persistance.MembersEntity"/>

I was curious how I ended up with 193.98565656 in the first place when multiplying by 100.
15 years ago
I don't understand....this is real code in Groovy. I may have posted in the wrong place perhaps?
15 years ago

I am trying to do various math operations using BigDecimal and are experiencing weird results. Here are some examples. Here's the groovy code.

I am getting the following results. Shouldn't c in the last run be 194.0. Before I used MathContext, I was getting something like 193.98797566565.

a = 550.0
b = 5.5
c = 550.0

a = 194.0
b = 1.94
c = 193.9

[ December 02, 2008: Message edited by: Martijn Verburg ]
15 years ago

I noticed that this morning! Should have been using compareTo. Thanks for your response and taking it easy on me :-)!!!
15 years ago

I am having trouble with using the switch statement in Groovy. One of the case statements evaluates to true but never enters the block. someMethod returns a String obviously. I have tried wrapping the case expression in parentheses and still no luck. Is there something I'm doing wrong. The .groovy file compiles just fine.

Here's an example of what I am trying to do.

String Hours = ""
String AM_PM = ""

AM_PM = "AM"
switch (0) {
case (someMethod().equals("12")):
AM_PM = "PM"
case (someMethod().equals("13")):
Hours = "01"
AM_PM = "PM"
case (someMethod().equals("14")):
Hours = "02"
AM_PM = "PM"

15 years ago
The issue is resolved. We kept doing different combinations of cleans, builds, and changing/deleting groovy pref files......although we are not sure why it happened, I am at least able to continue development. BTW, we are using RSA v7.0

Thanks for helping!
15 years ago
Actually both. My co-worker is able to continue execution but I get the errors related to the import statements. He also has the "red squiggly lines"

15 years ago
I am new to Groovy and am experiencing a problem to where a java file is not recognizing groovy files in the same project (causing errors with my import statements). It's weird, on my co-workers machine he is experiencing the exact same thing but he is still able to execute.

I tried cleaning and rebuilding but haven't had luck on this. Any thoughts?
[ October 27, 2008: Message edited by: Bear Bibeault ]
15 years ago