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
<?xml version="1.0"?> | |
<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd"> | |
<cross-domain-policy> | |
<site-control permitted-cross-domain-policies="master-only"/> | |
<allow-access-from domain="*" to-ports="*"/> | |
</cross-domain-policy> |
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 express = require('express'); | |
var load = require('express-load'); | |
var routes = require('./routes'); | |
var user = require('./routes/user'); //Chamou o routes/user aqui | |
var app = express(); | |
app.set('views', __dirname + '/views'); | |
app.set('views engine', 'ejs'); | |
app.use(express.static(__dirname + '/public')); |
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
<? | |
// Dados de envio e da mensagem | |
$nome_remetente = $_POST['nome_do_campo']; | |
$assunto = $_POST['nome_do_campo']; | |
$email_remetente = $_POST['nome_do_campo']; | |
$email_destinatario = $_POST['nome_do_campo']; | |
// Conteudo do e-mail (você poderá usar 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
$(document).ready(function(){ | |
$('#myModal').modal(options) //inicializa o modal | |
$('#myModal').modal('show') //mostra o modal | |
}); | |
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
javascript:$('span:first-of-type').remove();$('body').attr('style',''); |
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 routes = require('./routes'); | |
var user = require('./routes/user'); | |
var http = require('http'); | |
var path = require('path'); | |
var passport = require('passport'); |
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 cluster = require('cluster'); | |
if(cluster.isMaster){ | |
var cpuCount = require('os').cpus().length; | |
for(var i=0; i<cpuCount;i++){ | |
cluster.fork(); //Creates a worker | |
} | |
}else{ | |
//App goes here | |
} |
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
/* | |
* Model initialization | |
*/ | |
var _ = require('underscore'); | |
var mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost:27017'); | |
var Schema = mongoose.Schema; | |
var productSchema = new Schema({ |
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 | |
class Ajax extends CI_Controller{ | |
public function __construct(){ | |
parent::__construct(); | |
} | |
public function form($nome_do_form){ | |
$dados = $this->input->post();//Dados que vem do formulário | |
switch($nome_do_form){ | |
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
$('#id_do_botao_de_enviar').click(function(e){ | |
e.preventDefault(); | |
$.ajax({ | |
method: 'post', | |
url: 'ajax/form/nome_do_form', | |
data: dados_do_form, | |
success: function(data){ | |
if(data.status == 'ok'){ | |
//Mostra mensagem de sucesso | |
}else{ |