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
<?xml version='1.0' encoding='utf-8'?> | |
<widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | |
<name>HelloCordova</name> | |
<description> | |
A sample Apache Cordova application that responds to the deviceready event. | |
</description> | |
<author email="dev@cordova.apache.org" href="http://cordova.io"> | |
Apache Cordova Team |
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
<div class="calendar"> | |
<div class="calendar-navs"> | |
<div class="month-nav"> | |
<button (click)="prevMonth()"><</button> | |
<span class="p4">{{ currentDate.format('MMMM') }}</span> | |
<button (click)="nextMonth()">></button> | |
</div> | |
<div class="year-nav"> | |
<button (click)="prevYear()"><</button> | |
<span>{{ currentDate.format('YYYY') }}</span> |
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
1. Apresente a árvore de consulta otimizada para a expressão abaixo. Considere todos os dados de eleições da República do Brasil (desde 1892) cadastrados no banco consultado, 98% do número de doações a campanhas feitas por pessoas que não os próprios candidatos, 2% do número de doações com valor superior a 10.000, 1,5% das candidaturas em 2016 e 14% de pessoas rés. Considere ainda cada registro de Pessoa ocupando 256 bytes e índice primário por id<X> para cada tabela <X>, além de índice auxiliar por cada chave estrangeira, D.valor, C.ano e P.dtNasc. | |
SELECT P.*, SUM(D.valor) AS total, | |
COUNT (DISTINCT Cand.*) AS nroCands | |
FROM Pessoa AS P, Doacao AS D, Campanha AS C, Pessoa AS Cand | |
WHERE P.idP = D.idDoador AND D.idC = C.idC AND | |
C.idCand = Cand.idP AND P.idP = Cand.idP AND | |
D.valor > 10.000 AND C.ano > 2015 AND Cand.reu = ‘TRUE’ | |
GROUP BY P.* HAVING total > 100.000 | |
ORDER BY total, nroCands DESC; |
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
{ | |
"name": "app", | |
"version": "0.0.0", | |
"license": "MIT", | |
"scripts": { | |
"ng": "ng", | |
"start": "ng serve", | |
"build": "ng build", | |
"build-prod": "rm -rf dist && ng build --prod --output-hashing none --vendor-chunk true --extract-css false", | |
"test": "ng test --single-run", |
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 | |
function validaCPF($cpf) { | |
// Extrai somente os números | |
$cpf = preg_replace( '/[^0-9]/is', '', $cpf ); | |
// Verifica se foi informado todos os digitos corretamente | |
if (strlen($cpf) != 11) { | |
return false; |
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
// FRONTEND (angular2) | |
// product-form.compontent.html | |
<input type="file" (change)="fileChangeEvent($event)" placeholder="Upload file..." /> | |
<button type="button" (click)="upload()">Upload</button> | |
// product-form.compontent.ts | |
import { Component, OnInit } from '@angular/core'; | |
import { Http } from '@angular/http'; | |
@Component({ |
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
$wp_customize->add_setting( 'themeslug_textarea_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'default' => 'Lorem Ipsum Dolor Sit amet', | |
'sanitize_callback' => 'sanitize_textarea_field', | |
) ); | |
$wp_customize->add_control( 'themeslug_textarea_setting_id', array( | |
'type' => 'textarea', | |
'section' => 'custom_section', // // Add a default or your own section | |
'label' => __( 'Custom Text Area' ), |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Drag and Drop example</title> | |
<!-- Bootstrap --> |
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
mkdir desafio-delibera | |
cd desafio-delibera/ | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
php wp-cli.phar --info | |
chmod +x wp-cli.phar | |
# sudo mv wp-cli.phar /usr/local/bin/wp | |
mv wp-cli.phar wp | |
wp core download | |
wp core config --dbname=delibera --dbuser=root | |
wp core install --path=./ --url=http://localhost:8080 --title=teste-delibera --admin_user=root --admin_password=123 --skip-email --admin_email=teste@teste.com |
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 | |
//opcache_reset(); // Disable local dev MAMP cache | |
/* | |
WP_API_OAuth_Test_client.php | |
Tested with Wordpress 4.7.1 | |
WordPress REST API - OAuth 1.0a Server v.0.3.0 - https://en-gb.wordpress.org/plugins/rest-api-oauth1/ |
NewerOlder