mutation {
createUserForMobile(
input: {
name: "Santo Agostinho",
email: "[email protected]",Esse Pull Request tem a intenção de ... (descrição completa).
Our guidelines for building new applications and managing legacy systems.
For us doesn't not matter the language you choose to develop the application. It's importat to follow some rules when you decide to implement a different language that we are describing in other section of this document.
The main objective of this section is to make sure we follow the rules below independent of the language we choose. We like Sandi Metzs Rules for OOP. These rules have helped us to keep our code simpler to understand and easier to 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
| def distance_between_locations(locations) | |
| def distance(location_one, location_two) | |
| rad_per_deg = Math::PI/180 | |
| radius_in_meters = 6371 * 1000 | |
| dlat_rad = (location_two[0]-location_one[0]) * rad_per_deg | |
| dlon_rad = (location_two[1]-location_one[1]) * rad_per_deg |
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
| puts "Type the cooking time: " | |
| cooking_time = gets.chomp.to_i | |
| puts "Type the first hourglass time: " | |
| hour_glass_one = gets.chomp.to_i | |
| puts "Type the second hourglass time: " | |
| hour_glass_two = gets.chomp.to_i | |
| def calculate_minimum_time(cooking_time, hour_glass_one, hour_glass_two) | |
| minimum_time = 0 |
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
| =begin | |
| Write some code, that will flatten an array of arbitrarily | |
| nested arrays of integers into a flat array of integers. | |
| e.g. [[1,2,[3]],4] -> [1,2,3,4]. | |
| Your solution should be a link to a gist on gist.github.com | |
| with your implementation. | |
| When writing this code, you can use any language you're | |
| comfortable with. The code must be well tested and documented. |
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
| default: &default | |
| adapter: postgresql | |
| encoding: unicode | |
| pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> | |
| development: | |
| <<: *default | |
| database: your_database_development | |
| host: localhost | |
| username: postgres |
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
| # Each | |
| arr = ["Luke", "Leia", "Vader"] | |
| arr.each do |name| | |
| p name | |
| end | |
| # Times |
