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
SELECT COUNT(1) AS qtd, | |
tipo | |
FROM (SELECT DISTINCT table_schema AS objeto, | |
'esquemas' AS tipo | |
FROM information_schema.tables | |
WHERE table_schema != 'pg_catalog' | |
AND table_schema != 'information_schema' | |
UNION ALL | |
SELECT table_schema || '.' || table_name AS objeto, | |
CASE WHEN table_type = 'BASE TABLE' THEN 'tabelas' |
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
{% block collection_widget %} | |
{% spaceless %} | |
<div class="collection"> | |
{% if prototype is defined %} | |
{% set attr = attr|merge({'data-prototype': block('collection_item_widget') }) %} | |
{% endif %} | |
<div {{ block('widget_container_attributes') }}> | |
{{ form_errors(form) }} | |
<ul> | |
{% for rows in form %} |
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
SELECT cae.caenome as nome, | |
cae.caecpf as cpf, | |
prc.perid, | |
SUM(frq.frqqtdpresenca) as qtdpresenca | |
FROM projovemurbano.cadastroestudante cae | |
INNER JOIN projovemurbano.frequenciaestudante frq ON frq.caeid = cae.caeid | |
INNER JOIN projovemurbano.diariofrequencia dif ON dif.difid = frq.difid | |
INNER JOIN projovemurbano.diario dia ON dia.diaid = dif.diaid | |
INNER JOIN projovemurbano.periodocurso prc USING(perid) | |
-- WHERE cae.caeid = 44327 |
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
SELECT nome, | |
cpf, | |
sum(qtd_periodo1) as qtd_periodo1, | |
sum(qtd_periodo2) as qtd_periodo2, | |
sum(qtd_periodo3) as qtd_periodo3, | |
sum(qtd_periodo4) as qtd_periodo4, | |
sum(qtd_periodo5) as qtd_periodo5, | |
sum(qtd_periodo6) as qtd_periodo6, | |
sum(qtd_periodo7) as qtd_periodo7 | |
FROM (SELECT cae.caenome as nome, |
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
function parsePostSegundaEtapa() { | |
// -- Validando $_POST e $_FILES | |
if (empty($_POST) ) { | |
$e = new Exception('Tipo de requisição inválida.'); | |
throw $e; | |
} | |
$arquivos = array(); | |
// -- Lista de documentos enviados pelo proponente | |
$documentos = array('contrato_social', 'rg_e_cpf', 'comp_endereco', | |
'comp_bancario', 'logo'); |
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
<?php | |
foreach ($rowset['rs'] as $item) { | |
$acoes = array('acoes' => ''); | |
$acl = Zend_Registry::get('acl'); | |
$resource = $acl->formatNameResource(array('module' => 'unidade', 'controller' => 'index')); | |
if ($acl->isAllowed(null, $resource, 'get')) { | |
$acoes['acoes'] .= $this->view->open('Unidade', $item->id_unidade_prisional, 'Abrir Unidade Prisional'); | |
} |
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
-- 1) | |
function enemy:shoot() | |
local Bullet = require "Bullet"; | |
Bullet.owner = self; | |
-- the same as your previous code | |
end; | |
function enemy:canShootAgain() | |
self.activeBul = false; | |
end; |