Jackson: How to add custom property to the JSON without modifying the POJO

Jackson 2.5 introduced the @JsonAppend annotation, which can be used to add “virtual” properties during serialization. It can be used with the mixin functionality to avoid modifying the original POJO. The following example adds an ApprovalState property during serialization: @JsonAppend( attrs = { @JsonAppend.Attr(value = “ApprovalState”) } ) public static class ApprovalMixin {} Register the … Read more

Where can I find my .emacs file for Emacs running on Windows?

Copy and pasted from the Emacs FAQ, http://www.gnu.org/software/emacs/windows/: Where do I put my init file? On Windows, the .emacs file may be called _emacs for backward compatibility with DOS and FAT filesystems where filenames could not start with a dot. Some users prefer to continue using such a name, because Windows Explorer cannot create a file … Read more

Expert R users, what’s in your .Rprofile? [closed]

Here is mine. It won’t help you with the coloring but I get that from ESS and Emacs… options(“width”=160) # wide display with multiple monitors options(“digits.secs”=3) # show sub-second time stamps r <- getOption(“repos”) # hard code the US repo for CRAN r[“CRAN”] <- “http://cran.us.r-project.org” options(repos = r) rm(r) ## put something this is your … Read more