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 | |
/** | |
* Event Blocks | |
* | |
* @author ThemeBoy | |
* @package SportsPress/Templates | |
* @version 1.9.8 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
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 | |
/** | |
* Event Blocks | |
* | |
* @author ThemeBoy | |
* @package SportsPress/Templates | |
* @version 1.9.8 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
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 | |
/** | |
* Event Blocks | |
* | |
* @author ThemeBoy | |
* @package SportsPress/Templates | |
* @version 1.9.8 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
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"> | |
<title>Live Robot</title> | |
</head> | |
<body> | |
<p class="start">Start Your Robot Please.</p> | |
<div id="data"></div> | |
<script src="https://cdn.socket.io/socket.io-1.2.0.js"></script> |
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"> | |
<title>Live Robot</title> | |
</head> | |
<body> | |
<p class="start">Start Your Robot Please.</p> | |
<div id="data"></div> | |
<script src="https://cdn.socket.io/socket.io-1.2.0.js"></script> |
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
var express = require('express'), | |
router = express.Router(), | |
mongoose = require('mongoose'), //mongo connection | |
bodyParser = require('body-parser'), //parses information from POST | |
methodOverride = require('method-override'); //used to manipulate POST | |
router.use(bodyParser.urlencoded({ extended: true })) | |
router.use(methodOverride(function(req, res){ |
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
put(function(req, res) { | |
// Get our REST or form values. These rely on the "name" attributes | |
var email = req.body.email; | |
var password = req.body.password; | |
var servico = req.body.servico; | |
//find the document by ID | |
mongoose.model('Email').findById(req.id, function (err, email) { | |
//update it | |
email.update({ |
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
var request = require('request'); | |
function(req, res) { | |
request.get('http://api.openweathermap.org/data/2.5/weather?q=Viseu,pt', function(err, response, body) { | |
if (!err && response.statusCode == 200) { | |
var locals = JSON.parse(body); | |
res.render('index', locals); | |
} | |
} | |
} |
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> | |
<head> | |
<link href="http://s3.amazonaws.com/codecademy-content/courses/ltp/css/shift.css" rel="stylesheet"> | |
<link rel="stylesheet" href="http://s3.amazonaws.com/codecademy-content/courses/ltp/css/bootstrap.css"> | |
<link rel="stylesheet" href="main.css"> | |
</head> |
NewerOlder