Blog

It's a Wonderful Life

Dynamically show a Vue component

Using Vue you define the application layout using components. In the beginning you manually place components where you want, but at some point you need to have a more flexible way to show or hide c...

Fitting an img inside a div and keeping the aspect ratio

To achieve that, we need some JavaScript to prevent cropping if you don’t know the dimension of the image at the time you’re writing the css.

MySQL comments

In MySQL, you can add comments to a data column or a row by using comment directive.

Wechat Mini-program modal animations

WXML

Watcher in Vue

A watcher is a special Vue.js feature that allows you to spy on one property of the component state, and run a function when that property value changes.

ES6 promises

How does a Promise work?

Deque and ArrayDeque

Java Deque Interface Java Deque Interface is a linear collection that supports element insertion and removal at both ends. Deque is an acronym for double ended queue.

Queue and PriorityQueue

Java Queue Interface Java Queue interface orders the element in FIFO(First In First Out) manner. In FIFO, first element is removed first and last element is removed at last.

How to maintain aspect ratio using HTML IMG tag

don’t set height AND width, use one or the other and the correct aspect ratio will be maintained.

Difference between HashMap and ConcurrentHashMap

HashMap is the Class which is under Traditional Collection and ConcurrentHashMap is a Class which is under Concurrent Collections, apart from this there are various differences between them which a...