Snippets

More Code, Less Words

Frequency Map in Java 8+

Calculating the frequency of items in Java 8 or above using stream and collector APIs

Read

Python - First n items from dictionary / List

Extract first n items from any iterable

Read

FontAwesome - Changing SVG icons programmatically

Change FontAwesome SVG icons with JavaScript

Read

Custom Bootstrap Button with Sass/Scss

Create customized color button with bootstrap

Read

Three.js - Importing OrbitControls with Webpack

Import OrbitControls with Webpack or es6 style.

Read

Javascript - Insert at any index in an array

splice api can be used to insert in an array at any index

Read

GSAP-3 Ease with Webpack

Ease can't be used straightforward. By altering the way of importing Gsap, Ease can be used.

Read

Java - Iterator to Stream

Convert Iterator to Stream in Java 8+

Read

Gradle - Reusing buildscript Repositories

getByName() can be used to reuse gradle repositories from buildscript

Read

Collecting Unmapped Fields with Jackson

@JsonAnySetter is used to collect unmapped fields

Read