Logo
Header Main navigation
  • Who we are
    • About
      • About us
      • GenAI in Action
      • Leadership
      • Partners
      • Newsroom
      • Awards & Analyst Relations
      • CSR
      • Events
      • Careers
    • Insights
      • Case Studies
      • Whitepapers
      • Webinars
      • Newsletter
      • Podcasts
      • Blogs
      • Articles
      • Brochure
      • Testimonial
      • Video
  • What we do
    • Services
      • Generative AI
      • Digital Engineering
      • Quality Engineering
      • Cloud
      • Data
      • Digital Experience
      • Digital Marketing
    • Industries
      • Technology
      • Media & Entertainment
      • Financial Services
      • Healthcare
      • iGaming
    • Solutions
      • HAWK | Infra monitoring & Log Analytics
      • Prism | AI-based Test Automation
      • Nimbus | Custom Data Ingestion Solution
      • VideoReady | OTT & Video CMS framework
      • BOLT | Faster AEM Development
      • Technologies
  • InfAInite GPT
    • Generative AI
    • GenAI in Action
  Contact us
 
Home > Insights > Blogs > Divya Setia

Blogs

Told you, we love sharing!

Divya Setia
Technology

Technology

Using Inject method in Groovy 2.0

A very useful enhanced method in Groovy 2.0 is inject method whose key purpose is to pass the outcome of first iteration to next iteration and keep on passing till all the elements of collections are processed. Lets start with an example, consider a class Employee with name and salary as attributes: [java] class Employee{ ...

Divya Setia
Divya Setia September 26, 2012
Read→

Grails

Executing Groovy scripts at runtime

A very useful Groovy class GroovyScriptEngine can be used to execute Groovy scripts at runtime. For understanding purpose, lets start with an example. We have a script named as Area.groovy that calculates the area of circle. [java] // Area.groovy Float r = "${radius}".toFloat() //radius will be passed as an...

Divya Setia
Divya Setia September 25, 2012
Read→

Technology

Changing the order of the elements of List in random manner

I found a very interesting method in java to change the order of elements in a list randomly, also called shuffling of elements in list. Actually I got the requirement to show a random product details out of 5 products, each time user refreshes the page. I came out with the solution using Collections.shuffle(<list>) For...

Divya Setia
Divya Setia September 25, 2012
Read→

Grails

Understanding Groovy 2.0 withLazyDefault and withEagerDefault methods

Sometimes there is need to get some default value in place of null values from a list, that was the reason I came across: withLazyDefault and withEagerDefault methods. My use case consisted of a list of user names with possibility of null elements, hence wherever the element was null, I wanted to return “unknown”. Although there...

Divya Setia
Divya Setia September 17, 2012
Read→

Grails

Two Interesting methods in Groovy 2.0 : takeWhile and dropWhile

Today I found two very interesting methods: takeWhile and dropWhile. The names itself reveals their work i.e. takeWhile (consider while some condition is true) and dropWhile (ignore while some condition is true). Although, these methods have been added to Groovy 1.8.7, but for character sequence, these methods are supported in Groovy...

Divya Setia
Divya Setia September 12, 2012
Read→

Grails

Groovy HTTP builder for sending multipart file.

I had two applications that communicate with each other through web-services. There I had a requirement to send multi-part file from one application to another. After searching I came out with the following solution and thought to share: [java] import org.apache.http.entity.mime.MultipartEntity import...

Divya Setia
Divya Setia August 31, 2012
Read→

Grails

Executing linux shell command using ProcessBuilder

We often need to execute linux shell command from our groovy code. What I had to do in my project was to resize the image saved on file system. I was doing something like : [java]String command = "convert -adaptive-resize ${width}x${height}! ${sourceFilePath} ${destinationFilePath}" Process process=command.execute() ...

Divya Setia
Divya Setia December 29, 2011
Read→
Archive
  • 2026
    • Jan
    • Feb
    • Mar
    • Apr
    • May
  • 2025
    • Jan
    • Feb
    • Mar
    • Apr
    • May
    • Jun
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • 2024
    • Jan
    • Feb
    • Mar
    • Apr
    • May
    • Jun
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • 2023
    • Jan
    • Feb
    • Mar
    • Apr
    • May
    • Jun
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • 2022
    • Jan
    • Feb
    • Mar
    • Apr
    • May
    • Jun
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • 2021
    • Feb
    • Mar
    • May
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • 2020
    • Mar
    • Jul
  • 2019
    • Jan
    • Mar
    • May
    • Jun
    • Jul
    • Aug
    • Dec
  • 2018
    • Jan
    • Feb
    • Mar
    • Apr
    • Jun
    • Nov
  • 2017
    • Jan
    • Feb
    • Mar
    • Apr
    • May
    • Jun
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • 2016
    • Jan
    • Feb
    • Mar
    • Apr
    • May
    • Jun
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • 2015
    • Jan
    • Feb
    • Mar
    • Apr
    • May
    • Jun
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • 2014
    • Jan
    • Feb
    • Mar
    • Apr
    • May
    • Jun
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • 2013
    • Jan
    • Feb
    • Mar
    • Apr
    • May
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • 2012
    • Jan
    • Feb
    • Mar
    • Apr
    • May
    • Jun
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • 2011
    • Jan
    • Feb
    • Mar
    • Apr
    • May
    • Jun
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • 2010
    • Jan
    • Feb
    • Mar
    • Apr
    • May
    • Jun
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • 2009
    • Jan
    • Mar
    • Apr
    • May
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • 2008
    • Feb
    • Apr
    • May
    • Jun
    • Jul
    • Aug
    • Sep
Who we are
  • About
  • Leadership
  • Awards
  • Events
  • Privacy Policy
  • Press Releases
  • Media Coverage
  • Partners
  • CSR
  • Modern Slavery Statement
What we do
  • Services
  • Technologies
  • Solutions
  • Industries
  • Idanim
Knowledge
  • Blogs
  • Success Stories
  • Whitepapers
  • Webinars
  • Podcasts
  • Newsletter
  • Article
  • Brochure
  • Testimonial
  • Video
Contact Us
  • Career
  • Join us!
  • Request for Services
  • Media Queries
  • Responsible Disclosure
Follow us on
  • ln
  • twt
  • fb
  • Glassdoor
 
To The New
black-footer-logo

©2026 TO THE NEW

Services
Digital Marketing
  • Web Analytics
  • Social Listening
  • Digital Analytics
  • Search Engine Optimization
  • Email Marketing
  • Marketing Automation
  • Digital Marketing
  • Influencer Marketing
  • Content Marketing
  • Social Media Marketing
  • Creative Strategy
  • Digital Campaigns and Activations
  • Media planning and buying
  • Search Marketing
  • Digital Strategy
Backend Engineering
  • Python Development
  • Node.js Development
  • Grails Development
  • Java Development
  • MEAN Development
  • JavaScript Engineering
Web Content Management
  • AEM Development
  • Drupal Development
Cloud & DevOps
  • DevOps as a Service
  • DevOps on AWS
  • DevOps Tools
Digital Transformation
  • Digital Transformation
Experience Design
  • Experience Design
Mobility
  • Mobility
  • iOS App Development
  • Android Development
  • Smart TV App Development
  • Mobile Automation Testing
Frontend Engineering
  • AngularJS Development
  • React Native Development
  • React js Development
Product Engineering
  • Software Product Engineering
Video Solutions
  • Video Solutions
  • Video Managed Services
  • Multiscreen Solutions
Software Development
  • Offshore Software Development
  • Outsourced Software Product Development
  • Custom Software Development
  • Bespoke Software Development
Web Application Development
  • Idanim
  • Custom Web Application Development
  • Outsource Web Application Development
Development Center
  • Offshore Development Center

Tips for writing a blog

Learn how to write a caption