This file contains 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
//*** CASH MACHINE ***// | |
//THE PROBLEM | |
//Develop a solution that simulate the delivery of notes when a client does a withdraw in a cash machine. | |
//THE BASIC REQUIREMENTS ARE THE FOLLOW: | |
// Always deliver the lowest number of possible notes; | |
// It's possible to get the amount requested with available notes; | |
// The client balance is infinite; | |
// Amount of notes is infinite; |
This file contains 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
#set($array = [0..10]) | |
#foreach($i in $array) | |
#if($i.class != "class java.lang.Integer") | |
#set($i = $math.sub($velocityCount, 1)) | |
#end | |
#if($i < $array.size()) | |
#set($j = $math.random(0, $math.add($i, 1))) | |
#set($temp = $array.get($i)) | |
#set($array[$i] = $array.get($j)) |
This file contains 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
/****** NodeJS Redirecter *******/ | |
/* A simple script to write new folders/files based on an array with a content that you desire */ | |
/* IMPORTANT: All folders/files with the same name in the directory will be overwritten */ | |
'use strict'; | |
var fs = require('fs'), | |
folders = ['folder1', 'folder2', 'folder3'], | |
fileName = 'index.htm'; |