Skip to content

Instantly share code, notes, and snippets.

//Declarações do programa Ponto de Venda
#include<iostream>
#include<Windows.h>
using namespace std;
//definições do programa
#define PAUSA system("pause")
#define LIMPAR_TELA system("cls")
#define ATIVO 'A'
#define INATIVO 'I'
//Programa ponto de Venda
//FATEC - MC - Anderson - 04/05/2016
#include "PontoDeVenda.h"
// Função que pede um código de produto válido ou zero para
// cancelar a transação da main que está sendo executada
// Parâmetros:
// Entrada: char *szAcao - ponteiro para um string que indica qual
// é a transação que está sendo executada
int PedeUmProdutoValido(char *szAcao, CONFIGURACAO stConfig)
{
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="robots" content="noindex,nofollow" />
<style>
/* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html */
html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}
html { backgro
@anderson-marin26
anderson-marin26 / originate_call.php
Last active July 11, 2019 09:30 — forked from anpel/originate_call.php
Originate a call from Asterisk using PHP and Asterisk Manager Interface
/**
* Once this scipt is executed it will connect to the local port you have assigned to
* Asterisk (default: 5038) and send an authentication request. If successfull, it will
* send a second request to originate your call.
*
* The internal SIP line $internalPhoneline will be dialed, and when picked up the
* $target phone will be dialed using your outbound calls context ($context).
*
* Of course, you can modify the commands sent to the asterisk manager interface to suit your needs.
* you can find more about the available options at:
@anderson-marin26
anderson-marin26 / twig_loader.php
Created July 14, 2017 12:15
Twig Loader Example
<?php
require "../vendor/autoload.php";
$loader = new Twig_Loader_Filesystem('../view/');
$twig = new Twig_Environment($loader);
?>
@anderson-marin26
anderson-marin26 / capsule_example.php
Created July 14, 2017 12:11
Eloquent Capsule Example
<?php
require "vendor/autoload.php";
use Illuminate\Database\Capsule\Manager as Capsule;
$capsule = new Capsule();
$array = array(
'driver' => 'mysql',
'host' => '127.0.0.1',
'database' => 'db_name',
<?php
$rec_limit = 20;
$sql = $con_cdr->prepare($query_count);
$sql->execute();
$rec_count = $sql->fetch(PDO::FETCH_ASSOC);
$rec_count = $rec_count['count'];
$new_date = date("d/m/Y", strtotime($old_date));
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$serverName = "192.168.0.95";
$connectionOptions = array(
"Database" => "vanrooycrm_2",
"Uid" => "sa",
"PWD" => "VanrooY2015"
import mysql.connector
cnx = mysql.connector.connect(user='root', password='canalwebx', host='127.0.0.1', database='test')
cursor = cnx.cursor()
query = ("SELECT * FROM test")
cursor.execute(query)
for result in cursor: