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
const cluster = require('cluster'); | |
const numCPUs = require('os').cpus().length; | |
const express = require('express'); | |
const app = express(); | |
module.exports = app; | |
cluster.on('exit', (worker, code, signal) => { | |
console.log(`Worker ${worker.process.pid} died with code: ${code}, and signal: ${signal}`); | |
console.log('Starting a new worker'); |
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 script = document.createElement("SCRIPT"); | |
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'; | |
script.type = 'text/javascript'; | |
script.onload = function() { | |
var $ = window.jQuery; | |
// Use $ here... | |
}; | |
document.getElementsByTagName("head")[0].appendChild(script); |
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
function promessa() { | |
return new Promise(function (resolve, reject) { | |
setTimeout(function () { | |
resolve('PROMESSA CONCLUIDA') | |
}, 5000) | |
}) | |
} | |
var mensagem = promessa(); | |
console.log('Depois do Call da Promise') |
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
/* Usado para validar o filtro de busca antes do ajax */ | |
/* Caso o 'filtroIsVazio == false', o codigo pode realizar cosulta, caso contrario, exiba uma mensagem de alerta para preencher o filtro */ | |
var filtroIsVazio = true; | |
for (var [key, value] of Object.entries(filtroObject)) { | |
if (value !== null && value !== undefined) { | |
if (value.trim() != '') { | |
filtroIsVazio = false; | |
} |
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
sp_configure 'show advanced options', 1; | |
GO | |
RECONFIGURE; | |
GO | |
sp_configure 'Ole Automation Procedures', 1; | |
GO | |
RECONFIGURE; | |
GO | |
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> | |
<header> | |
<meta charset="UTF-8"> | |
<title>APP WEB</title> | |
<link rel="manifest" href="manifest.json"> | |
<!-- Add to homescreen for Chrome on Android --> | |
<meta name="mobile-web-app-capable" content="yes"> | |
<meta name="theme-color" content="#e91e63"> | |
<link rel="icon" sizes="192x192" href="img/angular.png"> |
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
(function (angular) { | |
var undefined; | |
angular.module("ui.materialize", ["ui.materialize.ngModel", "ui.materialize.collapsible", "ui.materialize.toast", "ui.materialize.sidenav", "ui.materialize.material_select", "ui.materialize.dropdown", "ui.materialize.inputfield", "ui.materialize.input_date", "ui.materialize.tabs", "ui.materialize.pagination", "ui.materialize.pushpin", "ui.materialize.scrollspy", "ui.materialize.parallax","ui.materialize.modal", "ui.materialize.tooltipped", "ui.materialize.slider", "ui.materialize.materialboxed", "ui.materialize.scrollFire", "ui.materialize.nouislider", "ui.materialize.input_clock", "ui.materialize.carousel"]); | |
/* example usage: | |
<div scroll-fire="func('Scrolled', 2000)" ></div> | |
*/ | |
angular.module("ui.materialize.scrollFire", []) | |
.directive("scrollFire", ["$compile", "$timeout", function ($compile, $timeout) { | |
return { |
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
<build> | |
<finalName>Gera-jar-executavel</finalName> | |
<plugins> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>exec-maven-plugin</artifactId> | |
<version>1.2.1</version> | |
<configuration> | |
<mainClass>PACOTE.CLASSEMAIN</mainClass> | |
</configuration> |
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
<html> | |
<head> | |
<title> | |
Criando requisição Ajax utilizando Javascript puro | |
</title> | |
</head> | |
<body> | |
<div> |
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
wget --mirror -p --convert-links http://getbootstrap.com/ |