This code snippet shows how to use Clojure Atoms to implement thread safe instance variables in JRuby classes. The atom_attr_accessor method is used analog to the usual attr_accessor so this should seem natural for the language, though I don't have enough experience with it to judge that.

Ever found yourself working on a MySQL server where root's password is unavailable? It has happened to me a few times, always because the person who set up the DB left the place long ago, and this information was not documented anywhere. If you have root access to the OS,...

Installation: > install.packages("RMySQL", dependencies = TRUE) > library(RMySQL) Simple usage: > con > dbGetQuery(con, "select * from sakila.sales_by_store") store manager total_sales 1 Woodridge,Australia Jon Stephens 33726.77 2 Lethbridge,Canada Mike Hillyer 33679.79 > sales_by_film_category > qplot(category, total_sales, data=sales_by_film_category, geom="bar", fill=category)