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
angular.module('minhasDiretivas', []) | |
.directive('meuPainel', function() | |
{ | |
var ddo = {}; //criando a variavel ddo | |
ddo.restric = "AE"; //definindo o que vai poder usar o ddo | |
ddo.scope = { //criando um scope | |
titulo: '@' | |
}; |
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
// validando campo de codigo para somente numeros | |
int error; | |
do | |
{ | |
error = 0; | |
cout << "Código do cliente entre 1 e " << QTDE_CLIENTES << endl << "Ou zero para cancelar a transaçao: "; | |
cin >> nCodigo; | |
if (cin.fail()) | |
{ | |
cout << "Entre um codigo valido" << endl; |
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
// Programa Escola de Natação - Prova N2 - 01/06/2016 - Turma da Tarde | |
// | |
#include "Escola.h" | |
// Entry point do programa | |
// | |
void main(void) | |
{ | |
int nPeriodo, // periodo da aula de natação | |
nRaia, // raia da piscina | |
nPosicionalRaia, // posicional da raia dentro do arquivo de raias |
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 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: |
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 | |
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" |
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
$new_date = date("d/m/Y", strtotime($old_date)); |
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 | |
$rec_limit = 20; | |
$sql = $con_cdr->prepare($query_count); | |
$sql->execute(); | |
$rec_count = $sql->fetch(PDO::FETCH_ASSOC); | |
$rec_count = $rec_count['count']; |
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 | |
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', |
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 | |
require "../vendor/autoload.php"; | |
$loader = new Twig_Loader_Filesystem('../view/'); | |
$twig = new Twig_Environment($loader); | |
?> |
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
/** | |
* 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: |
OlderNewer