Skip to content

Instantly share code, notes, and snippets.

-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: 30-Jun-2019 às 14:53
-- Versão do servidor: 5.7.24
-- versão do PHP: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
<?php
include 'conexao.php';
$filtro = ["preco_minimo" => "1.98"];
$edicoes = [1,2,10];
$edicoes = array_combine(
array_map(function($i){ return ':id'.$i; }, array_keys($edicoes)),
$edicoes
);
This file has been truncated, but you can view the full file.
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: 01-Ago-2019 às 00:09
-- Versão do servidor: 5.7.24
-- versão do PHP: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@celsowm
celsowm / pom.xml
Created August 13, 2019 21:31
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>aulaspring</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>aulaspring-1.0-SNAPSHOT</name>
<properties>
text class
mais valia esquerda
vamos lacrar esquerda
rouba mais faz esquerda
valores da família direita
direito auto defesa direita
<?php
include_once './vendor/autoload.php';
//source: https://www.softnix.co.th/2018/08/19/naive-bays-text-classification-with-php/
use Phpml\Classification\NaiveBayes;
use Phpml\FeatureExtraction\TfIdfTransformer;
use Phpml\FeatureExtraction\TokenCountVectorizer;
use Phpml\Tokenization\WordTokenizer;
<?php
namespace App\View\Helper;
use Cake\View\Helper\PaginatorHelper;
class AjaxPaginatorHelper extends PaginatorHelper {
private $formId;
private $responseId;
public $helpers = ['Url', 'Number', 'Html', 'Form', 'Text'];
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: 24-Maio-2019 às 01:49
-- Versão do servidor: 5.7.24
-- versão do PHP: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
<?php
class Configuracao {
const OPTIONS = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false, //para funcionar bind no limit
];
const SERVIDOR = "localhost";
@celsowm
celsowm / paginacao_usando_template_method_pattern.php
Last active March 12, 2020 02:04
paginacao_usando_template_method_pattern.php
<?php
include 'conexao.php';
abstract class Paginator {
private \PDO $pdo;
private int $pagina;
private int $limit;