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
drop table "cliente" cascade; | |
drop table "animal" cascade; | |
drop table "tipo" cascade; | |
drop table "treinamento" cascade; | |
drop table "relatorio" cascade; | |
create table "cliente" ( "codigo" integer not null | |
, "nome" varchar(16) not null | |
, "RG" integer not null | |
, "sexo" varchar(1) not null |
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
DROP SCHEMA public CASCADE; | |
CREATE SCHEMA public; | |
GRANT ALL ON SCHEMA public TO postgres; | |
COMMENT ON SCHEMA public IS 'standard public schema'; | |
create table secretaria | |
( | |
nome character varying(32), | |
id integer, | |
constraint secretaria_pk primary key (id) |
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
.data | |
my_global: .word 100 | |
.text | |
.globl main | |
main: | |
la $t0, my_global | |
lw $t1, 0($t0) | |
addi $t1, $t1, 1 | |
sw $t1, 0($t0) | |
addi $a0, $t1, 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
.data | |
my_global: .word 100 | |
.text | |
.globl main | |
main: | |
addi $s0, $0, 10 | |
addi $s1, $0, 20 | |
addi $a0, $s0, 0 | |
addi $a1, $s1, 0 | |
jal my_funct |
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
.data | |
_array : .word 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3 | |
_size : .word 11 | |
.text | |
.globl main | |
main: |
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
# encoding:utf-8 | |
import random | |
import os | |
def main(): | |
population = PopulateDatabase(1899, 2014) | |
population.generate_population() | |
class PopulateDatabase(object): |
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
PostgreSQL 9.1.13 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1, 64-bit | |
(Amigo=520656478): tem os seguintes amigos: [781909429, 1110305437, 100000457609775, 100000812625301, 100002501892899, 100004799408219] | |
(Amigo=529899682): tem os seguintes amigos: [575665265, 745660785, 781909429, 1110305437, 1238432251, 100000077490764, 100000180614378, 100000189691899, 100000300160728, 100000428181906, 100000457609775, 100000613955023, 100000777734096, 100000812625301, 100000960315423, 100002011676407, 100002038690476, 100002395436942, 100002501892899, 100002898593720, 100003599447454, 100004799408219, 100005483854341, 100005640431865] | |
(Amigo=568122832): tem os seguintes amigos: [580905942, 660857627, 745660785, 1221380516, 100000330878130, 100000743104362, 100000815109580, 100001297788224, 100001851762074, 100002807197544] | |
(Amigo=573918917): tem os seguintes amigos: [575665265, 580905942, 589557800, 647155272, 660857627, 687699461, 745660785, 763745050, 1076230774, 1131573494, 12213 |
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
. | |
├── bin | |
│ ├── pom.xml | |
│ ├── Procfile | |
│ ├── README.md | |
│ ├── src | |
│ │ └── main | |
│ │ ├── java | |
│ │ │ └── com | |
│ │ │ └── example |
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
@Service | |
public class VehicleServiceImpl implements VehicleService { | |
@PersistenceContext | |
EntityManager em; | |
/** | |
* O(1) | |
*/ | |
@Override |
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
@Entity | |
public class Vehicle { | |
private Double price; | |
private String pricestring; | |
public Double getPrice() { | |
return price; | |
} |