org.postgresql.util.PSQLException: ERROR: cannot cast type bytea to uuid

I was stuck solving this weird exception while working on a Spring Boot and Hibernate application. I verified all the configuration settings, double-checked the API calls and still, I was clueless as to what was actually causing the problem. The only conclusion that I had – The error occurs when there is a null value being sent a placeholder to the query.

Continue reading

Dark mode support in website

I am a Windows 10 user and one of the main feature that I like about it is – Dark Mode. Not just because its soothing on the eyes, but it makes the UI look so simple and elegant. In fact, majority of the applications I use, have dark mode/theme enabled. Be it IntelliJ Idea’s Darcula theme or Visual Studio code. This led me to explore whether there is built-in support for Dark mode in websites and to my surprise there is one.

Continue reading

Using Apache POI to create Excel File – Part I

Systems of any scale are holding data in one form or the other (Database, files, images, videos etc). With more and more data being churned out every day, there is also a need to be able to export data from the Applications. The exported data should be made available in the format that users can easily view with bunch of other tools. Excel is one of those dominating tool that people love for its multipurpose application. In this article, we will learn how to leverage Apache POI to generate Excel sheet with various customization options.

Continue reading

HTML 5 details and summary component animation

Up until now, to collapse and expand certain information, we had to rely on JavaScript or use CSS pseudo selectors. With HTML 5, we have a new kid on the block – details and summary. Put all the content inside details that you wish to hide initially and add a hint for it using summary tag. Open the page in chrome browser you will see a nice little triangle to expand/collapse the information.

Continue reading

Cool Scrolling Cards with HTML 5 and CSS

I read a lot on web. Be it articles, source code, tips-n-tricks and what not. In fact, if I like a site, I also jump through the HTML source code and try to figure out how a particular effect has been achieved. Css-tricks.com is one of those sites, which I often visit. The site has tons of information on various aspects of CSS / Design. Apart from the articles, the site is beautifully designed and one thing which particularly caught my attention is the list of articles on front page.

Continue reading

Build Angular custom validation function

Angular comes with pre-built set of validation functions which are suitable for most of the common scenarios. Whether its checking mandatory value, email address, max length etc. there are suitable functions available. But, as soon as the validation requirement becomes bit complex, the built-in functions fall short of expectation. Luckily, Angular does provide a capability to define custom validation functions and hook them easily in the components.

Continue reading

20 AWS VPC Questions

AWS VPC provides finer level controls to segregate your resources with tight security controls and data requirements. Quickly build your secure infrastructure with Click and configure interface. Change configuration on the fly and ensure that services like S3 can be only accessed by your instances. This quiz focuses on some of the key concepts in VPC.

Continue reading