Skip to content

Instantly share code, notes, and snippets.

View abacha's full-sized avatar

Adriano Bacha abacha

  • São Paulo, SP
  • 03:24 (UTC -03:00)
View GitHub Profile
SELECT A.DATMOV, "
+ " A.CODPROD,"
+ " B.NOMEPROD, "
+ " A.CODCOT, "
+ " C.CGCCPF,"
+ " C.CLASCONT, "
+ " A.QTDE, "
+ " A.IRRF, "
+ " A.RENDTOTRIB, "
+ " B.CNPJ, "
SELECT B.CNPJ ,
B.CODPROD,
B.NOMEPROD,
A.CODCOT,
C.CGCCPF,
C.CLASCONT,
A.IRRF,
A.VALOR,
A.VALORLIQU,
A.DATMOV,
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package br.bip.informerendimento.vo;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
interface Impressora {
void imprimir();
void imprimirPB();
}
class ImpressoraPDF implements Impressora { }
class ImpressoraHTML implements Impressora { }
class Sistema {
void imprimir(Impressora impressora) {
class Cliente {
void salvar();
void deletar();
}
class Receita {
private Cliente cliente;
public Receita(Cliente cliente) {
this.cliente = cliente
name: bigbang
root: /var/www/bigbang/releases
pre_window: rvm use 2.0.0@bigbang
tmux_options: -S /tmp/bigbang
windows:
- bigbang: tail -f ../current/log/production.log
- sidekiq: tail -f ../current/log/sidekiq.log
- unicorn: tail -f ../current/log/unicorn.stderr.log
- nginx: tail -f /var/log/nginx/error.log
- console: rails c
start on runlevel [2]
stop on runlevel [016]
console owner
setuid ubuntu
pre-start exec start_unicorn
post-stop exec kill `cat /var/www/bigbang/current/tmp/pids/unicorn.pid`
respawn
<?
function print_combo($id) {
$combo = "<select>";
while( has_sub_field('select_'.$id) ) {
$combo .= "<option value='".the_sub_field('link_externo')."'>";
$combo .= the_sub_field('texto');
$combo .= "</option>";
}
$combo .= "</select>";
return $combo;
Type SQL Duration (ms)
Client Load SELECT `clients`.* FROM `clients` WHERE `clients`.`id` = 85 LIMIT 1 148.472
HistoricBalance Load SELECT `historic_balances`.* FROM `historic_balances` INNER JOIN `funds` ON `funds`.`id` = `historic_balances`.`fund_id` WHERE (date <= '2013-09-30' AND fund_id = 705 AND caution = 0) ORDER BY historic_balances.date desc, historic_balances.id desc 5.111
HistoricBalance Load SELECT `historic_balances`.* FROM `historic_balances` INNER JOIN `funds` ON `funds`.`id` = `historic_balances`.`fund_id` WHERE `historic_balances`.`account_id` = 237 AND (date <= '2013-09-30' AND fund_id = 705 AND caution = 0) AND (amount > 0 ) ORDER BY historic_balances.date desc, historic_balances.id desc 3.374
Transaction Load SELECT `transactions`.* FROM `transactions` WHERE (value_date <= '2013-09-30' AND fund_id = 705 AND transactions.caution = 0 AND transactions.status_cd != 3) 3.257
HistoricBalance Load SELECT `historic_balances`.* FROM `historic_balances` INNER JOIN `funds` ON `funds`.`id` = `historic
class Empresa
has_one "matriz", class: Empresa
has_one "filial", class: Empresa
end