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
package com.gc.fiscaliza; | |
import java.io.BufferedReader; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.nio.charset.Charset; | |
import java.nio.charset.StandardCharsets; |
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
/* eslint-disable no-empty-pattern */ | |
/* eslint no-shadow: ["error", { "allow": ["state"] }] */ | |
import { baseApiUrl, showError } from '@/global'; | |
import axios from 'axios'; | |
const state = { | |
bairros: [], | |
}; | |
const actions = { |
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
<template> | |
<div class="bairros-admin"> | |
<b-form> | |
<input id="bairro-id" type="hidden" v-model="bairro.id" /> | |
<b-row> | |
<b-col md="6" sm="12"> | |
<b-form-group label="Estado" label-for="cidade-estadoId"> | |
<b-form-select id="cidade-estadoId" | |
:options="estados" | |
:disabled="mode === 'remove'" |
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
def update | |
if logradouro_params[:options_update] == 1.to_s #alterar somente trecho no loteamento | |
wkt_intersection = @logradouro.intersection(logradouro_params[:loteamento_wkt]) | |
wkt_difference = @logradouro.difference(logradouro_params[:loteamento_wkt]) | |
@logradouro.the_geom = wkt_intersection | |
logr = Logradouro.new(tipo_pavimento: @logradouro.tipo_pavimento_was, classificacao_viaria: @logradouro.classificacao_viaria_was, nome: @logradouro.nome_was, decreto: @logradouro.decreto_was, tipo_logradouro_id: @logradouro.tipo_logradouro_id_was, the_geom: wkt_difference) | |
logr.save | |
logradouros_antigos = @logradouro.logradouro_antigos | |
logradouros_antigos.each do |la| |
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
INSERT INTO public.usuario(nome, email) VALUES ('Jose da Silva', '[email protected]'); | |
INSERT INTO public.usuario(nome, email) VALUES ('Maria', '[email protected]'); | |
INSERT INTO public.cidades(nome) VALUES ('Volta Redonda'); | |
INSERT INTO public.cidades(nome) VALUES ('Barra Mansa'); | |
INSERT INTO public.cidades(nome) VALUES ('Resende'); | |
INSERT INTO public.cidades(nome) VALUES ('Pineiral'); | |
INSERT INTO public.filmes(nome) VALUES ('Os Vingadores'); | |
INSERT INTO public.filmes(nome) VALUES ('Até o último homem'); |
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
--DROP TABLE usuario CASCADE; | |
--DROP TABLE formas_pagamentos CASCADE; | |
--DROP TABLE ingresso CASCADE; | |
--DROP TABLE sessoes CASCADE; | |
--DROP TABLE horarios CASCADE; | |
--DROP TABLE cidades_filmes CASCADE; | |
--DROP TABLE cinemas CASCADE; | |
--DROP TABLE filmes CASCADE; | |
--DROP TABLE cidades CASCADE; |
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
-- Como usuário, quando seleciono "Cidades" quero ver a lista de cidades. | |
select c.id, c.nome from cidades c | |
-- Como usuário, quando seleciono uma cidade quero ver a lista de filmes. (Selecionei Volta Redonda) | |
select f.id, f.nome from cidades c join cidades_filmes cf on c.id = cf.cidade_id join filmes f on f.id = cf.filme_id | |
where c.nome = 'Volta Redonda' | |
-- Como usuário, quando seleciono um filme quero ver a lista de cinemas. (Selecionei o filme Os Vingadores) | |
select c.id, c.nome from filmes f join sessoes cf on f.id = cf.filme_id join cinemas c on c.id = cf.cinema_id | |
where f.nome = 'Os Vingadores' |
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.text.Normalizer; | |
import java.util.stream.Collectors; | |
import java.util.*; | |
public class Pessoas { | |
public static String removeAcentos(String nome) { | |
if (nome != null){ | |
nome = Normalizer.normalize(nome, Normalizer.Form.NFD); | |
nome = nome.replaceAll("[^\\p{ASCII}]", ""); |
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 ComplexNumber { | |
double num_real, num_img; | |
public ComplexNumber () { | |
this (0f, 0f); | |
} | |
ComplexNumber(double r, double i) { | |
this.num_real = r; | |
this.num_img = i; |
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 qgis.core import * | |
from qgis.gui import * | |
from qgis.utils import iface | |
@qgsfunction(args='auto', group='IPPU-RESP-OFICIOS') | |
def gerarQRCode(feature, parent): | |
lote = iface.activeLayer().selectedFeatures()[0] | |
geom = lote.geometry() | |
sourceCrs = QgsCoordinateReferenceSystem(31983) | |
destCrs = QgsCoordinateReferenceSystem(4326) |
NewerOlder