devxlogo

Web Development

Autoplay an Audio File Using the Audio Tag

The audio tag lets you play an audio file on a webpage. Its syntax is very simple. Please note the usage of “autoplay” attribute. It auto plays the music file

Logging HikariCP Activity in Spring Boot

See how to log HikariCP activity in Spring Boot. In the application.properties employ the following: logging.level.com.zaxxer.hikari.HikariConfig=DEBUGlogging.level.com.zaxxer.hikari=TRACE

Select All Elements Quickly in CSS

Use the asterisk (*) symbol as a prefix to select all elements of a selector object and then write your CSS styles on top of it. For example: *div would

The XML Encoding Trap

String xml = fileUtils.readTextFile(“XMLfile.xml”); It’s not a good idea to read an XML file and store it in a String because it wastes memory. The XML specifies its encoding in

Format a Date in Angular

To format a date in an Angular template, use the date pipe. For example, the following code formats the date to short date format by default. {{ dateObject | date:’