towards enlightenment
‘It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts.’
sudo docker run -p 8080:3000 -v $(pwd):/home/security/Documents/projects/docker-source-monitor -w "/home/security/Documents/projects/docker-source-monitor" node npm start | |
> [email protected] start /home/security/Documents/projects/docker-source-monitor | |
> npm run watch | |
> [email protected] watch /home/security/Documents/projects/docker-source-monitor | |
> nodemon --watch ./src -e ts,ejs --exec "npm run compile && npm run views && npm run build" | |
sh: 1: nodemon: not found |
const curry = (fn) => { | |
if(typeof fn !== 'function') { | |
throw Error('No function provided'); | |
} | |
return function curriedFn(...args) { | |
if(args.length < fn.length) { | |
return function() { | |
return curriedFn.apply(null, args.concat([].slice.call(arguments))); | |
}; |
Function.prototype.method = function (name, func) { | |
this.prototype[name] = func; | |
return this; | |
}; |
$ = jquery = require('jquery'); | |
((win) => { | |
'use strict'; | |
var React = require('react'); | |
var ReactDom = require('react-dom'); | |
var Home = require('./component/homePage'); |
module.exports = CodeMachine = function (coffee) { | |
if (coffee instanceof Coffee) { | |
throw new TypeError('CodeMachine needs coffee to work') | |
} | |
var linesOfCode = [] | |
for (var i = 0, end = Math.random() * 1000; i < end; i++) { | |
var line = [] |
Below are many examples of function hoisting behavior in JavaScript. Ones marked as works
successfuly print 'hi!' without errors.
To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js
(I may be using incorrect terms below, please forgive me)
controllers.controller('ListaImoveisCtrl', function($rootScope, $scope, $ionicPlatform, $location, $timeout, $ionicLoading, $cordovaSQLite, $stateParams, imoveisService) { | |
$scope.$on('$ionicView.enter', function () { | |
imoveisService.getImoveis(imoveisService.formData).success(function (imoveis) { | |
if (!imoveis || !imoveis.length) { | |
throw new Error('Algo deu errado ao tentar carregar informações de imóveis.'); | |
} | |
$scope.imoveis = imoveis | |
if ($stateParams.idAtendimento == undefined) { |