This file contains hidden or 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
<html> | |
<head> | |
<-- Se tiver um css, coloque o link aqui dentro. O mesmo vale para javascripts --> | |
<title> Título </title> | |
</head> | |
<body> | |
<!-- TODO O CONTEÚDO DO SEU DOCUMENTO FICARÁ DENTRO DESSA TAG, QUE É ABERTA APENAS UMA VEZ E FECHADA APENAS UMA VEZ --> | |
</body> | |
</html> |
This file contains hidden or 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
<form> | |
Primeiro nome: | |
<input type="text" name="firstname"> | |
<br> | |
Último nome: | |
<input type="text" name="lastname"> | |
</form> | |
<form> | |
CNPJ: | |
<input type="text" name="CNPJ"> |
This file contains hidden or 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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase /liqueur/ | |
RewriteCond $1 !^(index\.php|assets|static|images|scripts|css|robots\.txt) | |
RewriteRule ^(.*)$ index.php/$1 [L] | |
RewriteCond %{REQUEST_URI} ^system.* |
This file contains hidden or 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
NomeDaClasse{ | |
public int variavel_da_classe; | |
private int outra_variavel_da_classe; | |
function doSomething(){ | |
//faz algo. | |
outra_variavel_da_classe; //A variável é privada, mas como está dentro da classe, pode ser acessada. | |
} | |
} |
This file contains hidden or 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
var THRESHOLD_1 = 300; | |
var THRESHOLD_2 = 3000; | |
var THRESHOLD_3 = 3500; | |
var input_threshold = 500; | |
//Quando ocorrer o input | |
if(input_threshold >= THRESHOLD_1 && input_threshold < THRESHOLD_2) | |
//dispara primeiro gatilho |
This file contains hidden or 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 | |
/* | |
* Template Name: Tokenizador | |
*/ | |
$token_input = $_GET['key'];// Variável que acomoda a key vinda da url. | |
$base_url = get_bloginfo('url').'/'; //URL base do site atual. | |
$outbound_url = ''; //Variável que acomoda a url de destino. | |
This file contains hidden or 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 | |
$token_input = $_GET['key'];// Variável que acomoda a key vinda da url. | |
$base_url = 'http://localhost/mrp/'; //URL base do site atual. | |
$outbound_url = ''; //Variável que acomoda a url de destino. | |
if(!$token_input) | |
header('Location: index.php'); | |
switch($token_input){ | |
case 'page': //Mudar esse case e os outros pras chaves certas. |
This file contains hidden or 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
var DataConnector = (function(){ | |
var apiEndpoint = 'file.json'; | |
return{ | |
acquireData: function(){ | |
deferred = Q.defer(); | |
$.get(apiEndpoint) | |
.done(function(data){ | |
deferred.resolve(data); |
This file contains hidden or 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
DataConnector | |
->acquire() //pega um json | |
View | |
->injectData() // Injeta os dados na view, ou seja: monta os DOMs todos. | |
-> render() // Mostra a view de fato | |
//Fluxo | |
DataConnector->acquire()->then(View.injectData()).then(View.render()) |
This file contains hidden or 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
/** | |
* Module dependencies. | |
*/ | |
var express = require('express'); | |
var http = require('http'); | |
var path = require('path'); | |
var app = express(); | |
var server = require('http').createServer(app); |