Tuesday, November 29, 2011

groovysh

Here are a few things I learned about groovysh: if you declare a variable like so:


def foobar = 5;

and then try to use foobar you get the following error:

groovy:000> def foobar = 5; ===> 5 groovy:000> print foobar; ERROR groovy.lang.MissingPropertyException: No such property: foobar for class: groovysh_evaluate at groovysh_evaluate.run (groovysh_evaluate:2) ... groovy:000>

It turns out that you must leave off the def. Then it works fine:
groovy:000> foobar = 5; ===> 5 groovy:000> print foobar; 5===> null groovy:000>


TAB Completion
You can type the first few letters after the . for a given object then press TAB. groovysh will display the possible options:
groovy:000> foobar.l
lastIndexOf(   leftShift(     length()

groovy:000> foobar.l

Type a few more characters, and the shell will complete the method name:

groovy:000> foobar.length()
===> 5
groovy:000>

Monday, September 05, 2011

Groovy and its bad moods

I had not picked up Groovy in a while. So I downloaded Groovy 1.8.1 and off I went with HelloWorld.
class Greet {
def name
Greet(who) { name = who[0].toUpperCase() +
who[1..-1] }
def salute() { println "Hello $name!" }
}

g = new Greet('world') // create object
g.salute()

Then I compiled it in the GroovyConsole and I got the following error:
Invalid duplicate class definition of class Greet : The source Greet.groovy contains at least two definitions of the class Greet.


What da!?
It turns out that the Groovy compiler tries to put the code that is outside the class into a .class file called Greet.class Ooops! So the quick fix is to save the file as a different name such as Foo.groovy. Then after the Groovy compiler runs, you will end you with Foo.class and Greet.class

Now you know.

Tuesday, April 05, 2011

VirtualBox and Ubuntu

I just installed VirtualBox. Pretty coool! Then I created a VDI and installed Ubuntu 10.10. I might uninstall it and just install an instance of headless Fedora.

Wednesday, July 29, 2009

Pocket Devils

Get ready for latest craze: Pocket Devils.
The are portable, hand sewn, cute, angry and evil!
Buy them at www.pocketdevil.com

Thursday, November 27, 2008

Lake Harriet Yugioh Club

The Harriet Yugioh Club will start meeting a Java Jacks Saturdays at 2 pm. If you want to dual sent mail to lhyugioh at yahoo dot com

Saturday, October 18, 2008

Donna Chiara's Stelline d'Oro

Created by Mary Ann Esposito, host of Ciao Italia
Excepted from the book Jingle the Christmas Clown by Tomie dePaola

I could not find a picture of the cookie but I found these and they look yummy!
biscotti di natale
  • 2 cups unbleached flour
  • 1/2 tsp salt
  • 1/2 tsp baking powder
  • 1/2 cup butter or margarine
  • 1 cup sugar
  • 1 large egg
  • 1 1/2 tbsps orange flower water or 2 tsps orange juice
Stir the dry ingredients together and set aside.
Cream the butter or margarine with the sugar. Add the egg, the orange water or juice and mix. Add dry ingredients and mix well.
Wrap the dough in wax paper or plastic wrap and chill for at least 1 hour.
Cut the dough into 4 pieces. Roll out each piece, one at a time, until 1/8" thick.
Cut with small star cookie cutter. Place cookies evenly spaced on a large greased cookie sheet.
Bake in a preheated 375F oven for 6-7 minutes. Watch carefully or cookies will begin to brown. They should be firm to the touch but still pale.
Cookies will crisp as they cool.
Carefully remove cookies to a rack to cool. Continue with the dough until all is used. Makes 4-5 dozen.
When cookies are cool, ice with the following frosting:
  • 1/8 tsp saffron threads or powdered saffron
  • 1 1/2 tbsps warm water
  • 1 1/2 tbsps orange flower water or orange juice
  • 1 cup confectioners' sugar, sifted
Soak saffron threads for at least 10 minutes in the warm water; strain the liquid so it is clear and discard threads. Add the saffron water and orange flower water or orange juice to the confectioners' sugar. Mix well. Frost cookies and sprinkle with coarse raw sugar.

Friday, March 18, 2005

Sophrona Solutions

This is awesome!
It looks like Sophrona Solutions finally got its first mention in the press:
http://www.metrodoctors.com/Publications/March05.pdf

Metro Doctors is a bi-montly publication that goes out to about 6000 doctors in the Hennepin and Ramsey medical societies.