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
let elements = document.querySelectorAll('table'); | |
for (let elem of elements) { console.log(elem.innerHTML);} |
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
using System; | |
using System.ComponentModel.DataAnnotations; | |
using System.ComponentModel.DataAnnotations.Schema; | |
namespace Models | |
{ | |
public interface IAuditoria | |
{ | |
DateTime? DataCriacao {get; set;} | |
string LoginCriacao {get; set;} |
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
/* Removendo cabeçalho e rodapé automático de impressão */ | |
@page { | |
margin: 0; | |
} | |
body { | |
color: #000; | |
background-color: #fff; | |
} |
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
@media print { | |
body > *:not(#container) { | |
display: none; | |
} | |
body:after { | |
content: str-insert($string: "Para imprimir é necessário utilizar o botão em tela", $insert: "", $index: 0); | |
} | |
} |
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
/****** Object: UserDefinedFunction [dbo].[GetNumeric] Script Date: 11/04/2019 11:51:55 ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE FUNCTION [dbo].[GetNumeric] | |
(@strAlphaNumeric VARCHAR(256)) | |
RETURNS VARCHAR(256) |
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
SELECT SchemaName = c.table_schema, | |
TableName = c.table_name, | |
ColumnName = c.column_name, | |
DataType = data_type, | |
Validate = 'SELECT TOP 1 ' + c.column_name + ' FROM ' + c.table_name | |
FROM information_schema.columns c | |
INNER JOIN information_schema.tables t | |
ON c.table_name = t.table_name | |
AND c.table_schema = t.table_schema | |
AND t.table_type = 'BASE TABLE' |
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
--Maiores tabelas | |
SELECT | |
t.NAME AS Entidade, | |
p.rows AS Registros, | |
SUM(a.total_pages) * 8 AS EspacoTotalKB, | |
SUM(a.used_pages) * 8 AS EspacoUsadoKB, | |
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS EspacoNaoUsadoKB | |
FROM | |
sys.tables t | |
INNER JOIN |
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
-- Get ALTER TABLE Script for all tables to Enable all constraints for database | |
SELECT distinct 'ALTER TABLE [' + s.name + '].[' + o.name + '] WITH CHECK CHECK CONSTRAINT all' | |
FROM sys.foreign_keys i | |
INNER JOIN sys.objects o ON i.parent_object_id = o.OBJECT_ID | |
INNER JOIN sys.schemas s ON o.schema_id = s.schema_id | |
GO | |
-- Get ALTER TABLE Script for all tables to Disable all constraints for database | |
SELECT distinct 'ALTER TABLE [' + s.name + '].[' + o.name + '] NOCHECK CONSTRAINT all' |
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
Route::get('/laravellog', function () { | |
$file = storage_path() . DIRECTORY_SEPARATOR . 'logs' . DIRECTORY_SEPARATOR . 'laravel.log'; | |
$data = file($file); | |
$currentLine = count($data) - 1000; | |
if($currentLine < 0){ | |
$currentLine = 0; | |
} | |
while($currentLine <= count($data) - 1){ |
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
SELECT deqs.last_execution_time AS [Time], dest.text AS [Query], dest.* | |
FROM sys.dm_exec_query_stats AS deqs | |
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest | |
ORDER BY deqs.last_execution_time DESC |
NewerOlder