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
public class Animal { | |
public String emitirSom(){ | |
return "Animal emitindo som"; | |
} | |
} | |
public class Cachorro extends Animal { | |
public String emitirSom(){ | |
return "Au au au"; | |
} |
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
public class Animal { | |
public String emitirSom(){ | |
return "Animal emitindo som"; | |
} | |
} | |
public class Cachorro extends Animal { | |
@Override | |
public String emitirSom(){ | |
return "Au au au"; |
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
public class Pintura { | |
public void pintar(){ | |
System.out.println("pintando parede"); | |
} | |
public void pintar(String cor){ | |
System.out.println("pintando parede da cor "+cor); | |
} | |
public void pintar(String cor, String marca){ | |
System.out.println("pintando parede da cor "+cor+" e da marca "+marca); | |
} |
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
import java.util.Scanner; | |
class Noh{ | |
public int dado; | |
public Noh esquerdo; | |
public Noh direito; | |
public Noh(int dado){ | |
this.dado=dado; | |
} |
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
import java.util.ArrayList; | |
class Pessoa | |
{ | |
String nome; | |
String endereco; | |
int telefone; | |
public Pessoa(String nome, String end, int fone) | |
{ | |
this.nome = nome; |
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
import _thread | |
import time | |
import logging | |
from threading import Thread | |
from random import randint | |
logging.basicConfig(level=logging.INFO, format=' %(asctime)s - %(levelname)s - %(message)s') | |
class Lasqueira: | |
def lista_tupla(self, lista): |
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
from random import randint | |
import _thread | |
import time | |
def ordem_selecao(): | |
global lista | |
espera = randint(1, 3) | |
time.sleep(espera) | |
for i in range(len(lista)-1): | |
for j in range(i,len(lista)): |
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
class CreateSetups < ActiveRecord::Migration[5.0] | |
def change | |
create_table :setups do |t| | |
t.integer :administradora_id | |
t.integer :condominio_id | |
t.string :qtd_dias_max | |
t.integer :dias_atencedencia | |
t.string :email_admin | |
t.integer :reserva_automatica, default: 0 | |
t.timestamps |
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
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct no NO; | |
struct no{ | |
int valor; | |
NO *esq, *dir; | |
}; | |
NO* inserir(NO *raiz, int valor){ |
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
class PatientsController < ApplicationController | |
. | |
. | |
. | |
def create | |
user = User.create(email: params[:email],password: "123123") | |
patient_params[:users_id] = user.id #preciso fazer isso e ta indo como nil :/ | |
@patient = Patient.new(patient_params) |