Miner Phil

The place where I unearth useful bits

Archive for January, 2013

Groovy in Netbeans

Wednesday, January 30th, 2013

Not too long ago, I started using a framework called GRAILS, which meant learning Groovy. To my delight, Groovy is a groovy language!

I’ll save my explanation for a later post. For now, I leave you with this article describing how to use Groovy in a classic Java program using Netbeans. Enjoy!


Python Enumerate

Monday, January 7th, 2013

I find myself programming in a variety of languages these days. Today, I found a nugget of information pertaining to retrieving the index of a for-each-loop’s iteration.

 Python |  copy code |? 
data = ( 'a', 'b', 'c' )
for i, f in enumerate( data ):
    print "%d => %s" % ( i, f )