Micro-framework

javascript

JavaScript Sort Array of Objects by Property

This JavaScript code demonstrates how to sort an array of objects (products) based on a numeric...

python

Sorting a Dictionary by Values

This Python code sorts a dictionary (my_dict) based on its values using the sorted() function...

javascript

Asynchronous Fetch in JavaScript using async/await

This JavaScript code demonstrates asynchronous fetching of data from an API using the...

python

Flask Route Configuration with Optional Parameter Handling

Use multiple decorators with a default parameter value to handle both parameterized and...

python

Sort List of Objects by Attribute in Python

This Python code defines a Person class, creates instances of Person, and then sorts the list of...

python

Finding Common Elements in Two Lists

This Python code defines two lists (list1 and list2) and then finds their common elements using...

javascript

Leap Year Checker

This JavaScript code defines a function isLeapYear that checks whether a given year is a leap...

javascript

Hashing Password with SHA-256 using 'crypto' module

This Node.js code uses the 'crypto' module to create a SHA-256 hash of a password ('mypassword')...