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 url = "http://localhost:8080/VotiKiFome/resources/"; | |
| //var url = "http://192.168.1.111:8080/Delivery/resources/"; | |
| var resource = "grupos/empresa/5"; | |
| var entidade = "grupo"; | |
| var campo = "nome"; | |
| $(document).ready(function() { | |
| $.ajax({ | |
| url: url + resource, |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>enchantjs2</title> | |
| <script src="enchant.js"></script> | |
| <script> | |
| window.onload = function() { | |
| enchant(); |
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
| <!doctype html> | |
| <html lang="pt-br"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Canvas Mov</title> | |
| <script> | |
| var idInterval = null; | |
| function onLoad() { | |
| var canvas = document.getElementById('myCanvas'); |
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 server = require('http').createServer(handler); | |
| function handler(request, response) { | |
| var jsonText = JSON.stringify({ nome: 'Jose', sobrenome: 'Prando'}); | |
| var contato = JSON.parse(jsonText); | |
| console.log(contato); | |
| response.end(jsonText); | |
| } | |
| server.listen(8000); |
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
| <!doctype html> | |
| <html lang="pt-br"> | |
| <head> | |
| <title>socket.io chat</title> | |
| <meta charset='utf-8'> | |
| <script src="/socket.io/socket.io.js"></script> | |
| <script> | |
| function onLoad() { | |
| var socket = io.connect('http://192.168.1.151:8000'); | |
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 app = require('http').createServer(handler) | |
| , io = require('socket.io').listen(app) | |
| , fs = require('fs'); | |
| app.listen(8000); | |
| function handler (req, res) { | |
| req.setEncoding('utf-8'); | |
| fs.readFile(__dirname + '/index.html', 'utf8', | |
| function (err, 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
| // carrega o módulo http | |
| var http = require('http'); | |
| var servidor = http.createServer(function(request, response){ | |
| response.end('Voce acessou a url: ' + request.url); | |
| }); | |
| servidor.listen(8000); |
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
| // carrega o módulo mysql | |
| var mysql = require('mysql'); | |
| // variáveis | |
| var MYSQL_USUARIO = 'root'; | |
| var MYSQL_SENHA = '123'; | |
| var BANCO = 'siscombd'; | |
| // cliente de conexão | |
| var banco = mysql.createClient({ |
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 v = "Hello World"; | |
| console.log(v); |