Skip to content

Instantly share code, notes, and snippets.

View renatamarques97's full-sized avatar

Renata Marques renatamarques97

  • João Pessoa
View GitHub Profile
# 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.
# @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
@renatamarques97
renatamarques97 / toPdf.js
Created March 11, 2020 19:06 — forked from willamesoares/toPdf.js
Convert images in a folder to PDF
/*
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.