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
<?php | |
class ActivitiService{ | |
const BASE_URL = 'http://localhost:8080/activiti-rest/service/'; | |
const ADMIN_USERNAME = 'kermit'; | |
private $_services = array( | |
'processDefinitions' => 'process-definitions', | |
'processDefinition' => 'process-definition/', |
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 PedidoFacade | |
setTotalPedido: ($pedido_id) -> | |
CaixaFacade.setEnvVarCaixa() | |
$total = PedidoDAO.getTotalPedido($pedido_id) | |
$totalpago = PedidoDAO.getTotalPagoPedido($pedido_id) | |
$diff = $total - $totalpago | |
tk_set_env_var("total_pedido", $diff) | |
salvaPagamentoPedido: () -> | |
CaixaFacade.setEnvVarCaixa() |
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
(ns receitacrawler.sites.tudogostoso.crawler | |
(:require [net.cgrand.enlive-html :as html]) | |
(:use [cheshire.core :only [generate-string]])) | |
(def base-url "http://tudogostoso.uol.com.br") | |
(def title-selector [:.page-title :h1]) | |
(def ingredients-selector [:.ingredients :.recipelist :li :span]) | |
(def image-url-selector [:.photo]) |
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
(:use [ring.util.codec :only [url-encode]]) | |
(def utmac "MO-XXXXXXXX-X") ;; Use MO instead of UA | |
(defn- new-uuid [] | |
(java.util.UUID/randomUUID)) | |
(defn md5 | |
"Generate a md5 checksum for the given string" | |
[token] |
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
// Total de gastos por deputado por período | |
/* | |
Exemplo de documento | |
{ | |
"_id" : ObjectId("53e2a0ae0364c1ab82d44333"), | |
"nome" : "ACÁCIO JÚNIOR (53a Legislatura)", | |
"deputado-id" : "2034", | |
"despesas" : [ | |
{ | |
"mes-ano" : NumberLong(2011001), |
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
#!/usr/bin/env python -*- coding: utf-8 -*- | |
import os | |
import time | |
import re | |
import urllib | |
#import urllib.request | |
import json | |
import argparse | |
import sys |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Parameters</title> | |
<style> | |
body { | |
display: flex; | |
flex-direction: column; | |
font-family: monospace; |