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
import os | |
os.system('cls' if os.name == 'nt' else 'clear') | |
moedas_e_cedulas = (0.01,0.05,0.1,0.25,0.5,1,2,5,10,20,50,100,200) | |
def definir_valor_numerico_valido(mensageDeInput): | |
resultado = 0 | |
while(resultado == 0): | |
try: | |
resultado = round(float(input(mensageDeInput)), 2) |
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
public class MemoryMappedStream : IDisposable | |
{ | |
private bool disposedValue; | |
private readonly MemoryMappedFile _memoryMappedFile; | |
private MemoryMappedViewAccessor MemoryMappedViewAccessor { get; set; } | |
public bool IsMemoryNew | |
{ |
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
/// <summary> | |
/// Class to provide benchmark performance tests. | |
/// Dependency: This class needs to create .Config file | |
/// </summary> | |
public static class BenchmarkExtension | |
{ | |
/// <summary> | |
/// Query machine constants | |
/// </summary> | |
private const string QUERY_MACHINE = "SELECT * FROM Win32_Processor", |
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
/// <summary> | |
/// Classe com estruturas completas e estáveis para envio de E-mail | |
/// </summary> | |
public class MailSender | |
{ | |
/// <summary> | |
/// Login do SMTP | |
/// </summary> | |
[DebuggerBrowsable(DebuggerBrowsableState.Never)] | |
private readonly string _smptLogin; |
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
##Script para redefinir master page | |
Add-PSSnapin Microsoft.SharePoint.PowerShell | |
# get site collection | |
$site = Get-SPSite http://sharepoint-sitecollection | |
# get site in site collection | |
$web = Get-SPWeb http://sharepoint-subsite |
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
##Script para Deletar Listas corrompidas | |
Add-PSSnapin Microsoft.SharePoint.PowerShell | |
#Get the Web | |
$web = Get-SPWeb "<SharePoint-site-URL>" | |
#Get the corrupted List | |
$list = $web.lists["corrupted list name"] | |
#Set the AllowDeletion Flag to True | |
$list.AllowDeletion = $true |
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
DECLARE @TABLE_NAME AS VARCHAR(150) | |
SET @TABLE_NAME = 'TableName' | |
SELECT * FROM ( | |
SELECT | |
f.name constraint_name | |
,OBJECT_NAME(f.parent_object_id) referencing_table_name | |
,COL_NAME(fc.parent_object_id, fc.parent_column_id) referencing_column_name | |
,OBJECT_NAME (f.referenced_object_id) referenced_table_name |
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
######################################################################################################### | |
######################################################################################################### | |
############################### Author: Antonio Leonardo de Abreu Freire ################################ | |
#### Microsoft Certified ID: 13271836, vide https://www.youracclaim.com/users/antonioleonardo/badges #### | |
######################################################################################################### | |
## Update SharePoint Account Password on all Farm Layers: IIS, Windows Services and SharePoint Services # | |
######################################################################################################### | |
######################################################################################################### | |
########### Don't Forget this Script Premisses! The current user to execute this script needs: ########## | |
########### a)Belongs to Farm Administrator Group; ################### |
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
//Author: Antonio Leonardo de Abreu Freire, Microsoft Certified ID: 13271836 | |
using System; | |
using System.Web; | |
using System.Linq; | |
using System.Collections.Generic; | |
namespace ExtensionFunctions | |
{ | |
/// <summary> |
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
SET NOCOUNT ON; | |
DECLARE @name VARCHAR(MAX) | |
,@DBName SYSNAME | |
,@LogicalLogFile SYSNAME | |
,@SQL_CMD_ALTER_0 VARCHAR(MAX); | |
DECLARE clear_logs_cursor CURSOR FOR | |
SELECT name FROM master.dbo.sysdatabases | |
WHERE name NOT IN ('master','model','msdb','tempdb'); |