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
set transaction isolation level read uncommitted | |
SELECT TOP 20 | |
st.text as [SQL] | |
, cp.cacheobjtype | |
, cp.objtype | |
, COALESCE(DB_NAME(st.dbid), db_name(cast(pa.value as int))+ '*', 'Resource') as DataBaseName | |
, cp.usecounts as [Plan Usage] | |
, qp.query_plan | |
from sys.dm_exec_cached_plans cp |
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
--==================================================================== | |
-- DAC Connection em caso de emergência e o banco ficar travado, o usuário Admin não trava -- | |
--==================================================================== | |
/* | |
sp_configure 'remote admin connections', 1; | |
GO | |
RECONFIGURE; | |
GO | |
*/ |
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
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
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="pt-br"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>GetUserMedia HTML5 with Photo :D Smile!</title> | |
</head> | |
<body> | |
<button id="takePicture">Sorria! e clique</button><br /> | |
<video id="videoWebCamera"></video> | |
<canvas id="canvas" style="display:none;"></canvas> |
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
sp_configure 'show advanced options', 1; | |
GO | |
RECONFIGURE; | |
GO | |
sp_configure 'Ad Hoc Distributed Queries', 1; | |
GO | |
RECONFIGURE; | |
GO | |
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1 | |
GO |
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
function ValidException(number, message) { | |
this.message = message; | |
this.name = "Teste prático"; | |
this.number = number; | |
} | |
function LogicException(number, message) { | |
this.message = message; | |
this.name = "Teste prático"; | |
this.number = number; |
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
with TotalSolicitacoes as (select * from cesuh.tb_solicitacao sol where | |
((:DE IS NULL) OR | |
(TRUNC(sol.DT_SOLICITACAO) >= TO_DATE(:DE, 'DD/MM/YYYY') AND | |
TRUNC(Sol.DT_SOLICITACAO) <= TO_DATE(:ATE,'DD/MM/YYYY'))) | |
AND ((sol.CD_DIRETORIA = :CD_DIRETORIA) or (:CD_DIRETORIA is null))) | |
, | |
TotalAtestadosEnsinoFund as (select Count(1) Qtd from TotalSolicitacoes where cd_tipo_documento = 3 and (CD_TIPO_ENSINO = 1)) | |
, | |
TotalAtestadoEnsinoMedio as (select Count(1) Qtd from TotalSolicitacoes where cd_tipo_documento = 3 and CD_TIPO_ENSINO = 2) | |
, |
NewerOlder