Showing posts with label Groovy. Show all posts
Showing posts with label Groovy. Show all posts

Thursday, February 19, 2015

What is JSON ?

JSON stands for Javascript Object Notation.
Some descriptions are:

  • Format for sharing data
  • Derived from Javascript
  • Language independent (Originated with Js but availabe in many other language like PHP, C, Pearl, python)
  • An alternative to XML

Advantages:
  •  Leaner than XML
  • Easy to read
  •  Growing support in APIs
  • Natural format for Javascript
  • Implementation in many languages

Monday, December 8, 2014

GUID vs INTEGER as data type of the Primary key in INTREXX

In this short post I would like to point out few differences between the use of Guid and Integer as a data type of  the primary key when creating a new data group.
  • Guid is treated as a string and Integer as it is.
  • Guid  has a larger range than Integer.
  • When creating a new row for example, to get the current primary key maybe in groovy you need newGuid() (for Guid) while you will need to make a query : select max(id) from dgroup (for Integer)
  That is just what I have in mind now, please feel free to drop a comment and share your thoughts on this with us.
 

Monday, November 17, 2014

Regular expression for the file name without extension in Groovy

Are you willing to get rid on the file extension in groovy, but don't know how to do that ? This post is for you. If you are a programmer, you will not certainly want to read many useless lines before getting what you.
This line is for you:

file.name.replaceFirst(~/\.[^\.]+$/, '')
 
All credits go to Nikita 

Namaste