start new:
tmux
start new with session name:
tmux new -s myname
var itens = [ | |
'apple', | |
'grape', | |
'orange' | |
]; | |
itens | |
.join(',') | |
.replace(/(\w+(?!=\,))/g, '<li>\$1<\li>') | |
.split(','); |
# limpar memória do R | |
rm(list=ls(all=TRUE)) | |
# indicar diretório de trabalho | |
setwd('~/Documents/R-workspace/2013 tutorial microdados') | |
# mostrar até 8 casas decimais | |
options("scipen" = 8) | |
# listar arquivos do diretório de trabalho | |
dir() | |
# ---------------------------------------------- | |
# informações a serem retiradas da PNAD 2011 |
==> Upgrading opencv | |
Unsatisfied dependency: numpy | |
Homebrew does not provide Python dependencies; install with: | |
pip install numpy | |
brew remove opencv | |
/usr/local/share/python/pip install numpy | |
brew install tbb | |
brew install qt |
/** | |
* supplant() does variable substitution on the string. It scans through the string looking for | |
* expressions enclosed in { } braces. If an expression is found, use it as a key on the object, | |
* and if the key has a string value or number value, it is substituted for the bracket expression | |
* and it repeats. | |
* | |
* Written by Douglas Crockford | |
* http://www.crockford.com/ | |
*/ | |
String.prototype.supplant = function (o) { |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
// Javascript minification | |
min : { | |
code : { | |
'src' : [ | |
'public/js/file1.js', | |
'public/js/file2.js', | |
'public/js/file3.js' | |
], |
def is_even(num): | |
"Returns true iff num is even." | |
i = 0 | |
while i < num: | |
i += 2 | |
return i == num | |
def get_even_numbers(a, b): |
Object.defineProperty(Date.prototype,"diff",{ | |
writable: false, configurable: false, enumerable: true, | |
/** | |
* Returns the difference between two Date objects. | |
* @param {Date} The date to compare to. | |
* @return {Object} | |
* @throws {TypeError} | |
*/ | |
value: function(date) { |