This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From: https://stackoverflow.com/questions/42950501/delete-node-modules-folder-recursively-from-a-specified-path-using-command-line | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Number.prototype.map = function (in_min, in_max, out_min, out_max) { | |
return (this - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; | |
} |
- n = Number of samples (elements in an array)
- r = Number of sample points in each combination ( make combinations of 3 (r) groups from 9(n) members)
https://www.calculatorsoup.com/calculators/discretemathematics/combinations.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The code allows rotation of an 1D array (right and left) | |
using XOR operator | |
ie. Shifts elements of an Array to left or right directions, | |
wraps the elements circularly. | |
*/ | |
#include <stdio.h> | |
int arr[]={1,2,3,4,5,6,7,8,9,10}; |