How to create a temporary file to store data

Your application has to write data out in a temporary file to reprocess them before rendering to users. The file will be created temporarily and swept our when the application…

Fastest way to get the first n elements of a List into an Array

def s = ‘Hello Groovy world!’ assert s.take(5) == ‘Hello’ assert s.drop(6) == ‘Groovy world!’ Python Let’s assume an arbitrary list/array: in_list = list(range(10)) // Python2: in_list = range(10) //…

(English) An annoyed error needed to be paid more attention when using RestBuilder grails plugin

Désolé, cet article est seulement disponible en Anglais.

L’opérateur de spaceship Groovy a expliqué

Have you ever heard of the spaceship operator? If it is the case, how does it look like? To be honest, I have known it recently when I used this…

(English) ArrayList in Java

Désolé, cet article est seulement disponible en Anglais.

Utilisation des propriétés du système dans Grails

Désolé, cet article est seulement disponible en Anglais.

Combine two lists in Groovy

Combination or concatenation of two or multiple lists are believed to appear quite frequently in programming. This article aims to show you how to union two lists in Groovy in…

(English) Unveil magic of hibernate lazy loading

Désolé, cet article est seulement disponible en Anglais.