1 - print "Welcome to the calculator"?
2 - Get first number from the user
3 - Get second number from the user
4 - Ask which operation the user wants to perform
5 - Show the results
| # this file serves as a router for any questions related to tasks | |
| class Controller | |
| # Called on `Controller.new` | |
| def initialize(repository, view) | |
| # STATE | |
| # We receive an instance of Repository Class | |
| @repository = repository | |
| # Receive a instance of View, so we can display things |
| # 1) print "Welcome to the Instacart" | |
| # 2) Define the items on the store (Hashes) | |
| # 3) Initialize an empty cart | |
| # 3) Print the items | |
| # 4) Ask the user for one item until he types "quit" | |
| # 5) If the item is not on store, do something | |
| # 8) if user types "quit", then Display the order (BILL) | |
| # 9) Checkout. | |
| # Our items on store |
| # 1) print "Welcome to the Horse Race of Le Wagon" | |
| # 2) Create a List of horses? DONE | |
| # 3) Show the list of horses | |
| # 4) Ask the user: "On which horse do you want to bet on?" | |
| # 5) Ask the user: "How much do you want to bet?" | |
| # 6) Place the bet | |
| # 7) Run the race METHOD | |
| # 8) Display the result of the race: "Winner/Loser" | |
| # 9) Display the result of the bet | |
| # 10) Want to bet again? |
| require "date" | |
| # REGEX TIME! | |
| # Write a #french_ssn_info method extracting infos | |
| # from French SSN (Social Security Number) using | |
| # regexp. | |
| # "1 84 12 76 451 089 46" | |
| # Gender (1 == man, 2 == woman) | |
| # Year of birth (84) |
| # Our Chef class that receives a Restaurant as a parameter | |
| class Chef | |
| attr_reader :name | |
| def initialize(name, restaurant) | |
| @name = name | |
| @restaurant = restaurant # Can be any Restaurant | |
| end | |
| end |
| ###########Bibliotecas######## | |
| #se nao tiver instalada, e necessario usar o comando | |
| #install.packages("nome_da_biblioteca") | |
| library(tm) | |
| library(wordcloud) | |
| library(RColorBrewer) | |
| ###################################### | |
| #seta o folder de trabalho. é preciso passar o caminho completo até a pasta onde estao os dados | |
| setwd("/home/caminho/para/psta_local/dos_dados") |
| <form action="//desafioagorario.us9.list-manage.com/subscribe/post?u=5f55ed935ec2264bdcd24a578&id=25a5430095" method="post" target="_blank"> | |
| <label for="mce-EMAIL">Email: </label> | |
| <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"> | |
| <input type="hidden" name="b_5f55ed935ec2264bdcd24a578_25a5430095" tabindex="-1" value=""> | |
| <input type="submit" value="Cadastrar" name="subscribe" id="mc-embedded-subscribe" class="button"> | |
| </form> |
| DROP FUNCTION IF EXISTS get_category_zone(integer, text); | |
| CREATE OR REPLACE FUNCTION get_category_zone(cat_id integer, zone_id text) RETURNS numeric AS $$ | |
| SELECT SUM(zone_list.count) FROM ( | |
| SELECT | |
| d.id, | |
| d.zone, | |
| ( | |
| SELECT COUNT(*) | |
| FROM pins p0 |
| DROP FUNCTION IF EXISTS get_category_zone(integer, text); | |
| CREATE OR REPLACE FUNCTION get_category_zone(cat_id integer, zone_id text) RETURNS numeric AS $$ | |
| SELECT | |
| SUM(zone_list.count) | |
| FROM ( | |
| SELECT | |
| d.id, | |
| d.zone, | |
| ( | |
| SELECT COUNT(*) |