###Collections Salas{_id} Reservas{_id, sala_id, data}
###Preciso contar as reservas de cada sala por uma data:
map = function () { emit(this.sala_id, [1]); }
###Collections Salas{_id} Reservas{_id, sala_id, data}
###Preciso contar as reservas de cada sala por uma data:
map = function () { emit(this.sala_id, [1]); }
/** | |
* ECMAScript 5 implementation of Python's range function. | |
* @see {@link http://docs.python.org/release/1.5.1p1/tut/range.html} | |
* @param {Number} start | |
* @param {Number} end | |
* @param {Number} step | |
* @return {Array} | |
*/ | |
Object.defineProperty(Array, "range", { | |
writable: false, configurable: false, enumerable: true, |
<?php | |
//The actual implementation is just this file. Others are usage and tests. | |
class TodoList extends ArrayObject | |
{ | |
const CREATE = 'CREATE TABLE IF NOT EXISTS tasks (name VARCHAR(32) PRIMARY KEY, status INT)'; | |
const SELECT = 'SELECT * FROM tasks'; | |
const INSERT = 'INSERT INTO tasks VALUES (?,?)'; | |
const UPDATE = 'UPDATE tasks SET status = ? WHERE name = ?'; |
<?php | |
require_once 'PHPUnit/Framework/TestCase.php'; | |
require_once 'businessDays.php'; | |
/** | |
* businessDays() test case. | |
*/ | |
class BusinessDaysTest extends PHPUnit_Framework_TestCase { | |
protected function setUp() { | |
parent::setUp(); |
[IPFilter("192.168.0.0/24")] | |
public class HomeController : Controller | |
{ | |
public ActionResult Index() | |
{ | |
return View(); | |
} | |
} |
#!/bin/bash | |
if [ $EUID != 0 ]; then | |
echo 'Você precisa ser root para instalar certificados.' | |
exit $? | |
fi | |
# Diretório onde os certificados serão instalados | |
cert_path=`openssl version -d|sed 's/.*\"\(.*\)\"/\1/g'`/certs | |
# Path para o certificado da Cielo |
var gulp = require('gulp'); | |
var webpack = require('gulp-webpack'); | |
var ts = require('gulp-typescript'); | |
var ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
var dnx = require("gulp-dnx"); | |
gulp.task('webpack', function(){ | |
return gulp.src('./src/client/main.ts') | |
.pipe(webpack({ | |
output:{ |
git rebase --interactive HEAD~2 | |
# we are going to squash c into b | |
pick b76d157 b | |
pick a931ac7 c | |
# squash c into b | |
pick b76d157 b | |
s a931ac7 c |