Skip to content

Instantly share code, notes, and snippets.

View ClaudioHenrique's full-sized avatar
🏠
CTO Fortuna Pay @ Working from home

Cláudio Henrique ClaudioHenrique

🏠
CTO Fortuna Pay @ Working from home
View GitHub Profile
/*[C#]*/
var db = Database.Open("StayInFlorida");
int numBedrooms = Request.QueryString["numBedrooms"].AsInt();
[{"id":"1","path_file":"\/audios\/file.mp3"},{"id":"2","path_file":"\/audios\/file02.mp3"}][{"id":"2","enunciado":"Comunica\u00e7\u00e3o ( teve objetividade, sabe ouvir, linguagem clara e correta: boa flu\u00eancia verbal)","peso":"2","fk_prova":"2","mt_audios_id":"1"},{"id":"3","enunciado":"Criatividade (desperta o interesse na negocia\u00e7\u00e3o?)","peso":"2","fk_prova":"2","mt_audios_id":"1"}][{"id":"4","enunciado":"Uma questao aqui","peso":"2","fk_prova":"2","mt_audios_id":"2"}]
<?php
$variable++;
$variable++;
echo $variable;
?>
<?php
$config = array(
'port' => 8080,
'debug' => false,
'allowedOrigins' => null,
'IpBlackList' => null,
'authAdapter' => 'MgRTC\Session\AuthSimple',
'facebook' => array(
'appId' => '251017698383358',
'secret' => '0ee6bd094ef97478417ef9602232524d'
function getConnection() {
$dbhost="localhost";
$dbuser="root";
$dbpass="root";
$dbname="db_name";
$dbh = new PDO("mysql:host=$dbhost;dbname=$dbname;", $dbuser, $dbpass);
$dbh -> exec("set names utf8");
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
return $dbh;
}
@ClaudioHenrique
ClaudioHenrique / consulta
Created January 2, 2015 23:19
Consulta ao Banco.
function search($id){
$sql = "SELECT id,value,type FROM mt_type WHERE fk_questao = :id";
try{
$db = getConnection();
$stmt = $db->prepare($sql);
$stmt->bindParam('id',$id);
$stmt->execute();
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
}catch(PDOException $e){
echo $e->getMessage();
@ClaudioHenrique
ClaudioHenrique / consulta
Created January 2, 2015 23:19
Consulta ao Banco.
function search($id){
$sql = "SELECT id,value,type FROM mt_type WHERE fk_questao = :id";
try{
$db = getConnection();
$stmt = $db->prepare($sql);
$stmt->bindParam('id',$id);
$stmt->execute();
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
}catch(PDOException $e){
echo $e->getMessage();
{
"cardapio": {
"Promocoes": [
{
"id_produto": "1625",
"nome": "Atum",
"ingredientes": null,
"precos": "20",
"validade_promocao": [
"segunda",
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int read_line(FILE *in, char *buffer, size_t max)
{
return fgets(buffer, max, in) == buffer;
}
void cadastrarVendedor(){
<?php
$nome = $_POST['nome'];
$idade = $_POST['idade'];
$data = array(
'nome' => $nome,
'idade' => $idade
);