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
| # Chapter 1 - Object-Oriented Design | |
| 1. The Problem Design Solves | |
| > It is the need for change that makes design matter. | |
| 2. Why Change is Hard | |
| > Parts interact to product behavior (objects), the interaction is made through messages passed between them. | |
| > Object-Oriented Design is about managing dependencies. | |
| > OOD - Set of coding techniques to arrange dependencies so objects can tolerate change. | |
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
| # @param {String} j | |
| # @param {String} s | |
| # @return {Integer} | |
| def num_jewels_in_stones(j, s) | |
| jewels = j.split("") | |
| total = 0 | |
| s.split("").each do |stone| | |
| total += 1 if jewels.include?(stone) | |
| end |
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
| /* | |
| toPdf.js | |
| Gather all JPG, JPEG and PNG images in a folder and convert them to | |
| individual files in an output folder named after the source folder name | |
| $ node toPdf.js [source/folder/path] | |
| The script will, within the current directory, create a folder with the | |
| same name as the input folder and add all generated PDF files to it. |