devxlogo

Web Development

Use Image Sprite to Combine Images

If you have too many images on a web page, it will make too many requests to the server and take a lot of bandwidth as well. This will all

Loading a Youtube Video in an HTML Page

You can convert videos in different formats to view them in your browser. An easier way to play video in HTML format is to use YouTube. YouTube generates an automated

How to Capture Compute Time in Python

Import the time module and call the time function. The units are in Seconds. See below for an easy example. import timestartTime= time.time()”time consuming stuff”time consuming stuff”time consuming stuffendTime =

Good Alternative to $().ready in jQuery

jQuery developers often use $().ready or $(document).ready to initialize jQuery functions after the HTML page has loaded. However, it is fired when the HTML objects are still being downloaded by the browser

SQL JOINs

1. SELECT FROM TableA A INNER JOIN TableB B ON A.key=B.key2. SELECT FROM TableA A RIGHT JOIN TableB B ON A.key=B.key 3. SELECT FROM TableA A RIGHT JOIN TableB B

Calculating Availability

Availability is measured in so-called nines notation, that corresponds to the percentage of time that a service is available. For example, if a service is available 99.9% of the time, we can say that has “three-nines availability”. This notation is used to gives us the specific amount of downtime that a service is allowed to have.  Next are the availability and downtime calculations for 99% availability to 99.999% availability : 99% availability (two-nines):         * 3.65 days/year (of allowed downtime)         * 7.20 hours/month         * 1.68 hours/week         * 14.4 minutes/day 99.9% availability (three-nines):         * 8.76 hours/year         * 43.8 minutes/month         * 10.1 minutes/week         * 1.44 minutes/day 99.99% availability (four-nines):          * 52.56 minutes/year        * 4.38 minutes/month        * 1.01 minutes/week        * 8.66 seconds/day 99.999% availability (five-nines):        * 5.26 minutes/year        * 25.9 seconds/month        * 6.05 seconds/week        * 864.3 mimiseconds/day

CORS Support in Spring

Spring MVC has implicit CORS support, so to use the controller method CORS configuration with @CrossOrigin annotation in your Spring Boot application does not require any specific configuration. The global